/* ==========================================================================
   FMR Eventi — foglio di stile principale
   Design system: Figma "FMR Eventi — Sito Web (Design per agenzia)"
   Bodoni Moda (titoli) · Jost (testi). Colori con contrasto WCAG 2.2 AA.
   ========================================================================== */

/* ---------- Font self-hosted (nessuna richiesta a terze parti) ---------- */
@font-face {
    font-family: "Bodoni Moda";
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url("../fonts/bodoni-moda-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Bodoni Moda";
    font-style: italic;
    font-weight: 400 900;
    font-display: swap;
    src: url("../fonts/bodoni-moda-italic-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Jost";
    font-style: normal;
    font-weight: 300 500;
    font-display: swap;
    src: url("../fonts/jost-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Token ---------- */
:root {
    /* Palette Figma "FMR / Colori" */
    --ink: #1e1a14;
    --espresso: #2c2418;
    --ivory: #f9f6f0;
    --linen: #f2ede3;
    --sand: #ede5d4;
    --gold: #c4a45a;          /* solo decorativo su chiaro, testo su scuro */
    --gold-deep: #826629;     /* design #9C7D3A, scurito per contrasto 5:1 su ivory */
    --text-body: #6b5d4f;
    --taupe: #76685a;         /* design #8B7B6B, scurito per contrasto 5:1 su ivory */
    --taupe-on-ink: #978a80;  /* luoghi testimonianze su ink, 5.2:1 */
    --stone: #b8a898;
    --stone-dark: #978a80;    /* design #7A6E65, schiarito per contrasto su ink */
    --white: #ffffff;
    --error: #a4452c;
    --line: rgba(139, 105, 20, 0.15);
    --line-strong: rgba(30, 26, 20, 0.35);

    --font-display: "Bodoni Moda", Georgia, "Times New Roman", serif;
    /* Bodoni più leggibile: peso 500 e optical size fisso (tratti sottili più spessi del default 96) */
    --display-weight: 500;
    --display-variation: "opsz" 24;
    --font-sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --gutter: clamp(1.5rem, 5.5vw, 5rem);
    --container: 80rem;         /* 1280px */
    --header-h: 5.5rem;         /* mobile 88px */
    --section-y: clamp(6rem, 11vw, 9rem);
    /* Indicatore di focus da tastiera: visibile (WCAG 2.4.7) ma delicato */
    --focus: 1px solid rgba(156, 125, 58, 0.45);

    /* Scala tipografica fluida: min (mobile 375px) → max (desktop 1440px+), in rem per rispettare lo zoom */
    --fs-xs: clamp(0.75rem, 0.7rem + 0.13vw, 0.8125rem);        /* 12 → 13: eyebrow, nav, label, legal */
    --fs-sm: clamp(0.8125rem, 0.77rem + 0.16vw, 0.875rem);      /* 13 → 14: bottoni, note, nomi */
    --fs-body: clamp(0.875rem, 0.83rem + 0.2vw, 1rem);          /* 14 → 16: Body */
    --fs-body-l: clamp(0.9375rem, 0.89rem + 0.22vw, 1.0625rem); /* 15 → 17: Body L */
    --fs-base: clamp(1rem, 0.96rem + 0.15vw, 1.0625rem);        /* 16 → 17: input, testo base */
    --fs-quote: clamp(1.0625rem, 1rem + 0.25vw, 1.25rem);       /* 17 → 20: Quote */
    --fs-md: clamp(1.125rem, 1.07rem + 0.2vw, 1.25rem);
    --fs-lg: clamp(1.1875rem, 1.1rem + 0.35vw, 1.4375rem);
    --fs-xl: clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem);
    --fs-h4: clamp(1.25rem, 1.16rem + 0.38vw, 1.625rem);
    --fs-h5: clamp(1.5rem, 1.38rem + 0.5vw, 1.875rem);
    --fs-num: clamp(2rem, 1.8rem + 0.8vw, 2.75rem);
    --fs-h3: clamp(1.6875rem, 1.58rem + 0.47vw, 2rem);          /* H3 27 → 32 */
    --fs-h2-s: clamp(1.75rem, 1.49rem + 1.13vw, 2.5rem);        /* H2 S 28 → 40 */
    --fs-h2: clamp(2rem, 1.6rem + 1.69vw, 3.125rem);            /* H2 32 → 50 */
    --fs-h2-xl: clamp(2.5rem, 2.1rem + 2.6vw, 4.5rem);          /* H2 XL 45 → 72 */
    --fs-display-s: clamp(2.5rem, 1.9rem + 4.4vw, 6rem);
    --fs-display: clamp(2.625rem, 1.5rem + 6.2vw, 7rem);        /* Display H1 47 (375) → 112 (1440) */
    --fs-quote-l: clamp(1.5rem, 1.24rem + 1.13vw, 2.25rem);
    --fs-quote-xl: clamp(1.625rem, 1.4rem + 1.5vw, 2.75rem);
}
@media (min-width: 1024px) {
    :root { --header-h: 10.625rem; } /* desktop 170px */
}

/* ---------- Reset essenziale ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
    /* Sfondo della "tela" scuro come il footer: nel rimbalzo elastico a fine pagina
       (trackpad macOS, iOS) non compare più una fascia chiara sotto il footer */
    background: var(--ink);
    overscroll-behavior-y: none;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 7rem;
}
body {
    margin: 0;
    background: var(--ivory);
    color: var(--ink);
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: var(--fs-base);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
address { font-style: normal; }
em, i { font-style: italic; }
strong { font-weight: 500; }
[hidden] { display: none !important; }
main:focus { outline: none; }
/* Elementi che ricevono il focus solo via script (titoli, messaggi): nessun contorno */
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }

/* ---------- Accessibilità ---------- */
.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
.skip-link {
    /* Visibile solo a chi naviga con il tasto Tab (WCAG 2.4.1) */
    position: fixed;
    top: 0.75rem;
    left: 50%;
    z-index: 1000;
    padding: 0.625rem 1.25rem;
    background: var(--ivory);
    color: var(--ink);
    border-bottom: 1px solid var(--gold);
    box-shadow: 0 6px 20px rgba(30, 26, 20, 0.12);
    font-weight: 500;
    font-size: var(--fs-xs);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    transform: translate(-50%, -300%);
    transition: transform 0.25s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); outline: none; }
.skip-link:not(:focus-visible) { transform: translate(-50%, -300%); }
:focus-visible { outline: var(--focus); outline-offset: 4px; }
.section--ink :focus-visible,
.site-footer :focus-visible,
.hero :focus-visible,
.header-transparent .site-header:not(.is-scrolled):not(.menu-open) :focus-visible { outline-color: rgba(196, 164, 90, 0.55); }

/* ---------- Tipografia (stili Figma) ---------- */
.testimonial__quote, .quote-feature blockquote, blockquote.quote-feature, .faq__q-text, .form-alert__title,
.prose h2, .cookie-banner__title, .features__num, .steps__num, .values__num, .contact__next span, .hero .display {
    font-weight: var(--display-weight);
    font-variation-settings: var(--display-variation);
}
.display, .display-s, .h2-xl, .h2-lg, .h2, .h2-s, .h3, .h4 {
    font-family: var(--font-display);
    font-weight: var(--display-weight);
    font-variation-settings: var(--display-variation);
    color: inherit;
    text-wrap: balance;
}
.display em, .display-s em, .h2-xl em, .h2-lg em, .h2 em, .h2-s em, .h3 em, h1 em, h2 em, h3 em { font-style: italic; }
.display   { display: block; font-size: var(--fs-display); line-height: 0.9; }     /* Display H1 112/100.8 · mobile 51/46 */
.display-s { font-size: var(--fs-display-s); line-height: 0.95; }
.h2-xl     { font-size: var(--fs-h2-xl); line-height: 1; }                   /* H2 XL (CTA) 72/72 · mobile 45/45 */
.h2-lg     { font-size: var(--fs-h2-xl); line-height: 0.97; }
.h2        { font-size: var(--fs-h2); line-height: 1.07; }               /* H2 50/53 · mobile 32/34 */
.h2-s      { font-size: var(--fs-h2-s); line-height: 1.07; }               /* H2 S 40/43 */
.h3        { font-size: var(--fs-h3); line-height: 1.08; }                 /* H3 32/34 · mobile 27/29 */
.h4        { font-size: var(--fs-h4); line-height: 1.2; }
.h2--light { color: var(--white); }

.eyebrow {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: var(--fs-xs);
    line-height: 1.5;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold-deep);
}
.eyebrow--small { font-size: var(--fs-xs); letter-spacing: 0.28em; }
.eyebrow--gold { color: var(--gold); }
.body-l { font-size: var(--fs-body-l); line-height: 1.85; letter-spacing: 0.025em; color: var(--text-body); }   /* Body L 15/27.75 */
.body-text { font-size: var(--fs-body); line-height: 1.8; letter-spacing: 0.025em; color: var(--text-body); } /* Body 14/25.2 */
.caption { font-size: var(--fs-xs); line-height: 1.5; letter-spacing: 0.2em; text-transform: uppercase; color: var(--taupe); font-weight: 300; }
.center { text-align: center; }

