/* ═══════════════════════════════════════════════════════════════════════
   ZENIT WEB — core.css
   Token, reset, tipografia e componenti condivisi fra mobile e desktop.
   I file desktop.css e mobile.css aggiungono solo il layout.
   ═══════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────── font */
@font-face {
  font-family: 'Satoshi';
  src: url('../fonts/satoshi-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('../fonts/satoshi-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('../fonts/satoshi-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('../fonts/satoshi-900.woff2') format('woff2');
  font-weight: 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-latin.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ───────────────────────────────────────────────────────────── token */
:root {
  /* superfici */
  --bg:        #FBFBF9;
  --surface:   #FFFFFF;
  --muted:     #F5F5F2;
  --line:      #E8E8E3;
  --line-soft: #F0F0EC;

  /* testo
     I due grigi tenui sono tarati sul contrasto, non a occhio: su fondo
     #FBFBF9 danno 5,7:1 e 4,7:1, entrambi sopra la soglia WCAG AA di 4,5:1.
     Il grigio più chiaro che avevamo prima (#8A8A90) si fermava a 3,3:1 ed
     era illeggibile per chi ha una vista anche solo un po' ridotta. */
  --ink:       #0B0B0C;
  --ink-2:     #3A3A40;
  --ink-3:     #64646B;
  --ink-4:     #71717B;

  /* accento */
  --accent:      #1B4DFF;
  --accent-dark: #143BC7;
  --accent-tint: #EEF2FF;

  /* stato */
  --danger:    #C42B1C;
  --success:   #0E7C4A;

  /* tipografia */
  --font-display: 'Satoshi', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* forme */
  --r-sm:  8px;
  --r-md:  14px;
  --r-lg:  20px;
  --r-xl:  28px;
  --r-pill: 100px;

  /* movimento */
  --ease:  cubic-bezier(.22, 1, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur:   .55s;

  /* ombre — quasi impercettibili, coerenti con lo stile editoriale */
  --shadow-sm: 0 1px 2px rgba(11,11,12,.04);
  --shadow-md: 0 4px 24px -8px rgba(11,11,12,.10);
  --shadow-lg: 0 24px 60px -20px rgba(11,11,12,.16);
}

/* ───────────────────────────────────────────────────────────── reset */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: 'kern' 1, 'liga' 1, 'cv11' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

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

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

button, input, textarea, select {
  font: inherit;
  color: inherit;
  margin: 0;
}

ul, ol { margin: 0; padding: 0; list-style: none; }

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

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

/* Salta al contenuto: obbligatorio per la navigazione da tastiera */
.skip {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 999;
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
}
.skip:focus { left: 12px; }

/* honeypot: invisibile all'utente, presente per i bot */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ───────────────────────────────────────────────────── tipografia utile */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow::before {
  content: '';
  width: 20px; height: 1px;
  background: var(--accent);
}

.lede {
  font-size: 1.15em;
  line-height: 1.6;
  color: var(--ink-2);
}

.accent { color: var(--accent); }
.muted  { color: var(--ink-3); }

/* la marcatura <em> negli h1 diventa il tocco di colore, non il corsivo */
h1 em, h2 em, h3 em {
  font-style: normal;
  color: var(--accent);
}

/* ─────────────────────────────────────────────────────────── pulsanti */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.01em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .25s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn .ico { transition: transform .35s var(--ease); flex-shrink: 0; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:hover .ico { transform: translateX(4px); }
.btn:active { transform: translateY(0); }

.btn--accent { --btn-bg: var(--accent); }
.btn--accent:hover { background: var(--accent-dark); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { background: var(--surface); border-color: var(--ink); }

.btn--block { width: 100%; }

/* collegamento testuale con sottolineatura che si estende */
.link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--accent);
  position: relative;
  padding-bottom: 2px;
}
.link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s var(--ease);
}
.link:hover::after { transform: scaleX(1); transform-origin: left; }
.link .ico { transition: transform .35s var(--ease); }
.link:hover .ico { transform: translate(3px, -3px); }

/* ────────────────────────────────────────────────────────── superfici */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color .35s var(--ease), transform .45s var(--ease), box-shadow .45s var(--ease);
}
.card:hover { border-color: #D8D8D2; transform: translateY(-3px); box-shadow: var(--shadow-md); }

.hair { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ───────────────────────────────────────────────────────────── marchio */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.04em;
  color: var(--ink);
}
.brand__mark { flex-shrink: 0; }
.brand__mark path, .brand__mark polyline { transition: none; }
.brand b { font-weight: 700; }
.brand span { color: var(--accent); font-weight: 700; }

/* ────────────────────────────────────────────────────────── modulo */
.field { display: flex; flex-direction: column; gap: 7px; }

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: -.005em;
}
.field label .req { color: var(--accent); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: 16px; /* sotto i 16px iOS ingrandisce la pagina all'attivazione */
  line-height: 1.5;
  color: var(--ink);
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
  appearance: none;
}
.field textarea { resize: vertical; min-height: 132px; }

.field select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B6B70' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
  cursor: pointer;
}

.field input::placeholder,
.field textarea::placeholder { color: var(--ink-4); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(27, 77, 255, .12);
}

.field--error input,
.field--error select,
.field--error textarea { border-color: var(--danger); }

.field__err {
  font-size: 13px;
  color: var(--danger);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ─────────────────────────────────────────── selettore su misura ──────
   Il <select> nativo si può vestire solo da chiuso: la tendina aperta la
   disegna il sistema operativo e nessun CSS la raggiunge. Questo componente
   la ridisegna per intero. Il <select> vero resta nel DOM — nascosto ma
   presente — così il modulo si invia normalmente e senza JS funziona tutto
   come prima. */
.sel { position: relative; }

/* il select originale sparisce alla vista ma non dal modulo */
.sel__native {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.sel__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color .25s ease, box-shadow .25s ease;
  -webkit-tap-highlight-color: transparent;
}
.sel__btn:hover { border-color: #D2D2CC; }
.sel__btn[aria-expanded="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(27, 77, 255, .12);
}
.sel__btn .ico {
  flex-shrink: 0;
  color: var(--ink-3);
  transition: transform .35s var(--ease);
}
.sel__btn[aria-expanded="true"] .ico { transform: rotate(180deg); }

/* finché non si sceglie nulla il testo resta da segnaposto */
.sel__btn.is-empty .sel__label { color: var(--ink-4); }
.sel__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.field--error .sel__btn { border-color: var(--danger); }

/* ── pannello delle voci ── */
.sel__panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.sel__panel:focus { outline: none; }

.sel__group {
  padding: 14px 16px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.sel__group + .sel__opt { margin-top: 0; }

.sel__opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 16px;
  font-size: 15px;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.sel__opt:hover,
.sel__opt.is-active {            /* is-active = voce raggiunta da tastiera */
  background: var(--muted);
  color: var(--ink);
}
.sel__opt[aria-selected="true"] {
  background: var(--accent-tint);
  color: var(--accent);
  font-weight: 600;
}
.sel__opt .ico { flex-shrink: 0; opacity: 0; transition: opacity .18s ease; }
.sel__opt[aria-selected="true"] .ico { opacity: 1; }

/* consenso privacy */
.check {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  cursor: pointer;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-3);
}
.check input {
  width: 19px; height: 19px;
  flex-shrink: 0;
  margin-top: 2px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
  position: relative;
}
.check input:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.check input:checked::after {
  content: '';
  position: absolute;
  left: 6px; top: 2px;
  width: 5px; height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(43deg);
}
.check a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* avviso globale del modulo */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 15px 18px;
  border-radius: var(--r-md);
  font-size: 14.5px;
  line-height: 1.55;
}
.alert--error {
  background: #FDF2F1;
  color: #8E2318;
  border: 1px solid #F5D6D2;
}
.alert .ico { flex-shrink: 0; margin-top: 2px; }

/* ─────────────────────────────────────────── loghi in scorrimento */
.marquee {
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 42s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  opacity: .62;
  filter: grayscale(1);
  transition: opacity .4s ease, filter .4s ease;
}
.marquee__item:hover { opacity: 1; filter: grayscale(0); }

@keyframes marquee {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

/* ───────────────────────────────────────────────────────── fisarmonica */
.acc__item { border-bottom: 1px solid var(--line); }
.acc__item:first-child { border-top: 1px solid var(--line); }

.acc__head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
  transition: color .25s ease;
}
.acc__head:hover { color: var(--accent); }

.acc__sign {
  flex-shrink: 0;
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: transform .45s var(--ease), background .3s ease, border-color .3s ease, color .3s ease;
}
.acc__head[aria-expanded="true"] .acc__sign {
  transform: rotate(45deg);
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.acc__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .45s var(--ease);
}
.acc__body > div { overflow: hidden; }
.acc__item.is-open .acc__body { grid-template-rows: 1fr; }
.acc__body p {
  color: var(--ink-2);
  padding-bottom: 26px;
  max-width: 68ch;
}

/* ──────────────────────────────────────────────────────── rivelazione */
/* Niente will-change qui, per due motivi.
   1) Su un antenato crea un blocco contenitore: qualunque elemento
      position:fixed discendente — il pannello del selettore, per dire —
      smetterebbe di ancorarsi al viewport e resterebbe appeso dentro
      la scheda, tagliato a metà.
   2) Su 51 elementi resterebbe in memoria per sempre, mentre serve solo
      per gli 0,8 secondi dell'animazione.
   Opacità e transform sono comunque composte dalla GPU anche senza. */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition:
    opacity .8s var(--ease-out) var(--reveal-delay, 0s),
    transform .8s var(--ease-out) var(--reveal-delay, 0s);
}
[data-reveal].is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
/* Senza JS il contenuto deve restare visibile: mai nascondere per sempre. */
.no-js [data-reveal] { opacity: 1; transform: none; }

/* ──────────────────────────────────────────────────────────── mappa */
.map {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--muted);
  isolation: isolate;
}

