/*
  Okular: foglio di stile della landing (e di termini/privacy).
  Mobile-first, nessuna dipendenza. Tema scuro bloccato: il marchio vive di notte, sulla tessera scura.

  Le regole, da rispettare in tutta la pagina:
  - colore: il teal (--teal) è Okular e l'azione. L'ambra (--ambra) è SOLO la perdita che arriva
    al limite, nel grafico del giorno nero. Nient'altro ha colore: il resto lo portano le foto;
  - forma: i bottoni sono pillole; tessere, foto e pannelli hanno raggio 18 px (dentro, 12 px);
    l'unica eccezione è la cornice del telefono, che imita un telefono;
  - movimento: tutto sotto html.moto (la persona non ha chiesto di ridurlo). Senza, la pagina è
    ferma e intera. Si animano solo transform e opacity.
*/

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("font/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

/* Il testo dell'app, solo dentro il telefono dell'eroe (OFL, da Google Fonts, sottoinsieme latino) */
@font-face {
  font-family: "Instrument Sans";
  src: url("font/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --fondo: #0a1316;
  --fondo-2: #0d181c;
  --superficie: #112025;
  --superficie-2: #15282e;
  --linea: rgba(214, 236, 240, 0.09);
  --linea-forte: rgba(214, 236, 240, 0.16);
  --testo: #e8f0f2;
  --testo-2: #a5b7bc;          /* su --fondo circa 9:1 */
  --testo-3: #80959b;          /* su --fondo circa 5,8:1: solo testi piccoli di servizio */
  --teal: #5fc8cf;
  --teal-chiaro: #93e0e5;
  --teal-velo: rgba(95, 200, 207, 0.1);
  --teal-bordo: rgba(95, 200, 207, 0.3);
  --su-teal: #05201f;
  --ambra: #d9a441;

  --raggio: 18px;
  --raggio-dentro: 12px;
  --esce: cubic-bezier(0.16, 1, 0.3, 1);
  --molla: cubic-bezier(0.34, 1.56, 0.64, 1);

  --gutter: 20px;
  --larghezza: 74rem;
  --testata: 64px;
  --font: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--testata) + 12px);
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--fondo);
  color: var(--testo);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.con-consenso {
  padding-bottom: var(--altezza-consenso, 0);
}

h1,
h2,
h3,
p,
ol,
ul,
figure {
  margin: 0;
}

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

h1,
h2,
h3 {
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2rem, 1.35rem + 2.6vw, 3.25rem);
  letter-spacing: -0.032em;
}

