/* ==========================================================================
   EASYVALVE SRL — foglio di stile unico
   Design system: verde brand #95C11E, layout responsive.
   Font self-hosted: Sora (titoli) + Instrument Sans (corpo, come il nuovo
   sito); Barlow resta su app bar e footer.
   Indice: 1 token · 2 reset · 3 base · 4 utility · 5 header/nav · 6 hero
           7 sezioni/prosa · 8 pilastri · 9 famiglie · 10 liste tecniche
           11 CTA · 12 indirizzi · 13 breadcrumb · 14 form · 15 footer · 16 media
           17 tema scuro · 18 reveal (animazioni d'ingresso)
   ========================================================================== */

/* --- 1. Token ----------------------------------------------------------- */
:root {
    /* Brand: il verde #95C11E NON è leggibile come testo su bianco (2.12:1).
       Usalo per sfondi con testo scuro, bordi, icone, decorazioni.
       Per testo accento su bianco: --brand-dark (6.25:1) o --brand-deep (8:1). */
    --brand:       #95C11E;
    --brand-mid:   #7FA717;   /* "green-dark" del nuovo sito: accento intro */
    --brand-dark:  #4E6814;
    --brand-deep:  #3F5510;
    --ink:         #1F2421;
    --slate:       #55605A;
    --paper:       #FFFFFF;
    --mist:        #F3F6EC;
    --stone:       #F1F2F0;   /* grigio neutro leggero: banda famiglie home */
    --line:        #E3E7DC;
    --coal:        #262B22;
    --coal-deep:   #1D211B;
    --ok:          #1E7B3C;
    --err:         #B3261E;

    --font: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-head: "Sora", var(--font);           /* titoli ed etichette */
    --font-body: "Instrument Sans", var(--font); /* corpo del testo */
    --container: 1160px;
    --radius: 6px;
    --ease-out: cubic-bezier(.16, 1, .3, 1);   /* ingressi morbidi (reveal) */
    --ease-soft: cubic-bezier(.42, 0, .34, 1); /* fade lenti: parte piano e
                                                  si chiude piano, la dissolvenza
                                                  si distribuisce su tutta la
                                                  durata invece di esaurirsi
                                                  nei primi istanti */
    --ease-spring: cubic-bezier(.34, 1.56, .64, 1); /* molla: hover, badge */
    --shadow-card: 0 1px 2px rgba(31, 36, 33, .06), 0 6px 18px rgba(31, 36, 33, .07);
    --shadow-card-hover: 0 2px 4px rgba(31, 36, 33, .08), 0 12px 28px rgba(31, 36, 33, .12);
}

/* --- 2. Reset ----------------------------------------------------------- */
@font-face {
    font-family: "Barlow";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/barlow-400-latin.woff2") format("woff2");
}
@font-face {
    font-family: "Barlow";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/barlow-600-latin.woff2") format("woff2");
}
@font-face {
    font-family: "Barlow";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/barlow-700-latin.woff2") format("woff2");
}
/* Font del nuovo sito, self-hostati come Barlow: Sora per i titoli e le
   etichette, Instrument Sans per il corpo. File variabili: un solo woff2
   copre tutti i pesi dichiarati nell'intervallo. */
@font-face {
    font-family: "Sora";
    font-style: normal;
    font-weight: 600 700;
    font-display: swap;
    src: url("../fonts/sora-var-latin.woff2") format("woff2");
}
@font-face {
    font-family: "Instrument Sans";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/instrument-var-latin.woff2") format("woff2");
}
@font-face {
    font-family: "Instrument Sans";
    font-style: italic;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/instrument-var-italic-latin.woff2") format("woff2");
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    /* La barra di scroll sparisce quando il menu mobile blocca la pagina:
       con la gutter fissa l'header (e l'icona menu) non balla di lato —
       righe e crocetta restano esattamente nella stessa posizione */
    scrollbar-gutter: stable;
    /* L'header si compatta allo scroll (92→68px, v. .header-inner): lo scroll
       anchoring del browser compenserebbe quel cambio d'altezza spostando
       scrollY, che rimbalzando sulla soglia di is-scrolled farebbe sfarfallare
       la barra. Qui è sicuro disattivarlo: le immagini lazy hanno dimensioni
       esplicite e le animazioni toccano solo transform/opacity. */
    overflow-anchor: none;
}

body {
    font-family: var(--font-body);
    font-size: 1.0625rem;               /* 17px */
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }

/* --- 3. Base ------------------------------------------------------------ */
h1, h2, h3, h4 {
    font-family: var(--font-head);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.01em;
    color: var(--ink);
}

h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.6vw, 2.3rem); }
h3 { font-size: 1.2rem; }

/* Titoli, pulsanti ed etichette in Sora (font-head del nuovo sito) */
.btn, .hero-kicker, .contact-eyebrow, .breadcrumb, .pillar-badge {
    font-family: var(--font-head);
}

/* App bar e footer mantengono Barlow, il font originale del sito */
.site-header, .site-footer { font-family: var(--font); }
.site-header :is(h1, h2, h3, h4, .btn, .hero-kicker, .contact-eyebrow, .breadcrumb, .pillar-badge),
.site-footer :is(h1, h2, h3, h4, .btn, .hero-kicker, .contact-eyebrow, .breadcrumb, .pillar-badge) {
    font-family: var(--font);
}

p + p { margin-top: .9em; }

