/* ==========================================================================
   GESTIONE QHSE — foglio di stile (versione 6 «Salvia», novembre 2026)
   Chiaro e arioso: fondo grigio-verde quasi bianco, verde salvia per i
   pannelli, un verde bosco spento solo per pulsanti e link. Un solo carattere,
   Schibsted Grotesk. Angoli morbidi, molto spazio, colonne che restano ferme
   mentre l'altra scorre. In apertura della home un video a tutta larghezza
   con sopra un foglio di verifica: le spunte si segnano da sole e arriva il
   timbro «In regola».
   --------------------------------------------------------------------------
   01 Variabili · 02 Base · 03 Componenti comuni · 04 Header e menu
   05 Testate interne · 06 Home · 07 Pagine servizio · 08 Chi siamo
   09 Contatti e form · 10 Fascia finale e footer · 11 Pagine legali
   12 Movimento
   --------------------------------------------------------------------------
   Il movimento dipende da html[data-motion]: full (tutto), reduced (il sistema
   chiede meno movimento: niente parallasse né riquadri che si allargano con lo
   scorrimento, restano video, disegni e dissolvenze), off (l'utente ha fermato
   tutto). I colori sono variabili per ruolo, qui sotto.
   ========================================================================== */


/* 01. VARIABILI ============================================================ */
:root {
  --bg: #F5F7F4;          /* fondo della pagina */
  --panel: #E6EEE8;       /* pannelli salvia chiari */
  --panel-2: #D5E3D9;     /* pannelli salvia più pieni (fascia finale) */
  --white: #FFFFFF;
  --ink: #1D2A24;         /* titoli, footer */
  --text: #46524C;        /* testo corrente */
  --muted: #5E6A63;       /* testo secondario (contrasto AA anche sui pannelli chiari) */
  --line: #D5DDD8;        /* filetti */
  --line-2: #C3CEC7;      /* bordi dei campi e dei controlli */
  --action: #3D6B54;      /* pulsanti, link, spunte */
  --action-h: #2D5341;
  --soft: #8FB69E;        /* verde tenue decorativo (lo zero gigante) */
  --on-dark: #BCC8C1;     /* testo sul verde scuro del footer */
  --error: #B42318;
  --focus: var(--action);

  --r-low: #CFE5D1; --r-mid: #E3EAF0; --r-high: #F6CBA8; --r-crit: #EE958B;

  /* il piazzale disegnato */
  --pz-ink: #2B3A33; --pz-dark: #3F4D46; --pz-accent: #A3C8B1; --pz-accent-dark: #4F7F66;
  --pz-sel-1: #EEF5F0; --pz-sel-2: #DCEBE1; --pz-mark: #E2AA7C;

  --f-body: "Schibsted Grotesk", "Segoe UI", Arial, sans-serif;

  --container: 1240px;
  --gutter: clamp(18px, 4vw, 48px);
  --header-h: 80px;
  --section-y: clamp(88px, 10vw, 150px);
  --fs-h2: clamp(2.2rem, 3.9vw, 3.7rem);
  --r-lg: 28px;           /* foto grandi */
  --r-md: 20px;           /* schede */
  --r-sm: 14px;           /* miniature, campi */
  --shadow: 0 1px 0 rgb(29 42 36 / .04), 0 24px 48px -30px rgb(29 42 36 / .38);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
}
@media (max-width: 760px) { :root { --header-h: 70px; } }


/* 02. BASE ================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 80px); scroll-padding-bottom: 80px; overflow-x: clip; }
html[data-motion="off"] { scroll-behavior: auto; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--f-body); font-size: 1.125rem; line-height: 1.62; -webkit-font-smoothing: antialiased; overflow-x: hidden; overflow-x: clip; }
@media (max-width: 560px) { body { font-size: 1.0625rem; } }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.06; letter-spacing: -.035em; color: var(--ink); }
h3, h4 { font-weight: 600; line-height: 1.2; letter-spacing: -.02em; }
h1, h2, h3, .faq-item summary { text-wrap: balance; }
p, li { text-wrap: pretty; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
a[href^="tel:"] { white-space: nowrap; }
strong { font-weight: 700; color: var(--ink); }
em { font-style: normal; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
address { font-style: normal; }
[hidden] { display: none !important; }
::selection { background: var(--panel-2); color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.site-footer, .contact-card, .vid-toggle { --focus: #FFFFFF; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 300; padding: .75rem 1rem; border-radius: 999px; background: var(--ink); color: #FFFFFF; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }


/* 03. COMPONENTI COMUNI ==================================================== */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--grey { background: var(--white); }
.section:not(.section--grey) + .section:not(.section--grey) { padding-top: 0; }

.section-title { font-size: var(--fs-h2); }
.section-title--xl { font-size: clamp(2.4rem, 4.6vw, 4.4rem); }
.section-lead { margin-top: 1.1rem; max-width: 36rem; font-size: 1.15rem; color: var(--muted); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 4rem; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head .section-lead { margin-top: 0; }
@media (max-width: 860px) { .section-head { grid-template-columns: minmax(0, 1fr); } }
.head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 1rem 2rem; margin-bottom: 2.5rem; }

/* Parole che salgono da una maschera: i titoli le ricevono da main.js */
html:not([data-motion="off"]) [data-split]:not(.is-split) { visibility: hidden; }
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .1em .03em .16em; margin: -.1em -.03em -.16em; }
.w__i { display: inline-block; }
html:not([data-motion="off"]) [data-split]:not(.in) .w__i { transform: translateY(112%); }
html:not([data-motion="off"]) [data-split].in .w__i { transform: none; transition: transform .95s var(--ease-out); transition-delay: calc(var(--i, 0) * 38ms + var(--split-delay, 0ms)); }

/* Comparsa degli elementi */
html:not([data-motion="off"]) [data-rv]:not(.in) { opacity: 0; transform: translateY(26px); }
html:not([data-motion="off"]) [data-rv].in { transition: opacity .7s ease, transform .9s var(--ease-out); transition-delay: calc(var(--d, 0) * 70ms); }

/* Foto che si scoprono dal basso, come una tenda che sale */
html:not([data-motion="off"]) [data-wipe]:not(.in) { clip-path: inset(100% 0 0 0 round var(--wipe-r, 0px)); }
html:not([data-motion="off"]) [data-wipe] { clip-path: inset(0 0 0 0 round var(--wipe-r, 0px)); }
html:not([data-motion="off"]) [data-wipe].in { transition: clip-path 1.2s var(--ease-io); transition-delay: calc(var(--d, 0) * 70ms); }
html:not([data-motion="off"]) [data-wipe]:not(.in) :is(img, video) { scale: 1.18; }
html:not([data-motion="off"]) [data-wipe].in :is(img, video) { transition: scale 1.8s var(--ease-out); }

/* Link con freccia: sottolineatura leggera che si fa piena */
.dash-link { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; color: var(--action); text-decoration: underline; text-decoration-color: rgb(61 107 84 / .35); text-decoration-thickness: 1.5px; text-underline-offset: .32em; transition: text-decoration-color .25s, color .2s; }
.dash-link::after { content: ""; flex: none; width: 18px; height: 18px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h13M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h13M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform .35s var(--ease-out); }
.dash-link:hover { text-decoration-color: currentColor; }
.dash-link:hover::after { transform: translateX(4px); }
.dash-link--light { color: var(--action); }