/* ---------- Layout ---------- */
.container {
    width: 100%;
    max-width: calc(var(--container) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
}
.container--wide { max-width: calc(var(--container) + var(--gutter) * 2); }
.container--narrow { max-width: calc(48rem + var(--gutter) * 2); }
.section { padding-block: var(--section-y); }
.section--flush-top { padding-top: 0; }
.section--flush-top-sm { padding-top: clamp(2rem, 4vw, 3rem); }
.section--ink { background: var(--ink); color: var(--white); }
.section--linen { background: var(--linen); }

.gold-bar {
    display: block;
    width: 42px;
    height: 1px;
    background: linear-gradient(90deg, var(--gold) 0%, rgba(196, 164, 90, 0) 100%);
}
.gold-bar--center { margin-inline: auto; margin-bottom: 2.75rem; }

.section-label { display: flex; flex-direction: column; gap: 2.25rem; margin-bottom: 1.75rem; }
.section-label--center { align-items: center; }
.section-label--center .gold-bar { background: linear-gradient(90deg, rgba(196, 164, 90, 0) 0%, var(--gold) 50%, rgba(196, 164, 90, 0) 100%); }
.section-label--dark .eyebrow { color: var(--gold); }

/* ---------- Bottoni e link ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.875rem;
    min-height: 3.5rem;
    padding: 1.1rem 2.75rem;
    border: 1px solid transparent;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: var(--fs-sm);
    line-height: 1.2;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.5s var(--ease), color 0.5s var(--ease), border-color 0.5s var(--ease);
}
.btn .icon { transition: transform 0.35s var(--ease); }
.btn:hover .icon { transform: translateX(4px); }
.btn--primary { background: var(--ink); color: var(--ivory); }
.btn--primary:hover { background: var(--gold-deep); }
.btn--outline-light { border-color: rgba(255, 255, 255, 0.7); color: var(--white); }
.btn--outline-light:hover { background: var(--white); color: var(--ink); }
.btn--outline-dark { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--outline-dark:hover { background: var(--ink); color: var(--ivory); }
.btn--small { min-height: 2.75rem; padding: 0.75rem 1.5rem; font-size: var(--fs-xs); letter-spacing: 0.18em; }
.button-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 3rem; }

.link-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    font-weight: 500;
    font-size: var(--fs-sm);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink);
}
.link-cta__arrow { transition: transform 0.35s var(--ease); }
a.link-cta:hover .link-cta__arrow, .service-card:hover .link-cta__arrow { transform: translateX(4px); }
a.link-cta:hover { text-decoration: underline; }

.link-button {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    color: var(--ink);
    transition: background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}
.site-header__bar {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 1rem 1.5rem;
}
.site-header__nav { display: none; }
.site-header__nav ul { display: flex; gap: 2.25rem; }
.site-header__nav--right ul { justify-content: flex-end; }
.nav-link {
    position: relative;
    font-weight: 500;
    font-size: var(--fs-xs);
    line-height: 1.5;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    padding-block: 0.5rem;
}
.nav-link::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0.25rem;
    width: 0; height: 1px;
    background: currentColor;
    transition: width 0.35s var(--ease);
}
.nav-link:hover::after, .nav-link[aria-current="page"]::after { width: 100%; }

.site-header__logo { display: block; justify-self: start; }
.site-header__logo-img {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: contain;
    transition: width 0.3s ease, height 0.3s ease, filter 0.3s ease;
}
.site-header__toggle {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-right: -0.5rem;
    border: 0;
    background: none;
    color: inherit;
}
.site-header__toggle-close { display: none; }
.site-header.menu-open .site-header__toggle-open { display: none; }
.site-header.menu-open .site-header__toggle-close { display: block; }

/* Stato "Solid" (pagine chiare) e dopo lo scroll */
.header-solid .site-header,
.site-header.is-scrolled {
    background: rgba(249, 246, 240, 0.96);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 1px 0 rgba(139, 105, 20, 0.12);
    color: var(--ink);
}
/* Stato "Transparent" sopra l'hero: testi e logo bianchi */
.header-transparent .site-header:not(.is-scrolled):not(.menu-open) { color: rgba(255, 255, 255, 0.92); }
.header-transparent .site-header:not(.is-scrolled):not(.menu-open) .site-header__logo-img { filter: brightness(0) invert(1); }

/* Menu mobile aperto: barra ink + pannello ivory */
.site-header.menu-open .site-header__bar { background: var(--ink); color: var(--white); }
.site-header.menu-open .site-header__logo-img { filter: brightness(0) invert(1); }
/* Menu mobile a schermo intero */
.site-header.menu-open {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
}
.mobile-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--ivory);
    padding: 1.5rem 1.5rem calc(2rem + env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    animation: slideDown 0.25s var(--ease);
}
html.menu-lock, html.menu-lock body { overflow: hidden; }
.mobile-menu a {
    display: block;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--line-strong);
    font-weight: 500;
    font-size: var(--fs-xs);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink);
}
.mobile-menu li:last-child a { border-bottom: 0; }
.mobile-menu ul a { font-size: var(--fs-sm); }
.mobile-menu__contacts { margin-top: auto; padding-top: 2.5rem; display: grid; gap: 0.25rem; }
.mobile-menu__contacts .eyebrow { margin-bottom: 0.5rem; }
.mobile-menu .mobile-menu__contacts a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0;
    border: 0;
    font-weight: 300;
    font-size: var(--fs-body-l);
    letter-spacing: 0.025em;
    text-transform: none;
    color: var(--text-body);
}
.mobile-menu__contacts .icon { color: var(--gold-deep); }
.mobile-menu a[aria-current="page"] { color: var(--gold-deep); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

@media (min-width: 1024px) {
    .site-header__bar {
        grid-template-columns: 1fr auto 1fr;
        padding: 1.25rem 3.5rem;
        transition: padding 0.3s ease;
    }
    .site-header__nav { display: block; }
    .site-header__logo { justify-self: center; margin-inline: 2.5rem; }
    .site-header__logo-img { width: 8.125rem; height: 8.125rem; }       /* 130px */
    .site-header.is-scrolled .site-header__bar { padding-block: 1.0625rem; }
    .site-header.is-scrolled .site-header__logo-img { width: 6rem; height: 6rem; } /* 96px */
    .site-header__toggle, .mobile-menu { display: none !important; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: max(42.5rem, 100svh);
    overflow: hidden;
    background: var(--espresso);
    color: var(--white);
    isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -1; }
.hero__video, .hero__img { width: 100%; height: 100%; object-fit: cover; }
.hero__img--top { object-position: 50% 30%; }
.hero__img--kenburns { animation: kenburns 20s ease-in-out infinite alternate; }
.hero__overlay {
    position: absolute;
    inset: 0;
    /* Velo minimo 54% + sfumatura: anche su un pixel bianco il testo bianco
       resta ≥ 4,5:1 (WCAG 1.4.3, testo piccolo di eyebrow e pulsante) */
    background:
        linear-gradient(to top, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.25)),
        rgba(20, 16, 10, 0.54);
}
.hero__title .display, .hero__eyebrow { text-shadow: 0 1px 24px rgba(0, 0, 0, 0.25); }
.hero__content {
    max-width: 62rem;
    padding: calc(var(--header-h) + 2rem) 1.5rem 7rem;
    text-align: center;
}
.hero__title { font-weight: 400; margin-bottom: 2.75rem; }
.hero__eyebrow {
    display: block;
    margin-bottom: 2.25rem;
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: var(--fs-xs);
    line-height: 1.5;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}
.hero .display { font-family: var(--font-display); }
.hero__video-toggle {
    position: absolute;
    right: clamp(1rem, 3vw, 2.5rem);
    bottom: clamp(1rem, 3vw, 2.5rem);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    color: var(--white);
    transition: background-color 0.3s;
}
.hero__video-toggle:hover { background: rgba(255, 255, 255, 0.15); }
.hero__video-toggle-play { display: none; }
.hero__video-toggle[aria-pressed="true"] .hero__video-toggle-play { display: block; }
.hero__video-toggle[aria-pressed="true"] .hero__video-toggle-pause { display: none; }
.scroll-indicator {
    position: absolute;
    left: 50%;
    bottom: 2.5rem;
    width: 1px;
    height: 3.5rem;
    background: rgba(255, 255, 255, 0.25);
    overflow: hidden;
}
.scroll-indicator span {
    position: absolute;
    inset: 0 0 auto;
    background: rgba(255, 255, 255, 0.7);
    animation: scrollBar 2.2s ease-in-out infinite;
}
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.07) translateY(-1.5%); } }
@keyframes scrollBar {
    0% { height: 0; top: 0; opacity: 1; }
    50% { height: 60%; top: 0; opacity: 1; }
    100% { height: 0; top: 100%; opacity: 0; }
}