a { color: var(--brand-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }

:focus-visible {
    outline: 3px solid var(--brand-dark);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Selezione del testo: copiata tale e quale dal nuovo sito (verde brand,
   testo bianco). */
::selection { background: var(--brand); color: #fff; }

[id] { scroll-margin-top: 96px; }

/* --- 4. Utility --------------------------------------------------------- */
.container {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip-link {
    position: absolute; top: -100%; left: 1rem; z-index: 200;
    padding: .6rem 1rem; background: var(--coal); color: #fff;
    border-radius: 0 0 var(--radius) var(--radius); text-decoration: none;
}
.skip-link:focus { top: 0; color: #fff; }

.btn {
    display: inline-block;
    padding: .8rem 1.7rem;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: .02em;
    text-decoration: none;
    border-radius: var(--radius);
    border: 2px solid transparent;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease,
                transform .35s var(--ease-spring), box-shadow .25s ease;
    cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }

.btn--dark  { background: var(--coal); color: #fff; }
.btn--dark:hover { background: var(--brand-deep); color: #fff; }

.btn--light {
    background: rgba(255, 255, 255, .08);
    color: #fff;
    border-color: rgba(255, 255, 255, .65);
}
.btn--light:hover { background: var(--brand); border-color: var(--brand); color: var(--ink); }

/* Bianco pieno per le bande scure (CTA grigia), come btn--white del nuovo sito.
   Hover: verde Easyvalve con testo scuro (contrast ok, come btn--brand). */
.btn--white { background: #fff; color: #4E6814; }
.btn--white:hover { background: var(--brand); color: var(--ink); }

/* Verde pieno con testo scuro (contrast ok); hover scurisce e passa a bianco */
.btn--brand { background: var(--brand); color: var(--ink); }
.btn--brand:hover { background: var(--brand-dark); color: #fff; }

/* --- 5. Header e navigazione (design app bar nuovo sito) ------------------
   Ombra al posto della riga verde, voci maiuscole, linea verde sotto la
   pagina corrente, bandierina della lingua attiva, toggle tema. */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(31, 36, 33, .06);
    transition: box-shadow .35s ease, background .35s ease;
}
/* Scrolled: ombra e un filo più di trasparenza (il blur del backdrop tiene
   il testo leggibile anche riducendo l'opacità) */
.site-header.is-scrolled {
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 10px 30px rgba(31, 36, 33, .12);
}

.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1.5rem;
    /* Compattamento allo scroll: 92→68px. Il cambio d'altezza del documento
       è gestito da overflow-anchor: none su html (v. token base). */
    min-height: 92px;
    transition: min-height .35s ease;
}
.site-header.is-scrolled .header-inner { min-height: 68px; }

.brand {
    display: flex; align-items: center;
    text-decoration: none;
}
.brand img { width: 200px; height: auto; transition: width .35s ease; }
.site-header.is-scrolled .brand img { width: 168px; }

.site-nav { display: flex; align-items: center; }
.nav-list {
    display: flex; align-items: center; gap: .25rem;
    list-style: none; padding: 0;
    margin: 0;
}

.nav-list a {
    position: relative;
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .75rem 1rem;
    font-weight: 600; font-size: .95rem;
    text-transform: uppercase; letter-spacing: .02em;
    color: var(--ink);
    text-decoration: none;
    border-radius: 8px;
    transition: color .18s ease, transform .18s ease;
}
/* Hover: solo un piccolo zoom, niente verde né sottolineatura.
   La linea verde resta solo sotto la pagina corrente. */
.nav-list a:hover { transform: scale(1.06); }
.nav-list a::after {
    content: ""; position: absolute; left: 1rem; right: 1rem; bottom: .45rem;
    height: 2.5px; border-radius: 2px;
    background: var(--brand);
    transform: scaleX(0); transform-origin: left;
    transition: transform .35s ease;
}
.nav-list a[aria-current="page"]::after { transform: scaleX(1); }
.nav-list a[aria-current="page"] { color: var(--brand-deep); }

/* Slot fissi e centrati: le etichette IT/EN hanno lunghezze diverse ma
   ogni voce occupa lo stesso spazio, quindi l'app bar non si sposta
   cambiando lingua (bandierina e toggle compresi). */
@media (min-width: 901px) {
    .nav-list > li:not(.nav-lang) > a {
        min-width: 8.4rem;
        justify-content: center;
    }
    /* Tra 901 e 1080px lo slot si restringe ma resta identico per tutte le voci */
    @media (max-width: 1080px) {
        .nav-list > li:not(.nav-lang) > a { min-width: 7.5rem; padding-inline: .55rem; }
    }
}

/* Switch lingua: un click, bandierina della lingua di destinazione */
.nav-lang { margin-left: 1rem; }
.nav-lang a {
    padding: .42rem .55rem;
    font-size: .88rem;
    color: var(--ink);
}
.nav-lang a:hover { background: var(--mist); }
.nav-lang .flag {
    width: 24px; height: 16px; border-radius: 3px; display: block; flex: none;
}

/* Toggle tema chiaro/scuro */
.theme-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; margin-left: .4rem;
    background: none; border: 0; cursor: pointer;
    border-radius: 10px;
    color: var(--ink);
    transition: color .25s ease, background-color .25s ease;
}
.theme-toggle:hover { color: var(--brand-dark); background: var(--mist); }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle .ico-sun { display: none; }
[data-theme="dark"] .theme-toggle .ico-moon { display: none; }
[data-theme="dark"] .theme-toggle .ico-sun { display: block; }
/* Con il menu mobile aperto il pulsante sta sul pannello: colore a token */
.site-header.menu-open .theme-toggle { color: var(--ink); }
.site-header.menu-open .theme-toggle:hover { background: var(--mist); }
/* Copia nel menu mobile (dentro .nav-lang): visibile solo ≤900px */
.nav-lang .theme-toggle { display: none; }

/* Menu a tre righe: aperte si incrociano al centro esatto del pulsante
   formando una X normale, la riga centrale svanisce */
.nav-toggle {
    display: none;
    flex-direction: column; justify-content: center; align-items: center; gap: 7px;
    width: 46px; height: 46px;
    background: none; border: 0; cursor: pointer;
    border-radius: 10px;
    position: relative; z-index: 1100; /* sopra il pannello mobile */
}
.nav-toggle-bar {
    width: 24px; height: 3px;
    background: var(--ink); border-radius: 2px;
    transition: transform .6s var(--ease-out), opacity .45s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

/* --- 6. Hero ------------------------------------------------------------- */
.hero {
    position: relative;
    background-color: var(--coal);
    overflow: hidden;
    color: #fff;
    /* Hero delle pagine interne: un po' più alta (la home usa .hero--slides
       che sovrascrive i padding con la sua altezza minima) */
    padding: clamp(5.5rem, 12vw, 9.5rem) 0 clamp(8.5rem, 13vw, 10.5rem);
}
.hero::before {
    content: "";
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(100deg,
        rgba(29, 33, 27, .93) 0%,
        rgba(29, 33, 27, .82) 45%,
        rgba(63, 85, 16, .55) 100%);
}
.hero--solid::before {
    background: linear-gradient(100deg, var(--coal-deep) 0%, var(--coal) 55%, var(--brand-deep) 130%);
}

/* Stessa altezza per tutte le hero interne (chi-siamo, prodotti, servizi,
   contatti…): min-height comune e contenuto centrato, così pagine con più
   o meno testo non cambiano l'altezza della banda. La home è esclusa
   (.hero--slides ha la sua struttura con nav e timeline). */
.hero:not(.hero--slides) {
    min-height: clamp(430px, 50vw, 565px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.hero:not(.hero--slides) .hero-inner { width: 100%; }

/* Hero con slideshow: colonna flessibile, nav concept in flusso (mai sovrapposta) */
.hero--slides {
    display: flex; flex-direction: column; justify-content: center;
    min-height: min(86vh, 780px);
    padding-bottom: clamp(2.2rem, 4vw, 3.2rem);
}
/* Nel flex il margin:auto del container spezzerebbe lo stretch: larghezza piena, max-width fa il resto */
.hero--slides .hero-inner { width: 100%; }

/* Immagine singola */
.hero-bg {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
}

/* Slideshow concept (home) */
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.4s ease, transform 7s linear;
}
/* Ken Burns: tutte le slide come Puntualità — partono da scale(1.22) e si
   assestano su 1 in 7s. Non si può scendere sotto 1 (l'immagine è a cover:
   mostrerebbe i bordi), quindi la corsa dello zoom-out si allunga solo
   alzando lo zoom di partenza. */
.hero-slide                 { transform: scale(1.22); }
.hero-slide.is-active       { opacity: 1; transform: scale(1); }

/* Colonna allineata al logo dell'header (stesso container) */
.hero-inner { position: relative; z-index: 2; max-width: var(--container); }

.hero-kicker {
    display: inline-block;
    font-size: .85rem; font-weight: 700;
    letter-spacing: .18em; text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 1rem;
}
/* Titolo su riga intera: la prima frase entra nella colonna, l'accento va a capo */
.hero-title {
    color: #fff;
    margin-bottom: 1rem;
    font-size: clamp(2rem, 1rem + 2.55vw, 3.25rem);
}
.hero-sub {
    font-size: clamp(1.05rem, 1rem + .4vw, 1.3rem);
    line-height: 1.5;
    color: #D9E2CE;
    margin-bottom: 2rem;
    max-width: 620px;
}
.hero .btn { margin-top: .4rem; }

/* Nav slideshow: simbolo + didascalia del concetto attivo, frecce, timeline dei concetti.
   In flusso (position relative), quindi non può sovrapporsi al testo a nessuna larghezza. */
.hero-slides-nav {
    position: relative;
    z-index: 2;
    margin-top: clamp(2.4rem, 6vh, 4.5rem);
}
.hero-slides-nav-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1.5rem;
    max-width: var(--container);
}
.hero-concept { display: flex; align-items: center; gap: 1.1rem; min-width: 0; }

.hero-symbols {
    position: relative;
    width: 72px; height: 62px;
    flex: none;
}
.hero-symbol {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    opacity: 0;
    transform: scale(.82);
    transition: opacity .55s ease, transform .55s ease;
}
.hero-symbol.is-active { opacity: 1; transform: none; }

.hero-concept-text { min-width: 0; }
.hero-caption {
    margin: 0;
    max-width: 560px;
    font-size: 1rem;
    line-height: 1.5;
    color: #D9E2CE;
}
.hero-caption.is-anim { animation: heroRise .65s cubic-bezier(.22, .61, .36, 1) both; }

/* Timeline concetti: segmenti cliccabili, solo l'attivo è colorato (verde) e si riempie in 7s */
.hero-progress {
    display: flex; gap: 1.4rem;
    margin-top: 1.15rem;
    max-width: var(--container);
}
.hero-segment {
    display: block;
    flex: 1 1 0; min-width: 0;
    padding: 0; border: 0;
    background: none;
    text-align: left;
    cursor: pointer;
    -webkit-appearance: none; appearance: none;
}
.hero-segment-name {
    display: block;
    margin-bottom: .5rem;
    font-size: .74rem; font-weight: 700;
    letter-spacing: .16em; text-transform: uppercase;
    color: rgba(217, 226, 206, .5);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: color .4s ease;
}
.hero-segment:hover .hero-segment-name,
.hero-segment:focus-visible .hero-segment-name { color: #fff; }
.hero-segment:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
.hero-segment.is-active .hero-segment-name { color: var(--brand); }
.hero-segment-track {
    display: block;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    overflow: hidden;
}
.hero-segment-fill {
    display: block;
    height: 100%; width: 0;
    background: var(--brand);
    border-radius: inherit;
}
.hero-segment.is-active .hero-segment-fill { animation: heroFill 7s linear forwards; }

@keyframes heroFill { from { width: 0; } to { width: 100%; } }
@keyframes heroRise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

/* --- 7. Sezioni e prosa --------------------------------------------------- */
.section { padding: clamp(3rem, 6vw, 4.8rem) 0; }
.section--tight { padding: clamp(2rem, 4vw, 3rem) 0; }
.section--mist { background: var(--mist); }
/* Prosa che ne prosegue un'altra: un solo flusso, il testo sale senza salto bianco */
.section--after-prose { padding-top: 0; }
.section--before-prose { padding-bottom: clamp(1.4rem, 3vw, 2.2rem); }
/* Prosa che introduce un elenco: la prosa chiude vicino e il titolo
   dell'elenco sale — un solo respiro, niente vuoto doppio */
.section--prose:has(+ .section--list) { padding-bottom: clamp(1.2rem, 2.5vw, 2rem); }
.section--prose + .section--list { padding-top: clamp(1.6rem, 3vw, 2.4rem); }

.section-title {
    margin-bottom: 1.6rem;
    max-width: 720px;
}
.section-title::after {
    content: "";
    display: block;
    width: 56px; height: 4px;
    background: var(--brand);
    margin-top: .8rem;
    border-radius: 2px;
}
.section-intro {
    color: var(--slate);
    font-size: 1.12rem;
    max-width: 640px;
    margin: -0.8rem 0 1.8rem;
}

/* Colonne di prosa: da bordo logo a bordo pulsante lingua (piena larghezza container) */
.prose-wrap { max-width: var(--container); }
.prose { color: var(--ink); }
.prose p, .prose ul, .prose ol { margin-bottom: .9em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .35em; }
.prose strong { font-weight: 700; color: var(--brand-deep); }

/* Chi siamo: prosa a sinistra + foto a destra con cornice verde (come il
   nuovo sito). La cornice è un ::after spostato in diagonale dietro la foto
   (z-index -1): entra con la figura partendo più lontana (v. sezione 18) e
   poi si avvicina al passaggio del mouse. Gli offset vivono in variabili
   così sotto i 640px si riducono senza uscire dai bordi del container. */
.about-split {
    display: grid;
    /* Testo elastico (può restringersi), foto con larghezza propria:
       la colonna si misura sull'immagine, non sulla quota fr. */
    grid-template-columns: minmax(0, 1fr) auto;
    gap: clamp(2rem, 6vw, 4.5rem);
    align-items: center;
}
.about-figure {
    --frame-shift: 18px;   /* riposo: cornice scostata in basso-destra */
    --frame-hover: 10px;   /* avvicinamento al passaggio del mouse */
    position: relative;
}
/* Dimensioni misurate al pixel sul nuovo sito (cornice verde inclusa):
     1920/1440/1280px → 326px · 1024px → 303px
   clamp(240px, 30vw, 326px) riproduce la stessa curva restringendosi
   sotto i ~1100px di finestra. Sempre dentro il container. */
.about-figure img {
    width: clamp(240px, 30vw, 326px);
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card-hover);
}
.about-figure::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    border: 3px solid var(--brand);
    transform: translate(var(--frame-shift), var(--frame-shift));
    z-index: -1;
    transition: transform .6s var(--ease-out);
}
.about-figure:hover::after {
    transform: translate(var(--frame-hover), var(--frame-hover));
}
/* Accanto alla foto sta solo l'apertura della pagina: il primo paragrafo
   fa da lead (battuta maggiore, come l'intro della home), il resto del
   testo scorre nella sezione prosa successiva, sotto la coppia testo+foto. */
.about-split__text .prose > p:first-child {
    font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem);
    font-weight: 600;
    line-height: 1.5;
    color: var(--ink);
    margin-bottom: 1.1rem;
}
.about-split__text .prose > p:first-child::first-letter { color: var(--brand-deep); }
.about-split__text .prose > p:last-child { margin-bottom: 0; }

/* Intro della home, ricostruita dal nuovo sito: sopracciglio coi trattini
   verdi, titolo centrato con accento, lead in barra larga centrata e link
   frecciato. Accenti in --brand-mid (#7FA717, il "green-dark" del nuovo
   sito); il bold del lead in --brand-dark (il suo "green-darker"). */
.intro-head { text-align: center; margin-bottom: 1.8rem; }
.eyebrow {
    display: inline-flex; flex-wrap: wrap; justify-content: center;
    align-items: center; gap: .6rem;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .8rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--brand-mid);
    margin-bottom: 1.1rem;
}
.eyebrow::before, .eyebrow::after {
    content: "";
    width: 34px; height: 3px;
    background: var(--brand);
    border-radius: 2px;
}
.intro-title { font-size: clamp(1.75rem, 4vw, 2.6rem); }
.intro-title em { font-style: normal; color: var(--brand-mid); }
.intro-lead {
    max-width: 860px;
    margin-inline: auto;
    text-align: center;
    font-size: clamp(1.1rem, 2.2vw, 1.3rem);
    line-height: 1.8;
    color: var(--slate);
}
.intro-lead strong { color: var(--brand-dark); }
/* In scuro il "green-darker" del nuovo sito è #C4E55F = --brand-deep. */
[data-theme="dark"] .intro-lead strong { color: var(--brand-deep); }
.intro-more { margin-top: 2.2rem; text-align: center; }
.link-more {
    display: inline-flex; align-items: center; gap: .5rem;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .9rem;
    color: var(--brand-mid);
    text-decoration: none;
}
.link-more::after { content: "\2192"; transition: transform .3s var(--ease-out); }
.link-more:hover::after { transform: translateX(5px); }

/* --- 8. Pilastri 100% ----------------------------------------------------- */
.pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.2rem;
}

.pillar-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-top: 4px solid var(--brand);
    border-radius: var(--radius);
    padding: 1.5rem 1.3rem;
    box-shadow: var(--shadow-card);
    transition: box-shadow .2s ease, transform .2s ease;
}
.pillar-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); }
.section--mist .pillar-card { background: var(--paper); }