.map__canvas {
  position: relative;
  width: 100%;
  /* Altezza esplicita: il contenitore non ha contenuto in flusso che la generi,
     e senza questa il renderer disegnerebbe su un'area di zero pixel. */
  height: 260px;
  overflow: hidden;
  touch-action: none;      /* il trascinamento lo gestiamo noi */
  cursor: grab;
  background:
    repeating-linear-gradient(45deg, #EFEFEB 0 12px, #F4F4F0 12px 24px);
}
.map.is-live .map__canvas { background: #E9E5DC; }  /* tinta delle tessere OSM */
.map.is-dragging .map__canvas { cursor: grabbing; }

.map__layer { position: absolute; inset: 0; }

.map__tile {
  position: absolute;
  top: 0; left: 0;
  width: 256px;
  height: 256px;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.map__pin {
  position: absolute;
  top: 0; left: 0;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 3px 6px rgba(11,11,12,.28));
}

/* schermata di consenso: nessuna tessera parte prima del clic */
.map__gate {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  background: var(--muted);
  transition: opacity .4s var(--ease), visibility .4s;
}
.map__gate.is-gone { opacity: 0; visibility: hidden; }
.map__gate-in { display: flex; flex-direction: column; align-items: center; gap: 5px; max-width: 320px; }
.map__gate-in .ico { color: var(--accent); margin-bottom: 4px; }
.map__gate-in b { font-family: var(--font-display); font-size: 16px; letter-spacing: -.02em; }
.map__gate-in small { font-size: 13px; color: var(--ink-3); }
.map__gate-in .btn { margin-top: 12px; padding: 11px 22px; font-size: 14px; background: var(--surface); }
.map__gate-note { font-size: 10.5px; line-height: 1.5; color: var(--ink-4); margin-top: 8px; }

/* comandi di scala */
/* display:flex vincerebbe sull'attributo hidden dello UA stylesheet:
   senza questa riga i pulsanti si vedono anche a mappa non ancora caricata. */
.map__zoom[hidden] { display: none; }

.map__zoom {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 1px;
  border-radius: 9px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(11,11,12,.18);
}
.map__zbtn {
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.95);
  border: 0;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.map__zbtn:hover { background: #fff; color: var(--accent); }

/* Attribuzione OpenStreetMap: obbligatoria per licenza ODbL,
   ridotta al minimo indispensabile e ancorata in basso a destra. */
.map__credit {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 5;
  padding: 2px 7px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 5px;
  font-size: 9.5px;
  line-height: 1.5;
  letter-spacing: 0;
}
.map__credit a { color: var(--ink-3); text-decoration: none; }
.map__credit a:hover { text-decoration: underline; }

.map__open {
  position: absolute;
  left: 10px; bottom: 8px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  box-shadow: 0 1px 4px rgba(11,11,12,.12);
  transition: color .25s ease;
}
.map__open:hover { color: var(--accent); }

/* ───────────────────────────────────────────────────── piè di pagina */
.foot { border-top: 1px solid var(--line); }
.foot a { color: var(--ink-3); transition: color .25s ease; }
.foot a:hover { color: var(--ink); }
.foot__legal {
  font-size: 12.5px;
  color: var(--ink-4);
  line-height: 1.75;
}

/* ═══════════════════════════════════════════════════════════════════════
   MOVIMENTO
   Tutto quello che segue è governato dal blocco prefers-reduced-motion
   in fondo al file: chi ha chiesto meno animazioni non ne vede nessuna.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── titolo che sale parola per parola ─────────────────────────────────
   Ogni parola sta in una finestrella con overflow nascosto e scivola su
   da sotto. È l'animazione più costosa in termini di attenzione, quindi
   sta solo sul titolo principale e su nessun'altra cosa. */
.rise { display: block; }
.rise > span {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: .08em;   /* spazio per i discendenti: senza, la g si taglia */
  margin-bottom: -.08em;
}
.rise > span > b {
  display: inline-block;
  font-weight: inherit;
  animation: riseUp .95s var(--ease-out) both;
  animation-delay: var(--d, 0s);
}
@keyframes riseUp {
  from { transform: translateY(105%); }
  to   { transform: translateY(0); }
}
/* Ritardi a scalare: le parole entrano una dopo l'altra.
   In CSS e non inline, così la CSP resta pulita. */
.rise > span:nth-child(1) > b { --d: .06s; }
.rise > span:nth-child(2) > b { --d: .15s; }
.rise > span:nth-child(3) > b { --d: .24s; }
.rise > span:nth-child(4) > b { --d: .33s; }
.rise > span:nth-child(5) > b { --d: .42s; }

.no-js .rise > span > b { animation: none; }

/* ── barra di avanzamento della lettura ───────────────────────────────── */
.progress {
  position: fixed;
  top: 0; left: 0;
  z-index: 300;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--accent), #7C5BFF);
  pointer-events: none;
  will-change: transform;
}

/* ── lampo che attraversa i pulsanti al passaggio ─────────────────────── */
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.28) 50%, transparent 62%);
  transform: translateX(-120%);
  transition: transform .75s var(--ease);
  pointer-events: none;
}
.btn:hover::before { transform: translateX(120%); }
.btn > * { position: relative; z-index: 1; }