/* Hero delle pagine senza foto in testata */
.page-hero { padding: calc(var(--header-h) + clamp(3rem, 6vw, 3.5rem)) 0 clamp(2.5rem, 5vw, 4rem); }
.page-hero .eyebrow { margin-bottom: 2.25rem; }
.page-hero .display-s { margin-bottom: 2.25rem; }
.page-hero__title { max-width: 52rem; margin-inline: auto; }
.page-hero__lead { max-width: 28rem; margin-inline: auto; }
.page-hero--compact { padding-bottom: 1rem; }
.page-hero--compact .eyebrow { margin-bottom: 1.25rem; }
.page-hero--compact .h2 { margin-bottom: 1rem; }
.page-hero--full { min-height: 80svh; display: flex; align-items: center; }
.page-hero--full .page-hero__lead { max-width: 32rem; }

/* ---------- Animazioni di ingresso ---------- */
.fade-up { animation: fadeUp 1s var(--ease) both; }
.fade-up[data-delay="1"] { animation-delay: 0.3s; }
.fade-up[data-delay="2"] { animation-delay: 0.55s; }
.fade-up[data-delay="3"] { animation-delay: 0.85s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

.reveal { transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal[data-delay="1"] { transition-delay: 0.12s; }
.reveal[data-delay="2"] { transition-delay: 0.24s; }
.reveal[data-delay="3"] { transition-delay: 0.36s; }
.js .reveal.is-pending { opacity: 0; transform: translateY(28px); }

/* ---------- Breadcrumb ---------- */
.breadcrumbs { padding-top: 1.5rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 0.25rem 0; font-size: var(--fs-xs); letter-spacing: 0.15em; text-transform: uppercase; color: var(--taupe); }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-inline: 0.75rem; color: var(--stone); }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; color: var(--ink); }
.breadcrumbs [aria-current="page"] { color: var(--ink); }