.pillar-badge {
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .85rem; font-weight: 700;
    color: #fff; background: var(--brand-dark);
    min-width: 1.9rem; height: 1.9rem;
    padding: 0 .2rem;
    border-radius: 50%;
    margin-bottom: .7rem;
}

.pillar-card h3 { font-size: 1.06rem; margin-bottom: .5rem; }
.pillar-text { font-size: .95rem; color: var(--slate); }
.pillar-more { font-size: .95rem; color: var(--slate); margin-top: .5rem; }

/* --- 8b. Hub «Perché Easyvalve»: mappa radiale a 5 nodi -------------------- */
/* Home: l'intro fluisce nell'hub e l'hub prosegue in Cosa forniamo —
   un solo respiro per lato, niente doppio padding di sezione */
.section--before-hub { padding-bottom: clamp(1.6rem, 3vw, 2.4rem); }
.section--hub--flush { padding-top: 0; }
.section--hub--flow-end { padding-bottom: clamp(1.6rem, 3vw, 2.4rem); }
.section--families--flush { padding-top: clamp(2rem, 4vw, 3.2rem); }

/* Aloni radiali lenti anche nell'intro e nell'hub: stessa famiglia della
   banda CTA (drift + zoom, mai fermi), ma con dimensioni, posizioni, durate
   e fasi diverse (delay negativi) così ogni sezione respira per conto suo.
   Su fondo chiaro l'intensità è calata: deve restare un alone, non un fondo. */
.section--before-hub { position: relative; clip-path: inset(0 0 -340px 0); }
/* Entrambe aprono il clip verso il confine condiviso: gli aloni di
   ciascuna passano nella sezione vicina senza essere tagliati (il clip
   ferma solo lati esterni e gli estremi opposti) */
.section--hub { position: relative; clip-path: inset(-520px 0 0 0); }
.section--before-hub .container,
.section--hub .container { position: relative; z-index: 1; }
/* Aloni generati da main.js: posizione, dimensione, intensità e fase
   casuali a ogni caricamento (preferite le bande bianche ai lati del
   contenuto, possibili anche al centro). Drift + zoom lenti, stessa
   famiglia della banda CTA */
.halo {
    position: absolute; pointer-events: none;
    will-change: transform, opacity;
    background: radial-gradient(closest-side,
                rgba(149, 193, 30, var(--halo-a, .1)),
                transparent var(--halo-stop, 65%));
    animation: var(--halo-anim, band-glow-a) var(--halo-dur, 26s)
               ease-in-out var(--halo-delay, 0s) infinite;
}
.hub-map {
    position: relative;
    max-width: 1080px;
    margin-inline: auto;
    aspect-ratio: 1080 / 820;
}
.hub-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}
.hub-line {
    stroke: var(--brand);
    stroke-width: 2;
    stroke-linecap: round;
    opacity: .55;
    transition: opacity .3s ease, stroke-width .3s ease;
}