h3 {
  font-size: 1.1875rem;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

p {
  text-wrap: pretty;
}

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

a {
  color: inherit;
}

.num {
  white-space: nowrap;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ic {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.salta {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--teal);
  color: var(--su-teal);
  font-weight: 650;
  text-decoration: none;
}

.salta:focus {
  top: 12px;
}

.contenitore {
  width: 100%;
  max-width: var(--larghezza);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sezione {
  padding-block: clamp(72px, 9vw, 128px);
}

/* ---------- Testata ---------- */

.testata {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10, 19, 22, 0.78);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--linea);
}

.testata-riga {
  height: var(--testata);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.marchio {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.marchio img {
  width: 32px;
  height: 32px;
}

/* Termini e privacy disegnano il marchio inline, solo tratto */
.marchio svg {
  width: 28px;
  height: 28px;
  color: var(--teal);
}

.torna {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.95rem;
  font-weight: 550;
  color: var(--testo-2);
  text-decoration: none;
}

.torna:hover {
  color: var(--testo);
  text-decoration: underline;
}

/* ---------- Bottoni ---------- */

.bottone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  background: var(--teal);
  color: var(--su-teal);
  font: inherit;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s var(--esce), background-color 0.25s var(--esce), box-shadow 0.25s var(--esce);
}

.bottone:hover {
  background: var(--teal-chiaro);
}

.bottone:active {
  transform: translateY(1px) scale(0.98);
}

.bottone-piccolo {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.9375rem;
}

.bottone-grande {
  min-height: 58px;
  padding: 0 26px;
  font-size: 1.0625rem;
  box-shadow: 0 14px 34px -14px rgba(95, 200, 207, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.bottone-grande:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -14px rgba(95, 200, 207, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.bottone-freccia {
  transition: transform 0.3s var(--esce);
}

.bottone:hover .bottone-freccia {
  transform: translateX(4px);
}

.bottone-vuoto,
.bottone-vuoto:hover {
  background: transparent;
  color: var(--testo);
  box-shadow: inset 0 0 0 1px var(--linea-forte);
}

/* Termini e privacy hanno ancora il nome vecchio per il bottone pieno del consenso */
.bottone-pieno {
  min-height: 40px;
  padding: 0 16px;
}

.link-app {
  display: inline-block;
  font-size: 0.9375rem;
  color: var(--testo-2);
  text-decoration: none;
}

.link-app span {
  color: var(--testo);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--teal-bordo);
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
  transition: text-decoration-color 0.2s;
}

.link-app:hover span {
  text-decoration-color: var(--teal);
}

/* ---------- 1. Eroe ---------- */

.eroe {
  position: relative;
  padding-top: 28px;
  overflow: hidden;
}

/* Un alone teal leggero alle spalle del telefono: la luce dei monitor che esce dalla foto */
.eroe::before {
  content: "";
  position: absolute;
  inset: -20% -30% auto auto;
  width: 900px;
  height: 900px;
  background: radial-gradient(closest-side, rgba(95, 200, 207, 0.12), transparent 70%);
  pointer-events: none;
}

.eroe-griglia {
  position: relative;
  display: grid;
  gap: 32px;
}

.occhiello {
  margin-bottom: 18px;
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}

.eroe h1 {
  font-size: clamp(2.6rem, 1.5rem + 4.4vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.042em;
  font-weight: 750;
}

.eroe h1 .accento {
  color: var(--teal);
}

.eroe-sotto {
  margin-top: 22px;
  max-width: 34ch;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.55;
  color: var(--testo-2);
}

.eroe-azioni {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

/*
  Il telefono dell'eroe, dritto, disegnato qui. Dentro, lo schermo è progettato a 390 × 844
  (le misure CSS di un iPhone, le stesse delle schermate dell'app) e si scala con --scala,
  che vale sempre --schermo / 390: le due si cambiano insieme, per ogni misura.
*/
.eroe-telefono {
  --schermo: 284px;
  --scala: 0.72821;
  display: grid;
  justify-items: center;
  gap: 18px;
}

.eroe-telefono figcaption {
  max-width: 36ch;
  font-size: 0.8125rem;
  line-height: 1.5;
  text-align: center;
  color: var(--testo-3);
}

/* Sul telefono si vede la metà alta (l'avviso e la scheda della giornata): il resto sfuma */
.telefono-palco {
  display: grid;
  justify-items: center;
  width: 100%;
  max-height: 540px;
  padding-top: 4px;
  overflow-x: visible;
  overflow-y: clip;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent);
  mask-image: linear-gradient(to bottom, #000 72%, transparent);
}

@media (max-width: 359px) {
  .eroe-telefono {
    --schermo: 250px;
    --scala: 0.64103;
  }

  .telefono-palco {
    max-height: 480px;
  }
}

/* La scocca: un filo di titanio, la cornice nera, il vetro. I tasti sporgono dal titanio. */
.apparecchio {
  --cornice: 10px;
  --raggio-vetro: calc(var(--schermo) * 0.142);
  position: relative;
  padding: 3px;
  border-radius: calc(var(--raggio-vetro) + var(--cornice) + 3px);
  background: linear-gradient(145deg, #6d797e 0%, #2a3337 16%, #1a2124 50%, #2f393d 84%, #7b878c 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 50px 90px -34px rgba(0, 0, 0, 0.9),
    0 24px 120px -30px rgba(95, 200, 207, 0.32);
}

.cornice {
  padding: var(--cornice);
  border-radius: calc(var(--raggio-vetro) + var(--cornice));
  background: #040607;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.05);
}

.vetro {
  position: relative;
  width: var(--schermo);
  height: calc(var(--schermo) * 844 / 390);
  border-radius: var(--raggio-vetro);
  overflow: hidden;
  isolation: isolate;
  background: #ebf3f6;
}

/* Il riflesso del vetro, appena */
.vetro::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 10;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 30%);
  pointer-events: none;
}

.tasto {
  position: absolute;
  width: 3px;
  background: linear-gradient(90deg, #2a3337, #7b878c 55%, #3a4448);
}

.tasto-azione,
.tasto-volume-su,
.tasto-volume-giu {
  left: -3px;
  border-radius: 2px 0 0 2px;
}

.tasto-azione { top: 17%; height: 4%; }
.tasto-volume-su { top: 24%; height: 7.5%; }
.tasto-volume-giu { top: 33.5%; height: 7.5%; }

.tasto-accensione {
  right: -3px;
  top: 26%;
  height: 11%;
  border-radius: 0 2px 2px 0;
}

/* ---- Lo schermo: l'app, coi valori di apps/webapp/src/ui/theme.css ---- */

.app {
  position: absolute;
  top: 0;
  left: 0;
  width: 390px;
  height: 844px;
  transform: scale(var(--scala));
  transform-origin: 0 0;
  font-family: "Instrument Sans", -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: normal;
  letter-spacing: normal;
  color: #0f2027;
  background:
    radial-gradient(58% 42% at 88% 4%, rgb(0 135 147 / 0.14), transparent 72%),
    radial-gradient(46% 34% at 6% 0%, rgb(255 255 255 / 0.85), transparent 70%),
    linear-gradient(176deg, #ebf3f6 12%, #d3e4eb 100%);
}

.app-barra-stato {
  position: relative;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 30px 0 52px;
  font-family: -apple-system, "SF Pro Text", system-ui, "Segoe UI", sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #0f2027;
}

.app-isola {
  position: absolute;
  left: 50%;
  top: 11px;
  width: 125px;
  height: 37px;
  margin-left: -62.5px;
  border-radius: 20px;
  background: #000;
}

.app-segnali {
  display: flex;
  align-items: center;
  gap: 6px;
}

.app-segnali svg {
  display: block;
  fill: currentColor;
}

.app-batteria {
  position: relative;
  width: 26px;
  height: 13px;
  padding: 2px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgb(15 32 39 / 0.38);
}

.app-batteria span {
  display: block;
  width: 78%;
  height: 100%;
  border-radius: 2px;
  background: currentColor;
}

.app-batteria::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 4px;
  width: 2px;
  height: 5px;
  border-radius: 0 2px 2px 0;
  background: rgb(15 32 39 / 0.38);
}

.app-testata {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 24px 0;
}

.app-nome {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Schibsted Grotesk", sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.app-nome img {
  width: 32px;
  height: 32px;
  border-radius: 18.4%;
  box-shadow: 0 1px 2px rgb(15 32 39 / 0.16), 0 6px 14px -6px rgb(15 32 39 / 0.5);
}

.app-data {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.7);
  font-size: 13px;
  font-weight: 500;
  color: #47616b;
}

.app-contenuto {
  display: grid;
  gap: 16px;
  padding: 24px 24px 0;
  transition: opacity 0.4s ease-out;
}

/* La scheda profonda: teal quando guarda, ardesia fredda quando la giornata è chiusa.
   La tinta "ferma" sta in un velo sopra, così il passaggio è una dissolvenza. */
.app-eroe {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(80% 60% at 92% 0%, rgb(255 255 255 / 0.16), transparent 70%),
    linear-gradient(158deg, #0a5560 0%, #07414a 62%, #052f36 100%);
  box-shadow: 0 2px 6px rgb(7 65 74 / 0.1), 0 18px 40px -12px rgb(7 65 74 / 0.3), inset 0 1px 0 rgb(255 255 255 / 0.16);
}

.app-eroe::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 60% at 92% 0%, rgb(255 255 255 / 0.12), transparent 70%),
    linear-gradient(158deg, #2e3e46 0%, #223038 62%, #131e24 100%);
  opacity: 0;
  transition: opacity 0.6s ease-out;
}

.app-eroe > * {
  position: relative;
}

.app-eroe.ferma::before {
  opacity: 1;
}

.app-copertura-riga {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.app-spia {
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 10px;
  border-radius: 50%;
  background: #5fe3c8;
  box-shadow: 0 0 0 4px rgb(95 227 200 / 0.24);
  transition: background-color 0.4s, box-shadow 0.4s;
}

.app-eroe.ferma .app-spia {
  background: rgb(255 255 255 / 0.5);
  box-shadow: 0 0 0 4px rgb(255 255 255 / 0.12);
}

.app-titolo {
  font-family: "Schibsted Grotesk", sans-serif;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.018em;
}

.app-sotto {
  margin-top: 8px;
  color: rgb(255 255 255 / 0.84);
}

.app-giornata {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.app-etichetta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.66);
}

.app-numerone {
  font-family: "Schibsted Grotesk", sans-serif;
  font-size: 64px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: lining-nums proportional-nums;
}

.app-pct {
  margin-left: 0.1em;
  font-size: 0.4em;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* Il misuratore a tacche: 34 tacche come nell'app, la fronte più alta */
.app-misuratore {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 36px;
}

.app-misuratore i {
  flex: 1 1 0;
  min-width: 0;
  height: 56%;
  border-radius: 2px;
  background: rgb(255 255 255 / 0.14);
  transition: height 0.4s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.4s ease-out, box-shadow 0.4s ease-out;
}

.app-misuratore i.piena { background: #5fe3c8; }
.app-misuratore i.fronte { height: 100%; box-shadow: 0 0 0 3px rgb(95 227 200 / 0.18); }
.app-misuratore.avviso i.piena { background: #f0be5a; }
.app-misuratore.avviso i.fronte { box-shadow: 0 0 0 3px rgb(240 190 90 / 0.2); }
.app-misuratore.pericolo i.piena { background: #ff8fa8; }
.app-misuratore.pericolo i.fronte { box-shadow: 0 0 0 3px rgb(255 143 168 / 0.22); }

.app-frase {
  font-size: 14px;
  color: rgb(255 255 255 / 0.74);
}

.app-pastiglia {
  justify-self: start;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.14);
  font-size: 13px;
  font-weight: 500;
  color: rgb(255 255 255 / 0.86);
}

.app-nota {
  font-size: 14px;
  color: #7b949f;
}

.app-coppia {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.app-scheda {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(15 45 55 / 0.04), 0 10px 26px -8px rgb(15 45 55 / 0.11), inset 0 1px 0 rgb(255 255 255 / 0.9);
}

.app-scheda .app-etichetta {
  color: #7b949f;
}

.app-contatore {
  font-family: "Schibsted Grotesk", sans-serif;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.app-contatore small {
  font-family: "Instrument Sans", sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  color: #7b949f;
}

.app-nav {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 30px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 8px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.86);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 2px 8px rgb(15 45 55 / 0.06), 0 12px 32px -8px rgb(15 45 55 / 0.16), inset 0 1px 0 rgb(255 255 255 / 0.9);
}

.app-nav span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 46px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: #7b949f;
}

.app-nav span.attiva {
  color: #fff;
  background: #008793;
  box-shadow: 0 2px 8px rgb(0 135 147 / 0.34);
}

.app-nav svg {
  display: block;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-home {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 134px;
  height: 5px;
  margin-left: -67px;
  border-radius: 3px;
  background: #0f2027;
}

/* ---- Le notifiche di Telegram: come le disegna iOS, coi testi veri di Okular ---- */

.notifica {
  position: absolute;
  top: 56px;
  left: 9px;
  right: 9px;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 15px 14px 13px;
  border-radius: 24px;
  background: rgb(245 247 248 / 0.94);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  backdrop-filter: blur(24px) saturate(1.8);
  box-shadow: 0 12px 32px -10px rgb(10 30 40 / 0.4), 0 0 0 0.5px rgb(0 0 0 / 0.06);
  font-family: -apple-system, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  color: #111;
  opacity: 0;
  transform: translateY(-140%) scale(0.96);
}

.notifica.arrivata {
  opacity: 1;
  transform: none;
}

.notifica-avatar {
  position: relative;
  flex: none;
  width: 38px;
  height: 38px;
}

.notifica-avatar img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

/* Il bollino è il logo vero di Telegram (telegram.org/img/t_logo.svg) */
.notifica-avatar .notifica-bollino {
  position: absolute;
  right: -4px;
  bottom: -3px;
  width: 18px;
  height: 18px;
  box-shadow: 0 0 0 1.5px rgb(246 248 249);
}

.notifica-corpo {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 1px;
}

.notifica-testa {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 15px;
  line-height: 1.3;
}

.notifica-testa b {
  font-weight: 600;
}

.notifica-testa span {
  font-size: 13px;
  color: rgb(60 60 67 / 0.6);
}

.notifica-testo {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

@media (min-width: 960px) {
  .eroe {
    padding-top: 40px;
  }

  .eroe-griglia {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
    gap: 64px;
    min-height: calc(100dvh - var(--testata) - 120px);
  }

  .eroe-telefono {
    --schermo: 300px;
    --scala: 0.76923;
    padding-block: 12px 8px;
  }

  .telefono-palco {
    max-height: none;
    -webkit-mask-image: none;
    mask-image: none;
  }
}

/* ---------- 2. Funziona con ---------- */

.funziona {
  border-block: 1px solid var(--linea);
  background: var(--fondo-2);
}

.funziona-riga {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 32px;
  padding-block: 20px;
}

.funziona p {
  font-size: 0.875rem;
  color: var(--testo-3);
}

.funziona ul {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 32px;
}

.funziona li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.funziona li img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

/* ---------- 3. Il giorno nero ---------- */

.nero-testa {
  display: grid;
  gap: 20px;
  max-width: 44rem;
}

.nero-testa p {
  font-size: 1.125rem;
  color: var(--testo-2);
}

.nero-corpo {
  margin-top: clamp(40px, 6vw, 72px);
}

.nero-grafico {
  position: relative;
  height: clamp(190px, 24vw, 300px);
  margin-inline: 22px;
}

.nero-grafico svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.nero-griglia line {
  stroke: var(--linea);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.nero-limite {
  stroke: var(--ambra);
  stroke-width: 1.5;
  stroke-dasharray: 6 6;
  opacity: 0.8;
}

.nero-linea {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
}

.nero-limite-etichetta {
  position: absolute;
  left: 0;
  top: calc(186 / 260 * 100%);
  transform: translateY(-140%);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--ambra);
}

.nero-nodo {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--superficie-2);
  box-shadow: 0 0 0 1px var(--linea-forte), 0 0 0 6px var(--fondo);
  color: var(--testo);
  font-size: 1.05rem;
}

.nero-nodo-oltre {
  background: var(--ambra);
  color: #1d1505;
  box-shadow: 0 0 0 6px var(--fondo), 0 0 0 7px rgba(217, 164, 65, 0.4);
}

.scene {
  margin-top: 40px;
  display: grid;
  gap: 28px;
}

.scena {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-content: start;
  column-gap: 16px;
  row-gap: 6px;
}

.scena-icona {
  grid-row: span 2;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--superficie-2);
  box-shadow: 0 0 0 1px var(--linea-forte);
  font-size: 1.05rem;
}

.scena:last-child .scena-icona {
  background: var(--ambra);
  color: #1d1505;
  box-shadow: none;
}

.scena p {
  color: var(--testo-2);
}

.nero-chiusa {
  margin-top: clamp(48px, 7vw, 88px);
  max-width: 30ch;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

@media (min-width: 860px) {
  /* Sul largo i tre momenti stanno sotto il loro punto della curva */
  .scene {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-inline: 22px;
  }

  .scena {
    grid-template-columns: 1fr;
  }

  .scena-icona {
    display: none;
  }

  .scena h3::before {
    content: "";
    display: block;
    width: 1px;
    height: 28px;
    margin-bottom: 14px;
    background: var(--linea-forte);
  }

  .scena:last-child h3::before {
    background: var(--ambra);
  }
}

/* ---------- 4. Come funziona ---------- */

.come {
  background: var(--fondo-2);
  border-block: 1px solid var(--linea);
}

.come-griglia {
  display: grid;
  gap: 40px;
}

.passi {
  margin-top: 32px;
  display: grid;
  gap: 4px;
}

.passo {
  position: relative;
  border-radius: var(--raggio);
  transition: background-color 0.4s var(--esce);
}

.passo button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 18px 18px 16px;
  border: 0;
  background: none;
  color: var(--testo-2);
  font: inherit;
  font-size: 1.1875rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  text-align: left;
  cursor: pointer;
  transition: color 0.3s;
}

.passo-numero {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--linea-forte);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
}

.passo-corpo {
  display: grid;
  grid-template-rows: 1fr;
  padding: 0 18px 0 66px;
  transition: grid-template-rows 0.5s var(--esce);
}

.passo-corpo p {
  overflow: hidden;
  padding-bottom: 20px;
  color: var(--testo-2);
}

.passo-barra {
  position: absolute;
  left: 66px;
  right: 18px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--linea);
  overflow: hidden;
  opacity: 0;
}

.passo-barra::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
}

.passo.attivo {
  background: var(--superficie);
}

.passo.attivo button {
  color: var(--testo);
}

.passo.attivo .passo-numero {
  background: var(--teal);
  color: var(--su-teal);
  box-shadow: none;
}

/* Con lo script, si apre un passo alla volta */
.js .passo:not(.attivo) .passo-corpo {
  grid-template-rows: 0fr;
}

.js .passo:not(.attivo) .passo-corpo p {
  padding-bottom: 0;
}

.come-telefono {
  --schermo: 260px;
  --scala: 0.66667;
  justify-self: center;
  display: grid;
  justify-items: center;
  gap: 18px;
}

/* Le schermate vere riempiono il vetro (390 × 844 come l'app); sopra, la barra di stato */
.app-foto .schermo {
  position: absolute;
  inset: 0;
  width: 390px;
  max-width: none;
  height: 844px;
  object-fit: cover;
  object-position: top;
  opacity: 0;
  transition: opacity 0.6s var(--esce), transform 0.6s var(--esce);
}

.app-foto .schermo.attivo {
  opacity: 1;
}

.app-foto .app-barra-stato {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
}

.app-foto .app-home {
  z-index: 2;
}

/* Senza script si vede la prima schermata */
html:not(.js) #schermo-0 {
  opacity: 1;
}

.come-telefono figcaption {
  font-size: 0.8125rem;
  color: var(--testo-3);
}

@media (min-width: 900px) {
  .come-griglia {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 72px;
  }

  .come-telefono {
    --schermo: 300px;
    --scala: 0.76923;
  }
}

/* ---------- 5. Chi c'è dietro ---------- */

.dietro-griglia {
  display: grid;
  gap: 24px;
}

.dietro-griglia h2 {
  max-width: 15ch;
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem);
}

.dietro-testo {
  display: grid;
  gap: 18px;
  align-content: start;
}

.dietro-testo p {
  font-size: 1.125rem;
  color: var(--testo-2);
  max-width: 42ch;
}

.social {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.social a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px 0 14px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--linea-forte);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s;
}

.social a:hover {
  background: var(--superficie);
}

.social img {
  width: 20px;
  height: 20px;
}

@media (min-width: 900px) {
  .dietro-griglia {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 72px;
    align-items: start;
  }

  .dietro-testo {
    padding-top: 10px;
  }
}

/* ---------- 6. Fiducia ---------- */

.fiducia h2 {
  max-width: 18ch;
}

.bento {
  margin-top: clamp(36px, 5vw, 56px);
  display: grid;
  gap: 14px;
}

.tessera {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 26px;
  border-radius: var(--raggio);
  background: var(--superficie);
  box-shadow: inset 0 0 0 1px var(--linea);
  overflow: hidden;
}

.tessera p {
  color: var(--testo-2);
  max-width: 46ch;
}

.tessera-icona {
  margin-bottom: 10px;
  font-size: 1.5rem;
  color: var(--teal);
}

.tessera-codice {
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(95, 200, 207, 0.1), transparent 60%),
    var(--superficie);
}

.codice {
  margin-top: 14px;
  border-radius: var(--raggio-dentro);
  background: #071013;
  box-shadow: inset 0 0 0 1px var(--linea);
  overflow: hidden;
}

.codice pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.7;
  color: #c9d6d9;
}

