/* =========================================================================
   CENTRO FISIO — Studio di fisioterapia Dott. Paolo Montanari, Fidenza (PR)
   Design system "Movimento": l'arco ciano e la scia di punti del logo
   diventano il linguaggio grafico di tutto il sito.

   Palette derivata dal logo:  ciano #2EA9E0 · inchiostro #1C1C1B
   Tutti i rapporti di contrasto testo/sfondo sono >= 4.5:1 (WCAG 2.1 AA).
   Tutte le misure tipografiche sono in rem: il widget di accessibilità
   ingrandisce il testo agendo su html { font-size }.
   ========================================================================= */

/* ---------- 1. Font auto-ospitati (nessuna chiamata esterna: GDPR) ------- */
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url('../fonts/outfit-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url('../fonts/outfit-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../fonts/manrope-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../fonts/manrope-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------------------------- 2. Token ---------------------------------- */
:root {
    /* Colore */
    --brand: #2EA9E0;          /* ciano del logo */
    --brand-hi: #5EC3EC;       /* ciano chiaro, per fondi scuri */
    --brand-dk: #0B7CB4;       /* link su bianco — 4.6:1 */
    --brand-ink: #075E8A;      /* testo accento su bianco — 7.0:1 */
    --brand-soft: #EAF6FD;
    --brand-line: #CDE8F7;

    --ink: #1C1C1B;            /* inchiostro del logo — titoli */
    --ink-soft: #52585C;       /* testo corrente — 7.2:1 */
    --deep: #0A2A3D;           /* sezioni scure */
    --deep-2: #061E2C;
    --deep-line: rgba(255, 255, 255, .14);
    --on-deep: #C9DEEA;        /* testo secondario su scuro — 10.7:1 */

    --paper: #FFFFFF;
    --paper-2: #F6FAFC;
    --line: #E4EBF0;

    /* Tipografia */
    --font-display: 'Outfit', 'Avenir Next', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-body: 'Manrope', 'Avenir Next', 'Segoe UI', system-ui, -apple-system, sans-serif;

    /* Ritmo */
    --wrap: 75rem;
    --gutter: clamp(1.125rem, 4vw, 2.5rem);
    --section-y: clamp(3.75rem, 8vw, 7rem);
    --radius: 1.25rem;
    --radius-s: .75rem;
    --radius-pill: 62.5rem;

    /* Ombre */
    --shadow-s: 0 .0625rem .125rem rgba(10, 42, 61, .06), 0 .25rem .75rem rgba(10, 42, 61, .05);
    --shadow-m: 0 .75rem 2rem rgba(10, 42, 61, .09);
    --shadow-l: 0 1.5rem 3.5rem rgba(10, 42, 61, .16);

    --ease: cubic-bezier(.22, .8, .32, 1);
}

/* ---------------------------- 3. Base ----------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 6.5rem;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink-soft);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.7;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    /* Il cassetto del menu mobile e gli archi decorativi vivono fuori dallo schermo:
       vanno ritagliati. Si usa "hidden" e non "clip": su <body> clip verrebbe
       propagato anche all'asse verticale, bloccando lo scorrimento della pagina. */
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    color: var(--ink);
    line-height: 1.1;
    letter-spacing: -.02em;
    font-weight: 700;
    margin: 0 0 .6em;
    text-wrap: balance;
}

h1 { font-size: clamp(2.125rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.875rem, 3.9vw, 2.875rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { margin: 0 0 1.15rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--brand-dk); text-decoration-thickness: .0625rem; text-underline-offset: .2em; }
a:hover { color: var(--brand-ink); }

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

ul, ol { margin: 0 0 1.15rem; padding-left: 1.25rem; }
li { margin-bottom: .4rem; }

strong { color: var(--ink); font-weight: 700; }

:focus-visible {
    outline: .1875rem solid var(--brand-dk);
    outline-offset: .1875rem;
    border-radius: .25rem;
}

::selection { background: var(--brand); color: #fff; }

/* Testo riservato ai lettori di schermo */
.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Salta al contenuto (accessibilità da tastiera) */
.skip-link {
    position: absolute;
    left: .75rem;
    top: -6rem;
    z-index: 999;
    background: var(--deep);
    color: #fff;
    padding: .75rem 1.25rem;
    border-radius: var(--radius-s);
    font-weight: 700;
    text-decoration: none;
    transition: top .2s var(--ease);
}
.skip-link:focus { top: .75rem; color: #fff; }

/* ------------------------- 4. Layout ------------------------------------ */
.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--gutter);
}
.wrap.narrow { max-width: 48rem; }
.wrap.mid { max-width: 60rem; }

.section { padding-block: var(--section-y); position: relative; }
.section-tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section-soft { background: var(--paper-2); }
.section-brand { background: var(--brand-soft); }

/* Sezione scura con taglio diagonale — la "firma" del sito */
.section-deep {
    background: var(--deep);
    color: var(--on-deep);
    position: relative;
    overflow: hidden;
}
.section-deep h1, .section-deep h2, .section-deep h3, .section-deep h4 { color: #fff; }
.section-deep strong { color: #fff; }
.section-deep a { color: var(--brand-hi); }

.cut-top { clip-path: polygon(0 2.6vw, 100% 0, 100% 100%, 0 100%); margin-top: -2.6vw; padding-top: calc(var(--section-y) + 2.6vw); }
.cut-bottom { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2.6vw), 0 100%); padding-bottom: calc(var(--section-y) + 2.6vw); }
.cut-top.cut-bottom { clip-path: polygon(0 2.6vw, 100% 0, 100% calc(100% - 2.6vw), 0 100%); }

/* Intestazione di sezione */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--font-display);
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--brand-ink);
    margin: 0 0 1rem;
}
.eyebrow::before {
    content: "";
    width: 1.75rem;
    height: .125rem;
    background: var(--brand);
    border-radius: 62.5rem;
}
.section-deep .eyebrow { color: var(--brand-hi); }