/* Pulsanti: pillole, il colore pieno solo qui */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: 54px; padding: .9em 1.7em; border: 1.5px solid transparent; border-radius: 999px; font-size: 1.02rem; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap; transition: background-color .25s, border-color .25s, color .25s, transform .4s var(--ease-out); }
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--action); border-color: var(--action); color: #FFFFFF; }
.btn--primary:hover { background: var(--action-h); border-color: var(--action-h); }
.btn--white { background: #FFFFFF; border-color: #FFFFFF; color: var(--ink); }
.btn--white:hover { background: var(--panel); border-color: var(--panel); }
.btn--ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #FFFFFF; }
.btn--line { background: transparent; border-color: rgb(255 255 255 / .55); color: #FFFFFF; }
.btn--line:hover { background: #FFFFFF; border-color: #FFFFFF; color: var(--ink); }
.btn--lg { min-height: 58px; font-size: 1.06rem; }
.btn--sm { min-height: 44px; padding: .55em 1.25em; font-size: .95rem; }
.btn--block { width: 100%; }

/* Telefono accanto al pulsante principale */
.tel-link { font-size: 1rem; color: var(--muted); text-decoration: none; }
.tel-link strong { font-weight: 700; color: var(--ink); }
.tel-link:hover strong { text-decoration: underline; text-underline-offset: .3em; }

/* Elenchi con spunta */
.ticks { display: grid; gap: .6rem; margin-top: 1.25rem; }
.ticks li { position: relative; padding-left: 2rem; }
.ticks li::before { content: ""; position: absolute; left: .2rem; top: .45em; width: 11px; height: 6px; border-left: 2.5px solid var(--action); border-bottom: 2.5px solid var(--action); transform: rotate(-45deg); }
.ticks--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2.5rem; }
@media (max-width: 640px) { .ticks--2 { grid-template-columns: minmax(0, 1fr); } }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap:focus-visible { outline-offset: 4px; }
.note-small { margin-top: 1rem; font-size: .95rem; color: var(--muted); }
.note-small a { color: var(--action); font-weight: 600; }
.ico-diag { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s ease; }

/* Pausa dei video e del piazzale */
.vid-toggle { position: absolute; right: 16px; bottom: 16px; z-index: 3; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgb(255 255 255 / .92); color: var(--ink); transition: background-color .2s, color .2s; --focus: var(--ink); }
.vid-toggle:hover { background: var(--ink); color: #FFFFFF; }
.vid-toggle svg { width: 16px; height: 16px; fill: currentColor; }
.vid-toggle .i-play { display: none; }
.vid-toggle[aria-pressed="true"] .i-play { display: block; }
.vid-toggle[aria-pressed="true"] .i-pause { display: none; }

/* Avviso: il sistema chiede meno movimento */
.motion-note { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; margin-top: 1.5rem; font-size: .92rem; color: var(--muted); }
.motion-note button { padding: .35rem 0; border: 0; background: none; color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: .2em; }

/* Numeri a rullo */
.reel { display: inline-block; height: 1em; overflow: hidden; }
.reel__s { display: block; transform: translateY(0); }
.reel__s i { display: block; height: 1em; font-style: normal; text-align: center; }
.reel.go .reel__s { transform: translateY(var(--to)); transition: transform 2.1s var(--ease-out); transition-delay: var(--dl, 0ms); }

/* Barra di lettura: un filo verde in cima alla pagina */
.roadbar { position: fixed; inset: 0 0 auto 0; z-index: 120; height: 3px; pointer-events: none; opacity: 0; transition: opacity .3s; }
.roadbar.is-on { opacity: 1; }
.roadbar__fill { position: absolute; inset: 0; background: var(--action); transform: scaleX(var(--p, 0)); transform-origin: 0 50%; }
.roadbar__truck { display: none; }


/* 04. HEADER E MENU ======================================================== */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h); display: flex; align-items: center; color: var(--ink); transition: background-color .35s, box-shadow .35s, transform .45s var(--ease-out); view-transition-name: site-header; }
.site-header.is-scrolled, .site-header.mega-open, body.menu-open .site-header { background: rgb(245 247 244 / .9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.site-header.is-hidden { transform: translateY(-100%); }
body.menu-open .site-header { transform: none; }

.site-header__inner { display: flex; align-items: center; gap: 2rem; }
.brand { display: flex; align-items: center; gap: .7rem; margin-right: auto; color: var(--ink); text-decoration: none; }
.brand__logo { width: 44px; height: 44px; transition: transform .6s var(--ease-out); }
.brand:hover .brand__logo { transform: rotate(-12deg); }
.brand__name { font-size: 1.1rem; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }

.main-nav__list { display: flex; align-items: center; gap: 1.9rem; }
.main-nav__item { display: flex; align-items: center; gap: .15rem; }
.main-nav__link { padding-block: .6rem; font-size: 1rem; font-weight: 500; color: var(--text); text-decoration: none; text-underline-offset: .4em; text-decoration-thickness: 1.5px; transition: color .2s; }
.main-nav__link:hover, .main-nav__link[aria-current="page"], .main-nav__item.is-active > .main-nav__link { color: var(--ink); text-decoration: underline; }
.mega-toggle { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 50%; background: none; color: inherit; transition: background-color .2s; }
.mega-toggle:hover { background: var(--panel); }
.mega-toggle svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s; }
.has-mega.is-open .mega-toggle svg { transform: rotate(180deg); }
@media (hover: none) { .mega-toggle { position: relative; } .mega-toggle::after { content: ""; position: absolute; inset: -10px -18px -10px -2px; } }

/* Pannello dei servizi: una scheda bianca sospesa sotto la testata */
.mega { position: absolute; left: 0; right: 0; top: calc(100% - 6px); padding-inline: var(--gutter); visibility: hidden; opacity: 0; transform: translateY(-10px); transition: opacity .25s, transform .45s var(--ease-out), visibility 0s linear .45s; --focus: var(--action); }
.has-mega.is-open .mega { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.mega .mega__inner { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(20px, 3vw, 40px); max-width: var(--container); padding: 22px; border-radius: 24px; background: var(--white); box-shadow: 0 30px 60px -30px rgb(29 42 36 / .4), 0 0 0 1px var(--line); }
.mega__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: start; gap: 2px 8px; }
.mega__link { display: block; padding: .75rem .9rem; border-radius: var(--r-sm); font-weight: 600; line-height: 1.25; color: var(--ink); text-decoration: none; transition: background-color .15s; }
.mega__link small { display: block; margin-top: .2rem; font-size: .88rem; font-weight: 400; line-height: 1.35; color: var(--muted); }
.mega__link:hover, .mega__link:focus-visible, .mega__link.is-on { background: var(--bg); }
.mega__link[aria-current="page"] { background: var(--panel); }
.mega__all { grid-column: 1 / -1; margin: .6rem .9rem .2rem; }
.mega__prev { position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 16px; background: var(--panel); }
.mega__prev img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity .35s, transform .9s var(--ease-out); }
.mega__prev img.is-on { opacity: 1; transform: none; }

.site-header__cta { min-height: 44px; padding: .55em 1.25em; font-size: .95rem; }
.menu-toggle { display: none; place-items: center; width: 46px; height: 46px; border: 1.5px solid var(--line-2); border-radius: 50%; background: var(--white); color: var(--ink); }
.menu-toggle__icon { position: relative; width: 18px; height: 12px; }
.menu-toggle__icon span { position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform .25s, opacity .2s, top .25s; }
.menu-toggle__icon span:nth-child(1) { top: 0; }
.menu-toggle__icon span:nth-child(2) { top: 5px; }
.menu-toggle__icon span:nth-child(3) { top: 10px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(1) { top: 5px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(3) { top: 5px; transform: rotate(-45deg); }
@media (max-width: 1100px) { .main-nav { display: none; } .menu-toggle { display: grid; } .site-header__inner { gap: .75rem; } } /* 1100px: tenere allineato con main.js */
@media (max-width: 640px) { .site-header__cta { display: none; } .brand__logo { width: 40px; height: 40px; } }

body.menu-open { overflow: hidden; }
html:has(> body.menu-open) { overflow: hidden; }
.mobile-menu { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; padding: calc(var(--header-h) + 12px) var(--gutter) 0; background: var(--bg); overflow-y: auto; overscroll-behavior: contain; opacity: 0; transform: translateY(-12px); transition: opacity .3s, transform .5s var(--ease-out); }
.mobile-menu.is-open { opacity: 1; transform: none; }
.mobile-menu__list > li { border-bottom: 1px solid var(--line); }
.mobile-menu__list > li > a { display: block; padding: .9rem 0; font-size: 1.5rem; font-weight: 600; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.mobile-menu__sub { padding: 0 0 .9rem 1rem; margin-bottom: .9rem; border-left: 2px solid var(--panel-2); }
.mobile-menu__sub a { display: block; padding: .55rem 0; color: var(--muted); text-decoration: none; }
.mobile-menu__foot { position: sticky; bottom: 0; display: grid; gap: 1rem; margin-inline: calc(var(--gutter) * -1); padding: 1rem var(--gutter) calc(1rem + env(safe-area-inset-bottom, 0px)); background: var(--bg); box-shadow: 0 -1px 0 var(--line); }
.mobile-menu__foot p { color: var(--muted); }
.mobile-menu__foot a { text-decoration: none; }
.mobile-menu__foot p a { display: inline-block; padding-block: .5rem; }
.mobile-menu a[aria-current="page"] { color: var(--action); }


/* 05. TESTATE INTERNE ====================================================== */
/* testo a sinistra, foto o video in un riquadro arrotondato a destra */
.phero { padding-top: calc(var(--header-h) + clamp(20px, 4vw, 56px)); padding-bottom: clamp(48px, 6vw, 88px); }
.phero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.phero__title { max-width: 12em; font-size: clamp(2.5rem, 4.6vw, 4.6rem); font-weight: 700; line-height: 1.02; letter-spacing: -.042em; }
.phero__lead { margin-top: clamp(18px, 2vw, 28px); max-width: 34rem; font-size: clamp(1.1rem, 1.3vw, 1.24rem); line-height: 1.6; }
.phero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2rem; }
.phero__media { --wipe-r: var(--r-lg); position: relative; aspect-ratio: 5 / 4; max-height: min(72svh, 640px); width: 100%; overflow: hidden; border-radius: var(--r-lg); background: var(--panel-2); }
.phero__media img, .phero__media video { position: absolute; top: -7%; left: 0; width: 100%; max-width: none; height: 114%; object-fit: cover; will-change: transform; }
html:not([data-motion="off"]) .phero__media { animation: curtain 1.4s var(--ease-io) both .1s; }
html:not([data-motion="off"]) .phero__media :is(img, video) { animation: zoomIn 2.2s var(--ease-out) both .1s; }
html:not([data-motion="off"]) .phero__lead, html:not([data-motion="off"]) .phero__actions { animation: fadeUp .9s var(--ease-out) both .55s; }
html:not([data-motion="off"]) .phero__actions { animation-delay: .65s; }
@keyframes curtain { from { clip-path: inset(100% 0 0 0 round var(--r-lg)); } to { clip-path: inset(0 0 0 0 round var(--r-lg)); } }
@keyframes zoomIn { from { scale: 1.22; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } }
@keyframes fadeIn { from { opacity: 0; } }
/* pagine brevi (contatti): titolo e foto più contenuti */
.phero--compact .phero__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); }
.phero--compact .phero__title { font-size: clamp(2.4rem, 4.2vw, 4.2rem); }
.phero--compact .phero__media { aspect-ratio: 4 / 3; }
/* pagine senza foto (privacy, cookie) */
.phero--plain .phero__grid { grid-template-columns: minmax(0, 1fr); }
.phero--plain { padding-bottom: clamp(32px, 4vw, 56px); border-bottom: 1px solid var(--line); }
@media (max-width: 900px) {
  .phero__grid, .phero--compact .phero__grid { grid-template-columns: minmax(0, 1fr); }
  .phero__media, .phero--compact .phero__media { aspect-ratio: 16 / 10; max-height: none; }
}

.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.4rem; font-size: .95rem; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-right: .45rem; opacity: .6; }
.breadcrumb a { display: inline-block; padding-block: .6rem; margin-block: -.6rem; text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .3em; }
.breadcrumb [aria-current] { font-weight: 600; color: var(--ink); }

/* barra delle sezioni: resta in vista e segue la lettura */
.strip { position: sticky; top: 0; z-index: 70; background: rgb(245 247 244 / .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line), 0 -1px 0 var(--line); transition: top .4s var(--ease-out); }
.site-header:not(.is-hidden) ~ main .strip { top: var(--header-h); }
.strip ul { position: relative; display: flex; gap: .25rem; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); overflow-x: auto; scrollbar-width: none; }
.strip ul::-webkit-scrollbar { display: none; }
.strip li { flex: none; }
.strip a { display: flex; align-items: center; min-height: 60px; padding: .5rem 1rem; font-size: .98rem; font-weight: 500; color: var(--muted); text-decoration: none; white-space: nowrap; transition: color .2s; }
.strip a:hover, .strip a.is-active { color: var(--ink); }
.strip a.is-active { font-weight: 600; }
.strip a:focus-visible { outline-offset: -4px; }
.strip__bar { position: absolute; left: 0; bottom: 0; height: 2px; width: var(--w, 0); background: var(--action); transform: translateX(var(--x, 0)); transition: transform .45s var(--ease-out), width .45s var(--ease-out); }

/* subito sotto la testata il contenuto parte più vicino */
.lettura > .section:first-child { padding-top: clamp(24px, 3vw, 48px); }
.lettura > .doc { padding-top: clamp(56px, 6vw, 96px); }

/* fascia di dati sotto la testata */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 3rem; padding-block: 2.25rem; border-bottom: 1px solid var(--line); }
.facts div { padding-block: .75rem; }
.facts dt { margin-bottom: .3rem; font-size: .92rem; font-weight: 600; color: var(--action); }
.facts dd { color: var(--ink); font-size: 1.08rem; line-height: 1.4; }


/* 06. HOME ================================================================= */
/* --- apertura: la riunione in magazzino a tutta larghezza, sopra il foglio di verifica.
       Le spunte si segnano una dopo l'altra, poi arriva il timbro --- */