.codice .riga {
  display: inline-block;
}

.codice b {
  font-weight: 600;
  color: var(--teal-chiaro);
}

.codice i {
  font-style: normal;
  color: var(--teal);
}

.codice .c {
  color: #6c8187;
}

.codice figcaption {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 20px 14px;
  border-top: 1px solid var(--linea);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--testo-3);
}

.codice figcaption .ic {
  margin-top: 1px;
  color: var(--teal);
}

.tessera-attesa {
  background:
    radial-gradient(90% 70% at 0% 100%, rgba(217, 164, 65, 0.08), transparent 60%),
    var(--superficie);
}

.tessera-attesa img {
  margin-top: 16px;
  width: 100%;
  border-radius: var(--raggio-dentro);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.7);
}

@media (min-width: 900px) {
  .bento {
    grid-template-columns: repeat(12, 1fr);
  }

  .tessera-codice {
    grid-column: span 7;
  }

  .tessera-attesa {
    grid-column: span 5;
  }

  .bento .tessera:nth-child(3) {
    grid-column: span 5;
  }

  .bento .tessera:nth-child(4) {
    grid-column: span 7;
  }

  .tessera {
    padding: 34px;
  }

  .codice pre {
    font-size: 0.875rem;
  }
}

/* ---------- 7. Offerta ---------- */

