/* sito.css — la pagina di vendita di Rise Day (riseday.co). Stesse variabili e stesso carattere dell'app (app/stile.css):
   chi passa dal sito all'app non deve accorgersi del confine. Usato anche da success.html e lost-key.html (chiave.css). */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("app/caratteri/InterVariable.woff2") format("woff2");
}

/* ------------------------------------------------------------ colori (gli stessi di app/stile.css) */
:root {
  --notte: #171714;
  --carta: #1f1e1b;
  --rilievo: #2a2825;
  --notte-rgb: 23, 23, 20;
  --tinta: 255, 255, 255;
  --buio: 0, 0, 0;
  --linea: rgba(var(--tinta), 0.075);
  --linea-forte: rgba(var(--tinta), 0.15);
  --testo: #f4f2ee;
  --testo-2: #b3aea6;
  --testo-3: #958f87;
  --accento: #ff7a2e;
  --accento-chiaro: #ff9a5c;
  --accento-inchiostro: #241005;
  --accento-rgb: 255, 122, 46;
  --accento-fondo: #4a2511;
  --accento-velo: #2c1d13;
  --accento-pallido: #ffd5b8;
  --pulsante: linear-gradient(180deg, #ff8f4a, #ff6f22);
  --pulsante-sopra: linear-gradient(180deg, #ffa066, #ff7a2e);
  --riempimento: linear-gradient(90deg, #ff6a1f, #ff9a5c);
  --verde: #3fdc66;
  --verde-testo: #5fe382;
  --verde-rgb: 63, 220, 102;
  --rosso: #ef4f55;
  --giallo: #ffd60a;
  --arancio: #ffb340;
  --blu: #4aa3ff;
  --menta: #5fe3c7;
  --rosa: #ff5c8a;
  --viola: #bf5af2;
  --oro: #ffc53d;
  /* ombre a più strati: una vicina e netta, una lontana e morbida */
  --ombra: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 28px -14px rgba(0, 0, 0, 0.6);
  --ombra-alta: 0 1px 0 rgba(255, 255, 255, 0.07) inset, 0 2px 4px rgba(0, 0, 0, 0.25), 0 18px 36px -14px rgba(0, 0, 0, 0.55), 0 60px 110px -40px rgba(0, 0, 0, 0.8);
  --vetro: rgba(255, 255, 255, 0.06);
  --vetro-bordo: rgba(255, 255, 255, 0.14);
  --vetro-luce: rgba(255, 255, 255, 0.18);
  --vetro-fitto: rgba(31, 30, 27, 0.92);
  --sfoca: blur(24px) saturate(1.6);
  --titolo: #f4f2ee;
  /* l'ombra che una carta "getta" quando si solleva al passaggio del puntatore */
  --ombra-sopra: 0 2px 6px rgba(0, 0, 0, 0.25), 0 18px 32px -12px rgba(0, 0, 0, 0.55), 0 40px 70px -24px rgba(0, 0, 0, 0.7);
  --luce: radial-gradient(900px 600px at 10% -10%, rgba(var(--accento-rgb), 0.1), transparent 60%),
    radial-gradient(1000px 700px at 100% 110%, rgba(255, 196, 107, 0.05), transparent 60%);
  --carta-fatta: #24201b;
  --raggio: 18px;
  --raggio-2: 12px;
  --morbido: cubic-bezier(0.2, 0.65, 0.2, 1);
  color-scheme: dark;
}
:root[data-tema="chiaro"] {
  --notte: #fbf8f3;
  --notte-rgb: 251, 248, 243;
  --carta: #ffffff;
  --rilievo: #f3efe9;
  --tinta: 38, 30, 22;
  --buio: 48, 36, 24;
  --testo: #1d1d1f;
  --testo-2: #5f5e63;
  --testo-3: #6e6e73;
  --accento-chiaro: #bf4a12;
  --accento-fondo: #fde0cc;
  --accento-velo: #fdf0e5;
  --accento-pallido: #9a3a0c;
  --riempimento: linear-gradient(90deg, #ff8a45, #f2681f);
  --verde: #2fbf58;
  --verde-testo: #1f8a42;
  --verde-rgb: 47, 191, 88;
  --rosso: #e5484d;
  --giallo: #b48600;
  --arancio: #b87500;
  --blu: #1f78e0;
  --menta: #0f9f83;
  --rosa: #dd3768;
  --viola: #9440cc;
  --oro: #f2a900;
  --ombra: 0 1px 2px rgba(48, 36, 24, 0.06), 0 12px 28px -16px rgba(48, 36, 24, 0.22);
  --ombra-alta: 0 1px 2px rgba(48, 36, 24, 0.06), 0 14px 32px -14px rgba(48, 36, 24, 0.2), 0 60px 110px -40px rgba(48, 36, 24, 0.3);
  --vetro: rgba(255, 255, 255, 0.55);
  --vetro-bordo: rgba(38, 30, 22, 0.1);
  --vetro-luce: rgba(255, 255, 255, 0.9);
  --vetro-fitto: rgba(255, 255, 255, 0.94);
  --sfoca: blur(24px) saturate(1.4);
  --titolo: #262320;
  --ombra-sopra: 0 2px 6px rgba(48, 36, 24, 0.06), 0 18px 32px -12px rgba(48, 36, 24, 0.22), 0 40px 70px -24px rgba(48, 36, 24, 0.28);
  --luce: radial-gradient(900px 600px at 10% -10%, rgba(var(--accento-rgb), 0.12), transparent 60%),
    radial-gradient(1000px 700px at 100% 110%, rgba(255, 196, 107, 0.14), transparent 60%);
  --carta-fatta: #fff7f0;
  color-scheme: light;
}

/* ------------------------------------------------------------ base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--notte); color: var(--testo);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", system-ui, sans-serif;
  font-size: 17px; line-height: 1.5; letter-spacing: -0.006em; font-optical-sizing: auto;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--luce); }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { letter-spacing: -0.028em; line-height: 1.05; text-wrap: balance; color: var(--titolo); }
h1 { font-size: clamp(2.4rem, 9.2vw, 3.9rem); font-weight: 760; letter-spacing: -0.035em; line-height: 1.02; }
h2 { font-size: clamp(1.75rem, 6.4vw, 2.5rem); font-weight: 740; }
h3 { font-size: 1.08rem; font-weight: 650; line-height: 1.3; letter-spacing: -0.015em; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; letter-spacing: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accento-chiaro); outline-offset: 3px; }
svg { display: block; flex: none; }
main { display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: 640px; margin-inline: auto; padding-inline: 20px; }
section { position: relative; padding-block: 64px; }
.eyebrow { font-size: 0.76rem; font-weight: 640; letter-spacing: 0.13em; text-transform: uppercase; color: var(--accento-chiaro); margin-bottom: 14px; }
.muted { color: var(--testo-2); }
.lead { font-size: 1.12rem; line-height: 1.5; color: var(--testo-2); }
.lead.piccolo { font-size: 1rem; color: var(--testo-3); margin-top: 14px; }
.solo-computer { display: none; }

/* ------------------------------------------------------------ pulsanti (come nell'app) */
.bottone {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--raggio-2);
  background: rgba(var(--tinta), 0.07); color: var(--testo); font-weight: 600; font-size: 15px;
  border: 1px solid var(--linea-forte); text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(var(--tinta), 0.05);
  transition: background-color 0.2s, border-color 0.2s, transform 0.15s var(--morbido), box-shadow 0.25s;
}
.bottone:hover { background: rgba(var(--tinta), 0.11); }
.bottone:active { transform: scale(0.98); }
.bottone.primo {
  background: var(--pulsante); color: var(--accento-inchiostro); border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 1px 2px rgba(0, 0, 0, 0.2), 0 10px 24px -8px rgba(var(--accento-rgb), 0.6);
}
/* al passaggio il pulsante arancione rimbalza (scale, con una curva che supera e torna); il magnetismo e l'inclinazione li mette sito.js in transform */
.bottone.primo { transition: background-color 0.3s, box-shadow 0.5s, scale 0.7s cubic-bezier(0.3, 1.5, 0.4, 1); }
.bottone.primo:hover { background: var(--pulsante-sopra); scale: 1.035; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 8px rgba(0, 0, 0, 0.2), 0 18px 36px -8px rgba(var(--accento-rgb), 0.7); }
.bottone.primo:active { scale: 0.97; transform: none; transition-duration: 0.2s, 0.4s, 0.15s; }
.magnetico { will-change: transform; }
.bottone.grande { width: 100%; min-height: 58px; font-size: 1.08rem; font-weight: 700; border-radius: 16px; letter-spacing: -0.01em; }
.bottone .prezzo { font-weight: 600; opacity: 0.82; font-variant-numeric: tabular-nums; }
.sotto { margin-top: 14px; font-size: 0.9rem; color: var(--testo-3); text-align: center; }

/* ------------------------------------------------------------ testata: la pillola con tre voci e l'interruttore del tema (stessa altezza) */
.testata {
  position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); left: 0; right: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding-inline: 12px; pointer-events: none;
}
.pillola-nav { grid-column: 2; }
.tema-tasto { grid-column: 3; justify-self: end; }
/* vetro smerigliato: fondo quasi trasparente, sfocatura forte, un filo di luce sul bordo alto */
.pillola-nav, .tema-tasto {
  pointer-events: auto; background: var(--vetro); border: 1px solid var(--vetro-bordo);
  -webkit-backdrop-filter: var(--sfoca); backdrop-filter: var(--sfoca); border-radius: 999px;
  box-shadow: inset 0 1px 0 var(--vetro-luce), 0 1px 2px rgba(var(--buio), 0.2), 0 12px 32px -12px rgba(var(--buio), 0.45);
}
.pillola-nav { position: relative; display: flex; align-items: center; gap: 2px; height: 48px; padding: 4px; }
.pillola-nav a {
  position: relative; z-index: 1; display: flex; align-items: center; height: 40px; padding: 0 13px; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: 0.86rem; color: var(--testo-2); white-space: nowrap;
  transition: color 0.45s;
}
.pillola-nav a:hover, .pillola-nav a.attiva { color: var(--testo); }
/* la capsula grigia è una sola e scivola sotto la voce attiva (o sotto quella con il puntatore sopra) */
.pillola-nav .cursore {
  position: absolute; top: 4px; left: 4px; height: 40px; width: 0; border-radius: 999px; opacity: 0;
  background: rgba(var(--tinta), 0.1); box-shadow: inset 0 1px 0 rgba(var(--tinta), 0.08);
}
.pillola-nav.pronta .cursore { opacity: 1; transition: left 0.7s cubic-bezier(0.3, 1.12, 0.35, 1), width 0.7s cubic-bezier(0.3, 1.12, 0.35, 1), opacity 0.3s; }
.pillola-nav.senza .cursore { opacity: 0; }
.pillola-nav:not(.pronta) a.attiva { background: rgba(var(--tinta), 0.1); }
.pillola-nav a.compra { background: var(--pulsante); color: var(--accento-inchiostro); font-weight: 700; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.pillola-nav a.compra:hover, .pillola-nav a.compra.attiva { color: #ffffff; } /* sotto l'arancione la capsula non si vedrebbe: qui è il testo a cambiare */
.pillola-nav .segno { display: flex; align-items: center; padding: 0 8px; } /* lo usano success.html e lost-key.html */
.pillola-nav .segno svg { width: 30px; height: 30px; }

/* l'interruttore: la pista è il pulsante stesso, alta quanto la pillola; il pomello porta l'icona del tema attivo */
.tema-tasto { position: relative; flex: none; width: 82px; height: 48px; color: var(--testo-3); transition: background-color 0.4s, border-color 0.4s; }
.tema-tasto:hover { background: rgba(var(--tinta), 0.1); }
.tema-tasto > svg { position: absolute; top: 50%; width: 16px; height: 16px; margin-top: -8px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0.55; }
.tema-tasto .pista-sole { left: 13px; }
.tema-tasto .pista-luna { right: 13px; }
.tema-pomo {
  position: absolute; top: 3px; left: 3px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--rilievo); color: var(--testo);
  box-shadow: 0 1px 2px rgba(var(--buio), 0.35), 0 4px 10px -2px rgba(var(--buio), 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateX(36px);
  transition: transform 0.65s cubic-bezier(0.3, 1.22, 0.4, 1), background-color 0.5s, color 0.5s;
}
.tema-pomo svg { grid-area: 1 / 1; width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; transition: opacity 0.45s ease, transform 0.65s cubic-bezier(0.3, 1.22, 0.4, 1); }
.tema-pomo .icona-sole { opacity: 0; transform: rotate(-90deg) scale(0.5); }
.tema-tasto.chiaro .tema-pomo { transform: translateX(0); background: #ffffff; color: var(--oro); }
.tema-tasto.chiaro .icona-sole { opacity: 1; transform: none; }
.tema-tasto.chiaro .icona-luna { opacity: 0; transform: rotate(90deg) scale(0.5); }
.tema-tasto.subito .tema-pomo, .tema-tasto.subito .tema-pomo svg { transition: none; } /* durante il cerchio del tema il pomello è già a destinazione */
.tema-tasto:active .tema-pomo { transform: translateX(36px) scale(0.94); }
.tema-tasto.chiaro:active .tema-pomo { transform: translateX(0) scale(0.94); }

/* ------------------------------------------------------------ primo schermo */
.apertura { padding-top: 112px; padding-bottom: 8px; text-align: center; }
.apertura .wrap { display: grid; gap: 20px; }
.apertura .lead { max-width: 38ch; margin-inline: auto; }
.apertura .azione { max-width: 420px; margin-inline: auto; width: 100%; }
.apertura h1 { max-width: 14ch; margin-inline: auto; }
.apertura h1 em { font-style: normal; color: var(--accento); }
/* l'evidenziatore: una pennellata arancione che passa dietro la parola, poi il testo diventa inchiostro */
.marca {
  font-style: normal; color: var(--accento); padding: 0 0.08em; margin: 0 -0.08em; border-radius: 0.14em;
  background-image: linear-gradient(var(--accento), var(--accento)); background-repeat: no-repeat; background-size: 0% 88%; background-position: 0 58%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
html.js .titolo-vivo .marca { animation: marca-pennellata 0.8s cubic-bezier(0.3, 0.1, 0.2, 1) 1.4s both, marca-inchiostro 0.4s ease 1.75s both; }
.svolta .marca { transition: background-size 0.8s cubic-bezier(0.3, 0.1, 0.2, 1), color 0.4s ease 0.35s; }
.svolta.evidenzia .marca { background-size: 100% 88%; color: var(--accento-inchiostro); }
@keyframes marca-pennellata { to { background-size: 100% 88%; } }
@keyframes marca-inchiostro { to { color: var(--accento-inchiostro); } }
.apertura .eyebrow { font-size: 0.68rem; letter-spacing: 0.1em; white-space: nowrap; }
/* il titolo sale parola per parola, da sotto una riga invisibile */
.titolo-vivo .p { display: inline-block; overflow: hidden; vertical-align: bottom; padding: 0.1em 0.06em 0.16em; margin: -0.1em -0.06em -0.16em; }
.titolo-vivo .p > span { display: inline-block; }
html.js .titolo-vivo .p > span { transform: translateY(112%); animation: parola-sale 1.25s var(--morbido) forwards; }
.titolo-vivo .p:nth-child(2) > span { animation-delay: 0.07s; }
.titolo-vivo .p:nth-child(3) > span { animation-delay: 0.14s; }
.titolo-vivo .p:nth-child(4) > span { animation-delay: 0.21s; }
.titolo-vivo .p:nth-child(5) > span { animation-delay: 0.28s; }
.titolo-vivo .p:nth-child(6) > span { animation-delay: 0.35s; }
.titolo-vivo .p:nth-child(7) > span { animation-delay: 0.42s; }
.titolo-vivo .p:nth-child(8) > span { animation-delay: 0.49s; }
@keyframes parola-sale { to { transform: none; } }

/* il giro 3D delle schermate del telefono (solo su telefono) */
.giro { position: relative; isolation: isolate; height: 570px; margin-top: 14px; perspective: 1100px; perspective-origin: 50% 40%; overflow: hidden; touch-action: pan-y; }
.giro::before, .giro::after { content: ""; position: absolute; top: 0; bottom: 0; width: 14%; z-index: 2; pointer-events: none; background: linear-gradient(90deg, var(--notte), transparent); }
.giro::after { right: 0; background: linear-gradient(-90deg, var(--notte), transparent); }
.schermo {
  position: absolute; left: 50%; top: 14px; width: 226px; height: 490px; margin-left: -113px;
  border-radius: 32px; background: var(--carta); border: 1px solid var(--linea-forte); box-shadow: var(--ombra-alta);
  overflow: hidden; transform-style: preserve-3d; will-change: transform, opacity; cursor: grab; user-select: none; -webkit-user-select: none;
}
.schermo img { width: 100%; height: 100%; object-fit: cover; object-position: top; pointer-events: none; }
.schermo .nome {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 70px 14px 18px; text-align: center;
  font-weight: 780; font-size: 1.25rem; letter-spacing: 0.05em; color: #fff;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72)); text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
:root[data-tema="chiaro"] .schermo .nome { color: #1d1d1f; text-shadow: none; background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.92)); }
.giro.trascino .schermo { cursor: grabbing; }

/* ------------------------------------------------------------ la vetrina: le sette pagine sul computer, a carosello */
.vetrina { padding-block: 56px 48px; overflow-x: clip; overflow-y: visible; }
.vetrina .intesta { text-align: center; }
.vetrina .intesta h2 { margin-inline: auto; }
.carosello {
  --largo: min(84vw, 640px); --alto: calc(var(--largo) * 0.625);
  position: relative; margin-top: 30px; display: grid; gap: 22px; outline: none; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  transform-origin: 50% 0;
}
.didascalia { display: grid; gap: 4px; text-align: center; padding-inline: 20px; max-width: 560px; margin-inline: auto; min-height: 4.2em; }
.didascalia b { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.015em; }
.didascalia span { color: var(--testo-2); font-size: 0.95rem; line-height: 1.45; text-wrap: balance; }
.binario { position: relative; isolation: isolate; height: var(--alto); }
.diapo {
  position: absolute; left: 50%; top: 0; width: var(--largo); height: var(--alto); margin: 0 0 0 calc(var(--largo) / -2);
  border-radius: 14px; overflow: hidden; background: var(--carta); border: 1px solid var(--linea-forte); box-shadow: var(--ombra-alta);
  will-change: transform, opacity; cursor: grab; backface-visibility: hidden;
}
.carosello.trascino .diapo { cursor: grabbing; }
.diapo img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.vetro { display: none; }
/* sette tacche: quella della pagina mostrata è più lunga e si riempie di arancione mentre aspetta di passare alla prossima */
.tacche { display: flex; justify-content: center; align-items: center; gap: 6px; }
.tacca { display: flex; align-items: center; height: 24px; width: 22px; padding: 0; transition: width 0.6s var(--morbido); }
.tacca b { display: block; width: 100%; height: 4px; border-radius: 2px; background: rgba(var(--tinta), 0.16); overflow: hidden; transition: background-color 0.3s; }
.tacca i { display: block; height: 100%; background: var(--accento); transform: scaleX(0); transform-origin: 0 50%; }
.tacca:hover b { background: rgba(var(--tinta), 0.3); }
.tacca.attiva { width: 48px; }
.tacca.attiva b { background: rgba(var(--tinta), 0.22); }

/* ------------------------------------------------------------ "il giro che conosci" */
.ciclo { display: grid; gap: 10px; margin-top: 24px; }
.ciclo div { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: baseline; padding: 16px 18px; border-radius: var(--raggio); background: var(--carta); border: 1px solid var(--linea); box-shadow: var(--ombra); }

/* ------------------------------------------------------------ le carte si sollevano al passaggio: l'ombra gettata sta in un ::after che sfuma (più fluido di animare box-shadow) */
.carta-ab, .fatto, .ciclo div, .prezzo-carta, .nota { position: relative; transition: transform 0.7s var(--morbido), border-color 0.4s, background-color 0.4s; }
.carta-ab::after, .fatto::after, .ciclo div::after, .prezzo-carta::after, .nota::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  box-shadow: var(--ombra-sopra); opacity: 0; transition: opacity 0.7s var(--morbido);
}
@media (hover: hover) {
  .carta-ab:hover, .fatto:hover, .ciclo div:hover, .prezzo-carta:hover, .nota:hover { transform: translateY(-4px); border-color: var(--linea-forte); }
  .carta-ab:hover::after, .fatto:hover::after, .ciclo div:hover::after, .prezzo-carta:hover::after, .nota:hover::after { opacity: 1; }
}
.ciclo b { font-weight: 700; color: var(--accento-chiaro); font-variant-numeric: tabular-nums; }
.ciclo p { color: var(--testo-2); }
.svolta { margin-top: 30px; font-size: 1.3rem; font-weight: 640; line-height: 1.35; letter-spacing: -0.018em; max-width: 30ch; }
.svolta em { font-style: normal; color: var(--accento); }
.svolta .parola { display: inline-block; } /* le parole si accendono una dopo l'altra scorrendo (sito.js) */

/* ------------------------------------------------------------ "provala": la carta dell'abitudine, come nell'app */
.prova { display: grid; gap: 12px; margin-top: 24px; }
.prova-nota { font-size: 0.95rem; color: var(--testo-3); margin-top: 14px; }
.prova-nota b { color: var(--testo-2); font-weight: 600; }
.carta-ab {
  display: flex; flex-direction: column; gap: 10px; width: 100%; text-align: left;
  background: var(--carta); border: 1px solid var(--linea); border-radius: var(--raggio); padding: 16px; box-shadow: var(--ombra);
}
.carta-ab:active { transform: scale(0.985); transition-duration: 0.12s; }
.carta-ab.fatta { border-color: rgba(var(--accento-rgb), 0.3); background: var(--carta-fatta); }
.carta-su { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.emoji { width: 40px; height: 40px; border-radius: 11px; background: var(--rilievo); display: flex; align-items: center; justify-content: center; font-size: 22px; line-height: 1; flex: none; }
.tondo { width: 40px; height: 40px; border-radius: 50%; flex: none; border: 2px solid var(--linea-forte); color: transparent; display: flex; align-items: center; justify-content: center; transition: background-color 0.16s, border-color 0.16s, color 0.16s; }
.tondo svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.carta-ab:hover .tondo { border-color: var(--accento); }
.carta-ab.fatta .tondo { background: var(--accento); border-color: var(--accento); color: var(--accento-inchiostro); }
.carta-ab.scatto .tondo { animation: scatto 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
@keyframes scatto { 0% { transform: scale(0.7); } 55% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes traccia { from { stroke-dashoffset: 22; } to { stroke-dashoffset: 0; } }
.carta-ab.scatto .tondo path { stroke-dasharray: 22; animation: traccia 0.34s cubic-bezier(0.3, 0.9, 0.4, 1) 0.06s both; }
.carta-ab.scatto { animation: carta-sale 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
@keyframes carta-sale {
  0% { transform: none; }
  35% { transform: translateY(-3px) scale(1.02); box-shadow: 0 0 0 1px rgba(var(--accento-rgb), 0.45), 0 14px 36px -10px rgba(var(--accento-rgb), 0.55); }
  100% { transform: none; }
}
.carta-testi { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.carta-nome { font-weight: 600; line-height: 1.3; font-size: 15px; }
.carta-quando { font-size: 13px; color: var(--testo-3); }
.carta-numeri { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--testo-2); font-variant-numeric: tabular-nums; }
.carta-numeri b { font-weight: 700; color: var(--testo); }
.carta-ab.scatto .carta-numeri b.serie { display: inline-block; color: var(--verde-testo); animation: numero-sale 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.5); }
@keyframes numero-sale { 0% { transform: translateY(80%); opacity: 0; } 60% { transform: translateY(-14%) scale(1.3); opacity: 1; } 100% { transform: none; } }
.striscia { display: flex; align-items: center; gap: 4px; height: 8px; }
.striscia i { flex: 1 1 0; height: 8px; border-radius: 4px; display: block; }
.striscia i[data-s="fatta"] { background: var(--verde); }
.striscia i[data-s="attesa"] { border: 1.5px solid var(--verde); transition: background-color 0.25s; }
.carta-ab.fatta .striscia i[data-s="attesa"] { background: var(--verde); }
.carta-ab.scatto .striscia i:last-child { animation: scatto 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.4) 0.1s; }

/* la festa dell'app (effetti.js disegna su questo canvas e crea questa carta) */
.effetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }
.traguardo { position: fixed; inset: 0; z-index: 55; display: flex; align-items: center; justify-content: center; padding: 24px; pointer-events: none; }
.traguardo-carta {
  pointer-events: auto; width: min(360px, 100%); padding: 30px 24px 20px; border-radius: 26px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: var(--vetro-fitto); -webkit-backdrop-filter: var(--sfoca); backdrop-filter: var(--sfoca);
  border: 1px solid rgba(var(--accento-rgb), 0.35);
  box-shadow: var(--ombra-alta), 0 0 90px -12px rgba(var(--accento-rgb), 0.5);
  animation: traguardo-entra 0.62s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.traguardo-icona { position: relative; width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.traguardo-raggi {
  position: absolute; inset: -30px; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(var(--accento-rgb), 0.3) 0deg 9deg, transparent 9deg 30deg);
  -webkit-mask-image: radial-gradient(circle, #000 28%, transparent 70%); mask-image: radial-gradient(circle, #000 28%, transparent 70%);
  animation: traguardo-raggi 10s linear infinite;
}
.traguardo-emoji { position: relative; font-size: 58px; line-height: 1; animation: traguardo-emoji 0.9s cubic-bezier(0.2, 1.6, 0.4, 1) 0.1s both; filter: drop-shadow(0 8px 18px rgba(var(--buio), 0.35)); }
.traguardo-titolo { font-size: 23px; font-weight: 750; letter-spacing: -0.02em; color: var(--testo); }
.traguardo-testo { font-size: 15px; color: var(--testo-2); max-width: 32ch; }
.traguardo-premio { margin-top: 6px; padding: 8px 14px; border-radius: 12px; background: var(--accento-velo); border: 1px solid rgba(var(--accento-rgb), 0.3); color: var(--testo); font-size: 14px; font-weight: 600; animation: traguardo-premio 0.5s ease-out 0.45s both; }
.traguardo-ok { margin-top: 12px; min-width: 150px; min-height: 44px; justify-content: center; }
.traguardo.via .traguardo-carta { animation: traguardo-esce 0.22s ease-in both; }
.traguardo.fermo .traguardo-carta, .traguardo.fermo .traguardo-emoji, .traguardo.fermo .traguardo-premio, .traguardo.fermo .traguardo-raggi { animation: none; }
@keyframes traguardo-entra { 0% { opacity: 0; transform: translateY(20px) scale(0.8); } 100% { opacity: 1; transform: none; } }
@keyframes traguardo-esce { to { opacity: 0; transform: scale(0.94); } }
@keyframes traguardo-emoji { 0% { transform: scale(0) rotate(-24deg); } 60% { transform: scale(1.2) rotate(6deg); } 100% { transform: none; } }
@keyframes traguardo-raggi { to { transform: rotate(360deg); } }
@keyframes traguardo-premio { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ in tasca (solo computer): tre telefoni a velocità diverse */
.telefoni { position: relative; isolation: isolate; height: 560px; }
.telefoni img { position: absolute; border-radius: 28px; border: 1px solid var(--linea-forte); box-shadow: var(--ombra-alta); background: var(--carta); will-change: transform; }
.telefoni img:nth-child(1) { width: 176px; left: 0; top: 80px; z-index: 1; }
.telefoni img:nth-child(2) { width: 220px; left: 50%; margin-left: -110px; top: 0; z-index: 2; }
.telefoni img:nth-child(3) { width: 176px; right: 0; top: 120px; z-index: 1; }

/* ------------------------------------------------------------ fatti, passi, prezzo, domande */
.fatti { display: grid; gap: 14px; margin-top: 24px; }
.fatto { padding: 20px; border-radius: var(--raggio); background: var(--carta); border: 1px solid var(--linea); box-shadow: var(--ombra); }
.fatto h3 { color: var(--accento-chiaro); margin-bottom: 6px; }
.fatto p { color: var(--testo-2); font-size: 0.97rem; }
.passi { display: grid; gap: 18px; margin-top: 24px; counter-reset: p; }
.passo { display: grid; grid-template-columns: 36px 1fr; gap: 14px; }
.passo::before { counter-increment: p; content: counter(p); width: 36px; height: 36px; border-radius: 50%; background: var(--pulsante); color: var(--accento-inchiostro); font-weight: 760; display: grid; place-items: center; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 14px -6px rgba(var(--accento-rgb), 0.6); }
.passo h3 { margin-bottom: 4px; }
.passo p { color: var(--testo-2); font-size: 0.97rem; }
.nota { margin-top: 20px; padding: 14px 16px; border-left: 3px solid var(--accento); background: var(--carta); border-radius: 0 12px 12px 0; font-size: 0.93rem; color: var(--testo-2); box-shadow: var(--ombra); }
.prezzo-carta { background: var(--carta); border: 1px solid rgba(var(--accento-rgb), 0.3); border-radius: 24px; padding: 28px 24px; margin-top: 24px; box-shadow: var(--ombra-alta); }
.prezzo-carta::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(420px 220px at 100% 0%, rgba(var(--accento-rgb), 0.12), transparent 70%); }
.prezzo-carta > * { position: relative; }
.prezzo-carta .cifra { font-weight: 800; font-size: 3.3rem; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.prezzo-carta .cifra small { font-size: 1rem; font-weight: 600; color: var(--testo-2); letter-spacing: -0.01em; margin-left: 8px; }
.prezzo-carta ul { list-style: none; padding: 0; margin: 20px 0 24px; display: grid; gap: 10px; color: var(--testo-2); font-size: 0.97rem; }
.prezzo-carta li { display: flex; gap: 10px; align-items: flex-start; }
.prezzo-carta li svg { width: 18px; height: 18px; margin-top: 3px; stroke: var(--accento-chiaro); fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.sicuro { margin-top: 12px; font-size: 0.88rem; color: var(--testo-3); text-align: center; }
.domande { margin-top: 44px; }
/* le domande: una aperta alla volta; la risposta si apre con una piega (grid-template-rows) e il + ruota in × */
details { border-bottom: 1px solid var(--linea); padding: 4px 0; }
summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; font-weight: 600; font-size: 1rem; transition: color 0.3s; }
summary:hover { color: var(--accento-chiaro); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.5rem; font-weight: 450; line-height: 1; color: var(--accento-chiaro); flex: none; transition: transform 0.7s cubic-bezier(0.3, 1.25, 0.4, 1), color 0.4s; }
details.aperta summary::after { transform: rotate(135deg); }
html:not(.js) details[open] summary::after { transform: rotate(135deg); }
.piega { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.7s var(--morbido); }
.piega-dentro { overflow: hidden; opacity: 0; translate: 0 -6px; transition: opacity 0.5s ease, translate 0.7s var(--morbido); }
details.aperta .piega { grid-template-rows: 1fr; }
details.aperta .piega-dentro { opacity: 1; translate: 0 0; transition-delay: 0.1s; }
html:not(.js) .piega { grid-template-rows: 1fr; } html:not(.js) .piega-dentro { opacity: 1; translate: none; }
details p { padding-bottom: 16px; color: var(--testo-2); font-size: 0.97rem; }

/* ------------------------------------------------------------ piede */
footer { padding-block: 36px 120px; border-top: 1px solid var(--linea); color: var(--testo-3); font-size: 0.85rem; }
footer .riga { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; }
footer a { color: var(--testo-2); text-decoration: none; transition: color 0.2s; }
footer a:hover { color: var(--testo); }

/* ------------------------------------------------------------ pulsante fisso (telefono) */
.fisso { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--vetro); -webkit-backdrop-filter: var(--sfoca); backdrop-filter: var(--sfoca); border-top: 1px solid var(--linea-forte); transform: translateY(110%); transition: transform 0.45s var(--morbido); }
.fisso.visibile { transform: none; }
.fisso .bottone { min-height: 52px; max-width: 560px; margin-inline: auto; display: flex; }

/* ------------------------------------------------------------ le rivelazioni allo scorrimento: salgono e sfumano, i figli uno dopo l'altro */
html.js [data-rivela], html.js [data-rivela-figli] > * {
  opacity: 0; translate: 0 28px;
  /* oltre alla comparsa, qui vivono anche le transizioni del sollevamento al passaggio (transform, bordo, fondo): questa regola vince sulle altre */
  transition-property: opacity, translate, transform, border-color, background-color;
  transition-duration: 1.3s, 1.3s, 0.7s, 0.4s, 0.4s;
  transition-timing-function: var(--morbido);
  transition-delay: calc(var(--r, 0) * 140ms), calc(var(--r, 0) * 140ms), 0s, 0s, 0s;
}
html.js [data-rivela-figli] > :nth-child(2) { transition-delay: 140ms, 140ms, 0s, 0s, 0s; }
html.js [data-rivela-figli] > :nth-child(3) { transition-delay: 280ms, 280ms, 0s, 0s, 0s; }
html.js [data-rivela-figli] > :nth-child(4) { transition-delay: 420ms, 420ms, 0s, 0s, 0s; }
html.js .visto[data-rivela], html.js .visto[data-rivela-figli] > * { opacity: 1; translate: 0 0; }
[data-parallax] { will-change: transform; }

/* ------------------------------------------------------------ il cambio di tema: un cerchio che si apre dall'interruttore (View Transitions);
   dove non c'è, i colori sfumano tutti insieme */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.alba::view-transition-new(root) { animation: alba 1.15s cubic-bezier(0.3, 0.1, 0.25, 1) both; }
@keyframes alba { from { clip-path: circle(0px at var(--alba-x) var(--alba-y)); } to { clip-path: circle(var(--alba-r) at var(--alba-x) var(--alba-y)); } }
html.cambio-tema *, html.cambio-tema *::before { transition: background-color 0.6s ease, color 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease !important; }
html.cambio-tema .tema-pomo, html.cambio-tema .tema-pomo svg { transition: transform 0.55s cubic-bezier(0.3, 1.25, 0.4, 1), opacity 0.35s ease, background-color 0.4s ease, color 0.4s ease !important; }

/* ------------------------------------------------------------ pagine legali (anche success.html e lost-key.html) */
.legale { padding-top: 110px; padding-bottom: 60px; }
.wrap.legale { max-width: 720px; }
.legale h1 { font-size: clamp(1.9rem, 6vw, 2.6rem); margin-bottom: 8px; }
.legale h2 { font-size: 1.25rem; margin: 30px 0 8px; }
.legale p, .legale li { color: var(--testo-2); font-size: 0.98rem; }
.legale p + p { margin-top: 10px; }
.legale ul { padding-left: 20px; margin: 8px 0; }
.legale .data { color: var(--testo-3); font-size: 0.9rem; }

/* ------------------------------------------------------------ telefono: l'ordine delle sezioni (il giro subito sotto il titolo, le pagine del computer dopo la prova) */
@media (max-width: 899px) {
  #home { order: 1; } #giro { order: 2; } #loop { order: 3; } #try { order: 4; } #how { order: 5; } #different { order: 6; } #after { order: 7; } #buy { order: 8; } footer { order: 9; }
}

/* ------------------------------------------------------------ computer */
@media (min-width: 900px) {
  body { font-size: 18px; }
  h1 { font-size: clamp(3.4rem, 5.4vw, 4.6rem); }
  h2 { font-size: clamp(2.2rem, 3.4vw, 2.9rem); }
  h3 { font-size: 1.15rem; }
  .lead { font-size: 1.22rem; }
  .wrap { max-width: 1080px; padding-inline: 32px; }
  .wrap.due { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
  .wrap.due .colonna { max-width: 46ch; }
  .colonna > h2 + p { margin-top: 16px; }
  section { padding-block: 96px; }
  .solo-telefono { display: none; }
  .solo-computer { display: block; }
  .fisso { display: none; }
  footer { padding-bottom: 48px; }

  .testata { padding-inline: 20px; top: 16px; }
  .pillola-nav { height: 52px; padding: 5px; gap: 6px; }
  .pillola-nav a { height: 42px; padding: 0 24px; font-size: 0.95rem; }
  .pillola-nav a.compra { padding: 0 26px; }
  .tema-tasto { width: 94px; height: 52px; margin-right: 28px; }
  .tema-tasto .pista-sole { left: 17px; } .tema-tasto .pista-luna { right: 17px; }
  .tema-pomo { top: 4px; left: 4px; width: 42px; height: 42px; transform: translateX(42px); }
  .tema-tasto:active .tema-pomo { transform: translateX(42px) scale(0.94); }
  .tema-tasto.chiaro:active .tema-pomo { transform: translateX(0) scale(0.94); }

  .apertura { padding-top: 150px; padding-bottom: 0; }
  .apertura .wrap { gap: 24px; }
  .apertura h1 { max-width: 16ch; }
  .apertura .eyebrow { font-size: 0.78rem; letter-spacing: 0.14em; }
  .apertura .lead { max-width: 48ch; }
  .apertura .azione { max-width: none; display: grid; justify-items: center; }
  .apertura .bottone.grande { width: auto; min-width: 340px; padding-inline: 32px; min-height: 60px; }

  /* la vetrina sotto il titolo: parte un po' più piccola e cresce scorrendo (--sc la mette sito.js) */
  .vetrina { padding-top: 44px; padding-bottom: 72px; }
  .vetrina .intesta { display: none; } /* su computer la vetrina sta sotto il titolo: parla da sola, con le didascalie */
  .carosello { --largo: min(760px, 56vw); margin-top: 0; gap: 26px; transform: scale(var(--sc, 1)); }
  .didascalia b { font-size: 1.15rem; }
  .didascalia span { font-size: 1rem; }
  .diapo { border-radius: 18px; }
  /* i due vetri ai lati: sfocano e allungano quello che ci passa sotto */
  .vetro {
    display: block; position: absolute; top: -8%; bottom: -8%; width: 22%; z-index: 5; pointer-events: none;
    -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5);
    background: linear-gradient(90deg, rgba(var(--notte-rgb), 0.9), rgba(var(--notte-rgb), 0.35) 45%, rgba(var(--notte-rgb), 0));
    -webkit-mask-image: linear-gradient(90deg, #000 55%, transparent); mask-image: linear-gradient(90deg, #000 55%, transparent);
  }
  .vetro.sinistra { left: -2%; }
  .vetro.destra { right: -2%; transform: scaleX(-1); }

  .ciclo { grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
  .ciclo div { grid-template-columns: 1fr; gap: 8px; padding: 22px; }
  .svolta { font-size: 1.6rem; max-width: 34ch; margin-top: 40px; }
  .prova { margin-top: 0; }
  .fatti { grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
  .fatto { padding: 24px; }
  .passi { grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 36px; }
  .passo { grid-template-columns: 1fr; gap: 14px; }
  .nota { margin-top: 32px; max-width: 64ch; }
  .compra-blocco { align-items: start; }
  .prezzo-carta { padding: 32px 30px; max-width: 460px; }
  .domande { margin-top: 0; padding-top: 10px; }
}

/* ------------------------------------------------------------ meno movimento */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js [data-rivela], html.js [data-rivela-figli] > * { opacity: 1; translate: none; transition: none; }
  .svolta .parola { opacity: 1 !important; }
  .svolta .marca { background-size: 100% 88%; color: var(--accento-inchiostro); transition: none; }
  html.js .titolo-vivo .p > span { transform: none; animation: none; }
  .fisso, .tema-pomo, .tema-pomo svg, .pillola-nav a, .pillola-nav .cursore, .bottone, .tacca, .piega, .piega-dentro, summary::after { transition: none; }
  html.js .titolo-vivo .marca { animation: none; background-size: 100% 88%; color: var(--accento-inchiostro); }
  .carta-ab, .fatto, .ciclo div, .prezzo-carta, .nota { transition: none; }
  .carta-ab.scatto, .carta-ab.scatto .tondo, .carta-ab.scatto .tondo path, .carta-ab.scatto .carta-numeri b.serie, .carta-ab.scatto .striscia i:last-child { animation: none; }
  .carosello { transform: none !important; }
}
