/* ----------------------------------------------------
   FONT & VARIABLES
---------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;600&family=Inter:wght@300;400;500&display=swap');

:root {
    --bg-color: #F4F3F0;
    --bg-secondary: #E8E6E1;
    --text-main: #2A2A2A;
    --text-muted: #6B6B6B;
    --accent: #8C857B;
    --border-color: #D1CDC5;

    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Inter', sans-serif;

    --container-width: 1200px;
    --spacing-unit: 1.5rem;

    --transition: all 0.4s ease;
}

/* ----------------------------------------------------
   RESET
---------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
    object-fit: cover;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* ----------------------------------------------------
   TYPOGRAPHY
---------------------------------------------------- */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 400;
    color: var(--text-main);
}

.text-muted {
    color: var(--text-muted);
}

.text-serif {
    font-family: var(--font-serif);
}

/* ----------------------------------------------------
   LAYOUT
---------------------------------------------------- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
}

.section-padding {
    padding: 8rem 0;
}

.text-center {
    text-align: center;
}

/* ----------------------------------------------------
   HEADER & NAV
---------------------------------------------------- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.8rem 0;
    background: rgba(244, 243, 240, 0.85);
    backdrop-filter: blur(6px);
    z-index: 1000;
    transition: var(--transition);
}

header.scrolled {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text-main);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.6rem;
    cursor: pointer;
}

/* ----------------------------------------------------
   HERO
---------------------------------------------------- */
.hero {
    height: 90vh;
    display: flex;
    align-items: center;
    padding-top: 12vh;
    position: relative;
}

.hero-content {
    z-index: 2;
    max-width: 700px;
}

.hero-title {
    font-size: clamp(2.2rem, 6vw, 4.2rem);
    line-height: 1.15;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeUp 1s forwards 0.4s;
}


.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    opacity: 0;
    animation: fadeUp 1s forwards 0.7s;
}

.hero-image-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.22;
    object-fit: cover;
    mix-blend-mode: multiply;
}

/* ----------------------------------------------------
   PORTFOLIO GRID
---------------------------------------------------- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 4rem 2rem;
}

.project-card {
    cursor: pointer;
}

.project-image-wrapper {
    overflow: hidden;
    background: var(--bg-secondary);
    margin-bottom: 1.5rem;
}

.project-image {
    width: 100%;
    height: 100%;
    transition: transform 0.8s ease;
}

.project-card:hover .project-image {
    transform: scale(1.03);
}

.project-info h3 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.project-cat {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ----------------------------------------------------
   SERVICES
---------------------------------------------------- */
.services-list {
    margin-top: 4rem;
}

.service-item {
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    display: flex;
    justify-content: space-between;
}

.service-item:last-child {
    border-bottom: 1px solid var(--border-color);
}

.service-item:hover {
    padding-left: 2rem;
    background: rgba(255,255,255,0.4);
}

.service-title {
    font-size: 2.2rem;
}

/* ----------------------------------------------------
   ABOUT
---------------------------------------------------- */
.about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.about-img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    filter: grayscale(25%);
}

.quote {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-style: italic;
    border-left: 3px solid var(--accent);
    padding-left: 2rem;
    margin: 3rem 0;
}

/* ----------------------------------------------------
   CONTACT PAGE (NUOVA VERSIONE)
---------------------------------------------------- */
.contact-layout {
    display: flex;
    justify-content: center;
}

.contact-info {
    max-width: 600px;
    width: 100%;
}

.contact-info-block {
    margin-bottom: 3rem;
}

.contact-info-block h4 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.8rem;
}

.contact-link {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2px;
}

.contact-link:hover {
    border-bottom-color: var(--text-main);
}

.contact-box {
    margin-top: 4rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border-left: 3px solid var(--accent);
}

.contact-cta {
    display: inline-block;
    margin-top: 1rem;
    border-bottom: 1px solid var(--text-main);
}

.contact-cta:hover {
    transform: translateX(4px);
}

/* ----------------------------------------------------
   FOOTER
---------------------------------------------------- */
footer {
    background: var(--text-main);
    color: var(--bg-color);
    padding: 4rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
}

.footer-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.footer-links a {
    opacity: 0.7;
}

.footer-links a:hover {
    opacity: 1;
}

copyright {
    margin-top: 3rem;
    text-align: center;
    opacity: 0.5;
}

/* ----------------------------------------------------
   ANIMATIONS
---------------------------------------------------- */
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----------------------------------------------------
   RESPONSIVE
---------------------------------------------------- */
@media (max-width: 768px) {

    .nav-links {
        display: none;
        flex-direction: column;
        background: var(--bg-color);
        padding: 2rem;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .about-layout,
    .contact-layout {
        grid-template-columns: 1fr;
        display: block;
    }

    .about-img {
        height: 400px;
    }

    .service-item {
        flex-direction: column;
        gap: 1rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}