.offerta-pannello {
  position: relative;
  padding: clamp(28px, 5vw, 64px);
  border-radius: var(--raggio);
  background:
    radial-gradient(80% 120% at 0% 0%, rgba(95, 200, 207, 0.14), transparent 55%),
    linear-gradient(180deg, var(--superficie-2), var(--superficie));
  box-shadow: inset 0 0 0 1px var(--teal-bordo);
  overflow: hidden;
}

.offerta-pannello h2 {
  max-width: 16ch;
  font-size: clamp(2.25rem, 1.4rem + 3.4vw, 4rem);
  letter-spacing: -0.04em;
}

.offerta-pannello h2 .num {
  color: var(--teal);
}

.linea-tempo {
  position: relative;
  margin-top: clamp(36px, 5vw, 56px);
  display: grid;
  gap: 26px;
  padding-left: 30px;
}

/* La linea che unisce le tappe: verticale sul telefono, orizzontale sul largo */
.linea-tempo::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--teal), rgba(95, 200, 207, 0.15));
  transform-origin: top;
}

.linea-tempo li {
  position: relative;
}

.tappa {
  position: absolute;
  left: -30px;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--fondo);
  box-shadow: inset 0 0 0 2px var(--teal);
}

.linea-tempo li:nth-child(3) .tappa {
  background: var(--teal);
}