/* Centro: badge circolare con anello pulsante */
.hub-core {
    position: absolute;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
    width: clamp(180px, 22vw, 220px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--paper);
    border: 2px solid var(--brand);
    box-shadow: 0 0 0 12px rgba(149, 193, 30, .07), var(--shadow-card);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 2;
}
.hub-core::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid var(--brand);
    animation: hub-pulse 3.2s var(--ease-out) infinite;
}
.hub-core__title { margin: 0; }
.hub-core__kick {
    display: block;
    font: 600 .78rem/1.2 var(--font-head);
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--slate);
    margin-bottom: .3rem;
}
.hub-core__name {
    display: block;
    font: 700 1.7rem/1.05 var(--font-head);
    color: var(--brand-deep);
}

/* Nodi esterni */
.hub-nodes { display: contents; }
.hub-node {
    position: absolute;
    left: var(--x);
    top: var(--y);
    translate: -50% -50%;
    width: min(250px, 26vw);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: .75rem .9rem;
    z-index: 3;
    transform: translateY(0) scale(1);
    transition: transform .3s var(--ease-spring), box-shadow .3s ease, border-color .3s ease;
}
.hub-node:hover,
.hub-node:focus-within,
.hub-node.is-open {
    transform: translateY(-3px) scale(1.03);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--brand);
}
.hub-node__title { margin: 0; }
.hub-node__btn {
    all: unset;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: .55rem;
    width: 100%;
    cursor: pointer;
    font: 600 1.02rem/1.25 var(--font-head);
    color: var(--ink);
}
.hub-node__btn:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 3px;
    border-radius: 4px;
}
.hub-dot {
    flex: none;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--brand);
    box-shadow: 0 0 6px rgba(149, 193, 30, .9);
    transition: transform .3s var(--ease-spring);
}
.hub-node:hover .hub-dot,
.hub-node:focus-within .hub-dot,
.hub-node.is-open .hub-dot { transform: scale(1.3); }

/* Descrizione: compressa di default, si apre con hover/focus/tap */
.hub-node__body {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transform: translateY(-6px);
    transition: grid-template-rows .35s var(--ease-out),
                opacity .35s var(--ease-out),
                transform .35s var(--ease-out);
}
.hub-node__inner { overflow: hidden; min-height: 0; }
.hub-node__inner p {
    margin: 0;
    padding-top: .6rem;
    font-size: .92rem;
    line-height: 1.45;
    color: var(--slate);
}
.hub-node:hover .hub-node__body,
.hub-node:focus-within .hub-node__body,
.hub-node.is-open .hub-node__body {
    grid-template-rows: 1fr;
    opacity: 1;
    transform: none;
}

/* Linea e pallino si accendono quando il nodo è attivo (hover/focus/aperto) */
.hub-map:has(.hub-node--0:is(:hover, :focus-within, .is-open)) .hub-line--0,
.hub-map:has(.hub-node--1:is(:hover, :focus-within, .is-open)) .hub-line--1,
.hub-map:has(.hub-node--2:is(:hover, :focus-within, .is-open)) .hub-line--2,
.hub-map:has(.hub-node--3:is(:hover, :focus-within, .is-open)) .hub-line--3,
.hub-map:has(.hub-node--4:is(:hover, :focus-within, .is-open)) .hub-line--4 {
    opacity: 1;
    stroke-width: 3.5;
    filter: drop-shadow(0 0 6px rgba(149, 193, 30, .85));
}

/* Ingresso (main.js aggiunge .is-in quando il diagramma è entrato per un
   quarto nel viewport, non al primo bordo come i .reveal generici: così
   la coreografia non si "brucia" fuori schermo). Coreografia a strati:
   la mappa affiora, il badge centra scatta con la molla, i nodi salgono
   a scaglioni in senso orario e le linee si tracciano dal centro.
   Gli stati iniziali stanno nei keyframe (fill backwards), così a fine
   animazione le proprietà restano libere per hover e transizioni. */
.js .hub-map { opacity: 0; }
.js .hub-map.is-in {
    opacity: 1;
    animation: hub-map-in .8s var(--ease-soft) backwards;
}
.hub-map.is-in .hub-core {
    animation: hub-core-in 1.5s var(--ease-spring) backwards;
    animation-delay: .35s;
}
/* Linee: scoccano dal centro in sequenza (senso orario), corsa rapida e
   arrivo morbido; quando la punta raggiunge il nodo un alone accende la
   linea (hub-land) e un anello scatta sul punto d'arrivo (hub-spark).
   La card sale subito dopo e prende il posto dell'anello. */
.hub-map.is-in .hub-line {
    animation: hub-draw 1.1s var(--ease-out) backwards,
               hub-land .7s ease-out;
    animation-delay: calc(.55s + var(--i, 0) * .16s),
                     calc(1.45s + var(--i, 0) * .16s);
}
.hub-spark {
    fill: none;
    stroke: var(--brand);
    stroke-width: 2;
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
}
.hub-map.is-in .hub-spark {
    animation: hub-spark .65s var(--ease-out) backwards;
    animation-delay: calc(1.55s + var(--i, 0) * .16s);
}
.hub-map.is-in .hub-node {
    animation: hub-node-in 1.1s var(--ease-spring) backwards;
    animation-delay: calc(1.5s + var(--i, 0) * .16s);
}
@keyframes hub-map-in {
    0%   { opacity: 0; scale: .985; }
    40%  { opacity: .58; }
    100% { opacity: 1; }
}
@keyframes hub-core-in {
    0%   { opacity: 0; scale: .55; }
    40%  { opacity: .58; }
    100% { opacity: 1; }
}
@keyframes hub-draw {
    0%   { stroke-dasharray: 1; stroke-dashoffset: 1; }
    55%  { stroke-dasharray: 1; stroke-dashoffset: .12; }
    100% { stroke-dasharray: 1; stroke-dashoffset: 0; }
}
@keyframes hub-land {
    0%   { opacity: .55; }
    35%  { opacity: 1; filter: drop-shadow(0 0 7px rgba(149, 193, 30, .95)); }
    100% { opacity: .55; filter: none; }
}
@keyframes hub-spark {
    0%   { opacity: 0;   scale: .2; }
    30%  { opacity: .95; scale: .9; }
    100% { opacity: 0;   scale: 1.8; }
}
@keyframes hub-node-in {
    0%   { opacity: 0; translate: -50% calc(-50% + 26px); scale: .85; }
    35%  { opacity: .55; }
    100% { opacity: 1; }
}
@keyframes hub-pulse   { from { opacity: .55; scale: 1; } to { opacity: 0; scale: 1.3; } }

