/* Jatnet — landing v2
 * Tradotta dal frame Figma "Landing v2" (Jatnet-Project, node 163:24; mobile 178:26).
 * Colori dal sistema del ticket 01 (.scratch/jatnet-brand/assets/tokens.css).
 * La landing e' solo dark: hero petrolio, pannello bianco, chiusura petrolio.
 */

:root {
  --petrol-900: #001721;
  --petrol-800: #022432;
  --petrol-500: #124F60;

  --teal-700: #15817B;
  --teal-500: #35A09C;
  --teal-300: #6FD0CB;
  --teal-veil: #EFF5F5;

  --magenta-700: #9C0779;
  --magenta-500: #C9099C;
  --magenta-300: #F85DD4;

  --ink: var(--petrol-800);
  --ink-soft: var(--petrol-500);

  --glow-action: 0 0 20px rgba(201, 9, 156, 0.45);

  --display: "Rubik", system-ui, sans-serif;
  --text: "Raleway", system-ui, sans-serif;

  --gutter: 28px;
  --content: 1296px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--petrol-900);
  color: #fff;
  font-family: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: none; }

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

a { color: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid var(--magenta-300); outline-offset: 3px; }

/* ---------- Aloni ---------- */

.alone {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(53, 160, 156, 0.38), rgba(53, 160, 156, 0));
  pointer-events: none;
}

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

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px;
  font: 600 16px/normal var(--text);
  color: #fff; text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }

.btn--teal { background: var(--teal-500); padding: 14px 28px; box-shadow: var(--glow-action); }

