:root {
    --bg-color: #fbfbfb;
    --text-color: #070707;
    --font-main: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --transition: 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    --padding-side: clamp(1.5rem, 6vw, 6rem);
}

/* --- BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; }
body { background-color: var(--bg-color); color: var(--text-color); font-family: var(--font-main); overflow-x: hidden; }
a { text-decoration: none; color: inherit; transition: 0.3s; }

/* --- HEADER & NAVIGATION --- */
header { 
    position: fixed; top: 0; left: 0; width: 100%; height: 90px; 
    background: rgba(251, 251, 251, 0.95); backdrop-filter: blur(10px); z-index: 2000; 
    display: flex; align-items: center; 
}
.header-inner { 
    width: 100%; max-width: 1800px; margin: 0 auto; padding: 0 var(--padding-side); 
    display: flex; justify-content: space-between; align-items: center; 
}
.site-logo { height: 13px; width: auto; z-index: 2100; }

/* NOTA LOGO: se il file logo_png.png è bianco, aggiungi questa riga qui sotto per farlo diventare nero in automatico: */
/* .site-logo { filter: invert(1); } */

nav ul { display: flex; gap: 2.5rem; list-style: none; }
nav ul li a { text-transform: uppercase; font-size: 0.7rem; letter-spacing: 2px; opacity: 0.4; }
nav ul li a.active { opacity: 1; border-bottom: 1px solid #070707; padding-bottom: 4px; }

/* Hamburger Menu */
.menu-toggle { display: none; flex-direction: column; gap: 7px; cursor: pointer; z-index: 2100; }
.menu-toggle span { display: block; width: 22px; height: 1px; background: #070707; transition: 0.3s; }

@media (max-width: 850px) {
    .menu-toggle { display: flex; }
    nav { 
        position: fixed; top: 0; right: -100%; width: 100%; height: 100vh; 
        background: #fbfbfb; display: flex; align-items: center; justify-content: center; 
        transition: var(--transition); z-index: 2000; 
    }
    nav.active { right: 0; }
    nav ul { flex-direction: column; align-items: center; gap: 3rem; }
    nav ul li a { font-size: 1.3rem; opacity: 1; }
    .menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* --- GRIDS (Forzato a 2 blocchi per riga) --- */
.main-content { 
    padding: 180px var(--padding-side) 100px; 
    max-width: 1800px; 
    margin: 0 auto; 
}

.grid-gallery { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr) !important; 
    gap: 70px 40px; 
}

@media (max-width: 700px) { 
    .grid-gallery { 
        grid-template-columns: 1fr !important; 
    } 
}

.project-container { display: flex; flex-direction: column; gap: 15px; width: 100%; }
.grid-item { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #eaeaea; overflow: hidden; display: block; }
.grid-media { width: 100%; height: 100%; object-fit: cover; transition: 0.8s ease; }
.project-role { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 1px; opacity: 0.5; }

/* Overlay chiaro per nomi */
.overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(251,251,251,0.85); opacity: 0; transition: 0.4s; }
.overlay h3 { text-transform: uppercase; letter-spacing: 3px; font-size: 0.8rem; color: #070707; }
.grid-item:hover .overlay { opacity: 1; }
.grid-item:hover .grid-media { transform: scale(1.05); }

/* Segments per Sagrasse (Chiari) */
.segments-container { position: absolute; inset: 0; display: flex; z-index: 10; }
.segment { flex: 1; display: flex; align-items: center; justify-content: center; background: rgba(251,251,251,0.85); transition: 0.4s; opacity: 0; }
.segment:hover { opacity: 1; }
.segment span { text-transform: uppercase; font-size: 0.7rem; letter-spacing: 1.5px; color: #070707; }

/* --- SINGLE PROJECT PAGE --- */
.single-project-page { padding-top: 90px; }
.project-video-hero { width: 100%; background: #fbfbfb; }
.project-description-container { max-width: 1200px; margin: 0 auto; padding: 100px var(--padding-side); display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }

@media (max-width: 900px) { .project-description-container { grid-template-columns: 1fr; gap: 40px; } }

.project-header-info h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); letter-spacing: -2px; line-height: 1; margin-bottom: 20px; text-transform: uppercase; }
.role-tag { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 2px; opacity: 0.5; }
.project-main-text p { font-size: 1.2rem; opacity: 0.8; line-height: 1.6; margin-bottom: 50px; }

/* Credits */
.project-credits { display: grid; grid-template-columns: 1fr; gap: 30px; border-top: 1px solid #e0e0e0; padding-top: 30px; }
.credit-item span { display: block; font-size: 0.6rem; text-transform: uppercase; letter-spacing: 2px; opacity: 0.5; margin-bottom: 5px; }

/* --- CONTACT PAGE --- */
.contact-page { padding: 180px var(--padding-side) 100px; max-width: 1400px; margin: 0 auto; min-height: 85vh; display: flex; align-items: center; }
.contact-container { display: grid; grid-template-columns: 1fr 1.2fr; gap: 100px; width: 100%; align-items: center; }
.contact-image img { width: 100%; height: auto; filter: grayscale(100%); }
.contact-text h1 { font-size: clamp(4rem, 8vw, 7.5rem); letter-spacing: -5px; margin-bottom: 2rem; line-height: 0.8; text-transform: uppercase; font-weight: bold; }
.bio { font-size: 1.3rem; opacity: 0.8; margin-bottom: 4rem; max-width: 480px; }
.contact-links { display: flex; flex-direction: column; gap: 4rem; }
.link-group span { display: block; font-size: 0.6rem; text-transform: uppercase; letter-spacing: 2px; opacity: 0.5; margin-bottom: 15px; }
.link-group a { font-size: clamp(1.5rem, 2.5vw, 2.2rem); border-bottom: 1px solid rgba(7,7,7,0.1); padding-bottom: 10px; font-weight: bold; }
.link-group a:hover { border-bottom-color: #070707; }

@media (max-width: 900px) { .contact-container { grid-template-columns: 1fr; text-align: center; } .bio { margin: 0 auto 3rem; } }

/* --- INSTAGRAM SECTION --- */
.instagram-section { padding: 120px var(--padding-side); border-top: 1px solid #e0e0e0; text-align: center; }
.section-title { 
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 4px; 
    margin: 0 auto 60px; opacity: 0.5; width: 100%; text-align: center; 
}

/* --- FOOTER --- */
footer { padding: 180px var(--padding-side) 100px; text-align: center; border-top: 1px solid #e0e0e0; }
.simple-year { font-size: 0.7rem; opacity: 0.5; text-transform: uppercase; letter-spacing: 5px; }