/* Tema scuro: card su superficie staccata dal fondo (come le altre card) */
[data-theme="dark"] .hub-node { background: #22261F; }
[data-theme="dark"] .hub-core { background: #22261F; }

/* Mobile: la mappa radiale non scende sotto i 900px — l'hub si ridisegna da
   zero: il badge circolare diventa un normale titolo di sezione (kicker +
   nome + tratto verde) e i 5 punti un accordion numerato a righe, divise
   da un filetto invece che card. Il tap apre una riga alla volta. */
@media (max-width: 899px) {
    .hub-map { aspect-ratio: auto; }
    .hub-svg { display: none; }

    /* Centro → intestazione: niente cerchio, anello pulsante né ombra */
    .hub-core {
        position: static;
        translate: none;
        width: auto;
        aspect-ratio: auto;
        padding-top: .4rem;
        display: block;
        text-align: left;
        background: none;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
    .hub-core::before { content: none; }
    .hub-core::after {
        content: "";
        display: block;
        width: 46px;
        height: 3px;
        margin-top: .9rem;
        border-radius: 2px;
        background: var(--brand);
    }
    .hub-core__kick {
        font-size: .74rem;
        letter-spacing: .24em;
        color: var(--brand-dark);
        margin-bottom: .35rem;
    }
    .hub-core__name { font-size: clamp(1.8rem, 8vw, 2.05rem); }
    [data-theme="dark"] .hub-core { background: none; }

    /* Accordion numerato: contatore di riga nel bottone, segno + a destra */
    .hub-nodes {
        display: block;
        counter-reset: hub-i;
        margin-top: 2rem;
        border-top: 1px solid var(--line);
    }
    .hub-node {
        counter-increment: hub-i;
        position: relative;
        left: auto;
        top: auto;
        translate: none;
        width: 100%;
        margin: 0;
        padding: 0;
        background: none;
        border: 0;
        border-bottom: 1px solid var(--line);
        border-radius: 0;
        box-shadow: none;
    }
    [data-theme="dark"] .hub-node { background: none; }
    .hub-node:hover,
    .hub-node:focus-within,
    .hub-node.is-open {
        transform: none;
        box-shadow: none;
        border-color: var(--line);
    }
    .hub-dot { display: none; }
    .hub-node__btn {
        padding: 1.05rem .1rem .95rem;
        font-size: 1.05rem;
    }
    .hub-node__label { padding-right: .6rem; }
    .hub-node__btn::before {
        content: counter(hub-i, decimal-leading-zero);
        flex: none;
        width: 2.6rem;
        font: 600 .82rem/1 var(--font-head);
        letter-spacing: .06em;
        color: var(--brand-dark);
    }
    /* Il segno + (due barre) diventa × quando la riga è aperta */
    .hub-node__btn::after {
        content: "";
        flex: none;
        width: 13px;
        height: 13px;
        margin-left: auto;
        background:
            linear-gradient(var(--brand-dark), var(--brand-dark)) center / 100% 2px no-repeat,
            linear-gradient(var(--brand-dark), var(--brand-dark)) center / 2px 100% no-repeat;
        transition: rotate .3s var(--ease-out);
    }
    .hub-node.is-open .hub-node__btn::after { rotate: 45deg; }

    /* Sul touch apre solo il tap (.is-open): hover e focus-within resterebbero
       appiccicati su Android, dove il bottone mantiene il focus anche dopo
       il tap di chiusura */
    .hub-node:hover .hub-node__body,
    .hub-node:focus-within .hub-node__body {
        grid-template-rows: 0fr;
        opacity: 0;
        transform: translateY(-6px);
    }
    .hub-node.is-open .hub-node__body {
        grid-template-rows: 1fr;
        opacity: 1;
        transform: none;
    }
    .hub-node__inner p {
        margin-left: 3.15rem;  /* allineato all'etichetta: indice 2.6rem + gap .55rem */
        padding: .15rem 0 1.05rem;
        font-size: .95rem;
        line-height: 1.55;
    }

    /* Ingresso: il titolo sale piano, le righe a scaglioni come le card */
    .hub-map.is-in .hub-core { animation: hub-core-in-m 1.3s var(--ease-out) backwards; }
    /* Niente linee né anelli su mobile: le righe salgono subito, a scaglioni */
    .hub-map.is-in .hub-node { animation-name: hub-node-in-m; animation-delay: calc(.3s + var(--i, 0) * .12s); }
    @keyframes hub-core-in-m {
        0%   { opacity: 0; translate: 0 16px; }
        35%  { opacity: .55; }
        100% { opacity: 1; }
    }
    @keyframes hub-node-in-m {
        0%   { opacity: 0; translate: 0 22px; scale: .94; }
        35%  { opacity: .55; }
        100% { opacity: 1; }
    }
}

/* --- 9. Famiglie prodotto: 4 card minimali (icona, titolo, invito) --------- */
/* Banda della sezione: grigio neutro appena accennato (meno verde del mist),
   quel tanto che stacca le card bianche senza spezzare il respiro della pagina */
.section--families--flush { background: var(--stone); }
.families {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
}

.family-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 232px;
    padding: 1.9rem 1.3rem 1.25rem;
    text-align: center;
    text-decoration: none;
    border-radius: var(--radius);
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

/* Filo verde superiore: discreto a riposo, al passaggio si estende e si accende */
.family-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--brand);
    opacity: .3;
    transform: scaleX(.45);
    transition: transform .35s var(--ease-out), opacity .35s ease;
}

.family-card:hover,
.family-card:focus-visible {
    border-color: var(--brand);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-6px);
}
.family-card:hover::before,
.family-card:focus-visible::before {
    opacity: 1;
    transform: scaleX(1);
}
.family-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

.family-card__icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 1.05rem;
    color: var(--brand-deep);
    transition: color .3s ease, transform .35s var(--ease-spring);
}
.family-card__icon svg { display: block; width: 100%; height: 100%; }
.family-card:hover .family-card__icon,
.family-card:focus-visible .family-card__icon {
    color: var(--brand);
    transform: translateY(-3px) scale(1.06);
}

.family-card__title {
    margin: 0;
    font: 700 1.16rem/1.25 var(--font-head);
    color: var(--ink);
}

.family-card__more {
    margin-top: auto;
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding-top: 1.4rem;
    font: 600 .88rem/1 var(--font-head);
    color: var(--brand-dark);
}
.family-card__arrow {
    display: inline-block;
    font-size: 1.1rem;
    line-height: 1;
    transition: transform .3s var(--ease-out);
}
.family-card:hover .family-card__arrow,
.family-card:focus-visible .family-card__arrow { transform: translateX(6px); }

/* Tablet 2×2, mobile colonna singola */
@media (max-width: 1080px) { .families { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .families { grid-template-columns: 1fr; } }

/* Sezione "Scopri i servizi": titolo e intro come le liste tecniche, ma al
   posto dei gruppi un bottone. Allineata a sinistra come le altre sezioni.
   Sale vicina alla lista che la precede (padding-top ridotto). */
.section-more { padding-top: clamp(.8rem, 2vw, 1.2rem); }
.section-more .btn { margin-top: .6rem; }
/* Hover verde acceso Easyvalve, come il bottone Contattaci (btn--white:hover) */
.section-more .btn--dark:hover { background: var(--brand); color: var(--ink); }

/* --- 10. Liste tecniche ----------------------------------------------------- */
.tech-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem 3rem;
}

/* Variante impilata (pagina Prodotti): gruppi a larghezza piena, uno sotto
   l'altro — la riga verde sotto l'heading attraversa tutta la colonna.
   Più respiro fra i gruppi e fra titolo e primo gruppo. */
.tech-groups--stack { grid-template-columns: 1fr; gap: 3.4rem; margin-top: 1.2rem; }

.tech-group { break-inside: avoid; }

.tech-heading {
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--brand-deep);
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--brand);
    margin-bottom: 1rem;
    display: flex; align-items: center; gap: .75rem;
}
/* Marchietto della famiglia accanto al titolo (icone condivise con le
   card in home): altezza fissa, larghezza in proporzione — l'attuatore
   è più slanciato e non va costretto in un quadrato */
.tech-heading__icon {
    flex: none;
    display: inline-flex;
    height: 30px;
    color: var(--brand-deep);
}
.tech-heading__icon svg { display: block; height: 100%; width: auto; }

.tech-list {
    list-style: none;
    padding: 0;
    columns: 2;
    column-gap: 2.5rem;
}
.tech-list li {
    position: relative;
    padding: .3rem 0 .3rem 1.5rem;
    break-inside: avoid;
    border-bottom: 1px solid var(--line);
}
.tech-list li::before {
    content: "";
    position: absolute; left: 0; top: .78em;
    width: 9px; height: 9px;
    background: var(--brand);
    border-radius: 2px;
    transform: rotate(45deg);
}