.linea-tempo p {
  font-size: 1.0625rem;
  color: var(--testo-2);
  max-width: 30ch;
}

.linea-tempo p .num {
  color: var(--testo);
  font-weight: 650;
}

.offerta-nota {
  margin-top: 32px;
  font-size: 0.9375rem;
  color: var(--testo-3);
}

.offerta-azioni {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
}

@media (min-width: 900px) {
  .linea-tempo {
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    padding-left: 0;
    padding-top: 34px;
  }

  .linea-tempo::before {
    left: 8px;
    right: 8px;
    top: 7px;
    bottom: auto;
    width: auto;
    height: 2px;
    background: linear-gradient(90deg, var(--teal), rgba(95, 200, 207, 0.15));
    transform-origin: left;
  }

  .tappa {
    left: 0;
    top: -34px;
  }
}

/* ---------- 8. Domande ---------- */

.faq-griglia {
  display: grid;
  gap: 28px;
}

.faq-lista details {
  border-bottom: 1px solid var(--linea);
}

.faq-lista summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding-block: 18px;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}

.faq-lista summary::-webkit-details-marker {
  display: none;
}

.faq-lista summary .ic {
  color: var(--teal);
  transition: transform 0.35s var(--esce);
}

.faq-lista details[open] summary .ic {
  transform: rotate(45deg);
}

