/* ═══════════════════════════════════════════════════
   STILE PRINCIPALE — Chef Tommaso Sanguedolce
   Design editoriale di lusso (stile Kinfolk/Cereal)
   ═══════════════════════════════════════════════════ */

/* ───────── VARIABILI & TOKEN DI DESIGN ───────── */
:root {
    /* Palette crema/bronzo — luce mediterranea */
    --bg-primary: #faf8f4;
    --bg-secondary: #f2ede5;
    --bg-dark: #252018;
    /* leggermente più caldo/morbido del nero puro */
    --bg-dusk: #3a3228;
    /* sfondo intermedio per sezioni di transizione */
    --text-primary: #1e1c18;
    --text-secondary: #5a5550;
    --text-light: #8a8580;
    --accent: #9b7d55;
    /* bronzo un tono più luminoso */
    --accent-soft: #d4c4a8;
    /* sabbia chiara invece del bronzo spento */
    --accent-warm: #c8a87a;
    /* oro caldo per i CTA di rilievo */
    --white: #ffffff;
    --border: rgba(155, 125, 85, 0.15);

    /* Tipografia */
    --font-heading: 'Cormorant Garamond', 'Georgia', serif;
    --font-body: 'Inter', 'Helvetica Neue', sans-serif;

    /* Spaziatura generosa — il vuoto è lusso */
    --section-py: 5rem;
    /* Ridotto da 8rem per coesione */
    --section-px: clamp(1.5rem, 5vw, 6rem);

    /* Transizioni organiche */
    --ease-organic: cubic-bezier(0.23, 1, 0.32, 1);
    --duration: 0.6s;
    --duration-fast: 0.35s;
}

/* ───────── RESET & BASE ───────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    /* Compensa la navbar sticky */
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.85;
    overflow-x: hidden;
}

/* NOISE OVERLAY — Effetto Grana */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9000;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Utilità per Alpine.js x-cloak */
[x-cloak] {
    display: none !important;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Anti-aliasing su tutto il testo */
.antialiased {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* ───────── TIPOGRAFIA GLOBALE ───────── */
.section-eyebrow {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.section-heading {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 300;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.section-heading em {
    font-style: italic;
    font-weight: 400;
}


/* ═══════════════════════════════════════════════════
   NAVIGAZIONE ETEREA
   ═══════════════════════════════════════════════════ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    padding: 1.5rem var(--section-px);
    transition: padding var(--duration) var(--ease-organic);
    /* Soft protection: gradiente leggero dall'alto per agevolare il contrasto del testo scuro sulla foto */
    background: linear-gradient(to bottom, rgba(250, 248, 244, 0.4) 0%, rgba(250, 248, 244, 0) 100%);
}

.navbar::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0;
    background: rgba(248, 246, 242, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: opacity var(--duration) var(--ease-organic);
}

/* Stato scrollato — blur di sfondo */
.navbar.scrolled {
    padding: 1rem var(--section-px);
}

.navbar.scrolled::before {
    opacity: 1;
}

/* Quando il menu mobile è aperto, rimuovi il blur dello sfondo e rendi la barra trasparente */
.navbar.menu-open::before {
    opacity: 0 !important;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
}

/* Logo nella navbar */
.nav-logo {
    display: flex;
    align-items: center;
    transition: opacity var(--duration-fast) var(--ease-organic);
}

.nav-logo-testo {
    display: none;
}

/* Ritratti Mobile (da mostrare solo su smartphone) */
.portrait-mobile-visione,
.portrait-mobile-drawer {
    display: none;
}

/* Visibilità citazioni e testi mobile/desktop */
.mobile-quote { display: none; }
.desktop-quote { display: block; }
@media (max-width: 768px) {
    .mobile-quote { display: block; }
    .desktop-quote { display: none; }
    .desktop-text { display: none; }
}

.nav-logo:hover {
    opacity: 0.7;
}

/* Icona simbolo S/T — bianco sull'hero, colori originali dopo lo scroll */
.nav-logo-img {
    height: 56px;
    width: auto;
    /* Rimosso filtro brightness(0) invert(1) per mantenere il logo originale scuro/brand */
    transition: filter var(--duration) var(--ease-organic),
        opacity var(--duration-fast) var(--ease-organic);
}

/* Scrolled: torna ai colori originali del brand */
.navbar.scrolled .nav-logo-img {
    filter: none;
}

/* Menu aperto sul mobile: forza il logo a essere bianco per visibilità sul fondo scuro */
.navbar.menu-open .nav-logo-img {
    filter: brightness(0) invert(1) !important;
}

/* Links con animazione underline dal centro */
.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    margin-top: -6px;
    /* Sposta le voci leggermente più su rispetto al logo */
}

.nav-link {
    font-family: var(--font-heading);
    /* Passato al font elegante (Cormorant Garamond) */
    font-size: 1.15rem;
    /* Ingrandito appena ancora per facilitare l'occhio */
    font-weight: 700;
    /* Utilizzo del nuovo peso Bold (700) per irrobustire notevolmente il tratto */
    letter-spacing: 0.12em;
    /* Leggerissima riduzione dello spazio per non disperdere la frase */
    text-transform: uppercase;
    color: #6a5335;
    /* Variante "Bronzo Scuro": stessa tonalità oro/terra di var(--accent), ma decisamente più scura ed incisiva */
    position: relative;
    padding: 0.3rem 0;
    text-shadow: 0 0 12px rgba(250, 248, 244, 0.9);
    /* Aura potenziata al 90% per farlo staccare benissimo */
    transition: color var(--duration-fast) var(--ease-organic), opacity var(--duration-fast) var(--ease-organic);
}

.nav-link:hover {
    opacity: 0.7;
    /* Leggerissima opacità elegante invece di alterare colori */
}

.navbar.scrolled .nav-link {
    color: var(--text-primary);
    text-shadow: none;
    /* L'ombra viene tolta quando il menu ha sfondo solido */
}

/* Underline animato: dal centro verso l'esterno */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width var(--duration-fast) var(--ease-organic),
        left var(--duration-fast) var(--ease-organic);
}

.nav-link:hover::after {
    width: 100%;
    left: 0;
}

/* Hamburger mobile */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--accent);
    transition: transform var(--duration-fast) var(--ease-organic),
        opacity var(--duration-fast) var(--ease-organic);
}