.hero--home { padding-top: calc(var(--header-h) + 4px); }
.stage { --inset: clamp(10px, 2vw, 28px); position: relative; isolation: isolate; display: grid; width: calc(100% - 2 * var(--inset)); max-width: 1520px; min-height: min(88svh, 900px); margin-inline: auto; border-radius: clamp(24px, 3vw, 40px); overflow: hidden; background: var(--ink); }
.stage > * { grid-area: 1 / 1; }
.stage__media { position: relative; overflow: hidden; }
.stage__media video { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 60% 50%; }
.stage__chip { position: absolute; z-index: 2; right: 74px; bottom: 18px; max-width: calc(100% - 96px); padding: .55em 1.05em; border-radius: 999px; background: rgb(255 255 255 / .92); font-size: .88rem; font-weight: 600; line-height: 1.3; color: var(--ink); }
.stage .vid-toggle { right: 18px; bottom: 16px; }
/* il foglio si allinea al bordo del contenuto della pagina, come il logo */
.stage__over { position: relative; z-index: 1; display: flex; align-items: center; padding-block: clamp(24px, 3vw, 48px); padding-inline: max(20px, var(--gutter) - var(--inset), (100% - var(--container)) / 2); pointer-events: none; }
.stage__over > * { pointer-events: auto; }

.sheet { position: relative; width: min(100%, 650px); padding: clamp(24px, 2.6vw, 38px) clamp(22px, 2.9vw, 44px) clamp(24px, 2.6vw, 36px); border-radius: 18px; background: var(--white); box-shadow: 0 34px 70px -30px rgb(8 18 13 / .6); }
.sheet__head { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .8rem; margin-bottom: 1.4rem; border-bottom: 3px double var(--line); font-size: .88rem; font-weight: 600; color: var(--muted); }
.hero__title { font-size: clamp(2.05rem, 3.15vw, 3.2rem); font-weight: 700; line-height: 1.03; letter-spacing: -.042em; }
.check { margin-top: 1.5rem; border-top: 1px solid var(--line); }
.check li { position: relative; isolation: isolate; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 1rem; padding: .68rem .2rem; border-bottom: 1px solid var(--line); }
.check li::before { content: ""; position: absolute; inset: .3rem -.6rem; z-index: -1; border-radius: 10px; background: var(--panel); transform-origin: 0 50%; }
.check span { font-weight: 600; line-height: 1.35; color: var(--ink); }
.check small { font-size: .82rem; color: var(--muted); text-align: right; }
.check__box { width: 28px; height: 28px; }
.check__box rect { fill: var(--white); stroke: var(--line-2); stroke-width: 1.5; }
.check__box path { fill: none; stroke: var(--action); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
html:not([data-motion="off"]) .check .check__box path { stroke-dasharray: 1; stroke-dashoffset: 1; }
html:not([data-motion="off"]) .check li::before { transform: scaleX(0); }
html:not([data-motion="off"]) .sheet.go .check__box path { stroke-dashoffset: 0; transition: stroke-dashoffset .45s var(--ease-out) calc(1.25s + var(--k) * .34s); }
html:not([data-motion="off"]) .sheet.go .check li::before { transform: none; transition: transform .55s var(--ease-io) calc(1.4s + var(--k) * .34s); }
/* in fondo al foglio: l'invito a sinistra, a destra resta lo spazio per il timbro */
.sheet__foot { display: flex; flex-direction: column; align-items: flex-start; gap: .85rem; margin-top: 1.75rem; padding-right: clamp(120px, 11vw, 150px); }

/* il timbro, stampato sul foglio in basso a destra */
.stamp { position: absolute; right: clamp(16px, 2vw, 30px); bottom: clamp(14px, 1.6vw, 22px); width: clamp(112px, 9.6vw, 136px); height: auto; transform: rotate(-11deg); mix-blend-mode: multiply; pointer-events: none; }
.stamp__o, .stamp__i { fill: none; stroke: var(--action); }
.stamp__o { stroke-width: 5; }
.stamp__i { stroke-width: 2.2; }
.stamp__giro { font-family: var(--f-body); font-size: 17px; font-weight: 700; letter-spacing: .06em; fill: var(--action); }
.stamp__big { font-family: var(--f-body); font-size: 24px; font-weight: 800; letter-spacing: .01em; fill: var(--action); }
html:not([data-motion="off"]) .stamp { opacity: 0; }
html:not([data-motion="off"]) .sheet.go .stamp { animation: stampIn .5s cubic-bezier(.3, 1.3, .5, 1) both 2.85s; }
html:not([data-motion="off"]) .sheet { animation: sheetIn 1s var(--ease-out) both .3s; }
html:not([data-motion="off"]) .sheet.go { animation: sheetIn 1s var(--ease-out) both .3s, thud .35s ease-out 3.05s; }
@keyframes stampIn { 0% { opacity: 0; transform: rotate(-4deg) scale(1.8); } 60% { opacity: .95; transform: rotate(-11deg) scale(.95); } 100% { opacity: .9; transform: rotate(-11deg) scale(1); } }
@keyframes thud { 40% { transform: translateY(2px); } }
@keyframes sheetIn { from { opacity: 0; transform: translateY(30px); } }

/* entrata: il riquadro si apre dal centro e il video si assesta */
html:not([data-motion="off"]) .stage { animation: stageIn 1.5s var(--ease-io) both; }
html:not([data-motion="off"]) .stage__media video { animation: stageZoom 2.6s var(--ease-out) both; }
html:not([data-motion="off"]) .stage__chip { animation: fadeUp .8s var(--ease-out) both 1.4s; }
@keyframes stageIn { from { clip-path: inset(7% 5% round 48px); } to { clip-path: inset(0 round 0); } }
@keyframes stageZoom { from { scale: 1.14; } }
/* animazioni piene: scorrendo, il video si avvicina appena */
html[data-motion="full"] .stage__media video { transform: scale(calc(1 + var(--hp, 0) * .12)); }
.hero--home .motion-note { margin-top: 1rem; }
/* schermi bassi (portatili 1280×720): il foglio deve stare tutto nella prima schermata */
@media (min-width: 901px) and (max-height: 820px) {
  .stage__over { padding-block: 18px; }
  .hero__title { font-size: clamp(2rem, 2.9vw, 2.9rem); }
  .sheet__head { margin-bottom: 1rem; }
  .check { margin-top: 1.1rem; }
  .check li { padding-block: .5rem; }
  .sheet__foot { margin-top: 1.25rem; gap: .6rem; }
}

@media (max-width: 900px) {
  .hero--home { padding-bottom: 8px; }
  .stage { display: block; width: auto; min-height: 0; margin-inline: var(--inset); border-radius: 0; overflow: visible; background: none; isolation: auto; }
  .stage__media { aspect-ratio: 4 / 3; border-radius: 24px; background: var(--ink); }
  .stage__chip { top: 12px; bottom: auto; left: 12px; right: auto; max-width: calc(100% - 80px); font-size: .82rem; }
  .stage .vid-toggle { top: 10px; bottom: auto; right: 10px; }
  .stage__over { display: block; margin-top: -76px; padding: 0 calc(var(--gutter) - var(--inset)); }
  .sheet { width: 100%; max-width: 640px; margin-inline: auto; }
  /* sul telefono il timbro esce dal bordo del foglio */
  .stamp { right: 6px; bottom: -34px; width: 108px; }
  .hero--home .motion-note { margin-top: 3rem; }
  .sheet__foot { padding-right: 0; }
  .sheet__foot .tel-link { max-width: calc(100% - 112px); white-space: normal; }
  .sheet__foot .tel-link strong { white-space: nowrap; }
  html:not([data-motion="off"]) .stage { animation: none; }
  html:not([data-motion="off"]) .stage__media { animation: curtain 1.3s var(--ease-io) both; }
}
@media (max-width: 560px) {
  .stage__chip { display: none; }
  .check li { grid-template-columns: 28px minmax(0, 1fr); }
  .check small { display: none; }
  .sheet__foot { align-items: stretch; }
  .sheet__foot .btn { width: 100%; }
}

/* --- i settori: quattro foto alte, le pari scendono un poco --- */
.settori { padding-block: clamp(96px, 10vw, 150px) 0; }
.settori__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); align-items: start; }
.settore:nth-child(even) { margin-top: clamp(32px, 4.5vw, 72px); }
.settore a { display: block; color: var(--ink); text-decoration: none; }
.settore__pic { --wipe-r: var(--r-md); display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--r-md); background: var(--panel); }
.settore__pic img { width: 100%; height: 100%; object-fit: cover; transition: scale .9s var(--ease-out); }
.settore a:hover .settore__pic img { scale: 1.05; }
.settore__name { margin-top: 1.1rem; font-size: clamp(1.2rem, 1.55vw, 1.45rem); font-weight: 600; }
.settore a:hover .settore__name { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .22em; }
.settore__txt { display: block; margin-top: .4rem; font-size: 1rem; line-height: 1.5; color: var(--muted); }
@media (max-width: 900px) {
  .settori__list { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2rem; }
  .settore:nth-child(even) { margin-top: 44px; }
}
@media (max-width: 420px) { .settore__txt { font-size: .94rem; } }

