:root {
  --bg: #07061a;
  --ink: #f4f2ff;
  --muted: #a9a3cf;
  --line: rgba(255,255,255,.10);
  --glass: rgba(22,18,52,.55);
  --violet: #8b5cff;
  --pink: #ff4fa3;
  --amber: #ffb648;
  --cyan: #3fe0ff;
  --green: #3dffa8;
  --grad: linear-gradient(100deg, var(--violet), var(--pink) 50%, var(--amber));
  --radius: 22px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 Inter, system-ui, sans-serif;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
h1, h2, .logo, .amount { font-family: "Space Grotesk", Inter, sans-serif; letter-spacing: -.02em; }
button { font: inherit; color: inherit; cursor: pointer; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 100%; animation: shine 6s linear infinite; }
@keyframes shine { to { background-position: 200% 0; } }

/* sfondo */
.orbs { position: fixed; inset: 0; z-index: -2; overflow: hidden; }
.orbs i { position: absolute; width: 520px; height: 520px; border-radius: 50%; filter: blur(110px); opacity: .45; animation: float 18s ease-in-out infinite; }
.orbs i:nth-child(1) { background: var(--violet); top: -160px; left: -140px; }
.orbs i:nth-child(2) { background: var(--pink); bottom: -200px; right: -120px; animation-delay: -6s; opacity: .3; }
.orbs i:nth-child(3) { background: var(--cyan); top: 40%; left: 45%; width: 360px; height: 360px; animation-delay: -12s; opacity: .18; }
@keyframes float { 50% { transform: translate(60px, 40px) scale(1.12); } }
#globe { position: fixed; top: 0; right: -10vw; width: 60vw; height: 100vh; z-index: -1; pointer-events: none; }
@media (max-width: 1100px) { #globe { right: -24vw; opacity: .7; } }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 50; pointer-events: none; }

/* header */
.top { display: flex; justify-content: space-between; align-items: center; padding: 18px clamp(16px, 5vw, 56px); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(14px); background: rgba(7,6,26,.45); border-bottom: 1px solid var(--line); }
.logo { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 20px; display: flex; gap: 8px; align-items: center; }
.logo-mark { width: 40px; height: 40px; filter: drop-shadow(0 0 14px rgba(255,79,163,.55)); transition: transform .3s cubic-bezier(.2,.9,.3,1.6); }
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.08); }
.top-cta { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.05); transition: .25s; }
.top-cta:hover { border-color: var(--pink); box-shadow: 0 0 20px rgba(255,79,163,.4); }

main { width: min(1120px, 100%); margin: 0 auto; padding: 0 clamp(16px, 5vw, 56px); }

/* hero */
.hero { min-height: calc(100vh - 72px); display: flex; flex-direction: column; justify-content: center; max-width: 620px; padding: 40px 0 60px; }
.pill { display: inline-flex; align-self: flex-start; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.04); margin: 0 0 22px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
h1 { font-size: clamp(42px, 7vw, 78px); line-height: 1.02; margin: 0 0 20px; }
.sub { color: var(--muted); font-size: clamp(17px, 2vw, 20px); margin: 0 0 32px; max-width: 520px; }
.sub b { color: var(--ink); }
.sub.small { font-size: 15px; margin-bottom: 18px; }
.chips { list-style: none; padding: 0; margin: 34px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { font-size: 14px; color: var(--muted); padding: 8px 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(10px); }
.chips b { color: var(--ink); }

/* bottoni */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; text-decoration: none; color: #fff; font-weight: 700; padding: 14px 22px; border-radius: 16px; background: var(--grad); background-size: 200% 100%; box-shadow: 0 10px 30px -8px rgba(255,79,163,.6), inset 0 1px 0 rgba(255,255,255,.35); transition: transform .2s, box-shadow .25s, background-position .6s; }
.btn:hover { transform: translateY(-2px) scale(1.02); background-position: 100% 0; box-shadow: 0 16px 40px -8px rgba(255,79,163,.8), inset 0 1px 0 rgba(255,255,255,.35); }
.btn:active { transform: scale(.97); }
.btn-big { font-size: 19px; padding: 19px 30px; border-radius: 20px; align-self: flex-start; }
.btn-ghost { background: rgba(255,255,255,.07); border: 1px solid var(--line); box-shadow: none; }
.full { width: 100%; }
.arrow { transition: transform .25s; }
.btn:hover .arrow { transform: translateX(5px); }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; padding: 12px; }