.navbar.scrolled .hamburger-line {
    background: var(--text-primary);
}

/* Quando il menu mobile è aperto (sfondo scuro), forza le linee dell'hamburger ad essere chiare per il contrasto */
.hamburger-line.open-top,
.hamburger-line.open-mid,
.hamburger-line.open-bot {
    background: var(--bg-primary) !important;
}

/* Animazione hamburger → X */
.hamburger-line.open-top {
    transform: translateY(6.5px) rotate(45deg);
}

.hamburger-line.open-mid {
    opacity: 0;
}

.hamburger-line.open-bot {
    transform: translateY(-6.5px) rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    inset: 0;
    /* Colore coprente solido scuro con blur */
    background: rgba(22, 20, 18, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration) var(--ease-organic);
    /* Innalzato z-index per coprire tutto, anche noise-overlay(9000) e back-to-top(1000) */
    z-index: 9999;
}

.mobile-menu--open {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu-links {
    list-style: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.mobile-link {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 500;
    color: var(--bg-primary);
    letter-spacing: 0.08em;
    transition: color var(--duration-fast) var(--ease-organic),
        transform var(--duration-fast) var(--ease-organic);
}

.mobile-link:hover {
    color: var(--accent-soft);
    transform: translateX(8px);
}


/* ═══════════════════════════════════════════════════
   HERO — L'ORIGINE
   ═══════════════════════════════════════════════════ */
.hero {
    position: relative;
    height: 100vh;
    height: 100svh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Immagine di sfondo con parallax */
.hero-parallax {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: -20%;
    background: url('foto/tom-chef-nuova-stretta.jpg') center center / cover no-repeat;
    will-change: transform;
    transition: none;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(10, 8, 5, 0.08) 0%,
            rgba(10, 8, 5, 0.08) 40%,
            rgba(10, 8, 5, 0.08) 70%,
            rgba(10, 8, 5, 0.08) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    /* Fa sì che il testo si appoggi sul lato sinistro */
    text-align: left;
    color: var(--accent);
    /* Allinea il blocco di testo con il contenitore della navbar */
    max-width: calc(1400px + 2 * var(--section-px));
    margin: 0 auto;
    /* Spinge il testo all'interno, verso il centro ma mantendo l'allineamento a sinistra.
       Usa calc() per sommare il var(--section-px) di base con un extra padding */
    padding-left: calc(var(--section-px));
    padding-right: var(--section-px);
}

.hero-label {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-name {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 7vw, 4.8rem);
    /* Più piccolo e armonioso */
    font-weight: 500;
    letter-spacing: 0.15em;
    /* Ancora più aria tra le lettere */
    text-transform: uppercase;
    line-height: 1.15;
    margin-bottom: 2rem;
    opacity: 1;
}

.hero-name em {
    font-style: normal;
    font-weight: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    font-weight: 700;
    letter-spacing: 0.12em;
    opacity: 0.95;
}

.hero-subtitle em {
    font-style: italic;
    font-weight: 700;
}

/* La scroll-line è stata rimossa per pulizia visiva (less is more). */
/* ═══════════════════════════════════════════════════
   VISIONE
   ═══════════════════════════════════════════════════ */
.section-visione {
    padding: var(--section-py) var(--section-px);
    background: var(--bg-primary);
}

.visione-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: center;
    max-width: 1200px;
    /* Ridotto per rimpicciolire l'insieme */
    margin: 0 auto;
    position: relative;
    padding: 2rem 0;
}

.visione-image-wrapper {
    position: relative;
    z-index: 1;
    width: 85%;
    /* Ridotta larghezza foto */
    aspect-ratio: 4 / 5;
    border-radius: 16px;
    overflow: hidden;
    margin-left: auto;
    /* La spinge verso il centro/destra per facilitare l'overlap interno */
    margin-right: -10%;
    /* Aiuta il posizionamento relativo */
}

/* Allineamento a sinistra della griglia per compensare il wrapper */
.visione-grid {
    grid-template-columns: 55% 45%;
}

.visione-image-wrapper {
    grid-column: 1;
    width: 100%;
    max-width: 500px;
    /* Limite massimo dimensione foto */
    margin: 0;
}

.visione-content-wrapper {
    grid-column: 2;
    position: relative;
    z-index: 2;
    margin-left: -35%;
    /* Sovrapposizione aggressiva */
    margin-right: 15%;
    /* Rientra dai bordi della foto/sezione */
}

.visione-box {
    background: var(--bg-secondary);
    padding: clamp(2rem, 3.5vw, 3rem);
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

/* Modifiche ai testi di visione */
.visione-quote {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 1.8vw, 1.4rem);
    font-style: italic;
    color: var(--accent);
    line-height: 1.4;
    margin-bottom: 2rem;
    opacity: 0.95;
    text-align: left;
}

.visione-text {
    text-align: left;
    margin-top: 1rem;
}

/* Responsive per visione-grid */
@media (max-width: 1024px) {
    .visione-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
        padding: 0;
    }

    .visione-image-wrapper {
        max-width: 100%;
    }

    .visione-content-wrapper {
        margin-left: 5%;
        margin-right: 5%;
        margin-top: -20%;
    }
}

@media (max-width: 768px) {
    .visione-content-wrapper {
        margin-top: -30%;
    }

    .visione-box {
        padding: 2.5rem 1.5rem;
    }
}

.visione-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-bottom: 0.2rem;
    background: none;
    border: none;
    border-bottom: 1px solid var(--accent);
    color: var(--accent);
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.visione-cta:hover {
    color: var(--white);
    border-color: var(--white);
    padding-left: 0.5rem;
}

/* ═══════════════════════════════════════════════════
   BIO DRAWER (Pannello Laterale)
   ═══════════════════════════════════════════════════ */
.bio-drawer {
    position: fixed;
    inset: 0;
    z-index: 11000;
    visibility: hidden;
    transition: visibility 0.5s;
}

.bio-drawer.active {
    visibility: visible;
}

.bio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.bio-drawer.active .bio-overlay {
    opacity: 1;
}

.bio-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 42vw;
    /* Più compatto e focalizzato */
    max-width: 800px;
    height: 100%;
    background: var(--bg-secondary);
    transform: translateX(100%);
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    /* Rallento leggermente per l'eleganza */
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    /* Ombra più morbida */
    display: flex;
    flex-direction: column;
}