/* --- i nove servizi: a sinistra il titolo e la foto restano fermi, a destra scorre l'elenco --- */
.svc { padding-block: var(--section-y); }
.svc__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 7vw, 104px); align-items: start; }
.svc__side { position: sticky; top: calc(var(--header-h) + 24px); }
.svc__pics { position: relative; margin-top: 2.25rem; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 22px; background: var(--panel); }
.svc__pics img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.08); transition: opacity .6s ease, transform 1.4s var(--ease-out); }
.svc__pics img.is-on { opacity: 1; transform: none; }
.svc__all { margin-top: 1.5rem; }
.svc__list { border-top: 1px solid var(--line); }
.svc-row a { display: grid; grid-template-columns: minmax(0, 1fr) 52px; grid-template-areas: "name go" "desc go"; align-items: center; gap: .3rem 1.5rem; padding-block: clamp(22px, 2.4vw, 32px); border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.svc-row__thumb { display: none; }
.svc-row__name { grid-area: name; font-size: clamp(1.45rem, 2.3vw, 2.1rem); font-weight: 600; line-height: 1.1; letter-spacing: -.025em; transition: color .35s, transform .6s var(--ease-out); }
.svc-row__desc { grid-area: desc; font-size: 1rem; color: var(--muted); }
.svc-row__go { grid-area: go; display: grid; place-items: center; width: 52px; height: 52px; border: 1.5px solid var(--line-2); border-radius: 50%; color: var(--ink); transition: background-color .35s, border-color .35s, color .35s, transform .5s var(--ease-out); }
.svc-row__go svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 901px) {
  .svc-row:not(.is-on) .svc-row__name { color: #8E9A93; }
  .svc-row.is-on .svc-row__name { transform: translateX(10px); }
  .svc-row.is-on .svc-row__go { background: var(--action); border-color: var(--action); color: #FFFFFF; transform: rotate(-45deg); }
}
@media (max-width: 900px) {
  .svc__grid { grid-template-columns: minmax(0, 1fr); }
  .svc__side { position: static; margin-bottom: 1.5rem; }
  .svc__pics { display: none; }
  .svc-row a { grid-template-columns: 76px minmax(0, 1fr) 40px; grid-template-areas: "thumb name go" "thumb desc go"; column-gap: 1rem; }
  .svc-row__thumb { display: block; grid-area: thumb; width: 76px; height: 76px; object-fit: cover; border-radius: var(--r-sm); }
  .svc-row__go { width: 40px; height: 40px; }
  .svc-row__desc { font-size: .93rem; line-height: 1.4; }
}

/* --- in azienda: il video del magazzino si allarga fino a riempire lo schermo --- */
.apertura { position: relative; }
.apertura__sticky { position: relative; display: flex; align-items: flex-end; height: 100svh; min-height: 560px; max-height: 1000px; overflow: hidden; }
.apertura__frame { position: absolute; inset: 0; overflow: hidden; background: var(--panel-2); }
.apertura__frame video { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.apertura__frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgb(22 34 28 / .8) 0%, rgb(22 34 28 / .3) 45%, rgb(22 34 28 / 0) 72%); }
.apertura__copy { position: relative; padding-bottom: clamp(48px, 7vw, 100px); color: #FFFFFF; --focus: #FFFFFF; }
.apertura__title { max-width: 9em; font-size: clamp(2.8rem, 6.6vw, 6.6rem); font-weight: 700; line-height: .98; letter-spacing: -.045em; color: #FFFFFF; }
.apertura__copy p { max-width: 34rem; margin-top: 1.25rem; font-size: clamp(1.08rem, 1.35vw, 1.25rem); color: rgb(255 255 255 / .92); }
/* animazioni piene: la sezione si allunga, il riquadro resta fermo e si allarga con lo scorrimento */
.apertura.is-pinned { height: 230svh; }
.apertura.is-pinned .apertura__sticky { position: sticky; top: 0; max-height: none; }
.apertura.is-pinned .apertura__frame { clip-path: inset(calc((1 - var(--p, 0)) * 17%) calc((1 - var(--p, 0)) * 26%) round calc((1 - var(--p, 0)) * 36px)); }
.apertura.is-pinned .apertura__frame video { transform: scale(calc(1.3 - var(--p, 0) * .3)); }
.apertura.is-pinned .apertura__copy { transform: translateY(calc((1 - var(--p, 0)) * -40px)); }
.apertura.is-pinned .apertura__copy p { opacity: clamp(0, (var(--p, 0) - .5) * 3, 1); }
@media (max-width: 760px) { .apertura__sticky { height: 88svh; } .apertura.is-pinned .apertura__sticky { height: 100svh; } }

/* --- il piazzale, dentro un grande pannello salvia --- */
.piazzale { width: calc(100% - 2 * clamp(10px, 2vw, 28px)); max-width: 1520px; margin-inline: auto; padding-block: clamp(56px, 7vw, 110px); border-radius: clamp(24px, 3vw, 40px); background: var(--panel); overflow: hidden; }
.apertura + .piazzale { margin-top: clamp(10px, 2vw, 28px); }
.piazzale__grid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: clamp(20px, 3vw, 44px); align-items: center; }
.piazzale__title { font-size: clamp(2.1rem, 3.5vw, 3.3rem); }
.piazzale__sub { margin-top: 1rem; font-size: 1.08rem; color: var(--muted); }
.pz-card { margin-top: 1.75rem; padding: 1.5rem 1.6rem 1.6rem; border-radius: var(--r-md); background: var(--white); box-shadow: 0 18px 40px -30px rgb(29 42 36 / .45); }
html:not([data-motion="off"]) .pz-card { animation: cardIn .55s var(--ease-out) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(12px); } }
.pz-card h3 { font-size: 1.45rem; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }
.pz-card h3 a { text-decoration: none; }
.pz-card p { margin-top: .6rem; font-size: 1rem; line-height: 1.5; }
.pz-card .dash-link { margin-top: 1rem; }
.pz-list { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.1rem; }
.pz-list a, .pz-list button { display: block; min-height: 38px; padding: .35rem .85rem; border: 1px solid var(--line); border-radius: 999px; background: var(--white); font-size: .88rem; font-weight: 600; line-height: 1.2; color: var(--ink); text-decoration: none; transition: background-color .2s, border-color .2s, color .2s; }
.pz-list a { display: flex; align-items: center; }
.pz-list a:hover, .pz-list button:hover { border-color: var(--ink); }
.pz-list [aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.piazzale__scene { position: relative; margin-right: calc(var(--gutter) * -1); }
.piazzale__scene .vid-toggle { right: var(--gutter); bottom: 8px; }
.pz { width: 100%; height: auto; overflow: hidden; --pz-s: 1.2; user-select: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%), linear-gradient(0deg, transparent, #000 9%); -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent, #000 7%), linear-gradient(0deg, transparent, #000 9%); mask-composite: intersect; }
@media (max-width: 1100px) {
  .piazzale__grid { grid-template-columns: minmax(0, 1fr); }
  .piazzale__scene { order: -1; margin-inline: calc(var(--gutter) * -.6); }
  .piazzale__side { display: contents; }
  .piazzale__head { order: -2; }
}
@media (max-width: 640px) { .pz { --pz-s: 1.9; } }

/* disegno: tratti e facce, in colori morbidi */
.pz .d { stroke: var(--pz-ink); stroke-width: var(--pz-s); stroke-linejoin: round; stroke-linecap: round; }
.pz .l { fill: none; }
.pz .l-s { stroke-width: calc(var(--pz-s) * .6); stroke: #8C969D; }
.pz .l-m { stroke-width: calc(var(--pz-s) * .8); stroke: #A9B2B8; }
.pz .l-w { stroke: #FFFFFF; stroke-width: 1.4; }
.pz .l-y { stroke: var(--pz-mark); stroke-width: 2.4; }
.pz .l-y2 { stroke: var(--pz-mark); stroke-width: 1.6; }
.pz .l-b { stroke-width: 1.8; }
.pz .f-t { fill: #FFFFFF; } .pz .f-t2 { fill: #F4F6F5; } .pz .f-l { fill: #E8ECEA; } .pz .f-r { fill: #D3DBD7; }
.pz .f-v { fill: #C6D6DD; } .pz .f-k { fill: var(--pz-dark); } .pz .f-m { fill: #9AA49F; } .pz .f-m2 { fill: #B5BDAE; }
.pz .f-p { fill: #FBFCFB; } .pz .f-a { fill: #4B534F; stroke: #4B534F; }
.pz .f-y { fill: #EDB58A; } .pz .f-y2 { fill: #DE9A68; } .pz .f-y3 { fill: #C5814F; }
.pz .f-w { fill: #E8D7B5; } .pz .f-w2 { fill: #DAC49A; } .pz .f-w3 { fill: #C7AC7F; }
.pz .f-g { fill: #C8DBC6; } .pz .f-g2 { fill: #DCE8D9; }
.pz .f-o { fill: #E5A35E; } .pz .f-b { fill: var(--pz-accent-dark); } .pz .f-e { fill: #4E8D6D; } .pz .f-rs { fill: #C25C51; }
.pz .f-pv { fill: #7895B2; stroke: #FFFFFF; stroke-width: .7; }
.pz .f-gr { fill: #55906F; } .pz .f-gr2 { fill: var(--pz-accent-dark); }
.pz .f-led { fill: #1B201D; }
.pz-t { font-family: var(--f-body); font-size: 10px; font-weight: 800; fill: var(--pz-ink); }
.pz-dash { fill: none; stroke: #FFFFFF; stroke-width: 2; stroke-dasharray: 14 12; }
.pz-sbarra__l { fill: none; stroke: #C25C51; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 11 9; }
.pz-led { fill: #2C312E; }

/* oggetto selezionato: passa nel verde salvia */
.pz [data-s] { cursor: pointer; }
.pz .pz-o .d { transition: fill .3s; }
.pz .pz-o.is-sel .f-t { fill: var(--pz-sel-1); } .pz .pz-o.is-sel .f-t2 { fill: var(--pz-sel-2); } .pz .pz-o.is-sel .f-l { fill: var(--pz-accent); } .pz .pz-o.is-sel .f-r { fill: var(--pz-accent-dark); }
.pz .pz-o.is-sel .f-v { fill: var(--pz-dark); }
.pz .pz-o.is-sel .f-y { fill: #FFFFFF; }
.pz .pz-o.is-sel .f-pv { fill: var(--pz-accent); stroke: var(--pz-ink); }

/* spilli */
.pz-pin { cursor: pointer; }
.pz-pin__stem { stroke: var(--pz-ink); stroke-width: 1.5; }
.pz-pin__hit { fill: transparent; }
.pz-pin__dot { fill: #FFFFFF; stroke: var(--pz-ink); stroke-width: 2.4; transition: fill .2s, r .2s; }
.pz-pin__pulse { fill: var(--pz-accent); opacity: 0; }
.pz-pin__tag { opacity: 0; pointer-events: none; transition: opacity .25s; }
.pz-pin__tag rect { fill: var(--pz-ink); }
.pz-pin__tag text { fill: #FFFFFF; font-family: var(--f-body); font-size: 14px; font-weight: 700; }
.pz-pin.is-sel .pz-pin__dot { fill: var(--pz-accent); r: 10; }
.pz-pin.is-sel .pz-pin__tag { opacity: 1; }
.pz-pin:hover .pz-pin__dot { fill: var(--pz-accent); }
html:not([data-motion="off"]) .pz.is-done .pz-pin__pulse { animation: pzPulse 2.6s ease-out infinite; animation-delay: calc(var(--n, 0) * .3s); }
@keyframes pzPulse { 0% { opacity: .75; transform: scale(.7); } 70%, 100% { opacity: 0; transform: scale(2.3); } }
@media (max-width: 640px) { .pz-pin__dot { r: 11; stroke-width: 3; } .pz-pin.is-sel .pz-pin__dot { r: 13; } .pz-pin__tag { display: none; } }

/* il disegno si traccia da solo quando entra nello schermo */
html:not([data-motion="off"]) .pz:not(.is-done) .d { stroke-dasharray: 1; }
html:not([data-motion="off"]) .pz:not(.is-drawn) .d { stroke-dashoffset: 1; fill-opacity: 0; }
html:not([data-motion="off"]) .pz:not(.is-drawn) :is(.d-f, .pz-dash, .pz-pins, .pz-sbarra, .pz-ledg) { opacity: 0; }
html:not([data-motion="off"]) .pz.is-drawn:not(.is-done) .d { stroke-dashoffset: 0; fill-opacity: 1; transition: stroke-dashoffset 1.5s var(--ease-io) var(--dl, 0ms), fill-opacity .7s ease calc(var(--dl, 0ms) + .8s); }
html:not([data-motion="off"]) .pz.is-drawn:not(.is-done) :is(.d-f, .pz-dash, .pz-sbarra, .pz-ledg) { opacity: 1; transition: opacity .6s ease 1.4s; }
html:not([data-motion="off"]) .pz.is-drawn:not(.is-done) .pz-pins { opacity: 1; transition: opacity .6s ease 1.9s; }

/* cose che si muovono da sole */
html:not([data-motion="off"]) .pz .pz-anim--a { transform: translate(-517px, -298px); }
html:not([data-motion="off"]) .pz .pz-anim--b { transform: translate(810px, 468px); }
html:not([data-motion="off"]) .pz.is-done .pz-anim--a { animation: pzA 19s linear infinite; }
html:not([data-motion="off"]) .pz.is-done .pz-anim--b { animation: pzB 24s linear infinite -9s; }
html:not([data-motion="off"]) .pz.is-done .pz-anim--muletto { animation: pzM 11s ease-in-out infinite; }
html:not([data-motion="off"]) .pz.is-done .pz-sbarra { animation: pzSb 9s ease-in-out infinite; }
@keyframes pzSb { 0%, 12% { transform: rotate(0deg); } 24%, 62% { transform: rotate(52deg); } 74%, 100% { transform: rotate(0deg); } }
html:not([data-motion="off"]) .pz.is-done .pz-dash { animation: pzDash 1.4s linear infinite; }
@keyframes pzDash { to { stroke-dashoffset: -26; } }
html:not([data-motion="off"]) .pz.is-done .pz-led { animation: pzLed 3.2s steps(1) infinite; animation-delay: calc(var(--n) * .24s); }
@keyframes pzLed { 0%, 39% { fill: #EEF3EF; } 40%, 100% { fill: #2C312E; } }
.pz.is-paused :is(.pz-anim, .pz-dash, .pz-sbarra, .pz-led, .pz-pin__pulse) { animation-play-state: paused !important; }

/* schede dei servizi (pagina Servizi, servizi collegati) */
.svc-card { position: relative; display: flex; flex-direction: column; }
.svc-card__media { display: block; overflow: hidden; aspect-ratio: 3 / 2; border-radius: var(--r-md); background: var(--panel); }
.svc-card__media img { width: 100%; height: 100%; object-fit: cover; transition: scale .9s var(--ease-out); }
.svc-card:hover .svc-card__media img { scale: 1.06; }
.svc-card__title { margin-top: 1.25rem; font-size: 1.45rem; font-weight: 600; }
.svc-card__title a { text-decoration: none; }
.svc-card__title a::after { content: ""; position: absolute; inset: 0; }   /* tutta la scheda è cliccabile */
.svc-card:hover .svc-card__title a { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .25em; }
.svc-card__text { margin-top: .55rem; margin-bottom: 1.1rem; font-size: 1.02rem; line-height: 1.5; color: var(--muted); }
.svc-card .dash-link { position: relative; z-index: 1; margin-top: auto; align-self: flex-start; }
.svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3.25rem 2.25rem; }
@media (max-width: 1023px) { .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .svc-grid { grid-template-columns: minmax(0, 1fr); } }

/* --- formazione finanziata: un preventivo di esempio con il totale a zero --- */
.zero { padding-block: var(--section-y); }
.zero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 7vw, 104px); align-items: center; }
.zero__title { font-size: var(--fs-h2); }
.zero__text p { margin-top: 1.1rem; max-width: 32rem; font-size: 1.15rem; color: var(--muted); }
.zero__text .btn { margin-top: 2rem; }
.ricevuta-wrap { justify-self: center; width: min(100%, 450px); filter: drop-shadow(0 26px 28px rgb(29 42 36 / .2)); }
/* carta con il bordo inferiore strappato a denti */
.ricevuta { --z: 18px; position: relative; padding: 30px clamp(22px, 2.6vw, 34px) calc(30px + var(--z) / 2); background: var(--white);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--z) 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--z) 100%; }
.ricevuta__head { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .75rem; border-bottom: 1px dashed var(--line-2); font-size: .86rem; font-weight: 600; color: var(--muted); }
.ricevuta__what { margin-top: 1.1rem; font-size: 1.2rem; font-weight: 700; line-height: 1.25; letter-spacing: -.015em; color: var(--ink); }
.ricevuta__rows { margin-top: .6rem; }
.ricevuta__rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.25rem; align-items: baseline; padding-block: .7rem; border-bottom: 1px dashed var(--line-2); font-size: .98rem; line-height: 1.4; }
.ricevuta__rows li span:last-child { font-weight: 600; color: var(--action); white-space: nowrap; }
.ricevuta__tot { --k: 3; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .25rem 1rem; margin-top: 1rem; padding-top: .8rem; border-top: 3px double var(--ink); font-weight: 700; color: var(--ink); }
.ricevuta__tot strong { font-size: clamp(2.1rem, 3.4vw, 2.7rem); line-height: 1; letter-spacing: -.035em; }
.ricevuta__foot { display: flex; align-items: center; gap: 1rem; margin-top: 1.1rem; }
.ricevuta__note { flex: 1 1 auto; font-size: .84rem; line-height: 1.45; color: var(--muted); }
.ricevuta__timbro { flex: none; padding: .32em .62em; border: 3px solid var(--action); border-radius: 7px; box-shadow: inset 0 0 0 2px var(--white), inset 0 0 0 3.5px var(--action); color: var(--action); font-size: 1.15rem; font-weight: 800; line-height: 1; letter-spacing: .1em; text-transform: uppercase; transform: rotate(-12deg); mix-blend-mode: multiply; opacity: .9; }
/* quando arriva in vista: le righe si stampano una alla volta, poi il timbro */
html:not([data-motion="off"]) .ricevuta-wrap :is(.ricevuta__rows li, .ricevuta__tot) { opacity: 0; transform: translateY(-8px); }
html:not([data-motion="off"]) .ricevuta-wrap.in :is(.ricevuta__rows li, .ricevuta__tot) { opacity: 1; transform: none; transition: opacity .5s ease, transform .6s var(--ease-out); transition-delay: calc(.5s + var(--k) * .3s); }
html:not([data-motion="off"]) .ricevuta__timbro { opacity: 0; }
html:not([data-motion="off"]) .ricevuta-wrap.in .ricevuta__timbro { animation: timbroIn .5s cubic-bezier(.3, 1.3, .5, 1) both 1.95s; }
@keyframes timbroIn { 0% { opacity: 0; transform: rotate(-4deg) scale(1.9); } 60% { opacity: .95; transform: rotate(-12deg) scale(.94); } 100% { opacity: .9; transform: rotate(-12deg) scale(1); } }
@media (max-width: 860px) { .zero__grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .zero__text .btn { width: 100%; white-space: normal; text-align: center; } }

/* --- chi siamo, in home --- */
.about-home { padding-block: 0 var(--section-y); }
.about-home__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 7vw, 104px); align-items: center; }
.about-home__media { --wipe-r: var(--r-lg); position: relative; aspect-ratio: 5 / 4; overflow: hidden; border-radius: var(--r-lg); background: var(--panel); }
.about-home__media img { position: absolute; top: -7%; left: 0; width: 100%; height: 114%; object-fit: cover; will-change: transform; }
.about-home__title { font-size: var(--fs-h2); }
.about-home__lead { margin-top: 1.25rem; font-size: clamp(1.25rem, 1.8vw, 1.5rem); font-weight: 600; line-height: 1.35; letter-spacing: -.015em; color: var(--ink); }
.about-home__copy > p:not(.about-home__lead) { margin-top: 1rem; max-width: 36rem; }
.about-home__copy .btn { margin-top: 2rem; }
@media (max-width: 860px) { .about-home__grid { grid-template-columns: minmax(0, 1fr); } }

/* --- come lavoriamo: una linea sottile che si riempie, un punto che scende --- */
.method { padding-block: var(--section-y); border-top: 1px solid var(--line); }
.method__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 7vw, 104px); align-items: start; }
.method__head { position: sticky; top: calc(var(--header-h) + 24px); }
.percorso { position: relative; padding-left: 64px; }
.percorso__road { position: absolute; left: 15px; top: 2.2rem; bottom: 2.2rem; width: 2px; background: var(--line); }
.percorso__done { position: absolute; inset: 0; background: var(--action); transform: scaleY(var(--p, 0)); transform-origin: 50% 0; }
.percorso__truck { position: absolute; left: 50%; top: 0; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--action); box-shadow: 0 0 0 6px rgb(61 107 84 / .16); transform: translateY(calc(var(--p, 0) * (var(--h, 0px) - 4.4rem - 14px))); }
.percorso__truck svg { display: none; }
.tappa { position: relative; padding-block: 1.75rem; border-bottom: 1px solid var(--line); transition: opacity .5s; }
.tappa:first-child { padding-top: 1rem; }
.tappa__pin { position: absolute; left: -64px; top: 1.75rem; display: grid; place-items: center; width: 32px; height: 32px; border: 1.5px solid var(--line-2); border-radius: 50%; background: var(--bg); font-size: .9rem; font-weight: 700; color: var(--muted); transition: background-color .35s, border-color .35s, color .35s; }
.tappa:first-child .tappa__pin { top: 1rem; }
.tappa.is-on .tappa__pin { border-color: var(--action); background: var(--action); color: #FFFFFF; }
html:not([data-motion="off"]) .tappa:not(.is-on) { opacity: .45; }
.tappa__title { font-size: 1.45rem; font-weight: 600; letter-spacing: -.02em; }
.tappa p { margin-top: .35rem; font-size: 1.04rem; }
.tappa .tappa__out { margin-top: .6rem; font-weight: 600; color: var(--ink); }
@media (max-width: 860px) {
  .method__grid { grid-template-columns: minmax(0, 1fr); }
  .method__head { position: static; }
  .percorso { padding-left: 52px; }
  .tappa__pin { left: -52px; }
}

/* --- domande frequenti --- */
.faqhome, .faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 7vw, 104px); align-items: start; }
.faqhome__head { position: sticky; top: calc(var(--header-h) + 28px); }
.faq-list, .faq__list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1.35rem; cursor: pointer; list-style: none; font-size: 1.18rem; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; color: var(--ink); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item__icon { position: relative; flex: none; width: 40px; height: 40px; border: 1.5px solid var(--line-2); border-radius: 50%; transition: transform .4s var(--ease-out), background-color .3s, border-color .3s; }
.faq-item__icon::before, .faq-item__icon::after { content: ""; position: absolute; top: 50%; left: 50%; width: 14px; height: 2px; margin: -1px 0 0 -7px; background: var(--ink); transition: transform .3s, background-color .3s; }
.faq-item__icon::after { transform: rotate(90deg); }
.faq-item summary:hover .faq-item__icon { border-color: var(--ink); }
.faq-item[open]:not(.is-closing) .faq-item__icon { background: var(--action); border-color: var(--action); transform: rotate(180deg); }
.faq-item[open]:not(.is-closing) .faq-item__icon::before, .faq-item[open]:not(.is-closing) .faq-item__icon::after { background: #FFFFFF; }
.faq-item[open]:not(.is-closing) .faq-item__icon::after { transform: rotate(0deg); }
.faq-item__body { overflow: hidden; }
.faq-item__body p { max-width: 42rem; padding-bottom: 1.5rem; }
@media (max-width: 860px) { .faq, .faqhome { grid-template-columns: minmax(0, 1fr); } .faqhome__head { position: static; } }
.related .section-title { font-size: clamp(2.1rem, 3.4vw, 3.2rem); }


/* 07. PAGINE SERVIZIO ====================================================== */
.doc { padding-block: var(--section-y); }
.doc-section { padding-bottom: clamp(48px, 6vw, 72px); margin-bottom: clamp(48px, 6vw, 72px); border-bottom: 1px solid var(--line); }
.doc-section:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.doc-title { margin-bottom: 1.25rem; font-size: clamp(2.1rem, 3.4vw, 3.2rem); }
.prose p { max-width: 40rem; font-size: 1.1rem; line-height: 1.7; }
.prose p + p { margin-top: 1rem; }
.prose a { color: var(--action); font-weight: 600; text-underline-offset: .2em; }
@media (min-width: 1200px) {
  .doc-section { display: grid; grid-template-columns: 300px minmax(0, 1fr); column-gap: 72px; }
  .doc-section > * { grid-column: 2; }
  .doc-section > .doc-title { grid-column: 1; grid-row: 1 / span 40; align-self: start; position: sticky; top: calc(var(--header-h) + 90px); margin-bottom: 0; font-size: clamp(2rem, 2.5vw, 2.5rem); }
  .doc-section .feature-grid:first-of-type, .doc-section .norm-grid, .doc-section .role-grid, .doc-section .thresholds, .doc-section .flow, .doc-section .strengths, .doc-section .compare, .doc-section .tabs, .doc-section .risk-example { margin-top: 0; }
  .doc-section .prose + * { margin-top: 2rem; }
  .doc-section .norm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .doc-section .role-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .doc-section .strengths { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-section .feature-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-section .risk-example { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 1.75rem; }
}

/* punti chiave: un filetto che si stende, poi il testo */
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem 3rem; margin-top: 2rem; }
.feature-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feature-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem 2rem; }
.feature { position: relative; padding-top: 1.25rem; }
.feature::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--line-2); transform-origin: 0 50%; transition: background-color .3s; }
.feature:hover::before { background: var(--action); }
html:not([data-motion="off"]) .feature[data-rv]:not(.in) { transform: none; opacity: 1; }
html:not([data-motion="off"]) .feature[data-rv]:not(.in)::before { transform: scaleX(0); }
html:not([data-motion="off"]) .feature[data-rv].in::before { transition: transform .9s var(--ease-io), background-color .3s; transition-delay: calc(var(--d, 0) * 70ms); }
html:not([data-motion="off"]) .feature[data-rv]:not(.in) > * { opacity: 0; transform: translateY(14px); }
html:not([data-motion="off"]) .feature[data-rv].in > * { transition: opacity .7s ease, transform .8s var(--ease-out); transition-delay: calc(var(--d, 0) * 70ms + .22s); }
.feature__tag { margin-bottom: .55rem; font-size: .88rem; font-weight: 600; color: var(--action); }
.feature h3 { margin-bottom: .45rem; font-size: 1.28rem; }
.feature p:not(.feature__tag) { font-size: 1rem; color: var(--muted); }
.feature-grid--4 .feature h3 { margin-bottom: 0; }

.callout { margin-top: 2rem; padding: 1.5rem 1.75rem; border-radius: var(--r-md); background: var(--panel); }
.callout__title { margin-bottom: .3rem; font-weight: 700; color: var(--ink); }
.callout p { max-width: 44rem; }

.doc-cta { margin-top: 1.75rem; }
@media (max-width: 560px) { .doc-cta .btn { width: 100%; white-space: normal; text-align: center; } }

.flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-top: 2rem; counter-reset: flow; }
.flow li { padding: 1.5rem; border-radius: var(--r-md); background: var(--white); box-shadow: 0 0 0 1px var(--line); counter-increment: flow; }
.flow li::before { content: counter(flow); display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: .9rem; border-radius: 50%; background: var(--action); color: #FFFFFF; font-weight: 700; font-size: .95rem; }
.flow strong { display: block; margin-bottom: .3rem; font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em; }
.flow p { font-size: .98rem; color: var(--muted); }

.norm-grid, .role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin-top: 2rem; }
.norm, .role { display: flex; flex-direction: column; gap: .4rem; padding: 1.5rem; border-radius: var(--r-md); background: var(--white); box-shadow: 0 0 0 1px var(--line); }
.norm__code { font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.norm__name { margin-bottom: .5rem; font-size: .95rem; font-weight: 600; color: var(--action); }
.norm p, .role p { font-size: .98rem; color: var(--muted); }
.role__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-bottom: .75rem; margin-bottom: .4rem; border-bottom: 1px solid var(--line); }
.role__abbr { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; color: var(--action); }
.role__ref { font-size: .85rem; color: var(--muted); text-align: right; }
.role h3 { font-size: 1.2rem; }
/* griglie fisse: 5+5 norme e 4+4 figure, senza righe spaiate */
.norm-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.norm { padding: 1.35rem; }
@media (max-width: 1099px) { .norm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .norm-grid { grid-template-columns: minmax(0, 1fr); } }
.role-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1199px) { .role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .role-grid { grid-template-columns: minmax(0, 1fr); } }

.thresholds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.thresholds li { display: flex; flex-direction: column; gap: .2rem; padding: 1.6rem; border-radius: var(--r-md); background: var(--panel); }
.thresholds__period { font-size: .95rem; font-weight: 600; color: var(--muted); }
.thresholds__value { font-size: clamp(2.8rem, 4.4vw, 3.8rem); font-weight: 700; line-height: 1.05; letter-spacing: -.04em; color: var(--ink); }
.thresholds__unit { color: var(--muted); }

.compare { width: 100%; min-width: 560px; margin-top: 2rem; border-collapse: separate; border-spacing: 0; overflow: hidden; border-radius: var(--r-md); background: var(--white); box-shadow: 0 0 0 1px var(--line); }
.compare th, .compare td { padding: 1rem 1.2rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare thead th { background: var(--ink); color: #FFFFFF; font-size: .95rem; font-weight: 600; }
.compare thead th:last-child { background: var(--action); }
.compare tbody th { width: 22%; font-size: .98rem; font-weight: 600; color: var(--ink); }
.compare td.is-better { background: var(--panel); color: var(--ink); }

.strengths { display: grid; grid-template-columns: 1.25fr repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.strength { display: flex; flex-direction: column; gap: .4rem; padding: 1.6rem; border-radius: var(--r-md); background: var(--white); box-shadow: 0 0 0 1px var(--line); }
.strength__tag { font-size: .88rem; font-weight: 600; color: var(--action); }
.strength h3 { font-size: 1.2rem; }
.strength p:not(.strength__tag) { font-size: .98rem; color: var(--muted); }
.strength--feature { background: var(--action); box-shadow: none; color: #FFFFFF; }
.strength--feature .strength__tag, .strength--feature p:not(.strength__tag), .strength--feature h3, .strength--feature strong { color: #FFFFFF; }
.strength__big { font-size: clamp(2.8rem, 4.4vw, 3.8rem); font-weight: 700; line-height: 1.05; letter-spacing: -.04em; }
.strength__big small { margin-left: .3rem; font-size: .4em; font-weight: 600; letter-spacing: 0; }

/* schede che si sollevano appena al passaggio */
.norm, .role, .strength, .case, .step { transition: box-shadow .35s, transform .45s var(--ease-out); }
.norm:hover, .role:hover, .strength:not(.strength--feature):hover, .case:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--line-2), 0 22px 40px -28px rgb(29 42 36 / .45); }

.linklist { margin-top: 1.75rem; border-top: 1px solid var(--line); }
.linklist a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.2rem 0; border-bottom: 1px solid var(--line); font-size: 1.04rem; font-weight: 600; color: var(--ink); text-decoration: none; transition: color .2s, padding-left .35s var(--ease-out); }
.linklist a span { flex: none; font-size: .92rem; font-weight: 400; color: var(--muted); }
.linklist a:hover { color: var(--action); padding-left: .5rem; }

.funded-inline { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2rem; align-items: center; }
.funded-inline__figure { font-size: clamp(3.6rem, 7vw, 5.4rem); font-weight: 800; line-height: 1; letter-spacing: -.06em; color: var(--soft); white-space: nowrap; }
.funded-inline__figure span { color: var(--ink); }

/* Catalogo corsi */
.tabs { margin-top: 1.5rem; }
.tabs__list { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.tabs__tab { display: inline-flex; align-items: center; gap: .55rem; min-height: 46px; padding: .5rem 1.1rem; border: 1px solid var(--line-2); border-radius: 999px; background: var(--white); font-size: .95rem; font-weight: 600; color: var(--text); transition: background-color .2s, border-color .2s, color .2s; }
.tabs__tab:hover { border-color: var(--ink); color: var(--ink); }
.tabs__tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.tabs__count { padding: .05em .55em; border-radius: 999px; background: var(--panel); font-size: .8rem; color: var(--ink); }
.tabs__tab[aria-selected="true"] .tabs__count { background: rgb(255 255 255 / .18); color: #FFFFFF; }
@media (max-width: 640px) {
  .tabs__list { flex-direction: column; gap: .4rem; }
  .tabs__tab { justify-content: space-between; width: 100%; min-height: 50px; border-radius: var(--r-sm); text-align: left; }
}
.course-list { border-top: 1px solid var(--line); }
.course-list li { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, .8fr); gap: 1.25rem; align-items: baseline; padding: 1.05rem .75rem; border-bottom: 1px solid var(--line); transition: background-color .2s, padding-left .3s var(--ease-out); }
.course-list li:hover { background: var(--white); padding-left: 1.25rem; }
.course-list__name { font-size: 1.02rem; font-weight: 600; color: var(--ink); }
.course-list__ref { font-size: .95rem; color: var(--muted); }
.course-list__note { font-size: .95rem; text-align: right; }
@media (max-width: 860px) { .course-list li { grid-template-columns: minmax(0, 1fr) auto; gap: .2rem 1rem; padding-inline: 0; } .course-list li:hover { padding-left: 0; } .course-list__name { grid-column: 1 / -1; } }

/* Matrice di rischio (pagina Sicurezza) */
.risk-example { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; align-items: center; margin-top: 2.5rem; padding: clamp(20px, 3vw, 36px); border-radius: 24px; background: var(--panel); }
.risk-example__text h3 { font-size: 1.3rem; }
.risk-example__text p { margin-top: .6rem; color: var(--text); }
.risk-legend { display: grid; gap: .45rem; margin-top: 1.1rem; }
.risk-legend li { display: flex; align-items: center; gap: .6rem; }
.sw { display: inline-block; width: 16px; height: 16px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgb(29 42 36 / .22); }
.sw.r-low { background: var(--r-low); } .sw.r-mid { background: var(--r-mid); } .sw.r-high { background: var(--r-high); } .sw.r-crit { background: var(--r-crit); }
.riskcard { overflow: hidden; border-radius: var(--r-md); background: var(--white); box-shadow: 0 18px 40px -30px rgb(29 42 36 / .45); }
.riskcard__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1.2rem; border-bottom: 1px solid var(--line); }
.riskcard__title { font-weight: 600; color: var(--ink); }
.riskcard__replay { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 50%; background: none; transition: border-color .2s, color .2s; }
.riskcard__replay:hover { color: var(--action); border-color: var(--action); }
.riskcard__replay svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.matrix { width: 100%; height: auto; padding: .75rem .9rem 0; overflow: visible; }
.matrix__axis text, .matrix__axis-title { font-family: var(--f-body); fill: var(--muted); font-size: 14px; }
.cell text { font-family: var(--f-body); font-size: 17px; font-weight: 700; text-anchor: middle; fill: var(--ink); }
.cell rect { rx: 6px; }
.cell.r-low rect { fill: var(--r-low); } .cell.r-mid rect { fill: var(--r-mid); } .cell.r-high rect { fill: var(--r-high); } .cell.r-crit rect { fill: var(--r-crit); }
.cell, .matrix__marker { transform-box: fill-box; transform-origin: center; }
.matrix__path { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.matrix__marker circle:first-child { fill: none; stroke: var(--ink); stroke-width: 2.5; }
.matrix__marker--end circle:first-child { fill: var(--action); stroke: var(--action); }
.matrix__marker--end .tick { fill: none; stroke: #FFFFFF; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.riskcard.is-playing .cell { animation: cellIn .5s ease-out both; animation-delay: calc(var(--d) * 60ms + 100ms); }
.riskcard.is-playing .matrix__marker--start { animation: pop .5s ease-out both .8s; }
.riskcard.is-playing .matrix__path { animation: draw 1.2s ease-in-out both 1.1s; }
.riskcard.is-playing .matrix__marker--end { animation: pop .5s ease-out both 2.3s; }
@keyframes cellIn { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { opacity: 0; transform: scale(.4); } 70% { opacity: 1; transform: scale(1.08); } 100% { opacity: 1; transform: none; } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.riskcard__foot { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding: .85rem 1.2rem 1rem; border-top: 1px solid var(--line); }
.riskcard__label { font-size: .95rem; color: var(--muted); }
.riskcard__value { min-width: 2.4ch; padding: .1em .35em; border-radius: 8px; font-weight: 700; font-size: 1.6rem; line-height: 1.1; text-align: center; background: var(--r-low); }
.riskcard__value[data-level="crit"] { background: var(--r-crit); } .riskcard__value[data-level="high"] { background: var(--r-high); } .riskcard__value[data-level="mid"] { background: var(--r-mid); }
.riskcard__level { font-weight: 600; color: var(--ink); }

@media (max-width: 1100px) { .strengths { grid-template-columns: repeat(2, minmax(0, 1fr)); } .feature-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1023px) { .feature-grid--3, .risk-example { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .feature-grid, .feature-grid--4, .thresholds, .strengths { grid-template-columns: minmax(0, 1fr); } .funded-inline { grid-template-columns: minmax(0, 1fr); gap: 1rem; } }


/* 08. CHI SIAMO ============================================================ */
.about__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.about__media { position: sticky; top: calc(var(--header-h) + 32px); }
.about__copy .section-lead { margin-top: 1rem; }
.brand-plate { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; padding: clamp(28px, 3.5vw, 44px); border-radius: var(--r-lg); background: var(--panel); }
.brand-plate__logo { width: min(56%, 200px); height: auto; margin-inline: auto; will-change: transform; }   /* centrato nel <picture>, che occupa tutta la larghezza */
.brand-plate__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; border-top: 1px solid var(--line-2); }
/* column-reverse + flex-end: i numeri restano sulla stessa riga anche con etichette su due righe */
.brand-plate__facts div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: .2rem; padding: 1rem .4rem 0; text-align: center; }
.brand-plate__facts div + div { border-left: 1px solid var(--line-2); }
.brand-plate__facts dd { font-size: clamp(2.2rem, 3.4vw, 3rem); font-weight: 700; line-height: 1; letter-spacing: -.04em; color: var(--ink); }
.brand-plate__facts dt { font-size: .88rem; line-height: 1.3; color: var(--muted); }
@media (max-width: 359px) { .brand-plate__facts div { padding-inline: .2rem; } .brand-plate__facts dt { font-size: .8rem; } }
.checklist { display: grid; margin-top: 2rem; border-top: 1px solid var(--line); }
.checklist li { display: flex; gap: 1rem; padding-block: 1rem; border-bottom: 1px solid var(--line); }
.checklist li > span:last-child { color: var(--text); }
.checkbox { flex: none; display: grid; place-items: center; width: 26px; height: 26px; margin-top: .1rem; border-radius: 50%; background: var(--action); }
.checkbox svg { width: 16px; height: 16px; fill: none; stroke: #FFFFFF; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.about__quote { margin-top: 2.25rem; padding: 1.5rem 1.75rem; border-radius: var(--r-md); background: var(--panel); }
.about__quote p { font-size: clamp(1.2rem, 1.8vw, 1.45rem); font-weight: 600; line-height: 1.4; letter-spacing: -.015em; color: var(--ink); }
.about__quote footer { margin-top: .6rem; font-size: .95rem; color: var(--muted); }
@media (max-width: 860px) { .about__grid { grid-template-columns: minmax(0, 1fr); } .about__media { position: static; max-width: 440px; } }

.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; counter-reset: step; }
.step { padding: 1.6rem 1.4rem; border-radius: var(--r-md); background: var(--white); box-shadow: 0 0 0 1px var(--line); counter-increment: step; }
.step::before { content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: .9rem; border-radius: 50%; background: var(--action); color: #FFFFFF; font-size: 1rem; font-weight: 700; }
.step__title { font-size: 1.2rem; }
.step p { margin-top: .4rem; font-size: .98rem; color: var(--muted); }
.step .step__out { margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--line); color: var(--ink); font-weight: 500; }
@media (max-width: 1100px) { .steps { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); } }

.cases__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.case { display: flex; flex-direction: column; padding: 1.75rem; border-radius: var(--r-md); background: var(--white); box-shadow: 0 0 0 1px var(--line); }
.case__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-bottom: .9rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line); }
.case__code { font-size: .88rem; font-weight: 600; color: var(--action); }
.case__kpi strong { font-size: 1.3rem; font-weight: 700; }
.case__title { margin-bottom: 1rem; font-size: 1.2rem; }
.case__rows { display: grid; margin-top: auto; }
.case__rows div { display: grid; grid-template-columns: 6.5rem 1fr; gap: .75rem; padding-block: .6rem; border-top: 1px solid var(--line); }
.case__rows dt { font-size: .92rem; font-weight: 600; color: var(--muted); }
.case__rows dd { font-size: 1rem; }
/* intestazione, titolo e righe allineati tra le tre schede (dove il browser supporta subgrid) */
@supports (grid-template-rows: subgrid) {
  .case { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }
  .case__rows { margin-top: 0; align-self: start; }
}
@media (max-width: 1023px) { .cases__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cases__grid { grid-template-columns: minmax(0, 1fr); } .case__rows div { grid-template-columns: minmax(0, 1fr); gap: .1rem; } }


/* 09. CONTATTI E FORM ====================================================== */
.contact-page__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.contact-page__form { padding: clamp(24px, 4vw, 48px); border-radius: var(--r-lg); background: var(--white); box-shadow: var(--shadow); }
.contact-page__title { margin-bottom: 1.25rem; font-size: clamp(2.1rem, 3vw, 2.8rem); }
.contact-card { position: sticky; top: calc(var(--header-h) + 24px); padding: clamp(24px, 3vw, 40px); border-radius: var(--r-lg); background: var(--ink); color: #FFFFFF; }
.contact__channels li { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; align-items: baseline; padding-block: .9rem; border-bottom: 1px solid rgb(255 255 255 / .14); }
.contact__channels li:first-child { padding-top: 0; }
.contact__k { font-size: .9rem; color: var(--on-dark); }
.contact__v { text-decoration: none; }
a.contact__v:hover { text-decoration: underline; text-underline-offset: .25em; }
.contact__v--big { font-size: clamp(1.15rem, 1.8vw, 1.4rem); font-weight: 700; letter-spacing: -.01em; }
.btn--whatsapp { margin-top: 1.5rem; background: #FFFFFF; color: var(--ink); }
.btn--whatsapp:hover { background: var(--panel); }
.btn--whatsapp svg { width: 20px; height: 20px; fill: currentColor; }
.map { position: relative; margin-top: 1.5rem; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--r-md); background: #2B3A33; }
.map__art { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: rgb(255 255 255 / .18); stroke-width: 10; stroke-linecap: round; }
.map__art .thin { stroke-width: 1; stroke: rgb(255 255 255 / .1); }
.map__art .pin { fill: var(--soft); stroke: none; }
.map__art .pin-ring { stroke: var(--soft); stroke-width: 1.5; }
.map__btn { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: grid; gap: .15rem; width: max-content; max-width: calc(100% - 28px); padding: .65rem 1.1rem; border: 0; border-radius: var(--r-sm); background: #FFFFFF; color: var(--ink); font-size: .9rem; font-weight: 600; text-align: center; transition: background-color .2s; --focus: #FFFFFF; }
.map__btn:hover { background: var(--panel); }
.map__btn span { font-size: .8rem; font-weight: 400; color: var(--muted); white-space: normal; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 960px) { .contact-page__grid { grid-template-columns: minmax(0, 1fr); } .contact-card { position: static; } }
@media (max-width: 480px) { .contact__channels li { grid-template-columns: minmax(0, 1fr); gap: .1rem; } }

.form { display: grid; gap: 1.25rem; }
.form__intro { font-size: .95rem; color: var(--muted); }
.form__alt { margin: -.5rem 0 1.5rem; font-size: .98rem; color: var(--muted); }
.form__alt a { color: var(--action); font-weight: 600; }
.form__note { flex-basis: 100%; margin: 0; font-size: .95rem; color: var(--muted); }
.form__row--2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.field { position: relative; display: grid; gap: .4rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.field label, .field legend { font-size: .95rem; font-weight: 600; color: var(--ink); }
.field legend { padding: 0; margin-bottom: .4rem; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea { width: 100%; min-height: 52px; padding: .85rem 1rem; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--bg); font-size: 1.02rem; line-height: 1.4; -webkit-appearance: none; appearance: none; transition: border-color .15s, box-shadow .15s, background-color .15s; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #9AA8A0; }
.field textarea { resize: vertical; min-height: 7.5rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--action); background: var(--white); box-shadow: 0 0 0 3px rgb(61 107 84 / .22); }
/* il bordo rosso deve prevalere su .field input[type="text"], più specifico */
.field [aria-invalid="true"] { border-color: var(--error) !important; box-shadow: inset 0 0 0 1px var(--error); }
.field [aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgb(180 35 24 / .18); }
.field__error { font-size: .92rem; font-weight: 500; color: var(--error); }
/* vuoto: fuori dal flusso ma ancora nell'albero di accessibilità, così l'aria-live annuncia l'errore che compare all'uscita dal campo */
.field__error:empty { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.field__counter { font-size: .85rem; color: var(--muted); text-align: right; }
.select { position: relative; }
.select::after { content: ""; position: absolute; right: 1.1rem; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); pointer-events: none; }
.select select { padding-right: 2.6rem; text-overflow: ellipsis; cursor: pointer; }   /* voce più lunga del campo (telefoni da 320px): puntini invece del taglio netto */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.chips span { display: inline-block; padding: .6rem 1.1rem; border: 1px solid var(--line-2); border-radius: 999px; background: var(--white); font-size: .98rem; transition: background-color .15s, color .15s, border-color .15s; }
.chips label:hover span { border-color: var(--ink); }
.chips input:checked + span { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.chips input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.field--check { grid-template-columns: auto 1fr; align-items: start; column-gap: .75rem; }
.field--check label { font-weight: 400; font-size: .98rem; color: var(--muted); }
.field--check label a { color: var(--action); font-weight: 600; }
.field--check .field__error { grid-column: 2; }
.field--check input[type="checkbox"] { -webkit-appearance: none; appearance: none; display: grid; place-content: center; width: 22px; height: 22px; margin: .15rem 0 0; border: 1.5px solid #9AA8A0; border-radius: 6px; background: var(--white); cursor: pointer; }
.field--check input[type="checkbox"]::before { content: ""; width: 12px; height: 12px; background: #FFFFFF; clip-path: polygon(14% 44%, 0 59%, 40% 100%, 100% 22%, 86% 8%, 40% 69%); transform: scale(0); transition: transform .15s; }
.field--check input[type="checkbox"]:checked { background: var(--action); border-color: var(--action); }
.field--check input[type="checkbox"]:checked::before { transform: scale(1); }
.field--check input[type="checkbox"]:focus-visible { border-color: var(--action); box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--action); outline: none; }
.field--check input[type="checkbox"][aria-invalid="true"]:focus-visible { box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--error); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.btn__spinner { display: none; width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn.is-loading { pointer-events: none; opacity: .85; }
.btn.is-loading .btn__spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.form__status { font-size: .98rem; font-weight: 500; }
.form__status.is-error { color: var(--error); }
.form-success { max-width: 520px; }
.form-success:focus { outline: none; }
.form-success__icon { width: 64px; height: 64px; margin-bottom: 1.25rem; fill: none; stroke: var(--action); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.form-success h3 { margin-bottom: .5rem; font-size: 1.8rem; }
.form-success p { color: var(--muted); }
.form-success a { color: var(--action); font-weight: 600; }
@media (max-width: 560px) {
  .form__row--2 { grid-template-columns: minmax(0, 1fr); }
  .form__actions .btn { width: 100%; }
  /* telefono: modulo senza cornice, campi più larghi; scelte su una riga */
  .contact-page__form { padding: 0; border-radius: 0; background: none; box-shadow: none; }
  .chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .chips span { display: block; padding-inline: .25rem; text-align: center; }
}
@media (max-width: 359px) { .chips { grid-template-columns: repeat(2, minmax(0, 1fr)); } }


/* 10. FASCIA FINALE E FOOTER =============================================== */
.finale { padding-block: var(--section-y); }
.finale__panel { padding: clamp(36px, 7vw, 104px); border-radius: clamp(24px, 3vw, 40px); background: var(--panel-2); }
.finale__title { max-width: 11em; font-size: clamp(2.6rem, 5.6vw, 5.6rem); font-weight: 700; line-height: 1; letter-spacing: -.045em; }
.finale__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) auto; gap: 2rem clamp(32px, 5vw, 80px); align-items: end; margin-top: clamp(24px, 3vw, 40px); }
.finale__grid > p { max-width: 38rem; font-size: 1.2rem; line-height: 1.55; color: var(--text); }
.finale__actions { display: grid; justify-items: start; gap: .85rem; }
.finale__actions p { font-size: 1rem; color: var(--text); }
.finale__actions a:not(.btn) { font-weight: 700; color: var(--ink); text-underline-offset: .25em; }
@media (max-width: 860px) { .finale__grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .finale__actions, .finale__actions .btn { width: 100%; } }

.site-footer { padding-top: clamp(56px, 7vw, 96px); padding-bottom: 2rem; background: var(--ink); color: var(--on-dark); font-size: 1rem; }
.site-footer__motto { max-width: 14em; margin-bottom: clamp(40px, 5vw, 72px); font-size: clamp(2.2rem, 4.6vw, 4.4rem); font-weight: 700; line-height: 1.02; letter-spacing: -.04em; color: #FFFFFF; }
.site-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1.3fr; gap: 2.5rem; }
.site-footer__grid > * { padding-top: 1.25rem; border-top: 1px solid rgb(255 255 255 / .16); }
.site-footer__h { margin-bottom: .9rem; font-size: 1rem; font-weight: 600; letter-spacing: 0; color: #FFFFFF; }
.site-footer__col ul { display: grid; gap: .5rem; }
.site-footer__col a { text-decoration: none; transition: color .2s; }
.site-footer__col a:hover { color: #FFFFFF; text-decoration: underline; text-underline-offset: .25em; }
.site-footer__cta { display: inline-block; margin-top: 1.25rem; font-weight: 600; color: #FFFFFF !important; text-decoration: underline !important; text-underline-offset: .3em; text-decoration-color: rgb(255 255 255 / .4) !important; }
.site-footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid rgb(255 255 255 / .12); font-size: .92rem; }
.site-footer__bottom a { text-decoration: none; }
.site-footer__bottom a:hover { color: #FFFFFF; text-decoration: underline; }
.site-footer__logo { display: flex; align-items: center; gap: .85rem; }
.site-footer__logo img { width: 52px; height: 52px; }
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: minmax(0, 1fr); } }

/* scelta delle animazioni */
.motion-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; }
.motion-ctl__opts { display: inline-flex; padding: 3px; border: 1px solid rgb(255 255 255 / .25); border-radius: 999px; }
.motion-ctl button { min-height: 36px; padding: .3rem .85rem; border: 0; border-radius: 999px; background: none; color: var(--on-dark); font-size: .9rem; font-weight: 600; transition: background-color .2s, color .2s; }
.motion-ctl button:hover { color: #FFFFFF; }
.motion-ctl button[aria-pressed="true"] { background: #FFFFFF; color: var(--ink); }

.wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 80; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--action); color: #FFFFFF; box-shadow: 0 12px 26px -10px rgb(29 42 36 / .55); opacity: 0; visibility: hidden; transform: translateY(12px) scale(.8); transition: opacity .3s, transform .4s var(--ease-out), background-color .2s, visibility 0s linear .3s; }
.wa-float svg { width: 27px; height: 27px; fill: currentColor; }
.wa-float.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.wa-float:hover { background: var(--action-h); }
body.menu-open .wa-float { opacity: 0; pointer-events: none; }
@media (max-width: 640px) { .wa-float { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: 50px; height: 50px; } }


/* 11. PAGINE LEGALI E DI SERVIZIO ========================================== */
.legal__inner { max-width: 44rem; }
.legal__inner > p:first-child { font-size: 1.15rem; color: var(--ink); }
.legal h2 { margin: 2.5rem 0 .8rem; font-size: 1.4rem; letter-spacing: -.02em; }
.legal p + p, .legal ul + p, .legal .table-wrap + p { margin-top: 1rem; }
.legal ul { display: grid; gap: .4rem; margin-top: .75rem; padding-left: 1.25rem; list-style: disc; }
.legal a { color: var(--action); font-weight: 500; }
.legal table { width: 100%; min-width: 520px; margin-top: 1rem; border-collapse: collapse; font-size: .98rem; }
.legal th, .legal td { padding: .75rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.legal th { font-size: .9rem; font-weight: 600; color: var(--ink); background: var(--panel); }

/* tabelle (confronto TFR, privacy, cookie) leggibili su telefono senza scorrimento laterale */
@media (max-width: 640px) {
  .compare, .legal table { min-width: 0; table-layout: fixed; font-size: .95rem; }
  .compare th, .compare td, .legal th, .legal td { padding: .75rem .5rem; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
  .compare tbody th { width: 31%; font-size: .9rem; overflow-wrap: normal; -webkit-hyphens: manual; hyphens: manual; }
  .compare thead th, .legal th { font-size: .82rem; overflow-wrap: normal; }
}
/* telefoni stretti: celle più compatte, perché parole come «precontrattuali» stiano nella colonna */
@media (max-width: 400px) {
  .legal table, .compare { font-size: .88rem; }
  .legal th, .legal td, .compare th, .compare td { padding: .6rem .35rem; }
}
/* sotto i 360px le tabelle scorrono di poco in orizzontale invece di spezzare le parole
   (tabelle di dati: ammesso da WCAG 1.4.10; main.js rende il contenitore raggiungibile da tastiera) */
@media (max-width: 359px) { .compare, .legal table { min-width: 324px; } }

.message-page { display: grid; place-items: center; min-height: 72vh; padding: calc(var(--header-h) + 56px) 0 72px; }
.message-page__inner { max-width: 640px; }
.message-page .message-page__code { margin: 0; font-size: clamp(7rem, 22vw, 12rem); font-weight: 800; line-height: 1; letter-spacing: -.06em; color: var(--soft); }
.message-page h1 { margin: 1rem 0 .75rem; font-size: clamp(2.4rem, 4.6vw, 3.8rem); }
.message-page p { margin-bottom: 1.75rem; color: var(--muted); }
.message-page p a { color: var(--action); font-weight: 600; }
.message-page__inner .btn { margin: 0 .5rem .5rem 0; }


/* 12. MOVIMENTO ============================================================ */
/* cambio pagina: dissolvenza breve, l'header resta fermo */
@view-transition { navigation: auto; }
html[data-motion="full"]::view-transition-old(root) { animation: vtOut .22s ease both; }
html[data-motion="full"]::view-transition-new(root) { animation: vtIn .4s var(--ease-out) both; }
html[data-motion="reduced"]::view-transition-old(root) { animation: vtOut .2s ease both; }
html[data-motion="reduced"]::view-transition-new(root) { animation: vtFade .3s ease both; }
@keyframes vtOut { to { opacity: 0; } }
@keyframes vtIn { from { opacity: 0; transform: translateY(12px); } }
@keyframes vtFade { from { opacity: 0; } }
html[data-motion="off"]::view-transition-old(root), html[data-motion="off"]::view-transition-new(root) { animation: none; }

/* fermo: nessuna transizione o animazione, foto e testi sempre in vista */
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }

@media print {
  .site-header, .wa-float, .mobile-menu, .map, .finale, .strip, .roadbar, .vid-toggle, .motion-note, .motion-ctl, .stage__media, .phero__media, .apertura__frame, .svc__pics, .stamp, .ricevuta__timbro { display: none !important; }
  body { background: #FFFFFF; }
  .apertura, .apertura__sticky { min-height: 0 !important; height: auto !important; }
  .apertura__title, .apertura__copy p { color: #000000; }
  .sheet { width: auto; box-shadow: none; }
  .stage__over { padding: 0; }
  .stage { display: block; min-height: 0; background: none; }
  .ricevuta-wrap { filter: none; }
  .ricevuta { -webkit-mask: none; mask: none; border: 1px solid #999999; }
}