.section-head { max-width: 46rem; margin-bottom: clamp(2.25rem, 4vw, 3.5rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head p { font-size: 1.125rem; }

.lead { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); line-height: 1.65; }

/* ------------------------- 5. Bottoni ----------------------------------- */
.btn {
    --btn-bg: var(--brand);
    --btn-fg: var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .9375rem 1.75rem;
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -.005em;
    line-height: 1.2;
    border: none;
    border-radius: var(--radius-pill);
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform .35s var(--ease), box-shadow .35s var(--ease), background-color .25s var(--ease);
    box-shadow: 0 .375rem 1.125rem rgba(46, 169, 224, .32);
}
.btn::after {
    /* scia luminosa che attraversa il bottone al passaggio del mouse */
    content: "";
    position: absolute;
    inset: 0 auto 0 -60%;
    width: 45%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
    transform: skewX(-18deg);
    transition: left .6s var(--ease);
}
.btn:hover { transform: translateY(-.1875rem); box-shadow: 0 .875rem 1.75rem rgba(46, 169, 224, .38); color: var(--btn-fg); }
.btn:hover::after { left: 115%; }
.btn:active { transform: translateY(0); }

.btn-dark { --btn-bg: var(--deep); --btn-fg: #fff; box-shadow: 0 .375rem 1.125rem rgba(10, 42, 61, .28); }
.btn-dark:hover { box-shadow: 0 .875rem 1.75rem rgba(10, 42, 61, .34); }

.btn-ghost {
    --btn-bg: transparent;
    --btn-fg: var(--ink);
    box-shadow: inset 0 0 0 .125rem var(--line);
}
.btn-ghost:hover { --btn-bg: var(--brand-soft); box-shadow: inset 0 0 0 .125rem var(--brand); }
.section-deep .btn-ghost,
.page-hero .btn-ghost { --btn-fg: #fff; box-shadow: inset 0 0 0 .125rem var(--deep-line); }
.section-deep .btn-ghost:hover,
.page-hero .btn-ghost:hover { --btn-bg: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 .125rem var(--brand-hi); }

.btn-sm { padding: .6875rem 1.25rem; font-size: .9375rem; }
.btn-block { width: 100%; }

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: .875rem;
    margin-top: 2rem;
}

/* Link con freccia animata */
.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--brand-ink);
    text-decoration: none;
}
.link-arrow svg { transition: transform .35s var(--ease); }
.link-arrow:hover svg { transform: translateX(.375rem); }

/* --------------------- 6. Firma grafica: arco e scia -------------------- */
.arc-deco {
    position: absolute;
    pointer-events: none;
    color: var(--brand);
    opacity: .18;
    z-index: 0;
}
.arc-deco svg { display: block; width: 100%; height: auto; }
.section-deep .arc-deco { opacity: .22; }

/* Anello che ruota lentamente attorno alle immagini */
@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes float-soft {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-.75rem); }
}
@keyframes dot-trail {
    0%, 100% { opacity: .25; transform: scale(.7); }
    50% { opacity: 1; transform: scale(1); }
}

.dot-trail { display: flex; align-items: center; gap: .5rem; }
.dot-trail span {
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    background: var(--brand);
    animation: dot-trail 2.4s var(--ease) infinite;
}
.dot-trail span:nth-child(2) { animation-delay: .18s; width: .4375rem; height: .4375rem; }
.dot-trail span:nth-child(3) { animation-delay: .36s; width: .375rem; height: .375rem; }
.dot-trail span:nth-child(4) { animation-delay: .54s; width: .3125rem; height: .3125rem; }
.dot-trail span:nth-child(5) { animation-delay: .72s; width: .25rem; height: .25rem; }