@media (max-width: 1024px) {
    .bio-content {
        width: 65vw;
    }
}

@media (max-width: 768px) {
    .bio-content {
        width: 100%;
        max-width: 100%;
    }
}

.bio-drawer.active .bio-content {
    transform: translateX(0);
}

/* Indicatore swipe laterale (Handle) — sottile ed elegante */
@media (max-width: 768px) {
    .bio-content::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 8px;
        transform: translateY(-50%);
        width: 3px;
        height: 40px;
        background: var(--accent);
        border-radius: 10px;
        opacity: 0.3;
        z-index: 5;
    }
}

/* ═══════════════════════════════════════════════════
   BIO DRAWER - STILI CORRETTI PER SFONDO CHIARO
   ═══════════════════════════════════════════════════ */

.bio-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: rgba(250, 248, 244, 0.4); /* Sfondo leggero per contrasto */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--text-primary);
    border-radius: 50%;
    cursor: pointer;
    z-index: 100; /* Sopra tutto nel drawer */
    transition: all 0.3s var(--ease-organic);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bio-close:hover {
    background: var(--bg-primary);
    border-color: var(--accent);
    transform: rotate(90deg);
}

.bio-close::before,
.bio-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 1px;
    background: var(--text-primary);
    /* X scura */
    transition: background 0.3s ease;
}