/* ── la lineetta dell'occhiello si allunga quando entra in vista ──────── */
.eyebrow::before {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .7s var(--ease-out) .15s;
}
.eyebrow.is-in::before,
.is-in .eyebrow::before,
.no-js .eyebrow::before { transform: scaleX(1); }

/* ── fascia scura: lo stesso contrasto del richiamo finale ─────────────
   Spezza il ritmo della pagina e fa risaltare i numeri, che altrimenti
   su fondo chiaro passavano inosservati. */
.band {
  position: relative;
  background: var(--ink);
  border-radius: var(--r-xl);
  overflow: hidden;
  isolation: isolate;
}
.band::before {
  content: '';
  position: absolute;
  top: -60%; left: 50%;
  width: 780px; height: 780px;
  margin-left: -390px;
  background: radial-gradient(circle, rgba(27,77,255,.34), transparent 64%);
  pointer-events: none;
  z-index: 0;
  animation: breathe 9s ease-in-out infinite alternate;
}
/* reticolo appena percettibile, come nell'hero ma in negativo */
.band::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000, transparent 76%);
          mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000, transparent 76%);
  pointer-events: none;
  z-index: 0;
}
.band > * { position: relative; z-index: 1; }

@keyframes breathe {
  from { transform: scale(1)    translateY(0);     opacity: .85; }
  to   { transform: scale(1.14) translateY(26px);  opacity: 1; }
}