/* --------------------------- 7. Topbar ---------------------------------- */
.topbar {
    background: var(--deep);
    color: var(--on-deep);
    font-size: .875rem;
}
.topbar .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 2.75rem;
    flex-wrap: wrap;
}
.topbar-list { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.topbar-item { display: inline-flex; align-items: center; gap: .4375rem; }
.topbar-item svg { flex: none; color: var(--brand-hi); }
.topbar a { color: var(--on-deep); text-decoration: none; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar-note { color: var(--brand-hi); font-weight: 700; }

/* --------------------------- 8. Header ---------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 120;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: saturate(1.6) blur(.75rem);
    -webkit-backdrop-filter: saturate(1.6) blur(.75rem);
    border-bottom: .0625rem solid transparent;
    transition: box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.site-header.is-stuck {
    box-shadow: 0 .5rem 1.75rem rgba(10, 42, 61, .08);
    border-bottom-color: var(--line);
}
.site-header .wrap {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-height: 4.75rem;
}
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 3.125rem; width: auto; transition: height .3s var(--ease); }
.site-header.is-stuck .brand img { height: 2.625rem; }

.main-nav { margin-left: auto; }
.main-nav > ul {
    display: flex;
    align-items: center;
    gap: .25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.main-nav > ul > li { margin: 0; position: relative; }
.main-nav a:not(.btn) {
    display: inline-flex;
    align-items: center;
    gap: .3125rem;
    padding: .625rem .8125rem;
    font-family: var(--font-display);
    font-size: .9688rem;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
    border-radius: var(--radius-s);
    position: relative;
    transition: color .25s var(--ease), background-color .25s var(--ease);
}
.main-nav a:not(.btn)::after {
    content: "";
    position: absolute;
    left: .8125rem;
    right: .8125rem;
    bottom: .375rem;
    height: .125rem;
    border-radius: 62.5rem;
    background: var(--brand);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s var(--ease);
}
.main-nav a:not(.btn):hover { color: var(--brand-ink); }
.main-nav a:not(.btn):hover::after,
.main-nav li.is-current > a::after { transform: scaleX(1); }
.main-nav li.is-current > a:not(.btn) { color: var(--brand-ink); }

.header-cta { flex: none; margin-left: .5rem; }
.header-tel {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
    padding: .5rem .75rem;
    border-radius: var(--radius-pill);
}
.header-tel svg { color: var(--brand-dk); }
.header-tel:hover { background: var(--brand-soft); color: var(--brand-ink); }

/* Mega menu dei servizi */
.has-mega > button {
    display: inline-flex;
    align-items: center;
    gap: .3125rem;
    padding: .625rem .8125rem;
    font-family: var(--font-display);
    font-size: .9688rem;
    font-weight: 600;
    color: var(--ink);
    background: none;
    border: none;
    border-radius: var(--radius-s);
    cursor: pointer;
    position: relative;
}
.has-mega > button::after {
    content: "";
    position: absolute;
    left: .8125rem;
    right: .8125rem;
    bottom: .375rem;
    height: .125rem;
    border-radius: 62.5rem;
    background: var(--brand);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s var(--ease);
}
.has-mega:hover > button::after,
.has-mega.is-open > button::after,
.has-mega.is-current > button::after { transform: scaleX(1); }
.has-mega > button .chev { transition: transform .3s var(--ease); }
.has-mega.is-open > button .chev { transform: rotate(180deg); }

.mega {
    position: absolute;
    top: calc(100% + .75rem);
    right: -1rem;
    width: min(46rem, 92vw);
    background: #fff;
    border: .0625rem solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-l);
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .25rem 1.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-.625rem);
    transition: opacity .28s var(--ease), transform .28s var(--ease), visibility .28s;
}
.has-mega:hover .mega,
.has-mega:focus-within .mega,
.has-mega.is-open .mega { opacity: 1; visibility: visible; transform: translateY(0); }

.mega-col { display: flex; flex-direction: column; }
.mega-title {
    font-family: var(--font-display);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--brand-ink);
    padding: .5rem .625rem;
    margin: 0 0 .25rem;
}
.mega a {
    padding: .5rem .625rem;
    font-size: .9375rem;
    font-weight: 600;
    border-radius: .5rem;
    color: var(--ink);
}
.mega a::after { display: none; }
.mega a:hover { background: var(--brand-soft); color: var(--brand-ink); }
.mega-foot {
    grid-column: 1 / -1;
    margin-top: .75rem;
    padding-top: 1rem;
    border-top: .0625rem solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.mega-foot p { margin: 0; font-size: .9375rem; }

/* La CTA del cassetto mobile è nascosta su desktop */
.nav-mobile-cta { display: none; }

/* Hamburger + drawer mobile */
.nav-toggle {
    display: none;
    margin-left: auto;
    width: 2.875rem;
    height: 2.875rem;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    border: none;
    border-radius: var(--radius-s);
    cursor: pointer;
    color: var(--ink);
}
.nav-toggle span {
    display: block;
    position: relative;
    width: 1.25rem;
    height: .125rem;
    background: currentColor;
    border-radius: 62.5rem;
    transition: background-color .2s var(--ease);
}
.nav-toggle span::before, .nav-toggle span::after {
    content: "";
    position: absolute;
    left: 0;
    width: 1.25rem;
    height: .125rem;
    background: currentColor;
    border-radius: 62.5rem;
    transition: transform .3s var(--ease);
}
.nav-toggle span::before { top: -.375rem; }
.nav-toggle span::after { top: .375rem; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(.375rem) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-.375rem) rotate(-45deg); }

/* Intestazione del cassetto mobile: visibile solo quando il menu è aperto */
.nav-head { display: none; }

.nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(6, 30, 44, .5);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s var(--ease), visibility .3s;
    z-index: 130;
}
body.nav-open .nav-backdrop { opacity: 1; visibility: visible; }
body.nav-open { overflow: hidden; }

/* --------------------------- 9. Hero ------------------------------------ */
.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(120% 90% at 85% 0%, #EAF6FD 0%, rgba(234, 246, 253, 0) 60%),
        linear-gradient(180deg, #FBFDFE 0%, #FFFFFF 100%);
    padding-block: clamp(2.75rem, 6vw, 5rem) clamp(3.5rem, 7vw, 6rem);
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.14fr .86fr;
    align-items: center;
    gap: clamp(2rem, 4vw, 3.25rem);
    position: relative;
    z-index: 1;
}
.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .4375rem .875rem .4375rem .5rem;
    background: #fff;
    border: .0625rem solid var(--brand-line);
    border-radius: var(--radius-pill);
    font-size: .875rem;
    font-weight: 700;
    color: var(--brand-ink);
    box-shadow: var(--shadow-s);
    margin-bottom: 1.5rem;
}
.hero-chip b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.375rem;
    height: 1.375rem;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
}
.hero h1 { margin-bottom: .5rem; }
.hero h1 .hl { position: relative; display: inline-block; color: var(--brand-ink); }
/* Il tratto ciano sotto la parola chiave si "disegna" al caricamento */
.hero h1 .hl::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: .06em;
    height: .14em;
    background: var(--brand);
    border-radius: 62.5rem;
    transform: scaleX(0);
    transform-origin: left;
    animation: draw-line .9s .35s var(--ease) forwards;
}
@keyframes draw-line { to { transform: scaleX(1); } }