.bio-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.bio-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.bio-close:hover::before,
.bio-close:hover::after {
    background: var(--accent);
}

.bio-body {
    padding: 6rem 5.5vw 4rem 5.5vw;
    /* Ridotto: più spazio al contenuto */
    overflow-y: auto;
    height: 100%;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-secondary);
}

/* Contenitore interno per limitare la lunghezza delle righe */
.bio-body>* {
    max-width: 75ch;
    /* Aumentato leggermente per sfruttare lo spazio */
    margin-left: auto;
    margin-right: auto;
}

.bio-body::-webkit-scrollbar {
    width: 4px;
}

.bio-body::-webkit-scrollbar-thumb {
    background: var(--accent);
}

.bio-eyebrow {
    font-family: var(--font-body);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    color: var(--accent);
    display: block;
    margin-bottom: 1rem;
    font-weight: 600;
}

.bio-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 3rem;
    color: var(--text-primary);
    /* Titolo scuro */
}

.bio-text-block {
    margin-bottom: 3.5rem;
}

.bio-text-block h3 {
    font-family: var(--font-body);
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 0.15em;
    color: var(--accent);
    /* Bronzo */
    margin-bottom: 1rem;
    border-left: 2px solid var(--accent);
    padding-left: 1rem;
    font-weight: 600;
}

.bio-text-block p {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
}

.visione-text p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 1.8rem;
    line-height: 1.85;
}

@media (max-width: 768px) {
    .bio-body {
        padding: 5rem 2rem 2rem 2rem;
    }

    .bio-title {
        font-size: 2.5rem;
    }

    .visione-quote {
        margin-bottom: 1.4rem;
        line-height: 1.45;
        font-size: 1.25rem;
    }

    .visione-text p {
        font-size: 1.1rem;
        line-height: 1.65;
        margin-bottom: 1.2rem;
    }
}

/* Drop Cap — Capolettera elegante */
.drop-cap::first-letter {
    float: left;
    font-family: var(--font-heading);
    font-size: 4.2rem;
    font-weight: 400;
    line-height: 0.8;
    color: var(--accent);
    margin-right: 0.6rem;
    margin-top: 0.15rem;
    padding-bottom: 0.1rem;
}


/* ═══════════════════════════════════════════════════
   I SERVIZI — THE HYBRID GRID
   ═══════════════════════════════════════════════════ */
.section-servizi {
    padding: var(--section-py) var(--section-px);
    background: var(--bg-secondary);
}

.servizi-header {
    text-align: center;
    margin-bottom: 3rem;
    /* Ridotto per stare in schermata */
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.servizi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Card servizio con immagine di sfondo */
.servizio-card {
    position: relative;
    height: 380px;
    /* Ridotto: più compatto, stile editorial */
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
    z-index: 1;
}

/* Immagine di sfondo — leggera oscurità per testi */
.servizio-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.85) contrast(1.05);
    transition: filter var(--duration) var(--ease-organic),
        transform 0.8s var(--ease-organic);
}