/* ---------- Approccio + Servizi ---------- */
.section--approach .h2 { margin-bottom: 2.25rem; }
.intro { max-width: 36rem; margin-inline: auto; }
.services-grid {
    display: grid;
    gap: 3.5rem 1.25rem;
    margin-top: clamp(4rem, 8vw, 7rem);
}
.services-grid--flush { margin-top: 0; }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }

.service-card { position: relative; }
.service-card__media { overflow: hidden; background: var(--sand); height: clamp(23.75rem, 40vw, 33.75rem); margin-bottom: 1.75rem; }
.service-card__img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.service-card:hover .service-card__img { transform: scale(1.04); }
.service-card .eyebrow { margin-bottom: 0.75rem; }
.service-card__title { margin-bottom: 1.25rem; }
.service-card__title a { text-decoration: none; }
.service-card .body-text { max-width: 20rem; margin-bottom: 0.5rem; }
.stretched-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.stretched-link:focus-visible { outline: none; }
/* Focus solo da tastiera (nessuna cornice al clic): stesso effetto dell'hover + titolo sottolineato */
.service-card:has(.stretched-link:focus-visible) .service-card__img { transform: scale(1.04); }
.service-card:has(.stretched-link:focus-visible) .link-cta__arrow { transform: translateX(4px); }
.service-card:has(.stretched-link:focus-visible) .service-card__title a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }

/* ---------- Split immagine/testo ---------- */
.split { display: grid; gap: 4rem; align-items: center; }
.split__media { overflow: hidden; background: var(--sand); }
.split__img { width: 100%; height: clamp(26rem, 55vw, 41.25rem); object-fit: cover; }
.split__text .h2-s { margin-bottom: 2.25rem; }
.split__text .body-l + .body-l { margin-top: 1.5rem; }
.split__text .link-cta { margin-top: 3rem; }
@media (min-width: 1024px) {
    .split { grid-template-columns: 37rem 1fr; gap: 7rem; }
    .split--hero { grid-template-columns: 1fr 26rem; gap: 5rem; }
}
.split--hero .split__text .display-s { margin-bottom: 2rem; }
.split--hero .split__text .body-l { max-width: 30rem; margin-bottom: 2.5rem; }
.split__media--portrait .split__img { height: auto; aspect-ratio: 760 / 1024; }
.page-hero--split { padding-bottom: clamp(2rem, 5vw, 3rem); }