.btn--gradient {
  height: 47px; padding: 0 36px;
  background: linear-gradient(180deg, #6bcece 7.8%, #15827b 93.1%);
  border: .5px solid #185a75;
  letter-spacing: -0.64px;
}

.btn--accent { background: var(--magenta-500); padding: 14px 32px; box-shadow: var(--glow-action); }

/* ---------- Form email ---------- */

.form-email {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(111, 208, 203, 0.4);
}
.form-email input {
  flex: 1; min-width: 0;
  background: none; border: 0; outline: 0;
  color: #fff;
  font: 300 18px/normal var(--text);
}
.form-email input::placeholder { color: var(--teal-300); opacity: 1; }
.form-email:focus-within { border-color: var(--teal-300); }

/* Piu' compatto del Figma (619x80): stessa misura del form di chiusura */
.form-email--hero { width: 540px; max-width: 100%; padding: 8px 8px 8px 28px; }
.form-email--hero .mail { width: 20px; height: 20px; flex: none; }
.form-email--hero input { font-size: 18px; margin-left: 2px; }
.form-email--hero input::placeholder { color: #c8c8c8; }

.form-email--chiusura { width: 600px; max-width: 100%; padding: 8px 8px 8px 28px; }

.form-msg {
  min-height: 1.4em; margin-top: 12px;
  font: 500 15px/1.4 var(--text); color: var(--teal-300); text-align: center;
}
.form-msg.is-error { color: var(--magenta-300); }

/* ---------- Nav ---------- */

.nav {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1416px; margin: 0 auto; padding: 28px 0 0;
}
.marchio { display: flex; align-items: center; gap: 16px; text-decoration: none; }
/* Il logotipo: JATNET in Rubik, il pallino nella J e' l'interruttore del gioco.
 * Comportamento da brand/logo-pallino.html: teal da spento, accent da acceso,
 * si accende con un rimbalzo, un'onda e un bagliore che respira. Qui va in loop. */
.logo {
  position: relative; display: inline-block;
  font: 600 40px/1.1875 var(--display); letter-spacing: .1em; color: #fff;
}
.pallino {
  position: absolute; left: .1em; top: .525em;
  width: .15em; height: .15em; margin: -.075em 0 0 -.075em;
  border-radius: 50%;
  background: var(--teal-300);
  transition: transform 420ms cubic-bezier(.2, .7, .3, 1), background-color 420ms ease, box-shadow 420ms ease;
}
.pallino::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: .012em solid rgba(201, 9, 156, .9); opacity: 0;
}
.logo.acceso .pallino {
  background: var(--magenta-500);
  transform: scale(1.375);
  box-shadow: 0 0 .22em .03em rgba(201, 9, 156, .6);
  transition: transform 520ms cubic-bezier(.34, 1.56, .64, 1), background-color 260ms ease;
  animation: accendi 900ms ease-out, respira 3.2s ease-in-out 900ms infinite;
}
.logo.acceso .pallino::after { animation: onda 760ms ease-out 80ms; }

@keyframes accendi {
  0%   { box-shadow: 0 0 0 0 rgba(201, 9, 156, 0); }
  35%  { box-shadow: 0 0 .55em .14em rgba(201, 9, 156, .85); }
  100% { box-shadow: 0 0 .22em .03em rgba(201, 9, 156, .6); }
}
@keyframes respira {
  0%, 100% { box-shadow: 0 0 .22em .03em rgba(201, 9, 156, .6); }
  50%      { box-shadow: 0 0 .3em .05em rgba(201, 9, 156, .72); }
}
@keyframes onda {
  0%   { opacity: .9; transform: scale(1); }
  100% { opacity: 0; transform: scale(3.4); }
}
.marchio-sub { font: 300 16px/1.1 var(--text); color: var(--teal-300); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 0 48px 0;
  overflow: hidden;
  min-height: 938px;
}
.hero .alone--1 { width: 1400px; height: 900px; left: 50%; top: -80px; transform: translateX(-50%); }
.hero .alone--2 { width: 700px; height: 600px; left: calc(50% - 1006px); top: 500px; }
.hero .alone--3 { width: 600px; height: 500px; left: calc(50% + 394px); top: 520px; }

.hero-stage {
  position: relative; z-index: 1;
  max-width: 1512px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center;
  padding-top: 41px;
  padding-bottom: 178px;
}

.h1 {
  font: 700 128px/1 var(--display);
  letter-spacing: -0.03em;
  text-align: center;
}
.h1 .riga { display: block; }
.h1 .accent { color: var(--magenta-500); }

.validazione {
  margin-top: 23px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(111, 208, 203, 0.35);
  font: 500 14px/normal var(--text);
}
.validazione img { width: 24px; height: 24px; animation: gira 6s linear infinite; }

.hero-sub { margin-top: 29px; font: 400 34px/normal var(--text); color: var(--teal-300); text-align: center; }

.hero-text { margin-top: 56px; font: 400 20px/1.4 var(--text); text-align: center; }
.hero-text strong { font-weight: 600; }

.hero .form-email--hero { margin-top: 32px; }

/* Le due card ai lati dell'H1: fuori flusso su desktop */
.hero-cards { position: absolute; inset: 0; pointer-events: none; }

.pila {
  position: absolute; left: calc(50% - 686px); top: 405px;
  width: 290px;
  transform: rotate(-8deg);
}
.pila .cv-sotto {
  position: absolute; inset: 0;
  height: 330px; border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.pila .cv-sotto--1 { background: rgba(255, 255, 255, 0.07); transform: translate(-6px, 28px) rotate(9deg); }
.pila .cv-sotto--2 { background: rgba(255, 255, 255, 0.12); transform: translate(-2px, 12px) rotate(4deg); }

.cv {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
  padding: 22px;
  background: #fff; color: var(--ink);
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.cv-head { display: flex; align-items: center; gap: 12px; }
.cv-head img { width: 52px; height: 52px; }
.righe { display: flex; flex-direction: column; gap: 8px; }
.righe i { display: block; border-radius: 99px; background: rgba(2, 36, 50, 0.08); height: 7px; }
.cv-head .righe i:nth-child(1) { width: 130px; height: 10px; background: rgba(2, 36, 50, 0.18); }
.cv-head .righe i:nth-child(2) { width: 86px; height: 8px; background: rgba(2, 36, 50, 0.1); }
.cv-ruolo { display: flex; flex-direction: column; gap: 4px; }
.cv-ruolo b { font: 700 19px/normal var(--text); }
.cv-ruolo span { font: 500 14px/normal var(--text); color: var(--ink-soft); }
.skill { display: flex; gap: 6px; }
.skill span {
  padding: 4px 10px; border-radius: 999px;
  background: rgba(111, 208, 203, 0.3);
  font: 600 13px/normal var(--text);
}
.cv-esperienze i:nth-child(1) { width: 240px; }
.cv-esperienze i:nth-child(2) { width: 210px; }
.cv-esperienze i:nth-child(3) { width: 160px; }
.match {
  padding: 8px 16px; border-radius: 999px;
  background: var(--magenta-500); color: #fff;
  font: 600 16px/normal var(--display);
}

.ricerca {
  position: absolute; left: calc(50% + 411px); top: 360px;
  width: 280px;
  transform: rotate(8deg);
  display: flex; flex-direction: column; gap: 14px;
  padding: 20px 22px 22px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.ricerca-query { display: flex; align-items: center; gap: 10px; font: 600 16px/normal var(--text); }
.ricerca-query img { width: 18px; height: 18px; }
.ricerca hr { width: 100%; height: 1px; margin: 0; border: 0; background: rgba(255, 255, 255, 0.25); }
.profilo { display: flex; align-items: center; gap: 10px; }
.profilo img { width: 28px; height: 28px; }
.profilo i { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.3); }
.profilo b { margin-left: auto; font: 600 16px/normal var(--display); color: var(--teal-300); }
/* Il primo candidato e' il match: riga evidenziata, stesso ritmo della pill "Match" */
.profilo--top {
  margin: -6px -10px; padding: 6px 10px;
  border-radius: 14px;
  background: rgba(201, 9, 156, 0.16);
  box-shadow: inset 0 0 0 1px rgba(248, 93, 212, 0.45);
}
.profilo--top i { background: rgba(255, 255, 255, 0.6); }
.profilo--top b { color: var(--magenta-300); }

.scarabocchio { position: absolute; pointer-events: none; }
/* Il ricciolo di sinistra e' lo stesso tratto di quello di destra, girato verso l'H1 */
.scarabocchio--ricciolo-sx { left: calc(50% - 716px); top: 170px; width: 80px; height: auto; transform: rotate(200deg); }
.scarabocchio--ricciolo { left: calc(50% + 468px); top: 600px; transform: rotate(20deg); }

/* ---------- Pannello bianco ---------- */

.pannello {
  position: relative; z-index: 2;
  max-width: 1456px;
  margin: 0 var(--gutter);
  padding: 110px 80px 80px;
  background: #fff; color: var(--ink);
  border-radius: 48px;
}
@media (min-width: 1512px) { .pannello { margin: 0 auto; } }

.pannello > section { max-width: var(--content); margin: 0 auto; position: relative; }
.pannello > section + section { margin-top: 150px; }

.titolo { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.h2 { font: 700 72px/1.05 var(--display); letter-spacing: -0.02em; }
.titolo-sub { max-width: 900px; font: 400 26px/1.4 var(--text); }
.titolo-sub strong { font-weight: 700; position: relative; white-space: nowrap; }
.titolo-nota { max-width: 900px; font: 500 18px/1.4 var(--text); color: var(--ink-soft); }

.sottolineatura {
  position: absolute; left: -3px; bottom: -14px;
  width: calc(100% + 16px); height: 21px;
}

/* Vetro: le card filtrano i pallini che ci passano sotto */
.vetro {
  background: rgba(239, 245, 245, 0.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-radius: 28px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 10px 40px rgba(2, 36, 50, 0.06);
}

/* Il problema */
.sotto-vetro { position: absolute; left: 0; top: 0; width: 100%; height: auto; pointer-events: none; }
.problemi {
  position: relative;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
  margin-top: 64px;
}
.problema { display: flex; flex-direction: column; gap: 16px; min-height: 320px; padding: 32px 36px 40px; }
.problema-num { font: 700 80px/1 var(--display); color: var(--teal-700); }
.problema h3, .faq h3 { font: 700 22px/1.3 var(--text); }
.problema p { font: 500 17px/1.5 var(--text); color: var(--ink-soft); }

/* Payoff */
.payoff {
  padding: 110px 96px;
  border-radius: 40px;
  background:
    radial-gradient(50% 50% at 50% 50%, rgba(21, 129, 123, 0.45), rgba(21, 129, 123, 0)),
    var(--petrol-800);
  color: #fff; text-align: center;
  font: 700 60px/1.12 var(--display); letter-spacing: -0.02em;
}
.payoff .accent { color: var(--magenta-500); }

/* Come funziona */
.freccia { position: absolute; left: calc(50% + 460px); top: 95px; }
.passaggi {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  margin-top: 64px;
}
.passaggio {
  display: flex; flex-direction: column; gap: 14px;
  padding: 28px;
  min-height: 446px;
  border-radius: 28px;
  background: var(--teal-veil);
}
.passaggio-num {
  align-self: flex-start;
  padding: 4px 12px; border-radius: 999px;
  background: rgba(111, 208, 203, 0.35); color: var(--teal-700);
  font: 600 16px/normal var(--display);
}
.passaggio h3 { font: 700 22px/1.25 var(--text); }
.passaggio p { flex: 1; font: 500 16px/1.5 var(--text); color: var(--ink-soft); }
/* Lo schema e' centrato sulla card: --cx e' il centro del disegno dentro l'SVG,
 * ombre escluse, misurato con getBBox */
.schema { position: relative; align-self: stretch; height: 150px; flex: none; }
.schema img { position: absolute; top: 0; left: calc(50% - var(--cx)); }
.esito {
  padding: 8px 14px; border-radius: 999px;
  background: #fff; border: 1px solid rgba(53, 160, 156, 0.6);
  font: 600 14px/normal var(--text); text-align: center;
}
.passaggio--traguardo { background: var(--petrol-800); color: #fff; }
.passaggio--traguardo .passaggio-num { background: rgba(111, 208, 203, 0.2); color: var(--teal-300); }
.passaggio--traguardo p { color: var(--teal-300); }
.passaggio--traguardo .esito { background: var(--magenta-500); border-color: transparent; color: #fff; }

/* Vantaggi */
.vantaggi {
  display: flex; justify-content: center; gap: 96px;
  list-style: none; padding: 0;
}
.vantaggio { display: flex; flex-direction: column; align-items: center; gap: 36px; width: 294px; }
.badge { width: 294px; height: 294px; display: flex; align-items: flex-start; justify-content: center; }
.vantaggio h3 {
  font: 700 26px/1.15 var(--display); letter-spacing: 0.04em;
  text-align: center; text-transform: uppercase;
}

/* In arrivo */
.in-arrivo {
  display: flex; align-items: center; gap: 64px;
  padding: 56px;
  border-radius: 40px;
  background: var(--petrol-800); color: #fff;
}
.mascotte-box { flex: none; width: 520px; height: 300px; display: grid; place-items: center; }
.in-arrivo-testo { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.etichetta {
  padding: 6px 14px; border-radius: 999px;
  background: var(--magenta-500); border: 1px solid #ac1984;
  font: 600 14px/normal var(--text);
}
.in-arrivo h2 { font: 700 44px/1.1 var(--display); letter-spacing: -0.01em; }
.punti { display: flex; flex-direction: column; gap: 14px; list-style: none; padding: 0; }
.punti li { display: flex; align-items: center; gap: 14px; font: 500 20px/normal var(--text); }
.punti li::before {
  content: ""; flex: none; width: 8px; height: 8px;
  background: url("/assets/punto-elenco.svg") no-repeat center / contain;
}

/* FAQ */
.faq-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
  margin-top: 64px;
}
.faq { display: flex; flex-direction: column; gap: 14px; min-height: 200px; padding: 36px 40px 40px; }
.faq p { font: 500 17px/1.55 var(--text); color: var(--ink-soft); }
/* Con un numero dispari di domande l'ultima prende tutta la riga */
.faq:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ---------- Chiusura e footer ---------- */

.chiusura {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  padding: 166px 48px 100px;
}
.fondo { position: relative; overflow: hidden; }
.fondo > .alone { width: 1300px; height: 700px; left: 50%; top: -54px; transform: translateX(-50%); }
.chiusura h2 {
  position: relative;
  font: 700 96px/1 var(--display); letter-spacing: -0.03em; text-align: center;
}
.chiusura form { margin-top: 36px; }
.chiusura .form-msg { position: relative; }

.footer {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1416px; margin: 0 auto;
  padding: 26px 0 48px;
  border-top: 1px solid rgba(111, 208, 203, 0.2);
}
.footer-marchio { display: flex; align-items: center; gap: 14px; }
.footer-marchio b { font: 600 24px/normal var(--display); letter-spacing: 2.4px; }
.footer small { font: 300 14px/normal var(--text); color: var(--teal-300); }
.footer-wrap { padding: 0 48px; }

/* ---------- Movimento ---------- */

@keyframes gira { to { transform: rotate(360deg); } }

/* Mascotte: la faccia (J, pupille, bocca) si sposta verso il mouse via script,
 * con le stesse ampiezze delle pose "si guarda attorno" di brand/mascotte.html.
 * Senza mouse (touch) ripete il giro di sguardi del prototipo. */
.mascotte { width: 228px; height: 228px; overflow: visible; }

/* Micro-elementi di gioco attorno alla mascotte: punti, stelline, coriandoli.
 * Coordinate dal centro del riquadro; --k le stringe sui telefoni. */
.mascotte-box { position: relative; --k: 1; }
.premi { position: absolute; inset: 0; }
.mascotte { position: relative; z-index: 1; }
/* Spenti finche' la mascotte non diventa magenta, poi entrano a scatto uno dopo l'altro */
.js .mascotte-box:not(.festa) .premio { opacity: 0; scale: .3; }
.premio {
  transition: opacity 300ms ease calc(var(--i, 0) * 60ms), scale 500ms cubic-bezier(.34, 1.56, .64, 1) calc(var(--i, 0) * 60ms);
  position: absolute;
  left: calc(50% + var(--x) * var(--k)); top: calc(50% + var(--y) * var(--k));
  translate: -50% -50%;
  rotate: var(--r, 0deg);
  pointer-events: none;
}
.guadagno {
  padding: 5px 12px; border-radius: 999px;
  background: var(--magenta-500); color: #fff;
  font: 600 15px/normal var(--display); white-space: nowrap;
  box-shadow: 0 0 18px rgba(201, 9, 156, .5);
}
.guadagno--teal { background: none; color: var(--teal-300); box-shadow: inset 0 0 0 1.5px var(--teal-300); font-size: 13px; }
.moltiplica {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--petrol-800); color: var(--magenta-300);
  box-shadow: inset 0 0 0 2px var(--magenta-300);
  font: 700 15px/1 var(--display);
}
.scintilla { width: var(--s); height: var(--s); color: var(--c); }
.scintilla svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.coriandolo { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.coriandolo--striscia { width: 12px; height: 4px; border-radius: 2px; }
/* Due modi, come nel prototipo: verde (occhi teal, solo il gradiente teal) e
 * magenta (occhi e gradiente accent). Senza JS resta il magenta del Figma. */
.occhio {
  transform-box: fill-box; transform-origin: center;
  transition: transform 180ms cubic-bezier(.34, 1.8, .64, 1);
}
.sfondo-magenta { transition: opacity 500ms ease; }
.js .mascotte:not(.accesa) .occhio { fill: var(--teal-300); }
.js .mascotte:not(.accesa) .sfondo-magenta { opacity: 0; }
.mascotte.chiude .occhio { transform: scaleY(0); transition: transform 120ms ease-in; }
.mascotte.vibra { animation: vibra 820ms linear; }

@keyframes vibra {
  0%, 12%, 100% { transform: none; }
  18% { transform: translate(1.6px, -.6px) rotate(1.4deg); }
  26% { transform: translate(-2.8px, 1.2px) rotate(-2.4deg); }
  34% { transform: translate(3.2px, 1.6px) rotate(2.6deg); }
  42% { transform: translate(-3.2px, -1.4px) rotate(-2.8deg); }
  50% { transform: translate(3px, -1.6px) rotate(2.4deg); }
  58% { transform: translate(-2.6px, 1.2px) rotate(-2deg); }
  66% { transform: translate(2px, 1px) rotate(1.6deg); }
  74% { transform: translate(-1.4px, -.8px) rotate(-1deg); }
  82% { transform: translate(.8px, .4px) rotate(.5deg); }
  90% { transform: none; }
}
.mascotte.sbatte .occhio { animation: sbatti 240ms ease-in-out; }
.mascotte.gira .faccia { animation: guarda 9s cubic-bezier(.45, 0, .25, 1) infinite; }

@keyframes sbatti {
  0%, 100% { transform: scaleY(1); }
  45%, 60% { transform: scaleY(0); }
}
@keyframes guarda {
  0%, 6%    { transform: translate(0, 0); }
  14%, 24%  { transform: translate(12.5px, 22.5px); }
  34%, 42%  { transform: translate(-11px, -27px); }
  52%, 58%  { transform: translate(0, 0); }
  66%, 74%  { transform: translate(-12.5px, 22.5px); }
  82%, 88%  { transform: translate(11px, -27px); }
  96%, 100% { transform: translate(0, 0); }
}

/* Ingressi e scarabocchi: solo con JS attivo e senza "riduci movimento".
 * Senza JS la pagina resta ferma e completa. */
@media (prefers-reduced-motion: no-preference) {
  .js .rivela {
    opacity: 0;
    translate: 0 32px;
    transition:
      opacity .8s cubic-bezier(.2, .7, .3, 1) var(--d, 0ms),
      translate .9s cubic-bezier(.2, .7, .3, 1) var(--d, 0ms),
      scale .9s cubic-bezier(.34, 1.56, .64, 1) var(--d, 0ms);
  }
  .js .rivela--sinistra { translate: -80px 0; }
  .js .rivela--destra { translate: 80px 0; }
  .js .rivela--pop { translate: 0 0; scale: .6; }
  .js .rivela.visibile { opacity: 1; translate: 0 0; scale: 1; }

  /* Il match pulsa; la riga del primo candidato respira allo stesso ritmo */
  .match { animation: pulsa 2.4s ease-in-out infinite; }
  .profilo--top { animation: evidenzia 2.4s ease-in-out infinite; }

  /* Dopo l'ingresso punti, badge e coriandoli ondeggiano; le stelline brillano */
  .festa .scintilla { animation: brilla 2.4s ease-in-out calc(var(--d) + 600ms) infinite; }
  .festa .guadagno, .festa .coriandolo, .festa .moltiplica { animation: fluttua 3.2s ease-in-out calc(var(--d) + 600ms) infinite alternate; }

  /* Gli scarabocchi si disegnano, restano, si ritirano dal primo punto e ricominciano */
  .js .scarabocchio path { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .js .scarabocchio.visibile path { animation: traccia 5.5s cubic-bezier(.6, 0, .3, 1) var(--d, 0ms) infinite; }
}

@keyframes pulsa {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(201, 9, 156, 0); }
  50%      { transform: scale(1.06); box-shadow: 0 0 18px 2px rgba(201, 9, 156, .5); }
}
@keyframes evidenzia {
  0%, 100% { background: rgba(201, 9, 156, .14); box-shadow: inset 0 0 0 1px rgba(248, 93, 212, .35); }
  50%      { background: rgba(201, 9, 156, .26); box-shadow: inset 0 0 0 1px rgba(248, 93, 212, .7), 0 0 16px rgba(201, 9, 156, .35); }
}
@keyframes brilla {
  0%, 100% { opacity: .45; scale: .7; }
  50%      { opacity: 1; scale: 1.15; }
}
@keyframes fluttua {
  from { translate: -50% -50%; }
  to   { translate: -50% calc(-50% - 8px); }
}

@keyframes traccia {
  0%       { stroke-dashoffset: 1; }
  24%, 76% { stroke-dashoffset: 0; }
  94%, 100% { stroke-dashoffset: -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .validazione img { animation: none; }
  .pallino, .logo.acceso .pallino, .logo.acceso .pallino::after { transition: none; animation: none; }
  .mascotte.gira .faccia, .mascotte.sbatte .occhio, .mascotte.vibra { animation: none; }
}

/* ---------- Responsive ---------- */

/* Sotto i 1440px quattro passaggi affiancati non lasciano spazio agli schemi
 * (226px fissi): diventano una griglia 2x2. La freccia a mano puntava al 04
 * in fondo alla fila, quindi sparisce con la fila. */
@media (max-width: 1439px) {
  .passaggi { grid-template-columns: repeat(2, 1fr); }
  .passaggio { min-height: 0; }
  .freccia { display: none; }
}

/* Sotto i 1400px le card laterali non stanno piu' accanto all'H1:
 * passano sotto il sottotitolo, affiancate, come nel frame mobile. */
@media (max-width: 1399px) {
  .hero { min-height: 0; }
  .hero-stage { padding-bottom: 120px; }
  .h1 { font-size: clamp(52px, 8.4vw, 116px); }
  .hero-cards {
    position: relative; inset: auto; order: 4;
    display: flex; justify-content: center; align-items: flex-start; gap: 72px;
    margin-top: 56px; padding-bottom: 72px;
  }
  .hero-text { order: 5; margin-top: 48px; }
  .hero .form-email--hero { order: 6; }
  .hero .form-msg { order: 7; }
  .pila, .ricerca { position: relative; left: auto; top: auto; }
  .pila { transform: rotate(-6deg); }
  .ricerca { transform: rotate(6deg); margin-top: 92px; }
  /* Accanto alla card di ricerca, con la punta sul suo angolo alto */
  .scarabocchio--ricciolo-sx { left: calc(50% + 300px); top: -40px; width: 56px; z-index: 2; transform: none; }
  /* Il ricciolo di destra resta sul tablet: accanto al form, con la punta verso "Invia" */
  .scarabocchio--ricciolo { left: calc(50% + 284px); top: auto; bottom: 196px; width: 52px; height: auto; transform: none; }
}

@media (max-width: 1199px) {
  .pannello { padding: 90px 48px 64px; }
  .h2 { font-size: 56px; }
  .payoff { padding: 80px 56px; font-size: 44px; }
  .vantaggi { gap: 40px; }
  .in-arrivo { gap: 32px; }
  .mascotte-box { width: 300px; --k: .75; }
  .mascotte { width: 190px; height: 190px; }
}

@media (max-width: 899px) {
  .nav { padding-top: 20px; }
  .marchio-sub { display: none; }
  .logo { font-size: 27px; }
  .sotto-vetro { display: none; }
  .problemi, .faq-grid, .passaggi { grid-template-columns: 1fr; }
  .problema { min-height: 0; }
  .vantaggi { flex-direction: column; align-items: stretch; gap: 16px; max-width: 420px; margin: 0 auto; }
  .vantaggio { flex-direction: row; width: auto; gap: 24px; }
  .badge { width: 50%; height: auto; flex: none; }
  .badge img { width: 100%; height: auto; }
  .vantaggio h3 { text-align: left; font-size: 22px; }
  .in-arrivo { flex-direction: column; align-items: stretch; padding: 40px 28px; }
  .mascotte-box { width: auto; height: 260px; }
  .chiusura h2 { font-size: clamp(38px, 10.5vw, 80px); }
}

@media (max-width: 599px) {
  :root { --gutter: 10px; }
  .hero { padding: 0 20px; }
  .nav .btn--teal { padding: 10px 18px; font-size: 14px; }
  .hero-stage { padding-top: 40px; padding-bottom: 72px; }
  .validazione { margin-top: 24px; font-size: 11px; padding: 6px 10px; gap: 6px; }
  .validazione img { width: 18px; height: 18px; }
  .hero-sub { font-size: 22px; margin-top: 18px; }
  .hero-cards { gap: 0; margin-top: 36px; padding-bottom: 44px; }
  .pila { width: 200px; margin-right: -24px; }
  .pila .cv-sotto { height: 100%; }
  .cv { padding: 14px; gap: 9px; border-radius: 16px; }
  .cv-head img { width: 34px; height: 34px; }
  .cv-head .righe i:nth-child(1) { width: 84px; height: 7px; }
  .cv-head .righe i:nth-child(2) { width: 56px; height: 6px; }
  .cv-ruolo b { font-size: 13px; }
  .cv-ruolo span { font-size: 10px; }
  .skill span { font-size: 9px; padding: 3px 7px; }
  .cv-esperienze i { height: 5px; }
  .cv-esperienze i:nth-child(1) { width: 160px; }
  .cv-esperienze i:nth-child(2) { width: 140px; }
  .cv-esperienze i:nth-child(3) { width: 104px; }
  .match { font-size: 11px; padding: 5px 11px; }
  .ricerca { width: 170px; padding: 12px 14px 14px; gap: 9px; border-radius: 18px; margin-top: 60px; }
  .ricerca-query { font-size: 11px; gap: 6px; }
  .ricerca-query img { width: 12px; height: 12px; }
  .profilo { gap: 6px; }
  .profilo img { width: 18px; height: 18px; }
  .profilo i { transform: scaleX(.6); transform-origin: left; }
  .profilo b { font-size: 11px; }
  .h1 .riga { display: inline; }
  .h1 .accent { display: block; }
  .scarabocchio--ricciolo-sx { left: calc(50% + 104px); top: -34px; width: 36px; }
  .scarabocchio--ricciolo { display: none; }
  .hero-text { font-size: 16px; margin-top: 36px; }
  .form-email--hero { padding: 6px 6px 6px 22px; }
  .form-email--hero .mail { display: none; }
  .form-email--hero input, .form-email--chiusura input { font-size: 16px; letter-spacing: 0; }
  .btn--gradient { height: 46px; padding: 8px 28px; }
  .form-email--chiusura { padding-left: 22px; }
  .btn--accent { padding: 12px 24px; }

  .pannello { padding: 64px 20px 48px; border-radius: 32px; }
  .pannello > section + section { margin-top: 96px; }
  .h2 { font-size: 40px; }
  .titolo-sub { font-size: 19px; }
  .titolo-nota { font-size: 16px; }
  .problemi, .faq-grid, .passaggi { margin-top: 40px; gap: 18px; }
  .problema, .faq { padding: 26px 24px 30px; min-height: 0; }
  .problema-num { font-size: 60px; }
  .problema h3, .faq h3 { font-size: 19px; }
  .problema p, .faq p { font-size: 15px; }
  .payoff { padding: 56px 24px; font-size: 30px; border-radius: 28px; }
  .passaggio { padding: 24px; }
  .in-arrivo { border-radius: 28px; }
  .mascotte-box { --k: .66; }
  .in-arrivo h2 { font-size: 30px; }
  .punti li { font-size: 16px; align-items: baseline; }
  .punti li::before { transform: translateY(-2px); }
  .vantaggio h3 { font-size: 18px; }
  .chiusura { padding: 96px 20px 64px; }
  .footer-wrap { padding: 0 20px; }
  .footer { flex-direction: column; align-items: flex-start; gap: 10px; }
}