/* Gradiente per leggibilità testo (Sfumatura dal basso) */
.servizio-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(26, 24, 21, 0.85) 0%,
            rgba(26, 24, 21, 0.4) 45%,
            transparent 100%);
    transition: opacity var(--duration) var(--ease-organic);
}

/* Hover: luminosità naturale */
.servizio-card:hover .servizio-bg {
    filter: brightness(0.8);
    transform: scale(1.03);
}

.servizio-card:hover .servizio-bg::after {
    opacity: 0.9;
}

/* Contenuto testuale sovrapposto */
.servizio-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    padding: 2.5rem;
    color: var(--white);
    transition: transform var(--duration) var(--ease-organic);
}

.servizio-card:hover .servizio-content {
    transform: translateY(-5px);
}

.servizio-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3vw, 2.2rem);
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 0.8rem;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
}

.servizio-title em {
    font-style: italic;
    font-weight: 400;
    font-family: var(--font-heading);
}

.servizio-desc {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
    opacity: 0.85;
    max-width: 32ch;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1rem;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}


/* ═══════════════════════════════════════════════════
   MATERIA — Mosaic Gallery (Updated & Cleaned)
   ═══════════════════════════════════════════════════ */
.section-materia {
    padding: var(--section-py) var(--section-px);
    background: var(--bg-primary);
}

.materia-header {
    text-align: center;
    margin-bottom: 3rem;
}

/* ── Griglia Masonry Reale ── */
.materia-mosaic {
    column-count: 4;
    column-gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}



/* Cella Masonry */
.mosaic-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    break-inside: avoid;
    transition: filter 0.6s var(--ease-organic), transform 0.6s var(--ease-organic);
}

.mosaic-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.8s var(--ease-organic);
}

.mosaic-item:hover {
    z-index: 2;
    filter: brightness(1.05);
}

.mosaic-item:hover img {
    transform: scale(1.04);
}