/* --- 11. Banda CTA ----------------------------------------------------------- */
/* Grigio del nuovo sito (#363535) con aloni radiali brand animati. */
.cta-band {
    position: relative; overflow: hidden;
    background: #363535;
    color: #fff;
    padding: clamp(2.6rem, 5vw, 4rem) 0;
}
.cta-band::before,
.cta-band::after {
    content: ""; position: absolute; pointer-events: none;
    will-change: transform, opacity;
}
.cta-band::before {
    width: 1200px; height: 600px;
    left: calc(12% - 600px); top: calc(20% - 300px);
    background: radial-gradient(closest-side, rgba(149, 193, 30, .28), transparent 65%);
    animation: band-glow-a 19s ease-in-out infinite;
}
.cta-band::after {
    width: 1000px; height: 520px;
    left: calc(88% - 500px); top: calc(85% - 260px);
    background: radial-gradient(closest-side, rgba(149, 193, 30, .18), transparent 60%);
    animation: band-glow-b 24s ease-in-out infinite;
}
.cta-inner {
    position: relative; z-index: 1;
    display: grid;
    grid-template-columns: 1fr auto; /* titolo e pulsante sempre in riga insieme */
    align-items: center;
    gap: clamp(1.5rem, 4vw, 3rem);
}
.cta-title { color: #fff; margin-bottom: .3rem; max-width: 46ch; } /* lascia spazio al pulsante a fianco */
.cta-title em { font-style: normal; color: var(--brand); } /* accento verde come il nuovo sito */
.cta-text { color: rgba(255, 255, 255, .92); font-weight: 500; } /* niente max-width: la frase sta su una sola riga (wrap naturale solo quando la colonna è stretta) */

/* --- 12. Indirizzi ------------------------------------------------------------ */
.addresses {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
}
.address-card {
    background: var(--mist);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.6rem 1.5rem;
}
.address-card h3 {
    font-size: .95rem;
    text-transform: uppercase; letter-spacing: .08em;
    color: var(--brand-deep);
    margin-bottom: .8rem;
}
.address-card address { font-style: normal; line-height: 1.8; }

/* --- 13. Breadcrumb: striscia verde con lo stato della navigazione (stile nuovo sito) --- */
.breadcrumb-bar { background: var(--brand); }
.breadcrumb ol {
    display: flex; flex-wrap: wrap; align-items: center; gap: .55rem;
    list-style: none; padding: .8rem 0; margin: 0;
    font-size: .9rem;
    color: #fff;
}
.breadcrumb li + li::before {
    content: "›";
    margin-right: .55rem;
    font-size: .7rem;
    opacity: .55;
}
.breadcrumb a { color: #fff; opacity: .85; transition: opacity .25s; }
.breadcrumb a:hover { opacity: 1; }
.breadcrumb [aria-current="page"] { color: #fff; font-weight: 600; position: relative; }
.breadcrumb [aria-current="page"]::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -4px;
    height: 2px; background: #fff; border-radius: 2px;
}

/* --- 14. Sezione contatti (design nuovo sito) ---------------------------------------
   Due colonne: sedi (office-card) a sinistra, form-card a destra.
   Label floating: nel DOM l'input viene PRIMA della label.
   Sfondo sezione grigio caldo come nel nuovo sito: le card bianche staccano. */
#contact-form { background: #F5F4F3; }

.contact-grid {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.contact-eyebrow {
    display: flex; align-items: center; gap: .55rem;
    font-size: .8rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .14em;
    color: var(--brand-dark);
    margin-bottom: 1.1rem;
}
.contact-eyebrow::before {
    content: ""; width: 34px; height: 3px;
    background: var(--brand); border-radius: 2px;
}

.contact-offices .section-title { margin-bottom: 1.8rem; }

.office-card {
    background: #fff;
    border-left: 5px solid #878786;
    border-radius: 18px;
    padding: clamp(1.6rem, 3vw, 2.2rem);
    margin-bottom: 1.3rem;
    box-shadow: 0 10px 30px rgba(54, 53, 53, .12);
    transition: transform .4s ease, box-shadow .4s ease;
}
.office-card:hover { transform: translateY(-5px); }
.office-card h3 {
    display: flex; align-items: center; gap: .7rem;
    font-size: 1.05rem;
    margin-bottom: .8rem;
}
.office-card h3 svg { width: 20px; height: 20px; color: #7FA717; flex: none; }
.office-card p { color: var(--slate); font-size: .98rem; line-height: 1.7; }
.office-card a {
    color: var(--brand-deep); font-weight: 600;
    text-decoration: underline; text-underline-offset: 3px;
}

.form-card {
    background: #fff;
    border-top: 5px solid var(--brand);
    border-radius: 18px;
    padding: clamp(1.8rem, 4vw, 2.8rem);
    box-shadow: 0 24px 60px rgba(54, 53, 53, .18);
}
.form-card-title { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: .5rem; }
.form-card-title::after { display: none; } /* la card ha già il filo verde in alto */
.form-card-intro { color: var(--slate); margin-bottom: 1.6rem; }

.form-banner {
    padding: 1rem 1.3rem;
    border-radius: 10px;
    margin-bottom: 1.4rem;
    border: 1px solid;
}
.form-banner p { margin: 0; }
.form-banner--ok  { background: #EAF6EC; border-color: var(--ok);   color: #144925; }
.form-banner--err { background: #FBEDEB; border-color: var(--err); color: #7A1A14; }

.contact-form .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem 1.4rem;
}
.contact-form .form-field { position: relative; margin: 0; }
.form-field--full { grid-column: 1 / -1; }

.form-field input, .form-field textarea {
    width: 100%;
    font: inherit; color: var(--ink);
    background: #F5F4F3;
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 1.35rem 1.1rem .55rem;
    min-height: 58px;
    outline: none;
    transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.form-field textarea { min-height: 170px; resize: vertical; }

/* Label floating: sale e rimpicciolisce a fuoco o quando c'è un valore */
.form-field label {
    position: absolute; left: 1.15rem; top: 1rem;
    color: var(--slate);
    font-size: 1rem; font-weight: 400;
    pointer-events: none;
    transform-origin: left top;
    transition: transform .25s ease, color .25s ease;
}
.form-field input:focus, .form-field textarea:focus {
    background: #fff;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(149, 193, 30, .12);
}
.form-field input:focus + label, .form-field textarea:focus + label,
.form-field input:not(:placeholder-shown) + label,
.form-field textarea:not(:placeholder-shown) + label {
    transform: translateY(-.75rem) scale(.72);
    color: #7FA717; font-weight: 600;
}

.form-field--error input,
.form-field--error textarea { border-color: var(--err); background: #FDF3F2; }

.form-error {
    display: block;
    color: var(--err);
    font-size: .82rem; font-weight: 500;
    margin-top: .4rem;
    animation: form-shake .4s;
}
@keyframes form-shake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-5px); }
    75%      { transform: translateX(5px); }
}

.form-actions {
    display: flex; align-items: center; gap: 1.2rem;
    flex-wrap: wrap;
    margin-top: 1.8rem;
}
/* Glow verde come il pulsante primario del nuovo sito */
.contact-form .btn--brand { box-shadow: 0 16px 40px rgba(149, 193, 30, .35); }
.form-note { color: var(--slate); font-size: .82rem; margin: 1rem 0 0; }
.form-note a { color: var(--brand-deep); }

/* Honeypot: fuori dal flusso visivo ma presente nel layout */
.hp-field {
    position: absolute !important;
    width: 1px; height: 1px;
    clip-path: inset(50%);
    overflow: hidden;
    margin: -1px;
}

/* --- 15. Footer (design nuovo sito) --------------------------------------------------- */
.site-footer {
    position: relative; overflow: hidden;
    background: #7FA717; /* verde del footer del nuovo sito */
    color: #fff;
    margin-top: auto;
}
/* Cerchi bianchi in trasparenza sugli angoli del footer (come la banda
   Contattaci verde del nuovo sito). */
.site-footer::before {
    content: ""; position: absolute; left: -100px; top: -140px;
    width: 300px; height: 300px; border-radius: 50%;
    background: rgba(255, 255, 255, .06); pointer-events: none;
}
.site-footer::after {
    content: ""; position: absolute; right: -140px; bottom: -180px;
    width: 420px; height: 420px; border-radius: 50%;
    background: rgba(255, 255, 255, .07); pointer-events: none;
}
/* Aloni della banda CTA: due pseudo-elementi animati in transform/opacity
   (GPU): percorsi a più tappe in loop chiuso — vagano, respirano e cambiano
   intensità senza mai fermarsi né tornare indietro. Durate diverse (19s/24s)
   così le due fasi scorrono continuamente l'una rispetto all'altra. */
@keyframes band-glow-a {
    0%   { transform: translate3d(0, 0, 0) scale(1);           opacity: .85; }
    25%  { transform: translate3d(110px, -36px, 0) scale(1.16); opacity: 1;   }
    50%  { transform: translate3d(170px, 44px, 0) scale(.94);   opacity: .68; }
    75%  { transform: translate3d(58px, 96px, 0) scale(1.12);   opacity: .92; }
    100% { transform: translate3d(0, 0, 0) scale(1);            opacity: .85; }
}
@keyframes band-glow-b {
    0%   { transform: translate3d(0, 0, 0) scale(1.15);          opacity: .8;  }
    30%  { transform: translate3d(-120px, -56px, 0) scale(.88);   opacity: 1;  }
    60%  { transform: translate3d(-46px, -128px, 0) scale(1.22);  opacity: .62; }
    100% { transform: translate3d(0, 0, 0) scale(1.15);          opacity: .8;  }
}

.footer-grid {
    position: relative; z-index: 1;
    display: grid;
    grid-template-columns: 1.3fr .8fr 1fr;
    gap: clamp(2rem, 4vw, 3.5rem);
    padding-block: clamp(2.8rem, 6vw, 4rem) 2.2rem;
}
.footer-brand img { width: 190px; margin-bottom: 1.1rem; filter: brightness(0) invert(1); }
.footer-brand p { color: rgba(255, 255, 255, .9); font-size: .95rem; max-width: 300px; }

.footer-title {
    display: flex; align-items: center; gap: .6rem;
    font-size: .82rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .14em;
    color: #fff;
    margin-bottom: 1.2rem;
}
.footer-title::before {
    content: ""; width: 22px; height: 2.5px;
    background: #fff; border-radius: 2px; opacity: .7;
}

.footer-links { display: grid; gap: .55rem; list-style: none; padding: 0; margin: 0; }
.footer-links a {
    position: relative;
    color: rgba(255, 255, 255, .88);
    font-size: .95rem;
    width: fit-content;
    text-decoration: none;
    transition: color .2s ease;
}
.footer-links a::after {
    content: ""; position: absolute; left: 0; bottom: -2px;
    height: 1.5px; width: 100%;
    background: #fff;
    transform: scaleX(0); transform-origin: left;
    transition: transform .3s ease;
}
.footer-links a:hover { color: #fff; }
.footer-links a:hover::after { transform: scaleX(1); }

.footer-addr { font-style: normal; color: rgba(255, 255, 255, .9); font-size: .93rem; line-height: 1.8; }
.footer-addr a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.footer-bottom {
    position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap;
    border-top: 1px solid rgba(255, 255, 255, .25);
    padding-block: 1.3rem;
    font-size: .84rem;
    color: rgba(255, 255, 255, .85);
}
.footer-bottom p { margin: 0; }
.footer-bottom img { display: inline-block; width: 18px; height: 18px; vertical-align: -3px; margin-right: .45rem; }
.footer-bottom a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-lang strong { color: #fff; font-weight: 700; }
.footer-lang a { color: rgba(255, 255, 255, .85); }
.footer-lang a:hover { color: #fff; }

/* --- 16. Media query --------------------------------------------------------------------- */
@media (max-width: 900px) {
    .nav-toggle { display: flex; }

    /* Senza backdrop-filter: altrimenti l'header diventa containing block
       del pannello fixed e il menu si apre relativo all'header, non allo schermo.
       Il fondo resta solido anche scrolled: senza blur la trasparenza
       lascerebbe vedere il testo sottostante senza morbidezza. */
    .site-header,
    .site-header.is-scrolled {
        backdrop-filter: none; -webkit-backdrop-filter: none;
        background: var(--paper);
    }

    /* Menu mobile: pannello a tutto schermo con aloni verdi.
       Colori a token: chiaro nel tema chiaro, scuro nel tema scuro.
       La lista si centra con margin:auto (non justify-content:center):
       se lo schermo è basso e il contenuto non ci sta, resta scorrevole
       dall'alto invece di tagliare la prima voce. */
    .site-nav {
        position: fixed; inset: 0; z-index: 1050;
        background: var(--paper);
        display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start;
        padding: 4.5rem clamp(1rem, 4vw, 2.5rem) 2.5rem;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform .55s ease, visibility .55s;
        overflow-y: auto;
    }
    .site-nav.nav--open { transform: translateX(0); visibility: visible; }
    .site-nav::before {
        content: ""; position: absolute; inset: 0; pointer-events: none;
        background:
            radial-gradient(600px 300px at 12% 18%, rgba(149, 193, 30, .26), transparent 65%),
            radial-gradient(500px 260px at 88% 85%, rgba(149, 193, 30, .16), transparent 60%);
    }
    .nav-list {
        position: relative; z-index: 1;
        flex-direction: column; align-items: flex-start; gap: .3rem;
        width: 100%;
        margin: auto 0;  /* centrata quando c'è spazio, a filo cima se serve scroll */
    }
    /* Voci che entrano scaglionate da destra */
    .nav-list > li {
        width: 100%; opacity: 0; transform: translateX(44px);
        transition: opacity .55s ease, transform .6s ease;
    }
    .site-nav.nav--open .nav-list > li { opacity: 1; transform: none; }
    .site-nav.nav--open .nav-list > li:nth-child(1) { transition-delay: .12s; }
    .site-nav.nav--open .nav-list > li:nth-child(2) { transition-delay: .18s; }
    .site-nav.nav--open .nav-list > li:nth-child(3) { transition-delay: .24s; }
    .site-nav.nav--open .nav-list > li:nth-child(4) { transition-delay: .3s; }
    .site-nav.nav--open .nav-list > li:nth-child(5) { transition-delay: .36s; }
    .site-nav.nav--open .nav-list > li:nth-child(6) { transition-delay: .42s; }

    .nav-list a { color: var(--ink); font-size: 1.08rem; padding: .72rem 0; width: 100%; }
    .nav-list a::after { display: none; }
    /* Accento menu: verde medio ben visibile su pannello chiaro */
    .nav-list a:hover { background: transparent; color: #6B9110; transform: none; }
    .nav-list a[aria-current="page"] { background: transparent; color: #6B9110; font-weight: 700; }

    /* Lingua + tema: in fondo al pannello, toggle tondo a sinistra del
       selettore lingua (nella barra resta solo logo e hamburger) */
    .header-inner > .theme-toggle { display: none; }
    .nav-lang {
        display: flex; align-items: center; gap: .7rem;
        margin: 1.6rem 0 0; padding: 1.4rem 0 0;
        border-top: 1px solid var(--line);
    }
    .nav-lang .theme-toggle {
        display: inline-flex; flex: none;
        width: 41px; height: 41px; margin: 0;
        border: 1px solid var(--line); border-radius: 50%;
        background: var(--paper);
    }
    .nav-lang .theme-toggle:hover { background: var(--mist); }
    .nav-lang a {
        width: auto; padding: .72rem .8rem;
        color: var(--ink); font-size: .9rem;
        border: 1px solid var(--line); border-radius: 999px;
    }
    .nav-lang a:hover { background: var(--mist); color: var(--ink); transform: none; }

    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }

    .contact-grid { grid-template-columns: 1fr; }
    .contact-offices .section-title { margin-bottom: 1.4rem; }

    /* Chi siamo: colonna unica, la foto va sotto il testo a piena larghezza */
    .about-split { grid-template-columns: 1fr; }
    .about-figure img { width: 100%; }
}

@media (max-width: 640px) {
    body { font-size: 1rem; }

    .brand img { width: 150px; }
    .header-inner { min-height: 64px; }

    .tech-list { columns: 1; }
    .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
    .footer-bottom { flex-direction: column; align-items: flex-start; gap: .6rem; }
    .cta-inner { grid-template-columns: 1fr; }
    .cta-band .btn { justify-self: start; }

    .contact-form .form-grid { grid-template-columns: 1fr; }

    /* Cornice più stretta: il container ha 16px di padding, con lo shift
       intero (18px) sborderebbe di 2px facendo comparire lo scroll orizzontale */
    .about-figure { --frame-shift: 10px; --frame-hover: 5px; }

    /* Hero slideshow compatta: altezza naturale, nav e timeline subito sotto il testo */
    .hero--slides { min-height: 0; padding-bottom: 2.4rem; }
    .hero-slides-nav { margin-top: 1.8rem; }
    .hero-slides-nav-inner { flex-wrap: wrap; gap: 1.1rem; }
    .hero-concept { flex: 1 1 100%; }
    .hero-symbols { width: 58px; height: 50px; }
    .hero-caption { font-size: .92rem; }
    .hero-progress { gap: .8rem; margin-top: 1rem; }
    .hero-segment-name { font-size: .62rem; letter-spacing: .1em; margin-bottom: .4rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
    /* Zoom lento e dissolvenza della hero restano visibili anche con movimento ridotto */
    .hero-slide { transition-duration: 1.4s, 7s !important; }
    /* Aloni della banda CTA fermi, niente sfarfallio (anche quelli
       casuali di intro e hub) */
    .cta-band::before, .cta-band::after,
    .halo { animation: none !important; }
    /* Movimento ridotto: gli ingressi restano ma diventano pure dissolvenze
       (niente traslazioni, zoom né blur) — un filo più lunghe così si
       percepiscono, restando sicure per chi è sensibile al movimento.
       !important serve a scavalcare la
       regola universale animation-duration: .01ms qui sopra. */
    .js .reveal.is-in, .js .reveal-left.is-in, .js .reveal-right.is-in,
    .js .reveal-zoom.is-in, .js .reveal-down.is-in {
        animation: ev-fade 1.1s var(--ease-out) backwards !important;
        animation-delay: var(--reveal-delay, 0s) !important;
    }
    .js .pillar-card .pillar-badge { transform: none; transition: none; }
    /* Hub: niente anello pulsante attorno al centro; l'ingresso ridotto a
       dissolvenza pura, senza molla né scaglioni */
    .hub-core::before { animation: none !important; }
    .js .hub-map.is-in { animation: ev-fade 1.1s var(--ease-out) backwards !important; }
    .hub-map.is-in .hub-core,
    .hub-map.is-in .hub-node,
    .hub-map.is-in .hub-line,
    .hub-map.is-in .hub-spark { animation-delay: 0s !important; }
    /* Cornice foto chi siamo: già ferma al suo offset di riposo */
    .js .about-figure.is-in::after { animation: none !important; }
}

/* --- 17. Tema scuro (come il nuovo sito) ------------------------------------------------
   Attivato da [data-theme="dark"] su <html>: cambia i token e ricalibra
   i pochi punti con colori fissi. Le bande brand (CTA grigia, footer verde,
   hero) vengono ricalibrate di poco sullo stesso tono. */
:root { color-scheme: light; }

[data-theme="dark"] {
    color-scheme: dark;
    --ink:         #ECEFE8;
    --slate:       #A8B2A6;
    --paper:       #1B1E1A;   /* fondo pagina (in chiaro è il bianco) */
    --mist:        #242822;   /* campi, vassoietti, sezioni tenui */
    --stone:       #21251F;   /* banda famiglie: un filo sopra il fondo */
    --line:        #343931;
    --brand-mid:   #ACD832;   /* come il tema scuro del nuovo sito */
    --brand-dark:  #ACD832;   /* accento testo su scuro */
    --brand-deep:  #C4E55F;
    --coal:        #10120E;
    --coal-deep:   #0B0D0A;
    --shadow-card:        0 2px 10px rgba(0, 0, 0, .45), 0 6px 18px rgba(0, 0, 0, .35);
    --shadow-card-hover:  0 4px 12px rgba(0, 0, 0, .5), 0 14px 30px rgba(0, 0, 0, .5);
}

/* Card chiare → superfici scure leggermente staccate dal fondo */
[data-theme="dark"] .site-header {
    background: rgba(20, 23, 19, .94);
    border-bottom-color: rgba(255, 255, 255, .07);
}
/* Stesso effetto nel tema scuro: scrolled = un filo più trasparente */
[data-theme="dark"] .site-header.is-scrolled { background: rgba(20, 23, 19, .85); }
[data-theme="dark"] .pillar-card,
[data-theme="dark"] .family-card,
[data-theme="dark"] .address-card {
    background: #22261F;
    border: 1px solid rgba(255, 255, 255, .07);
}
[data-theme="dark"] .office-card,
[data-theme="dark"] .form-card { background: #22261F; }
[data-theme="dark"] #contact-form { background: #141613; }

/* Form */
[data-theme="dark"] .form-field input,
[data-theme="dark"] .form-field textarea { background: #2A2E27; }
[data-theme="dark"] .form-field input:focus,
[data-theme="dark"] .form-field textarea:focus { background: #22261F; }
[data-theme="dark"] .form-field--error input,
[data-theme="dark"] .form-field--error textarea { background: #3A1F1B; border-color: #E08478; }
[data-theme="dark"] .form-banner--ok  { background: #16301F; color: #A8E6B8; }
[data-theme="dark"] .form-banner--err { background: #3A1A16; color: #F1A9A0; }
[data-theme="dark"] .form-error { color: #F1A9A0; }

/* Pulsante bianco: resta chiaro, testo scuro (contrasto ok su qualunque fondo) */

/* Tema scuro: il footer verde si scurisce (#4E6814), la banda Contattaci
   grigia passa a grigio profondo. Il pulsante bianco è già leggibile su
   entrambi i fondi e non serve ricalibrarlo. */
[data-theme="dark"] .site-footer { background: #4E6814; }
[data-theme="dark"] .cta-band { background: #151714; }
[data-theme="dark"] .breadcrumb-bar { background: #4E6814; }

/* Accento del menu mobile: su pannello scuro serve il verde chiaro */
@media (max-width: 900px) {
    [data-theme="dark"] .nav-list a:hover,
    [data-theme="dark"] .nav-list a[aria-current="page"] { color: #ACD832; }
}

/* Stampa */
@media print {
    .site-header, .breadcrumb-bar, .cta-band, .site-footer, .skip-link { display: none; }
    /* Stampa: tutto il contenuto visibile anche se non ancora "rivelato" a schermo */
    .reveal, .reveal-left, .reveal-right, .reveal-zoom, .reveal-down {
        opacity: 1 !important; animation: none !important;
    }
    .pillar-badge { transform: none !important; }
    .hero { background: none; color: var(--ink); }
    .hero-title { color: var(--ink); }
}

/* --- 18. Reveal: animazioni d'ingresso (stile nuovo sito) ------------------------
   Architettura: lo stato pre-rivela è solo `opacity: 0` (niente transform
   statico, così l'hover resta libero). L'ingresso è una ANIMAZIONE (@keyframes)
   attivata da .is-in — classe già nel markup per l'hero (così parte al primo
   paint, senza attendere JS) e aggiunta da main.js allo scroll per il resto —
   con fill "backwards": trattiene lo stato di partenza durante il ritardo
   (--reveal-delay: inline nell'hero, a scaglioni via main.js sotto) e lo
   rilascia a fine corsa, lasciando l'elemento pulito. Così le transizioni di
   hover (transform a molla) restano indipendenti e reattive.
   Varianti: .reveal (salita), .reveal-left/.reveal-right (lati, per colonne),
   .reveal-zoom (molla, pulsanti), .reveal-down (dall'alto, breadcrumb).
   Senza JS (niente classe .js su <html>) tutto resta visibile. */

.js .reveal, .js .reveal-left, .js .reveal-right,
.js .reveal-zoom, .js .reveal-down { opacity: 0; }

.js .reveal.is-in, .js .reveal-left.is-in, .js .reveal-right.is-in,
.js .reveal-zoom.is-in, .js .reveal-down.is-in { opacity: 1; }

/* Ingressi lenti e fade-dominanti: la dissolvenza occupa TUTTA la durata
   grazie alla curva morbida --ease-soft (niente scatto iniziale): l'elemento
   parte invisibile, sale a metà opacità nella prima fase e continua ad
   affiorare gradualmente fino in fondo. */
.js .reveal.is-in       { animation: ev-rise  2.6s  var(--ease-soft)  backwards; }
.js .reveal-left.is-in  { animation: ev-left  2.6s  var(--ease-soft)  backwards; }
.js .reveal-right.is-in { animation: ev-right 2.6s  var(--ease-soft)  backwards; }
.js .reveal-zoom.is-in  { animation: ev-zoom  1.7s  var(--ease-spring) backwards; }
.js .reveal-down.is-in  { animation: ev-drop  2.2s  var(--ease-soft)  backwards; }
.js .reveal.is-in, .js .reveal-left.is-in, .js .reveal-right.is-in,
.js .reveal-zoom.is-in, .js .reveal-down.is-in { animation-delay: var(--reveal-delay, 0s); }

/* Titolo hero: ingresso con messa a fuoco, un filo più rapido del resto
   (parte al primo paint: is-in e i ritardi sono già nel markup dell'hero) */
.js .hero-title.reveal.is-in { animation-name: ev-focus; animation-duration: 1.8s; animation-timing-function: var(--ease-soft); }

@keyframes ev-rise {
    0%   { opacity: 0; transform: translateY(34px) scale(.99); }
    35%  { opacity: .55; }
    100% { opacity: 1; transform: none; }
}
@keyframes ev-left {
    0%   { opacity: 0; transform: translateX(-44px); }
    35%  { opacity: .55; }
    100% { opacity: 1; transform: none; }
}
@keyframes ev-right {
    0%   { opacity: 0; transform: translateX(44px); }
    35%  { opacity: .55; }
    100% { opacity: 1; transform: none; }
}
@keyframes ev-zoom {
    0%   { opacity: 0; transform: scale(.9); }
    40%  { opacity: .58; }
    100% { opacity: 1; transform: none; }
}
@keyframes ev-drop {
    0%   { opacity: 0; transform: translateY(-24px); }
    35%  { opacity: .55; }
    100% { opacity: 1; transform: none; }
}
@keyframes ev-focus {
    0%   { opacity: 0; transform: translateY(32px); filter: blur(12px); }
    45%  { opacity: .5; filter: blur(8px); }
    100% { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes ev-fade { from { opacity: 0; } } /* solo dissolvenza (movimento ridotto) */

/* Micro-interazioni: card e frecce con molla propria (prima ereditavano la
   transizione lenta del reveal) */
.pillar-card, .address-card, .office-card, .form-card {
    transition: transform .45s var(--ease-spring), box-shadow .45s var(--ease-out);
}
.family-card {
    transition: transform .45s var(--ease-spring), box-shadow .45s var(--ease-out),
                border-color .3s ease;
}

/* Badge numerato dei pilastri: pop a molla appena la card è entrata */
.js .pillar-card .pillar-badge { transform: scale(0); transition: transform .6s var(--ease-spring); }
.js .pillar-card.is-in .pillar-badge {
    transform: scale(1);
    transition-delay: calc(var(--reveal-delay, 0s) + .3s);
}

/* Cornice della foto "chi siamo": parte da un offset doppio e raggiunge
   quello di riposo poco dopo l'ingresso della figura (stesso scaglione). */
.js .about-figure.is-in::after {
    animation: ev-frame .9s var(--ease-out) backwards;
    animation-delay: calc(var(--reveal-delay, 0s) + .15s);
}
@keyframes ev-frame {
    from { opacity: 0; transform: translate(calc(var(--frame-shift) * 2), calc(var(--frame-shift) * 2)); }
    to   { opacity: 1; transform: translate(var(--frame-shift), var(--frame-shift)); }
}