.hero-lead { font-size: clamp(1.0625rem, 1.5vw, 1.1875rem); max-width: 34rem; margin-top: 1.25rem; }

.hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 1.75rem;
    margin-top: 2.25rem;
    padding-top: 1.75rem;
    border-top: .0625rem solid var(--line);
}
.hero-fact { display: flex; align-items: flex-start; gap: .75rem; }
.hero-fact svg { flex: none; color: var(--brand); margin-top: .1875rem; }
.hero-fact b { display: block; font-family: var(--font-display); color: var(--ink); font-size: .9688rem; }
.hero-fact span { font-size: .875rem; }

/* Immagine hero: cornice ad arco + anello ciano in rotazione */
.hero-visual { position: relative; }
.hero-frame {
    position: relative;
    border-radius: 15rem 15rem var(--radius) var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-l);
    aspect-ratio: 4 / 5;
    max-width: 100%;
}
.hero-frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-ring {
    position: absolute;
    inset: -4% -4% auto -4%;
    aspect-ratio: 1;
    border: .125rem dashed rgba(46, 169, 224, .45);
    border-radius: 50%;
    animation: spin-slow 46s linear infinite;
    pointer-events: none;
}
.hero-badge {
    position: absolute;
    right: -1rem;
    bottom: 2.5rem;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-m);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: .875rem;
    animation: float-soft 6s ease-in-out infinite;
    max-width: 15rem;
}
.hero-badge .num {
    font-family: var(--font-display);
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--brand-ink);
    line-height: 1;
}
.hero-badge span { font-size: .8125rem; line-height: 1.35; }

/* Hero delle pagine interne */
.page-hero {
    position: relative;
    overflow: hidden;
    background: var(--deep);
    color: var(--on-deep);
    padding-block: clamp(2.5rem, 5vw, 4rem) clamp(3.25rem, 6vw, 5rem);
}
.page-hero h1, .page-hero h2, .page-hero h3 { color: #fff; }
.page-hero h1 { margin-bottom: 1rem; }
.page-hero strong { color: #fff; }
.page-hero .eyebrow { color: var(--brand-hi); }
.page-hero-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: clamp(1.75rem, 4vw, 3.5rem);
    align-items: center;
    position: relative;
    z-index: 1;
}
.page-hero-lead { font-size: clamp(1.0625rem, 1.5vw, 1.1875rem); max-width: 38rem; }
.page-hero-img {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-l);
    aspect-ratio: 4 / 3;
}
.page-hero-img img { width: 100%; height: 100%; object-fit: cover; }

/* Pannello grafico al posto della foto, nelle pagine senza scatto dedicato */
.page-hero-art {
    position: relative;
    border-radius: var(--radius);
    aspect-ratio: 4 / 3;
    max-width: 100%;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(90% 90% at 30% 20%, rgba(46, 169, 224, .28), rgba(46, 169, 224, .05) 60%),
        rgba(255, 255, 255, .04);
    border: .0625rem solid var(--deep-line);
}
.page-hero-art .art-ring {
    position: absolute;
    width: 72%;
    aspect-ratio: 1;
    border: .125rem dashed rgba(94, 195, 236, .4);
    border-radius: 50%;
    animation: spin-slow 44s linear infinite;
}
.page-hero-art .art-ring.b {
    width: 96%;
    border-style: dotted;
    border-color: rgba(94, 195, 236, .22);
    animation-duration: 72s;
    animation-direction: reverse;
}
.page-hero-art .art-ico { position: relative; z-index: 1; color: #fff; }
.page-hero-art .art-dots { position: absolute; right: 12%; bottom: 14%; }

.crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
    font-size: .8125rem;
}
.crumbs li { margin: 0; display: inline-flex; align-items: center; gap: .5rem; }
.crumbs li + li::before { content: "/"; opacity: .5; }
.crumbs a { color: inherit; text-decoration: none; opacity: .85; }
.crumbs a:hover { opacity: 1; text-decoration: underline; color: inherit; }
.crumbs [aria-current] { color: #fff; font-weight: 600; }

/* -------------------- 10. Striscia scorrevole (marquee) ----------------- */
.marquee {
    background: var(--brand);
    color: var(--ink);
    padding-block: .9375rem;
    overflow: hidden;
    position: relative;
}
.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 42s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; align-items: center; flex: none; }
.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: 1.25rem;
    padding-inline: 1.25rem;
    font-family: var(--font-display);
    font-size: .9375rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}