.faq-lista details p {
  padding-bottom: 22px;
  max-width: 62ch;
  color: var(--testo-2);
}

@media (min-width: 900px) {
  .faq-griglia {
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 72px;
    align-items: start;
  }

  .faq-griglia h2 {
    position: sticky;
    top: calc(var(--testata) + 32px);
  }
}

/* ---------- 9. Chiusura ---------- */

.finale {
  position: relative;
  overflow: clip;
  padding-block: clamp(56px, 7vw, 96px) clamp(80px, 10vw, 136px);
  text-align: center;
  background: radial-gradient(60% 75% at 50% 100%, rgba(95, 200, 207, 0.16), transparent 70%);
}

.finale-testo {
  display: grid;
  justify-items: center;
  gap: 28px;
}

.finale-testo h2 {
  max-width: 16ch;
  font-size: clamp(2.125rem, 1.35rem + 3vw, 3.5rem);
}

/* Il marchio: la linea del conto che sale e finisce nell'occhio */
.finale-marchio {
  width: 92px;
  height: 66px;
  fill: none;
  stroke: var(--teal);
  stroke-width: 30;
  stroke-linecap: round;
  overflow: visible;
}

.finale-pupilla {
  fill: var(--teal);
  stroke: none;
  transform-box: fill-box;
  transform-origin: center;
}