/* ---------- Due colonne (filosofia) ---------- */
.two-cols { display: grid; gap: 3rem; }
.two-cols__text .body-l + .body-l { margin-top: 1.75rem; }
.two-cols__text .link-cta { margin-top: 3rem; }
@media (min-width: 1024px) {
    .two-cols { grid-template-columns: 1fr 1fr; gap: 8rem; align-items: start; }
    .two-cols__text { padding-top: 4rem; }
}

/* ---------- Testimonianze ---------- */
.testimonials .h2 { margin-top: 1.75rem; }
.testimonials__grid { display: grid; gap: 3.5rem; margin-top: clamp(3.5rem, 7vw, 5rem); }
@media (min-width: 768px) {
    .testimonials__grid { grid-template-columns: repeat(auto-fit, minmax(14rem, 22rem)); justify-content: center; gap: 2.5rem; }
}
@media (min-width: 1024px) { .testimonials__grid { gap: 5rem; } }
.testimonial { display: flex; flex-direction: column; text-align: left; }
.testimonial .gold-bar { margin-bottom: 2rem; }
.testimonial__quote { flex: 1; margin-bottom: 2.25rem; font-family: var(--font-display); font-style: italic; font-size: var(--fs-quote); line-height: 1.7; color: rgba(255, 255, 255, 0.92); }
.testimonial figcaption { display: flex; flex-direction: column; gap: 0.375rem; }
.testimonial__name { font-weight: 500; font-size: var(--fs-sm); letter-spacing: 0.025em; color: var(--white); }
.testimonial__place { font-size: var(--fs-xs); letter-spacing: 0.2em; text-transform: uppercase; color: var(--taupe-on-ink); }
.section--ink .container--narrow .testimonial { max-width: 36rem; margin: 2.5rem auto 0; }

.quote-feature blockquote, blockquote.quote-feature {
    font-family: var(--font-display);
    font-style: italic;
    font-size: var(--fs-quote-l);
    line-height: 1.5;
    color: var(--ink);
    margin-bottom: 3.5rem;
}
.quote-feature--large { font-size: var(--fs-quote-xl) !important; line-height: 1.45 !important; margin-bottom: 0 !important; }
.quote-feature figcaption { display: flex; flex-direction: column; gap: 0.5rem; }
.quote-feature__name { font-weight: 500; font-size: var(--fs-body); letter-spacing: 0.1em; text-transform: uppercase; }
.quote-feature__place { font-size: var(--fs-xs); letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-deep); }

/* ---------- Call to action ---------- */
.cta { padding-block: clamp(8rem, 12vw, 10rem); }
.cta .h2-xl { margin-bottom: 2.5rem; }
.cta__text { max-width: 28rem; margin: 0 auto 1.5rem; }
.cta__text:last-of-type { margin-bottom: 3.5rem; }

/* ---------- Portfolio e gallerie ---------- */
.portfolio__head { display: flex; flex-direction: column; gap: 2rem; margin-bottom: 3.5rem; }
@media (min-width: 768px) { .portfolio__head { flex-direction: row; align-items: flex-end; justify-content: space-between; } }
.portfolio__head .section-label { margin-bottom: 1rem; }
.filters { display: flex; flex-wrap: wrap; gap: 0.125rem; }
.filter-chip {
    min-height: 2.75rem;
    padding: 0.625rem 1.25rem;
    border: 0;
    background: transparent;
    font-weight: 500;
    font-size: var(--fs-xs);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--taupe);
    transition: background-color 0.3s, color 0.3s;
}
.filter-chip:hover { color: var(--ink); }
.filter-chip[aria-pressed="true"] { background: var(--gold-deep); color: var(--ivory); }
/* Griglia regolare: stesse proporzioni per tutte le foto, ultima riga incompleta centrata */
.gallery {
    --gallery-gap: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--gallery-gap);
    margin-top: 3rem;
}
.portfolio__head + .visually-hidden + .gallery { margin-top: 0; }
.gallery__item {
    flex: 0 0 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--sand);
}
@media (min-width: 600px) { .gallery__item { flex-basis: calc((100% - var(--gallery-gap)) / 2); } }
@media (min-width: 1024px) { .gallery__item { flex-basis: calc((100% - var(--gallery-gap) * 2) / 3); } }
.gallery__item figure { height: 100%; }
.gallery__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease), filter 0.6s ease;
}
.gallery__item:hover .gallery__img { transform: scale(1.04); filter: brightness(1.04); }
.gallery__item.is-entering { animation: fadeUp 0.75s var(--ease) both; }