.marquee-item::after {
    content: "";
    width: .375rem;
    height: .375rem;
    border-radius: 50%;
    background: rgba(28, 28, 27, .55);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ----------------------- 11. Griglie e card ----------------------------- */
.grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Card servizio */
.svc-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: .0625rem solid var(--line);
    border-radius: var(--radius);
    padding: 1.75rem;
    text-decoration: none;
    overflow: hidden;
    isolation: isolate;
    transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.svc-card::before {
    /* arco ciano che compare dall'angolo: la firma del logo */
    content: "";
    position: absolute;
    top: -5.5rem;
    right: -5.5rem;
    width: 11rem;
    height: 11rem;
    border: .625rem solid var(--brand);
    border-radius: 50%;
    opacity: 0;
    transform: scale(.72);
    transition: opacity .45s var(--ease), transform .55s var(--ease);
    z-index: -1;
}
.svc-card:hover, .svc-card:focus-visible {
    transform: translateY(-.5rem);
    box-shadow: var(--shadow-m);
    border-color: var(--brand-line);
}
.svc-card:hover::before, .svc-card:focus-visible::before { opacity: .16; transform: scale(1); }

.svc-icon {
    width: 3.75rem;
    height: 3.75rem;
    display: grid;
    place-items: center;
    border-radius: 1rem;
    background: var(--brand-soft);
    color: var(--brand-dk);
    margin-bottom: 1.25rem;
    transition: background-color .35s var(--ease), color .35s var(--ease);
}
.svc-card:hover .svc-icon { background: var(--brand); color: #fff; }
.svc-card h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.svc-card p { font-size: .9688rem; margin-bottom: 1.25rem; color: var(--ink-soft); }
.svc-card .link-arrow { margin-top: auto; font-size: .9375rem; }

/* Card generica */
.card {
    background: #fff;
    border: .0625rem solid var(--line);
    border-radius: var(--radius);
    padding: 1.75rem;
}
.card h3 { font-size: 1.1875rem; }
.card p { font-size: .9688rem; margin-bottom: 0; }
.section-deep .card {
    background: rgba(255, 255, 255, .05);
    border-color: var(--deep-line);
    color: var(--on-deep);
}

/* Card "perché sceglierci" con numero */
.value-card { position: relative; padding-left: 4.25rem; }
.value-card .value-num {
    position: absolute;
    left: 1.75rem;
    top: 1.75rem;
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--brand);
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: .875rem;
}

/* Elenco con spunta */
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6875rem; }
.check-list li { position: relative; padding-left: 2rem; margin: 0; }
.check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .45rem;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B7CB4' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / .75rem no-repeat;
}
.section-deep .check-list li::before,
.page-hero .check-list li::before {
    background-color: rgba(94, 195, 236, .16);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237FD0F2' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}
.check-list.two-col { grid-template-columns: repeat(2, 1fr); gap: .6875rem 1.5rem; }

/* --------------------- 12. Contatori animati ---------------------------- */
.counters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(1.25rem, 3vw, 2.5rem);
    position: relative;
    z-index: 1;
}
.counter { text-align: center; }
.counter .num {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    font-weight: 800;
    line-height: 1;
    color: #fff;
    letter-spacing: -.03em;
}
.counter .num em { font-style: normal; color: var(--brand-hi); }
.counter .lbl {
    display: block;
    margin-top: .75rem;
    font-size: .9375rem;
    line-height: 1.4;
    color: var(--on-deep);
}

/* ------------------- 13. Percorso / timeline ---------------------------- */
.path { position: relative; display: grid; gap: 2rem; }
.path::before {
    content: "";
    position: absolute;
    left: 1.4375rem;
    top: 1.25rem;
    bottom: 1.25rem;
    width: .125rem;
    background: var(--brand-line);
    border-radius: 62.5rem;
}
.path::after {
    /* la linea ciano si riempie con lo scorrimento */
    content: "";
    position: absolute;
    left: 1.4375rem;
    top: 1.25rem;
    width: .125rem;
    height: calc((100% - 2.5rem) * var(--path-progress, 0));
    background: var(--brand);
    border-radius: 62.5rem;
    transition: height .3s linear;
}
.path-step { position: relative; padding-left: 4.5rem; }
.path-step .step-num {
    position: absolute;
    left: 0;
    top: 0;
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    border: .125rem solid var(--brand-line);
    color: var(--brand-ink);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.0625rem;
    transition: background-color .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
}
.path-step.is-on .step-num { background: var(--brand); border-color: var(--brand); color: var(--ink); }
.path-step h3 { font-size: 1.1875rem; margin-bottom: .375rem; }
.path-step p { font-size: .9688rem; margin-bottom: 0; }
.section-deep .path::before { background: var(--deep-line); }
.section-deep .path-step .step-num { background: var(--deep-2); border-color: var(--deep-line); color: var(--brand-hi); }
.section-deep .path-step.is-on .step-num { background: var(--brand); border-color: var(--brand); color: var(--ink); }

/* ----------------------- 14. Split testo/immagine ----------------------- */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}
.split.reverse .split-media { order: 2; }
.split-media { position: relative; }
.split-media img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-m);
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
.split-media.tall img { aspect-ratio: 3 / 4; }
.split-media .stamp {
    position: absolute;
    left: -1.25rem;
    bottom: -1.25rem;
    background: var(--brand);
    color: var(--ink);
    border-radius: var(--radius);
    padding: 1.125rem 1.375rem;
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.25;
    max-width: 13.75rem;
    box-shadow: var(--shadow-m);
    font-size: .9375rem;
}
.media-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.media-duo img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-s); aspect-ratio: 3 / 4; object-fit: cover; }
.media-duo img:first-child { margin-top: 2.25rem; }