/* ---------- Piè di pagina ---------- */

.pie {
  border-top: 1px solid var(--linea);
  padding-block: 40px calc(40px + env(safe-area-inset-bottom));
  font-size: 0.875rem;
  color: var(--testo-3);
}

.pie-griglia {
  display: grid;
  gap: 28px;
}

.pie-rischio {
  display: flex;
  gap: 12px;
  max-width: 72ch;
  line-height: 1.55;
  color: var(--testo-2);
}

.pie-rischio .ic {
  margin-top: 2px;
  color: var(--ambra);
}

.pie-fondo {
  display: grid;
  gap: 14px;
}

.pie-fondo nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.pie-fondo nav a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  color: var(--testo-2);
  text-underline-offset: 3px;
}

.pie-fondo nav a:hover {
  color: var(--testo);
}

/* ---------- CTA fissa sul telefono ---------- */

.cta-fissa {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 30;
  padding: 14px var(--gutter) calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(10, 19, 22, 0), rgba(10, 19, 22, 0.94) 38%);
  transform: translateY(110%);
  transition: transform 0.45s var(--esce);
  pointer-events: none;
}

.cta-fissa .bottone {
  width: 100%;
}

.cta-fissa.visibile {
  transform: none;
  pointer-events: auto;
}

body.con-consenso .cta-fissa {
  display: none;
}

@media (min-width: 900px) {
  .cta-fissa {
    display: none;
  }
}

/* ---------- Pagine di testo (termini, privacy) ---------- */

.documento {
  padding-block: 32px 72px;
}

.documento .contenitore {
  max-width: 46rem;
}

.documento h1 {
  font-size: clamp(2.125rem, 3vw + 1.2rem, 3.25rem);
}

.documento .sottotitolo {
  margin-top: 12px;
  margin-bottom: 40px;
  font-size: 0.9375rem;
  color: var(--testo-3);
}

.documento section {
  padding-top: 28px;
  border-top: 1px solid var(--linea);
}

.documento section + section {
  margin-top: 28px;
}

.documento h2 {
  margin-bottom: 12px;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
}

.documento p {
  color: var(--testo-2);
}

.documento p + p {
  margin-top: 12px;
}

.documento ~ .pie .contenitore {
  max-width: 46rem;
}

/* ---------- Banner di consenso ---------- */