/* Punto focale delle foto (impostato dal CMS, passo 5%) */
.gallery__img, .service-card__img { object-position: var(--fx, 50%) var(--fy, 50%); }
.fp-x-0{--fx:0%}.fp-x-5{--fx:5%}.fp-x-10{--fx:10%}.fp-x-15{--fx:15%}.fp-x-20{--fx:20%}.fp-x-25{--fx:25%}.fp-x-30{--fx:30%}.fp-x-35{--fx:35%}.fp-x-40{--fx:40%}.fp-x-45{--fx:45%}.fp-x-50{--fx:50%}.fp-x-55{--fx:55%}.fp-x-60{--fx:60%}.fp-x-65{--fx:65%}.fp-x-70{--fx:70%}.fp-x-75{--fx:75%}.fp-x-80{--fx:80%}.fp-x-85{--fx:85%}.fp-x-90{--fx:90%}.fp-x-95{--fx:95%}.fp-x-100{--fx:100%}
.fp-y-0{--fy:0%}.fp-y-5{--fy:5%}.fp-y-10{--fy:10%}.fp-y-15{--fy:15%}.fp-y-20{--fy:20%}.fp-y-25{--fy:25%}.fp-y-30{--fy:30%}.fp-y-35{--fy:35%}.fp-y-40{--fy:40%}.fp-y-45{--fy:45%}.fp-y-50{--fy:50%}.fp-y-55{--fy:55%}.fp-y-60{--fy:60%}.fp-y-65{--fy:65%}.fp-y-70{--fy:70%}.fp-y-75{--fy:75%}.fp-y-80{--fy:80%}.fp-y-85{--fy:85%}.fp-y-90{--fy:90%}.fp-y-95{--fy:95%}.fp-y-100{--fy:100%}
.gallery__item figure { position: relative; }
.gallery__caption {
    position: absolute;
    inset: auto 0 0;
    padding: 2.5rem 1rem 0.875rem;
    background: linear-gradient(to top, rgba(20, 16, 10, 0.75), rgba(20, 16, 10, 0));
    color: var(--white);
    font-size: var(--fs-sm);
    letter-spacing: 0.03em;
}
/* ---------- Liste numerate (occasioni, metodo, valori) ---------- */
.features, .steps, .values { display: grid; gap: 0; margin-top: 3.5rem; }
@media (min-width: 768px) { .features { grid-template-columns: repeat(2, 1fr); column-gap: 3rem; } }
@media (min-width: 1024px) { .features { grid-template-columns: repeat(3, 1fr); } }
.features__item, .steps__item { padding: 2.5rem 0; border-top: 1px solid var(--line); }
.features__num, .steps__num, .values__num {
    display: block;
    margin-bottom: 1.25rem;
    font-family: var(--font-display);
    font-size: var(--fs-num);
    line-height: 1;
    color: var(--gold-deep);
}
.features__item .h4, .steps__item .h4, .values__item .h4 { margin-bottom: 1rem; }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); column-gap: 3rem; } }
.values__item { padding: 2.5rem 0; border-top: 1px solid var(--line); }
.values__item .body-text + .body-text { margin-top: 1rem; }
@media (min-width: 768px) {
    .values { grid-template-columns: repeat(3, 1fr); }
    .values__item { padding: 0 3rem 0 0; border-top: 0; border-right: 1px solid var(--line); }
    .values__item + .values__item { padding-left: 3rem; }
    .values__item:last-child { border-right: 0; padding-right: 0; }
}

/* ---------- Chi sono ---------- */
.story { display: grid; gap: 4rem; align-items: start; max-width: calc(72rem + var(--gutter) * 2); }
@media (min-width: 1024px) { .story { grid-template-columns: 28.75rem 1fr; gap: 5rem; } }
.story__img { width: 100%; }
.story__media .caption { margin-top: 1rem; }
.story__text .h2-s { margin-bottom: 2.5rem; }
.story__text .body-l + .body-l { margin-top: 1.5rem; }
.story__text .link-cta { margin-top: 3rem; }
.wide-image { overflow: hidden; background: var(--sand); height: clamp(25rem, 60vh, 42.5rem); }
.wide-image__img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.wide-image:hover .wide-image__img { transform: scale(1.02); }
.wide-image__img--faces { object-position: 50% 32%; } /* volti nella fascia visibile */