/* ── faretto che segue il puntatore sulle schede ───────────────────────
   Le coordinate arrivano dal JS come variabili CSS. Senza JS non succede
   nulla e la scheda resta esattamente com'era. */
/* Niente overflow:hidden qui: taglierebbe il badge "Il più scelto",
   che sporge sopra il bordo della scheda. Il bagliore lo contengo con
   il raggio ereditato dalla scheda stessa. */
.spot { position: relative; }
.spot::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    340px circle at var(--mx, 50%) var(--my, 50%),
    rgba(27, 77, 255, .09),
    transparent 62%
  );
  opacity: 0;
  transition: opacity .45s var(--ease);
  pointer-events: none;
  z-index: 0;
}
.spot:hover::before { opacity: 1; }
.spot > * { position: relative; z-index: 1; }

/* ─────────────────────────────────────────────── movimento ridotto */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .marquee__track { animation: none; }

  /* Le nuove animazioni vanno spente in modo esplicito: con la sola
     durata a .01ms resterebbero ferme sul fotogramma finale, che per il
     bagliore della fascia scura significa "ingrandito e spostato". */
  .rise > span > b { animation: none; transform: none; }
  .band::before    { animation: none; transform: none; opacity: .9; }
  .progress        { display: none; }
  .btn::before     { display: none; }
  .eyebrow::before { transform: scaleX(1) !important; }
  .spot::before    { display: none; }
}

/* ───────────────────────────────────────────────────────── stampa */
@media print {
  .nav, .foot, .btn, .marquee { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  a[href^="http"]::after { content: ' (' attr(href) ')'; font-size: 9pt; color: #666; }
}