/* card */
.card { position: relative; background: var(--glass); border: 1px solid var(--line); border-radius: 30px; padding: clamp(22px, 4vw, 44px); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); box-shadow: 0 40px 100px -30px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.08); margin: 0 auto 80px; max-width: 680px; scroll-margin-top: 90px; }
.card::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(140deg, rgba(139,92,255,.7), transparent 35%, transparent 65%, rgba(255,79,163,.6)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.wizard { min-height: 440px; }
.progress { height: 6px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; margin-bottom: 26px; }
.bar { height: 100%; width: 0; background: var(--grad); box-shadow: 0 0 16px var(--pink); border-radius: inherit; transition: width .5s cubic-bezier(.2,.9,.3,1.2); }
.back { display: block; margin: -10px 0 -12px; background: none; border: 0; color: var(--muted); font-size: 14px; padding: 4px 0; }
.back[hidden] { display: none; }
.back:hover { color: var(--ink); }

.step { display: none; }
.step.on { display: block; animation: enter .45s cubic-bezier(.2,.9,.3,1.1); }
@keyframes enter { from { opacity: 0; transform: translateY(18px) scale(.98); filter: blur(6px); } }
.q-num { margin: 22px 0 6px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--pink); }
.step h2 { font-size: clamp(28px, 4.5vw, 38px); line-height: 1.1; margin: 0 0 24px; }
.step h2 u { text-decoration-color: var(--pink); text-underline-offset: 6px; }
.hint { color: var(--muted); font-size: 14px; margin: 16px 0 0; }

/* ricerca aeroporto */
.search { position: relative; }
.search input, .form input { width: 100%; font: inherit; color: var(--ink); background: rgba(255,255,255,.06); border: 1.5px solid var(--line); border-radius: 18px; outline: none; transition: .25s; }
.search input { font-size: 20px; padding: 18px 20px; }
.search input:focus, .form input:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(139,92,255,.22), 0 0 30px rgba(139,92,255,.3); background: rgba(255,255,255,.09); }
.search input::placeholder, .form input::placeholder { color: rgba(169,163,207,.6); }
.results { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.results li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid transparent; cursor: pointer; transition: .18s; animation: enter .3s both; }
.results li:hover, .results li.hl { border-color: var(--violet); background: rgba(139,92,255,.16); transform: translateX(4px); }
.results .code { font-family: "Space Grotesk"; font-weight: 700; font-size: 15px; padding: 5px 9px; border-radius: 9px; background: var(--grad); min-width: 52px; text-align: center; }
.results small { color: var(--muted); display: block; font-size: 13px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.quick button { border: 1px solid var(--line); background: rgba(255,255,255,.05); padding: 9px 14px; border-radius: 999px; font-size: 14px; transition: .2s; }
.quick button:hover { border-color: var(--cyan); box-shadow: 0 0 16px rgba(63,224,255,.35); transform: translateY(-2px); }

/* scelte */
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.opts-sm { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.opt { position: relative; text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: var(--radius); border: 1.5px solid var(--line); background: rgba(255,255,255,.045); transition: transform .2s, border-color .2s, box-shadow .25s, background .2s; overflow: hidden; }
.opt::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,79,163,.25), transparent 60%); opacity: 0; transition: opacity .25s; }
.opt:hover { transform: translateY(-4px); border-color: rgba(255,79,163,.6); box-shadow: 0 18px 40px -16px rgba(255,79,163,.6); }
.opt:hover::after { opacity: 1; }
.opt.sel { border-color: var(--pink); background: rgba(255,79,163,.14); box-shadow: 0 0 0 3px rgba(255,79,163,.25); }
.opt .em { font-size: 32px; line-height: 1; margin-bottom: 8px; transition: transform .3s cubic-bezier(.2,.9,.3,1.6); }
.opt:hover .em { transform: scale(1.2) rotate(-8deg); }
.opt b { font-size: 17px; }
.opt small { color: var(--muted); font-size: 13px; }