/* ---------- FAQ ---------- */
.faq { margin-top: 3rem; border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.5rem 0;
    cursor: pointer;
    list-style: none;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q-text { font-family: var(--font-display); font-size: var(--fs-lg); line-height: 1.3; }
.faq__icon { flex-shrink: 0; transition: transform 0.3s var(--ease); }
.faq__item[open] .faq__icon { transform: rotate(180deg); }
.faq__a { padding-bottom: 1.75rem; max-width: 40rem; }

/* ---------- Contatti e form (Figma: Form Field, Checkbox) ---------- */
.contact { display: grid; gap: 4rem; }
@media (min-width: 1024px) { .contact { grid-template-columns: 22rem 1fr; gap: 7rem; } }
.contact__info .h3 { margin-bottom: 2rem; }
.contact__list { display: grid; gap: 1rem; margin-bottom: 3rem; }
.contact__list a, .contact__list p { display: flex; align-items: flex-start; gap: 0.75rem; font-size: var(--fs-body-l); color: var(--text-body); text-decoration: none; }
.contact__list a:hover span { text-decoration: underline; color: var(--ink); }
.contact__list .icon { margin-top: 0.3rem; flex-shrink: 0; color: var(--gold-deep); }
.contact__next-title { margin-bottom: 1.25rem; }
.contact__next { display: grid; gap: 1rem; }
.contact__next li { display: flex; gap: 1rem; font-size: var(--fs-body); line-height: 1.7; color: var(--text-body); }
.contact__next span { font-family: var(--font-display); color: var(--gold-deep); font-size: var(--fs-md); line-height: 1.4; }

.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__note { font-size: var(--fs-sm); color: var(--text-body); margin-bottom: 2rem; }
.form__grid { display: grid; gap: 2.25rem 2.5rem; margin-bottom: 2.25rem; }
@media (min-width: 768px) { .form__grid { grid-template-columns: 1fr 1fr; } .field--full { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: 0.625rem; }
.field__label { font-weight: 500; font-size: var(--fs-xs); line-height: 1.5; letter-spacing: 0.3em; text-transform: uppercase; color: var(--text-body); }
.field__input {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.375rem 0 0.875rem;
    border: 0;
    border-bottom: 1px solid var(--ink);
    border-radius: 0;
    background: transparent;
    font-weight: 300;
    font-size: var(--fs-base);
    line-height: 1.75;
    letter-spacing: 0.025em;
    color: var(--ink);
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s;
}
.field__input::placeholder { color: var(--taupe); opacity: 1; }
/* Focus dei campi come da Figma: solo la linea inferiore dorata, nessun contorno */
.field__input:focus, .field__input:focus-visible { outline: none; border-bottom: 2px solid var(--gold); padding-bottom: calc(0.875rem - 1px); }
.field__textarea { min-height: 7.5rem; resize: vertical; }
.field__select { position: relative; }
.field__select select { padding-right: 2rem; cursor: pointer; }
.field__chevron { position: absolute; right: 0; top: 0.9rem; pointer-events: none; }
.field--error .field__label { color: var(--error); }
.field--error .field__input { border-bottom-color: var(--error); }
.field__error { font-size: var(--fs-sm); line-height: 1.5; letter-spacing: 0.02em; color: var(--error); }

.checkbox { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 0.875rem; align-items: start; margin-bottom: 2.5rem; }
.checkbox .field__error { grid-column: 2; }
.checkbox__input {
    -webkit-appearance: none;
    appearance: none;
    width: 1.125rem;
    height: 1.125rem;
    margin: 0.2rem 0 0;
    border: 1px solid var(--ink);
    border-radius: 0;
    background: transparent center / 0.8rem no-repeat;
    cursor: pointer;
}
.checkbox__input:checked {
    background-color: var(--ink);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F9F6F0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.checkbox__input:focus-visible { outline: var(--focus); outline-offset: 3px; }
.field--error .checkbox__input { border-color: var(--error); }
.checkbox__label { font-size: var(--fs-sm); line-height: 1.55; letter-spacing: 0.025em; color: var(--text-body); cursor: pointer; }
.form__captcha { min-height: 65px; margin-block: 0.5rem 1.75rem; }
.form__submit { width: 100%; }
@media (min-width: 768px) { .form__submit { width: auto; } }

.form-alert {
    position: relative;
    margin-bottom: 3rem;
    padding: 0.25rem 0 0.25rem 1.75rem;
    border-left: 1px solid var(--error);
}
.form-alert:focus, .form-alert:focus-visible { outline: none; }
.form-alert__eyebrow {
    margin-bottom: 0.75rem;
    font-weight: 500;
    font-size: var(--fs-xs);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--error);
}
.form-alert__title {
    margin-bottom: 1.25rem;
    font-family: var(--font-display);
    font-weight: var(--display-weight);
    font-variation-settings: var(--display-variation);
    font-size: var(--fs-h5);
    line-height: 1.2;
    color: var(--ink);
}
.form-alert__title em { font-style: italic; }
.form-alert__text { font-size: var(--fs-body-l); line-height: 1.8; color: var(--text-body); }
.form-alert__list { display: grid; gap: 0.625rem; }
.form-alert__list a {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.875rem;
    text-decoration: none;
    color: var(--text-body);
}
.form-alert__field {
    min-width: 9.5rem;
    font-weight: 500;
    font-size: var(--fs-xs);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink);
}
.form-alert__msg { font-size: var(--fs-body); line-height: 1.6; }
.form-alert__list a:hover .form-alert__msg { text-decoration: underline; text-underline-offset: 0.2em; color: var(--ink); }

/* ---------- Pagine legali ---------- */
.prose { color: var(--text-body); font-size: var(--fs-body-l); line-height: 1.85; }
.prose h2 { font-family: var(--font-display); font-size: var(--fs-h5); line-height: 1.2; color: var(--ink); margin: 3.5rem 0 1rem; }
.prose h3 { font-weight: 500; font-size: var(--fs-base); color: var(--ink); margin: 2rem 0 0.5rem; }
.prose p, .prose ul, .prose .table-wrap { margin-bottom: 1.25rem; }
.prose ul { padding-left: 1.25rem; }
.prose li + li { margin-top: 0.5rem; }
.prose a { color: var(--ink); }
.prose code { font-size: 0.875em; background: var(--sand); padding: 0.1em 0.35em; }
.toc { padding: 1.75rem 2rem; background: var(--linen); margin-bottom: 1rem; }
.toc__title { font-family: var(--font-sans) !important; font-weight: 500 !important; font-size: var(--fs-xs) !important; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold-deep) !important; margin: 0 0 1rem !important; }
.toc ol { margin: 0; padding-left: 1.25rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-body); }
th, td { text-align: left; vertical-align: top; padding: 0.875rem 1rem 0.875rem 0; border-bottom: 1px solid var(--line); }
th { font-weight: 500; color: var(--ink); font-size: var(--fs-xs); letter-spacing: 0.15em; text-transform: uppercase; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--stone); border-top: 1px solid rgba(192, 155, 46, 0.1); }
.site-footer__inner { max-width: calc(73rem + var(--gutter) * 2); margin-inline: auto; padding: 5rem var(--gutter); }
.site-footer__cols { display: grid; gap: 3rem; margin-bottom: 3.5rem; }
@media (min-width: 768px) { .site-footer__cols { grid-template-columns: 1fr 16rem 16rem; } }
.site-footer__logo { display: inline-block; margin-bottom: 1.75rem; }
.site-footer__logo-img { width: 8rem; height: 8rem; object-fit: contain; filter: brightness(0) invert(1); opacity: 0.55; }
.site-footer__tagline { max-width: 20rem; font-size: var(--fs-body); line-height: 1.8; letter-spacing: 0.025em; }
.site-footer__title { font-family: var(--font-sans); font-weight: 500; font-size: var(--fs-xs); line-height: 1.5; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.75rem; }
.site-footer__col ul { display: grid; gap: 0.875rem; }
.site-footer a { text-decoration: none; transition: color 0.3s; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer__col li a, .site-footer__contacts a, .site-footer__contacts p { font-size: var(--fs-body); letter-spacing: 0.025em; }
.site-footer__contacts { display: grid; gap: 0.875rem; }
.site-footer__contacts a, .site-footer__contacts p { display: flex; align-items: center; gap: 0.75rem; }
.site-footer__social { display: inline-flex; margin-top: 1.75rem; padding: 0.5rem; margin-left: -0.5rem; }
.site-footer__social:hover { color: var(--gold) !important; }
.site-footer__bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-weight: 400;
    font-size: var(--fs-xs);
    line-height: 1.6;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-align: center;
    color: var(--stone-dark);
}
.site-footer__legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.75rem; }
.site-footer__legal a:hover, .site-footer__legal button:hover { color: var(--stone); }
.site-footer__credits {
    margin-top: 1.5rem;
    font-weight: 400;
    font-size: var(--fs-xs);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-align: center;
    color: var(--stone-dark);
}
.site-footer__credits a { color: var(--stone); text-decoration: underline; text-underline-offset: 0.25em; }
.site-footer__credits a:hover { color: var(--white); }
@media (min-width: 768px) { .site-footer__credits { text-align: right; } }
@media (min-width: 768px) { .site-footer__bottom { flex-direction: row; justify-content: space-between; text-align: left; } }