/* Overlay per indicare interattività (molto più leggero di prima) */
.mosaic-overlay {
    position: absolute;
    inset: 0;
    background: rgba(40, 36, 31, 0.15);
    /* Appena percettibile */
    opacity: 0;
    transition: opacity 0.5s var(--ease-organic);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* Icona zoom elegantissima */
.mosaic-overlay::after {
    content: '';
    /* Nessun '+', usiamo un dot o cerchio vuoto elegante */
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.4s var(--ease-organic), transform 0.4s var(--ease-organic);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.mosaic-item:hover .mosaic-overlay {
    opacity: 1;
}

.mosaic-item:hover .mosaic-overlay::after {
    opacity: 1;
    transform: scale(1);
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 1100px) {
    .materia-mosaic {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .materia-mosaic {
        column-count: unset;
        display: flex;
        gap: 1rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding: 0 var(--section-px);
        padding-bottom: 1.5rem;
        /* Nasconde la scrollbar per un look pulito */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .materia-mosaic::-webkit-scrollbar {
        display: none;
    }

    .mosaic-item {
        flex: 0 0 75vw;
        width: 75vw !important; /* Fissa la larghezza per poter calcolare altezza */
        scroll-snap-align: center;
        margin-bottom: 0;
        border-radius: 12px;
        /* Metodo blindato per mantenere 3:4 su vecchi e nuovi mobile */
        height: 0;
        padding-top: 133.33%; /* 4 diviso 3 */
        position: relative;
        overflow: hidden;
    }

    .mosaic-item img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover !important;
        /* Tiene il soggetto centrato durante il ritaglio */
        object-position: center;
    }
}


/* ═══════════════════════════════════════════════════
   CONTACT — IL DIALOGO
   ═══════════════════════════════════════════════════ */
.section-dialogo {
    padding: var(--section-py) var(--section-px);
    background: #ede5d8;
    /* Crema caldo — luce pomeridiana pugliese */
    color: var(--text-primary);
}

.dialogo-container {
    max-width: 42rem;
    margin: 0 auto;
    text-align: center;
}

.dialogo-container .section-eyebrow {
    color: var(--accent);
}

.dialogo-container .section-heading {
    color: var(--text-primary);
}

.dialogo-text {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

/* CTA testuale — non sembra un bottone, ma un invito */
.dialogo-cta {
    margin-bottom: 3rem;
}

.cta-invito {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 300;
    letter-spacing: 0.06em;
    color: var(--accent);
    position: relative;
    display: inline-block;
    padding-bottom: 4px;
    transition: color var(--duration-fast) var(--ease-organic);
}

.cta-invito::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0.3);
    transform-origin: left;
    transition: transform var(--duration) var(--ease-organic);
}

.cta-invito:hover {
    color: var(--text-primary);
}

.cta-invito:hover::after {
    transform: scaleX(1);
    background: var(--text-primary);
}

.dialogo-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.dialogo-info p {
    font-size: 0.85rem;
    font-weight: 300;
    color: rgba(248, 246, 242, 0.4);
    letter-spacing: 0.05em;
}


/* ═══════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════
   FOOTER - 3 COLONNE EDITORITALE
   ═══════════════════════════════════════════════════ */
.site-footer {
    background: #b5a48e;
    /* Sabbia scuro — un tono sotto il crema del dialogo */
    color: #1e1c18;
    /* Testo scuro per contrasto leggibile */
    padding: 6rem var(--section-px) 4rem;
    font-size: 0.95rem;
    border-top: 1px solid rgba(100, 80, 55, 0.15);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 4rem;
}

/* Colonna 1: Brand */
.footer-logo {
    height: 48px;
    width: auto;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.footer-desc {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2.5rem;
    max-width: 300px;
}

.footer-location {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

.footer-location span {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    color: var(--accent);
}

/* Colonne Navigazione & Social */
.footer-heading {
    font-family: var(--font-body);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 2rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-social {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
}

.social-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: var(--accent);
    transform: translateX(5px);
}

.footer-bottom-info {
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0.6;
}

.legal-link {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.2);
}

/* Footer Responsive */
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-brand {
        margin-bottom: 1rem;
    }
}


/* ═══════════════════════════════════════════════════
   AOS — Sovrascritture per animazioni più organiche
   ═══════════════════════════════════════════════════ */
[data-aos] {
    transition-timing-function: var(--ease-organic) !important;
}


/* ═══════════════════════════════════════════════════
   RESPONSIVE (Tablet — max 1024px)
   ═══════════════════════════════════════════════════ */
@media (max-width: 1024px) {

    /* Scorrimento orizzontale stile swipe per iPad e Mobile */
    .servizi-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1.5rem;
        padding-bottom: 1.5rem;
        /* Spazio per l'ombra o respiro visivo */

        /* Nasconde la scrollbar estetica originaria del browser */
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .servizi-grid::-webkit-scrollbar {
        display: none;
    }

    .servizio-card {
        /* Larghezza fissa per far spuntare l'inizio della card successiva (circa l'80% o 85%) */
        flex: 0 0 82%;
        scroll-snap-align: center;
        height: 420px;
        /* Altezza adeguata per l'aspetto "Portrait" editoriale */
    }


}


/* ═══════════════════════════════════════════════════
   RESPONSIVE (Mobile — max 768px)
   ═══════════════════════════════════════════════════ */
@media (max-width: 768px) {
    :root {
        --section-py: 5rem;
    }

    /* Navbar: mostra hamburger, nascondi link desktop */
    .nav-links {
        display: none;
    }

    .nav-hamburger {
        display: flex;
    }

    .nav-logo-testo {
        display: none; /* Nascosto di base su mobile per evitare ridondanza in Home */
        font-family: var(--font-heading);
        font-size: 0.95rem;
        font-weight: 600;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: inherit; /* Segue il colore del link/logo active */
        margin-left: 1rem;
        white-space: nowrap;
    }

    /* Navbar più sottile on scroll nel mobile */
    .navbar.scrolled {
        padding: 0.8rem var(--section-px);
    }
    
    .navbar.scrolled .nav-logo-img {
        height: 44px; /* Ridotto da 56px */
    }

    .navbar.scrolled .nav-logo-testo {
        display: block; /* Appare solo dopo lo scroll (fuori dalla Home top) */
        font-size: 0.85rem;
    }

    /* Logo bianco quando il menu mobile scuro è aperto */
    .navbar.menu-open .nav-logo-testo {
        display: block !important;
        color: var(--white) !important;
    }

    /* Drawer: Titolo e X non coperti dalla barra o troppo alti */
    .bio-content {
        padding-top: 0; 
    }
    
    .bio-close {
        top: 1.5rem;
        right: 1.5rem;
        border-color: var(--text-primary);
    }

    .bio-body {
        padding-top: 4rem; 
    }

    /* Styling Ritratti Mobile */
    .portrait-mobile-visione {
        display: block;
        width: 180px;
        height: 180px;
        margin: 0 auto 2.5rem;
        border-radius: 50%;
        overflow: hidden;
        border: 1px solid var(--border);
        box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    }

    .portrait-mobile-drawer {
        display: block;
        width: calc(100% + 11vw); /* Estendi per coprire il padding del bio-body se serve, o tieni allineato */
        margin: -4rem -5.5vw 2.5rem -5.5vw; /* Negativo per farlo partire dalla cima del drawer */
        height: 350px;
        overflow: hidden;
        border-bottom: 1px solid var(--border);
        border-top: 1px solid var(--border);
    }

    .portrait-mobile-visione img,
    .portrait-mobile-drawer img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center 25%;
    }

    /* Riduzione padding bio-body se c'è immagine drawer per non avere troppa aria */
    .portrait-mobile-drawer + .bio-eyebrow {
        margin-top: 1rem;
    }

    /* Hero: foto d'azione per mobile — sfondo scuro, testo leggibile */
    .hero-parallax {
        background-image: url('foto/chef-plating-premium.jpg');
        background-position: center center;
    }

    .hero-overlay {
        background: linear-gradient(to top,
                rgba(10, 8, 5, 0.70) 0%,
                rgba(10, 8, 5, 0.45) 40%,
                rgba(10, 8, 5, 0.25) 70%,
                rgba(10, 8, 5, 0.15) 100%);
    }

    .hero-content {
        color: var(--white);
        text-align: center;
        padding-left: var(--section-px);
    }

    .hero-label {
        opacity: 0.85;
    }

    /* Hero: nome più piccolo */
    .hero-name {
        letter-spacing: 0.15em;
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    /* Footer: colonna su mobile */
    .footer-inner {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    /* Ottimizzazione Card Servizi per Mobile */
    .servizio-content {
        padding: 1.5rem;
    }

    .servizio-title {
        font-size: 1.65rem !important;
        margin-bottom: 0.5rem;
    }

    .servizio-desc {
        font-size: 0.88rem;
        padding-top: 0.8rem;
        max-width: 100%;
    }
}


/* ═══════════════════════════════════════════════════
   LIGHTBOX POPUP
   ═══════════════════════════════════════════════════ */
.lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--ease-organic);
}

.lightbox-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    transform: scale(0.95);
    transition: transform 0.4s var(--ease-organic);
}