/* passeggeri */
.stepper { display: flex; align-items: center; justify-content: center; gap: 26px; margin: 10px 0 8px; }
.stepper button { width: 64px; height: 64px; border-radius: 50%; border: 1.5px solid var(--line); background: rgba(255,255,255,.06); font-size: 30px; transition: .2s; }
.stepper button:hover { border-color: var(--pink); box-shadow: 0 0 24px rgba(255,79,163,.5); transform: scale(1.08); }
.stepper output { font: 700 72px/1 "Space Grotesk"; min-width: 90px; text-align: center; }
.step[data-step="pax"] .hint { text-align: center; margin-bottom: 26px; }

/* risultato */
.result { text-align: center; padding-top: 18px; }
.badge { display: inline-block; font-weight: 700; padding: 8px 18px; border-radius: 999px; font-size: 15px; }
.badge.yes { background: rgba(61,255,168,.14); color: var(--green); border: 1px solid rgba(61,255,168,.4); box-shadow: 0 0 30px rgba(61,255,168,.25); }
.badge.maybe { background: rgba(255,182,72,.14); color: var(--amber); border: 1px solid rgba(255,182,72,.4); }
.badge.no { background: rgba(255,255,255,.06); color: var(--muted); border: 1px solid var(--line); }
.route { color: var(--muted); margin: 18px 0 0; font-size: 15px; }
.amount { font-size: clamp(88px, 18vw, 150px); font-weight: 700; line-height: 1; margin: 8px 0 4px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 40px rgba(255,79,163,.45)); }
.amount .eur { font-size: .5em; margin-left: 6px; }
.amount.zero { background: none; color: var(--muted); filter: none; }
.per { font-weight: 600; margin: 0; }
.why { color: var(--muted); max-width: 470px; margin: 14px auto 26px; font-size: 15px; }
.result-actions { max-width: 420px; margin: 0 auto; }