/* Mobile: tutto il footer centrato */
@media (max-width: 767.98px) {
    .site-footer__cols, .site-footer__brand, .site-footer__col { text-align: center; }
    .site-footer__logo { margin-inline: auto; }
    .site-footer__tagline { margin-inline: auto; }
    .site-footer__contacts a, .site-footer__contacts p { justify-content: center; }
    .site-footer__social { margin-inline: auto; display: flex; width: fit-content; }
}

/* ---------- Torna su ---------- */
.to-top {
    position: fixed;
    right: clamp(1rem, 3vw, 2rem);
    bottom: calc(clamp(1rem, 3vw, 2rem) + env(safe-area-inset-bottom));
    z-index: 90;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border: 1px solid rgba(196, 164, 90, 0.6);
    border-radius: 50%;
    background: var(--ink);
    color: var(--gold);
    box-shadow: 0 6px 20px rgba(30, 26, 20, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s, background-color 0.3s, color 0.3s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--gold-deep); color: var(--ivory); }
.to-top:focus-visible { outline: var(--focus); outline-offset: 4px; }
.cookie-banner:not([hidden]) ~ .to-top { display: none; }
@media print { .to-top { display: none !important; } }

/* ---------- Banner cookie ---------- */
.cookie-banner {
    position: fixed;
    inset: auto 0 0;
    z-index: 200;
    background: var(--ivory);
    border-top: 1px solid var(--line-strong);
    box-shadow: 0 -12px 32px rgba(30, 26, 20, 0.12);
    max-height: 90dvh;
    overflow-y: auto;
    animation: slideUp 0.35s var(--ease);
}
.cookie-banner__inner { position: relative; max-width: 64rem; margin-inline: auto; padding: 1.75rem var(--gutter) 1.5rem; }
.cookie-banner__title { font-family: var(--font-display); font-size: var(--fs-xl); margin-bottom: 0.75rem; padding-right: 3rem; }
.cookie-banner__text { font-size: var(--fs-body); line-height: 1.7; color: var(--text-body); margin-bottom: 1.25rem; }
.cookie-banner__text a { color: var(--ink); }
.cookie-banner__close {
    position: absolute;
    top: 1rem; right: calc(var(--gutter) - 0.75rem);
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.75rem; height: 2.75rem;
    border: 0; background: none; color: var(--ink);
}
.cookie-banner__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.75rem; }
.cookie-banner__actions .btn { flex: 1 1 10rem; }
@media (min-width: 768px) { .cookie-banner__actions .btn { flex: 0 0 auto; } }
.cookie-prefs { margin-bottom: 1.25rem; }
.cookie-prefs fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.cookie-prefs__row { display: flex; gap: 0.75rem; align-items: flex-start; font-size: var(--fs-body); line-height: 1.6; color: var(--text-body); }
.cookie-prefs__row input { width: 1.125rem; height: 1.125rem; margin-top: 0.2rem; accent-color: var(--ink); flex-shrink: 0; }
.cookie-prefs__row strong { color: var(--ink); }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }

/* ---------- Email protetta dallo spam ---------- */
.email-link__at::before { content: "@"; }

/* ---------- Icone ---------- */
.icon { flex-shrink: 0; }

/* ---------- Riduzione del movimento ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
    }
    .js .reveal.is-pending { opacity: 1; transform: none; }
    .scroll-indicator { display: none; }
}

/* ---------- Contrasto elevato / modalità colori forzati ---------- */
@media (forced-colors: active) {
    .btn, .filter-chip, .field__input { border: 1px solid ButtonText; }
    .filter-chip[aria-pressed="true"] { outline: 2px solid Highlight; }
}

/* ---------- Stampa ---------- */
@media print {
    .site-header, .cookie-banner, .hero__media, .scroll-indicator, .hero__video-toggle, .site-footer__social { display: none !important; }
    .hero { min-height: auto; color: var(--ink); background: none; }
    body { background: #fff; }
}