.lightbox-modal.active .lightbox-content {
    transform: scale(1);
}

.lightbox-content img {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    border-radius: 2px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10001;
}

.lightbox-close::before,
.lightbox-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 1px;
    background: var(--white);
    transition: transform 0.3s ease;
}

.lightbox-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.lightbox-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.lightbox-close:hover::before,
.lightbox-close:hover::after {
    background: var(--accent);
    transform: translate(-50%, -50%) rotate(0deg);
    /* Effetto + al passaggio */
}


/* ═══════════════════════════════════════════════════
   RESPONSIVE (Mobile piccolo — max 480px)
   ═══════════════════════════════════════════════════ */
@media (max-width: 480px) {
    :root {
        --section-py: 4rem;
    }

    .hero-name {
        font-size: 2.4rem;
        letter-spacing: 0.1em;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .servizio-card {
        height: 320px;
    }

    .servizio-content {
        padding: 1.2rem;
    }

    .servizio-title {
        font-size: 1.5rem !important;
    }

    .servizio-desc {
        font-size: 0.82rem;
        line-height: 1.4;
    }

    .slider-item {
        flex: 0 0 85vw;
    }
}

/* ═══════════════════════════════════════════════════
   FOOTER - LUXURY MINIMALIST (NARROW)
   Sovrascrittura completa
   ═══════════════════════════════════════════════════ */
.site-footer {
    background: #6b5744; /* Bronzo scuro — il logo risalta perfettamente */
    color: var(--white);
    padding: 1.5rem var(--section-px) 0.8rem;
    font-size: 0.9rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    gap: 1.5rem 0.5rem;
    padding-bottom: 0.6rem;
    margin-bottom: 0.3rem;
}

/* SX */
.footer-block.block-nav {
    flex: 1;
    text-align: left;
}

.footer-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0rem;
    padding: 0;
    margin: 0;
}