/* lettera */
.letter h2 { font-size: clamp(28px, 4.5vw, 38px); margin: 0 0 6px; line-height: 1.1; }
.lang { display: inline-flex; padding: 4px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid var(--line); margin-bottom: 18px; }
.lang button { border: 0; background: none; padding: 8px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--muted); transition: .2s; }
.lang button.on { background: var(--grad); color: #fff; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.form label { font-size: 13px; font-weight: 600; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.form input { padding: 13px 14px; font-size: 16px; border-radius: 14px; color-scheme: dark; }
.paper-wrap { position: relative; }
.paper { white-space: pre-wrap; font: 14px/1.6 Inter, sans-serif; background: #fbfaff; color: #1d1a33; border-radius: 18px; padding: 26px; margin: 0; max-height: 440px; overflow: auto; box-shadow: 0 30px 60px -24px rgba(139,92,255,.6); }
.paper mark { background: #ffe1f0; color: #b0236b; border-radius: 4px; padding: 0 3px; }
.paper.locked { max-height: 340px; user-select: none; overflow: hidden; -webkit-mask: linear-gradient(#000 30%, transparent 92%); mask: linear-gradient(#000 30%, transparent 92%); }
.lock { position: absolute; left: 16px; right: 16px; bottom: 16px; text-align: center; padding: 22px 20px; border-radius: 20px; background: rgba(16,12,40,.92); border: 1px solid rgba(255,79,163,.45); box-shadow: 0 20px 50px -10px rgba(139,92,255,.6); backdrop-filter: blur(12px); }
.lock-title { font: 700 20px "Space Grotesk"; margin: 0; }
.lock-sub { color: var(--muted); margin: 4px 0 14px; font-size: 14px; }
.letter-actions { display: flex; gap: 10px; margin-top: 16px; }
.letter-actions .btn { flex: 1; }
.next { margin: 28px 0 0; padding-left: 22px; color: var(--muted); font-size: 15px; }
.next li { margin-bottom: 10px; }
.next b { color: var(--ink); }

/* sezioni */
.how, .faq { max-width: 900px; margin: 0 auto 90px; }
.how h2, .faq h2 { font-size: clamp(28px, 4vw, 40px); text-align: center; margin: 0 0 30px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.mini { padding: 24px; border-radius: var(--radius); background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(16px); transition: transform .3s, box-shadow .3s; }
.mini:hover { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 24px 50px -20px rgba(139,92,255,.6); }
.mini .em { font-size: 34px; display: block; margin-bottom: 10px; }
.mini p { color: var(--muted); margin: 6px 0 0; font-size: 15px; }
.faq details { background: var(--glass); border: 1px solid var(--line); border-radius: 18px; padding: 4px 20px; margin-bottom: 10px; backdrop-filter: blur(16px); transition: border-color .2s; }
.faq details[open] { border-color: rgba(139,92,255,.6); }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--pink); transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--muted); margin: 0 0 16px; }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 30px 16px 50px; border-top: 1px solid var(--line); }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--grad); color: #fff; font-weight: 700; padding: 12px 22px; border-radius: 999px; z-index: 60; box-shadow: 0 10px 30px rgba(255,79,163,.5); animation: enter .3s; }

@media (max-width: 760px) {
  #globe { width: 140vw; right: -55vw; top: -6vh; height: 70vh; opacity: .55; }
  .hero { min-height: auto; padding: 56px 0 50px; }
  .btn-big { align-self: stretch; }
  .form { grid-template-columns: 1fr; }
  .card { border-radius: 24px; }
  .opts { grid-template-columns: 1fr; }
  .opt { flex-direction: row; align-items: center; gap: 14px; padding: 16px 18px; flex-wrap: wrap; }
  .opt .em { margin: 0; font-size: 28px; }
  .opt small { flex-basis: 100%; margin-left: 42px; margin-top: -6px; }
  .top-cta { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
footer a { color: var(--muted); }
footer a:hover { color: var(--ink); }

/* treni */
.train-line { display: inline-block; margin-top: 12px; color: var(--ink); font-size: .92em; }
.price-box { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.06); border: 1.5px solid var(--line); border-radius: 22px; padding: 6px 24px; transition: .25s; }
.price-box:focus-within { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(139,92,255,.22), 0 0 30px rgba(139,92,255,.3); }
.price-box input { flex: 1; min-width: 0; font: 700 56px "Space Grotesk"; color: var(--ink); background: none; border: 0; outline: none; padding: 10px 0; }
.price-box span { font: 700 48px "Space Grotesk"; color: var(--muted); }
.step[data-step="t-price"] .hint { margin-bottom: 22px; }
.steps-big { font-size: 17px; }
.steps-big li { margin-bottom: 14px; }
.tg-sub { font: 700 22px "Space Grotesk"; margin: 30px 0 14px; }
#train-paper { max-height: none; }

/* accessibilità */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.step h2:focus, .amount:focus { outline: none; }
.top-right { display: flex; gap: 10px; align-items: center; }
.a11y { font: 700 15px Inter; color: var(--ink); width: 44px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.06); }
.a11y[aria-pressed="true"] { background: var(--grad); border-color: transparent; }
body.big-text main, body.big-text footer { zoom: 1.18; }
body.big-text .hint, body.big-text .opt small, body.big-text .chips li { color: var(--ink); }