/* --------------------------- 15. Galleria ------------------------------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.gallery figure { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius-s); }
.gallery img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    transition: transform .6s var(--ease);
}
.gallery figure:hover img { transform: scale(1.06); }
.gallery figcaption {
    position: absolute;
    inset: auto 0 0 0;
    padding: 1.5rem .875rem .75rem;
    background: linear-gradient(to top, rgba(6, 30, 44, .82), transparent);
    color: #fff;
    font-size: .8125rem;
    font-weight: 600;
}

/* --------------------------- 16. FAQ ------------------------------------ */
.faq { display: grid; gap: .75rem; max-width: 52rem; }
.faq details {
    background: #fff;
    border: .0625rem solid var(--line);
    border-radius: var(--radius-s);
    overflow: hidden;
    transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.faq details[open] { border-color: var(--brand-line); box-shadow: var(--shadow-s); }
.faq summary {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.125rem 1.375rem;
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--ink);
    cursor: pointer;
    list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "";
    flex: none;
    width: 1.5rem;
    height: 1.5rem;
    margin-left: auto;
    border-radius: 50%;
    background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B7CB4' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / .75rem no-repeat;
    transition: transform .35s var(--ease);
}
.faq details[open] summary::after { transform: rotate(135deg); }
.faq .faq-body { padding: 0 1.375rem 1.375rem; }
.faq .faq-body p { font-size: .9688rem; }

/* --------------------------- 17. Orari ---------------------------------- */
.schedule {
    width: 100%;
    border-collapse: collapse;
    font-size: .9688rem;
}
.schedule caption {
    text-align: left;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--ink);
    padding-bottom: .75rem;
}
.schedule th, .schedule td {
    text-align: left;
    padding: .8125rem 1rem;
    border-bottom: .0625rem solid var(--line);
}
.schedule th {
    font-family: var(--font-display);
    color: var(--ink);
    font-weight: 700;
    width: 40%;
}
.schedule tr:last-child th, .schedule tr:last-child td { border-bottom: none; }
.schedule td span { display: block; }
.table-scroll { overflow-x: auto; }

/* Box informativo */
.info-box {
    background: var(--brand-soft);
    border-left: .25rem solid var(--brand);
    border-radius: var(--radius-s);
    padding: 1.375rem 1.5rem;
}
.info-box h3 { font-size: 1.0625rem; margin-bottom: .5rem; }
.info-box p { font-size: .9688rem; }
.info-box p:last-child { margin-bottom: 0; }

/* Riquadro referente corsi */
.ref-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    background: #fff;
    border: .0625rem solid var(--brand-line);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-s);
}
.ref-card .ref-ico {
    width: 3.25rem;
    height: 3.25rem;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--brand);
    color: var(--ink);
}
.ref-card p { margin: 0; font-size: .9688rem; }
.ref-card b { display: block; font-family: var(--font-display); color: var(--ink); font-size: 1.0625rem; }

/* --------------------------- 18. Form ----------------------------------- */
.form-panel {
    background: #fff;
    border: .0625rem solid var(--line);
    border-radius: var(--radius);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    box-shadow: var(--shadow-m);
}
.contact-form { display: grid; gap: 1.125rem; }
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.125rem; }
.contact-form label {
    display: block;
    font-family: var(--font-display);
    font-size: .875rem;
    font-weight: 700;
    color: var(--ink);
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea {
    width: 100%;
    margin-top: .4375rem;
    padding: .8125rem 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    color: var(--ink);
    background: var(--paper-2);
    border: .0625rem solid var(--line);
    border-radius: var(--radius-s);
    transition: border-color .25s var(--ease), box-shadow .25s var(--ease), background-color .25s var(--ease);
}
.contact-form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2352585C' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.125rem;
    padding-right: 2.75rem;
}
.contact-form textarea { resize: vertical; min-height: 8.75rem; line-height: 1.6; }
.contact-form :is(input, select, textarea):focus {
    outline: none;
    background: #fff;
    border-color: var(--brand);
    box-shadow: 0 0 0 .1875rem rgba(46, 169, 224, .2);
}
.contact-form .hint { display: block; margin-top: .375rem; font-size: .8125rem; font-weight: 400; color: var(--ink-soft); }

.privacy-field {
    display: flex !important;
    align-items: flex-start;
    gap: .75rem;
    font-weight: 400 !important;
    font-family: var(--font-body) !important;
    font-size: .875rem !important;
    color: var(--ink-soft) !important;
    line-height: 1.55;
}
.privacy-field input[type="checkbox"] {
    flex: none;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: .125rem;
    accent-color: var(--brand-dk);
}

/* Honeypot antispam: deve restare invisibile */
.hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none;
}