.footer-nav-list a {
    font-family: var(--font-body);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #e8ddd0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-nav-list a:hover {
    color: var(--white);
}

/* CENTRO */
.footer-block.block-brand {
    flex: 0 0 auto;
    text-align: center;
}

.footer-logo {
    height: 180px;
    width: auto;
    opacity: 0.95;
}

/* P.IVA nel blocco contatti — font più piccolo */
.footer-piva {
    font-size: 0.72rem !important;
    color: #e8ddd0;
    margin-top: 0.1rem;
}

/* DX */
.footer-block.block-contact {
    flex: 1;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0rem;
}

.footer-link {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: #e8ddd0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--accent);
}

/* CREDITS */
.footer-credits {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.58rem;
    color: #e8ddd0;
    font-weight: 300;
    letter-spacing: 0.05em;
    width: 100%;
}

.footer-credits .credit-left {
    flex: 1;
    text-align: left;
}

.footer-credits .credit-center {
    flex: 1;
    text-align: center;
}

.footer-credits .credit-center span {
    font-size: 0.45rem;
}

.footer-credits .credit-right {
    flex: 1;
    text-align: right;
}

.footer-credits a {
    color: inherit;
    text-decoration: none;
}

/* Social Icons */
.footer-social-icons {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 0.3rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e8ddd0;
    transition: all 0.3s ease;
}

.social-icon svg {
    width: 18px;
    height: 18px;
}

.social-icon:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .site-footer {
        padding: 2rem var(--section-px) 1rem; 
    }

    .footer-container {
        /* Punto 4: griglia a due colonne. Logo occupa tutto, sotto nav a sx e contatti a dx */
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-areas: 
            "logo logo"
            "nav contact";
        gap: 1rem 0.5rem;
        align-items: start;
    }

    .footer-block.block-brand {
        grid-area: logo;
        text-align: center;
        /* Rimosso margine sotto per avvicinare le scritte al logo */
        margin-bottom: 0.5rem; 
        order: auto; /* Reset dell'order -1 */
    }

    .footer-logo {
        height: auto !important;
        width: 200px !important;
        max-width: 90%;
        margin: 0 auto;
        opacity: 0.95 !important;
    }

    .footer-block.block-nav {
        grid-area: nav;
        text-align: left;
        width: 100%;
        justify-content: flex-start;
    }

    .footer-block.block-contact {
        grid-area: contact;
        text-align: right;
        width: 100%;
        justify-content: flex-start;
    }

    .footer-nav-list {
        display: flex;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start;
        gap: 0.1rem !important;
    }

    /* Punto 1: schiarisci colori testi opacità (mobile) */
    .footer-nav-list a {
        font-size: 0.9rem !important;
        letter-spacing: 0.05em !important;
        color: #e8ddd0 !important;
        opacity: 1 !important;
    }

    .footer-contact-line {
        color: #e8ddd0 !important;
        text-align: right;
        font-size: 0.9rem;
        margin-bottom: 0;
        display: block;
    }

    .footer-social-icons {
        display: flex;
        flex-direction: row;
        gap: 1rem;
        align-items: center;
        justify-content: flex-end;
        margin-top: 1rem;
    }

    .social-icon {
        color: #e8ddd0 !important;
    }

    .social-icon svg {
        width: 20px;
        height: 20px;
        fill: none;
        stroke: currentColor;
    }
    
    .footer-credits {
        margin-top: 2rem;
        color: #e8ddd0 !important;
        /* Giustificati sinistra, centro, destra si auto-applicano da flex */
        font-size: 0.75rem;
    }

    .footer-credits a {
        color: #e8ddd0 !important;
        text-decoration: underline;
        font-weight: 300;
    }
    
    .footer-credits .credit-center span {
        font-weight: 300;
    }
}

/* Contatti Footer — Testo Puro */
.footer-contact-line {
    display: block;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: #e8ddd0;
    text-decoration: none;
    transition: color 0.3s ease;
}

a.footer-contact-line:hover {
    color: var(--accent);
}

/* ═══════════════════════════════════════════════════
   BACK TO TOP BUTTON
   ═══════════════════════════════════════════════════ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s var(--ease-organic);
    color: var(--accent);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
    transform: translateY(-5px);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}