.consenso {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 50;
  padding: 14px var(--gutter) calc(14px + env(safe-area-inset-bottom));
  background: rgba(17, 32, 37, 0.97);
  border-top: 1px solid var(--linea-forte);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.consenso[hidden] {
  display: none;
}

.consenso-interno {
  max-width: 46rem;
  margin-inline: auto;
  display: grid;
  gap: 12px;
}

.consenso p {
  font-size: 0.9375rem;
  line-height: 1.45;
}

.consenso-azioni {
  display: flex;
  gap: 8px;
}

.consenso-azioni .bottone {
  flex: 1;
}

@media (min-width: 640px) {
  .consenso-interno {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 20px;
  }

  .consenso-azioni .bottone {
    flex: none;
  }
}

/* ======================================================================
   Movimento. Tutto qui sotto vale solo con html.moto.
   ====================================================================== */

@keyframes entra {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes barra {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes nodo {
  0% {
    opacity: 0;
    transform: scale(0.4);
  }
  70% {
    opacity: 1;
    transform: scale(1.08);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

/* L'eroe entra a scalini: occhiello, titolo, sotto, bottoni. La foto si posa da sola. */
.moto .entra {
  animation: entra 0.9s var(--esce) both;
  animation-delay: calc(var(--d) * 90ms + 80ms);
}

/* Il telefono sale e si posa; poi app.js fa girare la giornata */
.moto .eroe-telefono .telefono-palco {
  animation: telefono 1.3s var(--esce) both;
  animation-delay: 0.3s;
}

@keyframes telefono {
  from {
    opacity: 0;
    transform: translateY(48px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* La notifica scende con un filo di rimbalzo, come su iOS, e risale veloce */
.moto .notifica {
  transition: transform 0.38s cubic-bezier(0.4, 0, 1, 1), opacity 0.3s ease-in;
}

.moto .notifica.arrivata {
  transition: transform 0.7s cubic-bezier(0.2, 1.3, 0.35, 1), opacity 0.25s ease-out;
}

/* Quando arriva un messaggio il telefono vibra, appena */
.moto .apparecchio.vibra {
  animation: vibra 0.42s linear;
}

@keyframes vibra {
  0%, 100% { transform: none; }
  15% { transform: translateX(-2px) rotate(-0.4deg); }
  35% { transform: translateX(2px) rotate(0.4deg); }
  55% { transform: translateX(-1.5px) rotate(-0.25deg); }
  75% { transform: translateX(1px) rotate(0.15deg); }
}

/* La spia verde respira: Okular è sveglio */
.moto .app-eroe:not(.ferma) .app-spia {
  animation: respiro 3.2s ease-in-out infinite;
}

@keyframes respiro {
  0%, 100% { box-shadow: 0 0 0 4px rgb(95 227 200 / 0.24); }
  50% { box-shadow: 0 0 0 8px rgb(95 227 200 / 0.1); }
}

/* Il cambio di giornata: lo schermo sfuma, si azzera, torna */
[data-dimostratore].riavvio .app-contenuto {
  opacity: 0;
}

[data-dimostratore].istantaneo *,
[data-dimostratore].istantaneo *::before {
  transition: none !important;
}

/* Le icone della fiducia si disegnano */
.moto .tessera .tessera-icona {
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.1s cubic-bezier(0.65, 0, 0.35, 1) 0.3s;
}

.moto .tessera.visto .tessera-icona {
  stroke-dashoffset: 0;
}

/* Il marchio finale si disegna: la linea sale, l'anello si chiude, la pupilla si apre */
.moto .finale-linea,
.moto .finale-anello {
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 0.9s cubic-bezier(0.65, 0, 0.35, 1) 0.35s;
}

.moto .finale-anello {
  transition-delay: 1.05s;
}

.moto .finale-pupilla {
  transform: scale(0);
  transition: transform 0.5s var(--molla) 1.7s;
}

.moto .visto .finale-linea,
.moto .visto .finale-anello {
  stroke-dashoffset: 0;
}

.moto .visto .finale-pupilla {
  transform: none;
}

/* Le sezioni compaiono entrando nello schermo */
.moto [data-rivela] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--esce), transform 0.9s var(--esce);
}

.moto [data-rivela].visto {
  opacity: 1;
  transform: none;
}

/* Il giorno nero: la linea si disegna, poi i tre punti, poi i tre momenti */
.moto [data-nero] .nero-linea {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 2.4s cubic-bezier(0.45, 0, 0.2, 1);
}

.moto [data-nero] .nero-area,
.moto [data-nero] .nero-limite,
.moto [data-nero] .nero-limite-etichetta {
  opacity: 0;
  transition: opacity 1.2s var(--esce);
}

.moto [data-nero] .nero-nodo {
  opacity: 0;
}

.moto [data-nero] .scena {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s var(--esce), transform 0.8s var(--esce);
  transition-delay: calc(var(--i) * 0.7s + 0.5s);
}

.moto [data-nero].visto .nero-linea {
  stroke-dashoffset: 0;
}

.moto [data-nero].visto .nero-area {
  opacity: 1;
  transition-delay: 1s;
}

.moto [data-nero].visto .nero-limite,
.moto [data-nero].visto .nero-limite-etichetta {
  opacity: 0.85;
  transition-delay: 0.2s;
}

.moto [data-nero].visto .nero-nodo {
  animation: nodo 0.6s var(--esce) both;
  animation-delay: calc(var(--i) * 0.7s + 0.45s);
}

.moto [data-nero].visto .scena {
  opacity: 1;
  transform: none;
}

/* Come funziona: la barra del passo attivo si riempie, poi il passo cambia */
.moto [data-passi].in-giro .passo.attivo .passo-barra {
  opacity: 1;
}

.moto [data-passi].in-giro .passo.attivo .passo-barra::after {
  animation: barra var(--durata-passo, 6s) linear both;
}

.moto [data-passi].in-pausa .passo.attivo .passo-barra::after {
  animation-play-state: paused;
}

.moto .schermo {
  transform: translateY(10px) scale(0.985);
}

.moto .schermo.attivo {
  transform: none;
}

/* Il codice: le righe arrivano una dopo l'altra, come scritte */
.moto [data-codice] .riga {
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.5s var(--esce), transform 0.5s var(--esce);
}

.moto [data-codice].visto .riga {
  opacity: 1;
  transform: none;
}

.moto [data-codice].visto .riga:nth-child(2) { transition-delay: 0.12s; }
.moto [data-codice].visto .riga:nth-child(3) { transition-delay: 0.36s; }
.moto [data-codice].visto .riga:nth-child(4) { transition-delay: 0.48s; }
.moto [data-codice].visto .riga:nth-child(5) { transition-delay: 0.6s; }
.moto [data-codice].visto .riga:nth-child(6) { transition-delay: 0.72s; }
.moto [data-codice].visto .riga:nth-child(7) { transition-delay: 0.84s; }

/* L'offerta: la linea delle tappe si stende */
.moto [data-linea]::before {
  transform: scaleY(0);
  transition: transform 1.4s var(--esce) 0.2s;
}

.moto [data-linea].visto::before {
  transform: none;
}

@media (min-width: 900px) {
  .moto [data-linea]::before {
    transform: scaleX(0);
  }
}

.moto [data-linea] .tappa {
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.4s var(--esce), transform 0.5s var(--esce);
}

.moto [data-linea].visto .tappa {
  opacity: 1;
  transform: none;
}

.moto [data-linea].visto li:nth-child(2) .tappa { transition-delay: 0.35s; }
.moto [data-linea].visto li:nth-child(3) .tappa { transition-delay: 0.7s; }
.moto [data-linea].visto li:nth-child(4) .tappa { transition-delay: 1.05s; }