.notice {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-s);
    font-size: .9688rem;
    margin-bottom: 1.5rem;
}
.notice-ok { background: #E8F7EE; border-left: .25rem solid #1E8E4E; color: #14532D; }
.notice-err { background: #FDECEC; border-left: .25rem solid #C42B2B; color: #7A1717; }

/* Blocchi contatto */
.contact-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.125rem; }
.contact-list li { display: flex; gap: .9375rem; margin: 0; }
.contact-list .ico {
    flex: none;
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    border-radius: .875rem;
    background: var(--brand-soft);
    color: var(--brand-dk);
}
.contact-list b { display: block; font-family: var(--font-display); color: var(--ink); font-size: .9375rem; }
.contact-list a { font-weight: 600; }
.map-frame {
    border-radius: var(--radius);
    overflow: hidden;
    border: .0625rem solid var(--line);
    box-shadow: var(--shadow-s);
}
.map-frame iframe { display: block; width: 100%; height: 20rem; border: 0; }

/* ------------------------ 19. CTA finale -------------------------------- */
.cta-band { position: relative; overflow: hidden; }
.cta-inner { position: relative; z-index: 1; text-align: center; max-width: 44rem; margin-inline: auto; }
.cta-inner .btn-row { justify-content: center; }

/* ---------------------- 20. Bottone WhatsApp flottante ------------------ */
/* In basso a DESTRA: il widget di accessibilità sta in basso a sinistra. */
.wa-float {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 110;
    display: inline-flex;
    align-items: center;
    gap: .625rem;
    padding: .75rem 1.125rem .75rem .75rem;
    background: #1FAF54;
    color: #fff;
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-size: .9375rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 .5rem 1.5rem rgba(10, 42, 61, .28);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.wa-float:hover { transform: translateY(-.1875rem); color: #fff; box-shadow: 0 .875rem 2rem rgba(10, 42, 61, .34); }
.wa-float svg { flex: none; }
.wa-float .wa-label { display: inline; }

/* --------------------------- 21. Footer --------------------------------- */
.site-footer {
    background: var(--deep-2);
    color: var(--on-deep);
    padding-block: clamp(3rem, 6vw, 4.5rem) 0;
    font-size: .9375rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: clamp(1.75rem, 4vw, 3rem);
    padding-bottom: 3rem;
}
.footer-brand img { height: 3rem; width: auto; margin-bottom: 1.25rem; }
.footer-brand p { font-size: .9375rem; }
.footer-col h3 {
    color: #fff;
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: 1.125rem;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .625rem; }
.footer-col li { margin: 0; }
.footer-col a { color: var(--on-deep); text-decoration: none; }
.footer-col a:hover { color: var(--brand-hi); text-decoration: underline; }
.footer-nap { display: grid; gap: .875rem; }
.footer-nap div { display: flex; gap: .75rem; }
.footer-nap svg { flex: none; color: var(--brand-hi); margin-top: .1875rem; }
.footer-nap b { color: #fff; display: block; font-family: var(--font-display); }
.footer-social { display: flex; gap: .625rem; margin-top: 1.25rem; }
.footer-social a {
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    transition: background-color .25s var(--ease);
}
.footer-social a:hover { background: var(--brand); color: var(--ink); }

.footer-bottom {
    border-top: .0625rem solid var(--deep-line);
    padding-block: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1.5rem;
    align-items: center;
    justify-content: space-between;
    font-size: .8125rem;
}
.footer-bottom p { margin: 0; }
.footer-piva { opacity: .75; }

/* Link legali obbligatori (stampati da compliance_footer_links) */
.legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.25rem;
    align-items: center;
    font-size: .8125rem;
}
.legal-links a, .legal-links button {
    color: var(--on-deep);
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
}
.legal-links a:hover, .legal-links button:hover { color: var(--brand-hi); text-decoration: underline; }

/* ---------------------- 22. Pagine legali ------------------------------- */
.legal-page { padding-block: clamp(2.5rem, 5vw, 4rem); }
.legal-page h1 { font-size: clamp(1.875rem, 4vw, 2.75rem); }
.legal-page h2 { font-size: clamp(1.25rem, 2.4vw, 1.5rem); margin-top: 2.5rem; }
.legal-page section:first-of-type h2 { margin-top: 2rem; }
.legal-updated { font-size: .875rem; color: var(--ink-soft); margin-bottom: 2rem; }
.legal-owner-box {
    display: grid;
    gap: .3125rem;
    background: var(--brand-soft);
    border-left: .25rem solid var(--brand);
    border-radius: var(--radius-s);
    padding: 1.375rem 1.5rem;
    margin-bottom: 2.5rem;
    font-size: .9688rem;
}
.legal-owner-box strong { font-family: var(--font-display); }

/* ------------------- 23. Thank you page --------------------------------- */
.thanks { text-align: center; }
.thanks-mark {
    width: 5.5rem;
    height: 5.5rem;
    margin: 0 auto 1.75rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand-dk);
    position: relative;
}
.thanks-mark::before {
    content: "";
    position: absolute;
    inset: -.5rem;
    border-radius: 50%;
    border: .125rem solid var(--brand);
    opacity: .35;
    animation: pulse-ring 2.6s var(--ease) infinite;
}
@keyframes pulse-ring {
    0% { transform: scale(.9); opacity: .5; }
    70% { transform: scale(1.14); opacity: 0; }
    100% { transform: scale(1.14); opacity: 0; }
}
.thanks-mark svg { animation: pop-in .55s .15s var(--ease) both; }
@keyframes pop-in { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.thanks-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--brand-soft);
    color: var(--brand-ink);
    padding: .4375rem 1rem;
    border-radius: var(--radius-pill);
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}
.thanks-lead { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); max-width: 40rem; margin-inline: auto; }
.thanks-note {
    margin-top: 1.5rem;
    font-size: .9375rem;
    color: var(--ink-soft);
    background: var(--paper-2);
    border-radius: var(--radius-s);
    padding: .875rem 1.25rem;
    display: inline-block;
}
.thanks-actions { display: flex; flex-wrap: wrap; gap: .875rem; justify-content: center; margin-top: 1.75rem; }
.header-slim .wrap { justify-content: center; min-height: 4.25rem; }

/* --------------------- 24. Animazioni allo scroll ----------------------- */
.reveal {
    opacity: 0;
    transform: translateY(1.75rem);
    transition: opacity .75s var(--ease), transform .75s var(--ease);
    transition-delay: var(--d, 0ms);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal-left { transform: translateX(-1.75rem); }
.reveal-right { transform: translateX(1.75rem); }
.reveal-zoom { transform: scale(.94); }

/* Tracciato SVG che si disegna quando entra nello schermo */
.draw path { stroke-dasharray: var(--len, 1200); stroke-dashoffset: var(--len, 1200); }
.draw.is-in path { transition: stroke-dashoffset 2.2s var(--ease); stroke-dashoffset: 0; }

/* --------------------- 25. Rispetto di prefers-reduced-motion ----------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1 !important; transform: none !important; }
    .draw path { stroke-dashoffset: 0 !important; }
    .marquee-track { animation: none; }
    .hero h1 .hl::after { transform: scaleX(1); }
}

/* --------------------------- 26. Responsive ----------------------------- */
@media (max-width: 68.75rem) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .gallery { grid-template-columns: repeat(3, 1fr); }
    .mega { width: min(38rem, 92vw); grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 60rem) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { max-width: 26rem; margin-inline: auto; order: -1; }
    .hero-frame { aspect-ratio: 5 / 4; border-radius: 12rem 12rem var(--radius) var(--radius); }
    .hero-badge { right: 0; bottom: 1rem; }
    .page-hero-grid { grid-template-columns: 1fr; }
    .split, .contact-grid { grid-template-columns: 1fr; }
    .split.reverse .split-media { order: 0; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .counters { grid-template-columns: repeat(2, 1fr); row-gap: 2.25rem; }

    /* Navigazione mobile a cassetto.
       backdrop-filter va rimosso qui: renderebbe l'header il contenitore di
       riferimento degli elementi in position:fixed, e il cassetto non
       occuperebbe tutta l'altezza dello schermo. */
    .site-header {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: var(--paper);
    }
    .nav-toggle { display: inline-flex; }
    .header-cta, .header-tel { display: none; }
    .nav-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        margin-bottom: 1.25rem;
        padding-bottom: 1rem;
        border-bottom: .0625rem solid var(--line);
    }
    .nav-head img { height: 2.25rem; width: auto; }
    .nav-close {
        flex: none;
        width: 2.75rem;
        height: 2.75rem;
        display: grid;
        place-items: center;
        background: var(--brand-soft);
        color: var(--ink);
        border: none;
        border-radius: var(--radius-s);
        cursor: pointer;
    }
    .nav-close:hover { background: var(--brand-line); }
    .main-nav {
        position: fixed;
        inset: 0 0 0 auto;
        width: min(23rem, 88vw);
        margin: 0;
        background: #fff;
        padding: 1.25rem 1.5rem 2.5rem;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform .38s var(--ease);
        z-index: 140;
        box-shadow: var(--shadow-l);
    }
    body.nav-open .main-nav { transform: none; }
    .main-nav > ul { flex-direction: column; align-items: stretch; gap: .125rem; }
    .main-nav > ul > li { width: 100%; }
    .main-nav a:not(.btn), .has-mega > button {
        width: 100%;
        justify-content: space-between;
        padding: .875rem .75rem;
        font-size: 1.0625rem;
        border-radius: var(--radius-s);
    }
    .main-nav a:not(.btn)::after, .has-mega > button::after { display: none; }
    .main-nav a:not(.btn):hover, .has-mega > button:hover { background: var(--brand-soft); }
    .main-nav li.is-current > a:not(.btn) { background: var(--brand-soft); }
    .mega {
        position: static;
        width: 100%;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-left: .125rem solid var(--brand-line);
        border-radius: 0;
        padding: .25rem 0 .75rem .75rem;
        margin-left: .75rem;
        grid-template-columns: 1fr;
        gap: 0;
    }
    .has-mega.is-open .mega { display: grid; }
    .has-mega:hover .mega { display: none; }
    .has-mega.is-open:hover .mega { display: grid; }
    .mega-title { padding-inline: .75rem; margin-top: .5rem; }
    .mega-foot { display: none; }
    .nav-mobile-cta { display: grid; gap: .625rem; margin-top: 1.5rem; }
}

@media (max-width: 40rem) {
    :root { --radius: 1rem; }
    body { font-size: 1rem; }
    .topbar .wrap { min-height: 0; padding-block: .5rem; justify-content: center; text-align: center; }
    .topbar-list { gap: .875rem; justify-content: center; font-size: .8125rem; }
    .topbar-hide-sm { display: none; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .gallery { grid-template-columns: repeat(2, 1fr); }
    .contact-form .row { grid-template-columns: 1fr; }
    .check-list.two-col { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .media-duo img:first-child { margin-top: 0; }
    .split-media .stamp { left: 0; bottom: -.75rem; position: relative; margin-top: 1rem; max-width: none; }
    .hero-badge { position: static; margin-top: 1rem; max-width: none; animation: none; }
    .btn { width: 100%; }
    .btn-row .btn { width: auto; flex: 1 1 12rem; }
    .wa-float { padding: .75rem; }
    .wa-float .wa-label { display: none; }
    .path-step { padding-left: 3.75rem; }
    .path::before, .path::after { left: 1.1875rem; }
    .path-step .step-num { width: 2.5rem; height: 2.5rem; font-size: .9375rem; }
    .counters { grid-template-columns: 1fr; }
}
