/* ================= LSPD • Coral City ================= */
:root {
  --bg: #050912;
  --bg2: #0a1226;
  --panel: rgba(13, 22, 46, .62);
  --panel2: rgba(20, 32, 64, .55);
  --line: rgba(224, 178, 90, .16);
  --line2: rgba(255, 255, 255, .07);
  --gold: #e0b25a;
  --gold2: #f8dc95;
  --gold3: #a8742a;
  --blue: #2f6bff;
  --red: #ff2d4a;
  --blurple: #5865f2;
  --text: #e9edf7;
  --muted: #8f9ab6;
  --ok: #33d17a;
  --err: #ff5d6c;
  --radius: 18px;
  --head: 'Chakra Petch', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --gold-grad: linear-gradient(180deg, var(--gold2) 0%, var(--gold) 45%, var(--gold3) 100%);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; overflow-x: clip; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(47, 107, 255, .16), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(224, 178, 90, .08), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--body);
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
em { font-style: normal; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
::selection { background: rgba(224, 178, 90, .35); }

/* sfondi */
#dust { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.grid-bg {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(var(--line2) 1px, transparent 1px),
    linear-gradient(90deg, var(--line2) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
  opacity: .45;
}

/* barra lampeggiante in alto */
.lightbar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; display: flex; }
.lightbar i { flex: 1; }
.lightbar i:first-child { background: var(--red); box-shadow: 0 0 18px 4px var(--red); animation: flashA 1.6s infinite; }
.lightbar i:last-child { background: var(--blue); box-shadow: 0 0 18px 4px var(--blue); animation: flashB 1.6s infinite; }
@keyframes flashA { 0%, 18%, 36% { opacity: 1 } 9%, 27%, 50%, 100% { opacity: .12 } }
@keyframes flashB { 0%, 50%, 100% { opacity: .12 } 59%, 77% { opacity: 1 } 68%, 86% { opacity: .12 } }

/* ================= INTRO ================= */
.intro {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; align-content: center; gap: 18px;
  background: var(--bg); transition: opacity .7s ease, visibility .7s;
}
.intro.gone { opacity: 0; visibility: hidden; }
.intro-logo { width: min(240px, 50vw); animation: introLogo 1.5s cubic-bezier(.2, .9, .2, 1) both; filter: drop-shadow(0 0 40px rgba(224, 178, 90, .35)); }
.intro-text { text-align: center; font-family: var(--head); letter-spacing: .4em; overflow: hidden; }
.intro-text span { display: block; color: var(--gold); font-size: 14px; animation: rise .8s .6s both; }
.intro-text b { display: block; font-size: clamp(18px, 3vw, 26px); animation: rise .8s .75s both; }
.intro-flash { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(80px); opacity: 0; }
.intro-flash.red { background: var(--red); left: -20vmax; animation: introFlash 1.4s .1s; }
.intro-flash.blue { background: var(--blue); right: -20vmax; animation: introFlash 1.4s .35s; }
@keyframes introLogo { 0% { transform: scale(.6) rotateY(80deg); opacity: 0 } 60% { opacity: 1 } 100% { transform: none; opacity: 1 } }
@keyframes introFlash { 0%, 100% { opacity: 0 } 15%, 45% { opacity: .55 } 30% { opacity: .1 } }
@keyframes rise { from { transform: translateY(110%); opacity: 0 } to { transform: none; opacity: 1 } }

/* ================= NAV ================= */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 50;
  width: min(1180px, calc(100% - 32px));
  display: flex; align-items: center; gap: 24px;
  padding: 10px 12px 10px 14px; border-radius: 16px;
  background: rgba(8, 14, 30, .55); border: 1px solid var(--line2);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  transition: background .3s, border-color .3s, box-shadow .3s;
}
.nav.scrolled { background: rgba(8, 14, 30, .85); border-color: var(--line); box-shadow: 0 10px 40px rgba(0, 0, 0, .4); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 38px; filter: drop-shadow(0 0 10px rgba(224, 178, 90, .35)); }
.brand b { display: block; font: 700 18px/1 var(--head); letter-spacing: .12em; }
.brand small { display: block; font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.nav-links { display: flex; gap: 6px; margin-left: auto; }
.nav-links a { padding: 8px 14px; border-radius: 10px; font-weight: 500; font-size: 15px; color: #c6cde0; transition: color .2s, background .2s; position: relative; }
.nav-links a:hover, .nav-links a.active { color: #fff; background: rgba(255, 255, 255, .06); }
.nav-links a.active::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--gold-grad); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line2); white-space: nowrap; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(51, 209, 122, .6); animation: ping 2s infinite; }
.status.off i { background: var(--err); animation: none; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(51, 209, 122, .55) } 100% { box-shadow: 0 0 0 10px rgba(51, 209, 122, 0) } }
.burger { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line2); background: transparent; cursor: pointer; position: relative; }
.burger i { position: absolute; left: 12px; right: 12px; height: 2px; background: #fff; border-radius: 2px; transition: transform .3s, top .3s; }
.burger i:first-child { top: 16px; } .burger i:last-child { top: 24px; }
.nav.open .burger i:first-child { top: 20px; transform: rotate(45deg); }
.nav.open .burger i:last-child { top: 20px; transform: rotate(-45deg); }

/* ================= BOTTONI ================= */
.btn {
  --h: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 24px; border-radius: 14px; border: 0; cursor: pointer;
  font: 600 15px/1 var(--body); letter-spacing: .02em; position: relative; overflow: hidden;
  transition: transform .2s, box-shadow .3s, background .3s, opacity .2s;
}
.btn svg { font-size: 18px; }
.btn-sm { --h: 40px; padding: 0 16px; font-size: 14px; border-radius: 11px; }
.btn-gold { color: #1a1205; background: var(--gold-grad); box-shadow: 0 8px 30px -8px rgba(224, 178, 90, .6), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-gold svg { fill: rgba(26, 18, 5, .15); }
.btn-gold::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s; }
.btn-gold:hover::after { transform: translateX(120%); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -8px rgba(224, 178, 90, .75), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-ghost { color: var(--text); background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .12); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); border-color: var(--line); transform: translateY(-2px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ================= HERO ================= */
.hero {
  min-height: 100svh; width: min(1180px, calc(100% - 32px)); margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 40px;
  padding: 120px 0 80px; position: relative;
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 600 13px/1 var(--head); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); padding: 9px 14px; border-radius: 99px; border: 1px solid var(--line); background: rgba(224, 178, 90, .05); margin: 0 0 26px; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: dot 1.6s infinite; }
@keyframes dot { 0%, 100% { background: var(--red); box-shadow: 0 0 10px var(--red) } 50% { background: var(--blue); box-shadow: 0 0 10px var(--blue) } }
h1 { margin: 0; font-family: var(--head); line-height: .92; text-transform: uppercase; }
.h1-small { display: block; font-size: clamp(18px, 2vw, 24px); letter-spacing: .5em; color: var(--muted); font-weight: 600; margin-bottom: 14px; }
.h1-big { display: block; font-size: clamp(54px, 7.4vw, 104px); font-weight: 700; letter-spacing: -.01em; }
.lead { font-size: clamp(16px, 1.4vw, 19px); color: #b9c2d9; max-width: 520px; margin: 26px 0 34px; }
.lead b { color: var(--gold2); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-meta { display: flex; gap: 34px; margin-top: 48px; padding-top: 26px; border-top: 1px solid var(--line2); }
.hero-meta b { display: block; font: 700 28px/1 var(--head); color: #fff; }
.hero-meta span { font-size: 13px; color: var(--muted); }

/* stemma animato */
.badge-wrap { position: relative; display: grid; place-items: center; perspective: 1100px; }
.badge {
  --rx: 0deg; --ry: 0deg;
  position: relative; width: min(520px, 90vw); aspect-ratio: 1; display: grid; place-items: center;
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d;
  transition: transform .25s ease-out;
}
.badge-logo { position: relative; width: 74%; transform: translateZ(60px); animation: float 6s ease-in-out infinite; }
.badge-logo img { width: 100%; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .6)) drop-shadow(0 0 30px rgba(224, 178, 90, .25)); }
.shine {
  position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: url(img/logo.webp) center / contain no-repeat; mask: url(img/logo.webp) center / contain no-repeat;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 246, 214, .0) 42%, rgba(255, 246, 214, .75) 50%, rgba(255, 246, 214, 0) 58%, transparent 62%);
  background-size: 300% 100%; mix-blend-mode: overlay;
  animation: shine 5s ease-in-out infinite;
}
@keyframes shine { 0%, 35% { background-position: 120% 0 } 75%, 100% { background-position: -20% 0 } }
@keyframes float { 0%, 100% { transform: translateZ(60px) translateY(0) } 50% { transform: translateZ(60px) translateY(-14px) } }
.halo {
  position: absolute; inset: 6%; border-radius: 50%; transform: translateZ(-40px);
  background: conic-gradient(from 0deg, transparent 0 20%, rgba(224, 178, 90, .55) 30%, transparent 40% 70%, rgba(47, 107, 255, .5) 80%, transparent 90%);
  -webkit-mask: radial-gradient(circle, transparent 64%, #000 65%, #000 66.5%, transparent 67.5%);
  mask: radial-gradient(circle, transparent 64%, #000 65%, #000 66.5%, transparent 67.5%);
  animation: spin 9s linear infinite;
}
.orbit { position: absolute; inset: 0; width: 100%; height: 100%; transform: translateZ(-20px); animation: spin 40s linear infinite reverse; }
.orbit text { fill: rgba(224, 178, 90, .55); stroke: none; font: 600 15.5px var(--head); letter-spacing: 4.4px; }
@keyframes spin { to { rotate: 360deg } }
.siren { position: absolute; width: 55%; aspect-ratio: 1; border-radius: 50%; filter: blur(70px); opacity: .0; transform: translateZ(-80px); }
.siren.red { background: var(--red); left: 0; top: 10%; animation: sirenA 2.4s infinite; }
.siren.blue { background: var(--blue); right: 0; top: 10%; animation: sirenB 2.4s infinite; }
@keyframes sirenA { 0%, 100% { opacity: .5 } 12% { opacity: .12 } 24% { opacity: .5 } 50%, 90% { opacity: .08 } }
@keyframes sirenB { 0%, 40% { opacity: .1 } 50% { opacity: .55 } 62% { opacity: .15 } 74% { opacity: .55 } 90% { opacity: .1 } }
.badge-floor { width: 50%; height: 30px; margin-top: -20px; border-radius: 50%; background: radial-gradient(closest-side, rgba(224, 178, 90, .25), transparent); filter: blur(6px); animation: floor 6s ease-in-out infinite; }
@keyframes floor { 50% { transform: scaleX(.8); opacity: .6 } }

.scroll-hint { position: absolute; left: 50%; bottom: 26px; translate: -50% 0; width: 26px; height: 42px; border: 2px solid rgba(255, 255, 255, .25); border-radius: 14px; }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--gold); animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(-4px) } 30% { opacity: 1 } 100% { opacity: 0; transform: translateY(12px) } }

/* nastro */
.tape { position: relative; overflow: hidden; padding: 14px 0; transform: rotate(-2deg) scale(1.04); margin: 10px 0 40px;
  background: repeating-linear-gradient(135deg, #f2c94c 0 34px, #1b1404 34px 52px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
.tape::before { content: ''; position: absolute; inset: 7px 0; background: #f2c94c; }
.tape-track { position: relative; display: flex; width: max-content; animation: tape 40s linear infinite; }
.tape-track span { font: 700 18px/1 var(--head); letter-spacing: .25em; color: #120d02; padding: 0 22px; white-space: nowrap; }
.tape-track span::after { content: '◆'; margin-left: 44px; font-size: 10px; vertical-align: middle; }
@keyframes tape { to { transform: translateX(-50%) } }

/* valori */
.values { width: min(1180px, calc(100% - 32px)); margin: 60px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.value { padding: 30px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line2); position: relative; overflow: hidden; transition: transform .35s, border-color .35s; }
.value::before { content: ''; position: absolute; inset: -1px; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(224, 178, 90, .14), transparent 45%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.value:hover { transform: translateY(-6px); border-color: var(--line); }
.value:hover::before { opacity: 1; }
.v-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; color: var(--gold); background: rgba(224, 178, 90, .08); border: 1px solid var(--line); margin-bottom: 18px; }
.value h3 { margin: 0 0 8px; font: 700 22px/1.2 var(--head); letter-spacing: .04em; text-transform: uppercase; }
.value p { margin: 0; color: var(--muted); }

/* ================= SEZIONI ================= */
.section { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 130px 0 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 50px; }
.kicker { display: inline-block; font: 600 13px/1 var(--head); letter-spacing: .3em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
.kicker::before, .kicker::after { content: '—'; margin: 0 10px; opacity: .5; }
h2 { margin: 0; font: 700 clamp(38px, 5vw, 64px)/1 var(--head); text-transform: uppercase; letter-spacing: .01em; }
.section-head p { color: var(--muted); font-size: 17px; margin: 18px 0 0; }

/* ================= BANDI ================= */
.apply { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; position: relative; }
.steps { list-style: none; margin: 0; padding: 0; position: sticky; top: 100px; display: flex; flex-direction: column; gap: 6px; counter-reset: s; }
.steps li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; color: var(--muted); font-size: 14px; font-weight: 500; position: relative; transition: background .3s, color .3s; cursor: default; }
.steps li.clickable { cursor: pointer; }
.steps li.clickable:hover { background: rgba(255, 255, 255, .03); }
.steps li::before { counter-increment: s; content: counter(s); width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; font: 700 14px var(--head); border: 1px solid var(--line2); background: rgba(255, 255, 255, .03); transition: all .3s; }
.steps li:not(:last-child)::after { content: ''; position: absolute; left: 30px; top: 48px; width: 2px; height: 14px; background: var(--line2); }
.steps li.active { color: #fff; background: var(--panel); }
.steps li.active::before { background: var(--gold-grad); color: #1a1205; border-color: transparent; box-shadow: 0 0 20px rgba(224, 178, 90, .45); }
.steps li.done { color: #cfd5e4; }
.steps li.done::before { content: '✓'; color: var(--gold); border-color: var(--line); background: rgba(224, 178, 90, .08); }

.apply-card { margin: 0; padding: 30px 34px 30px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line2); position: relative; overflow: hidden; min-width: 0;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .7); }
.apply-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .6; }
.apply-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; font-size: 12px; }
.file-no { font: 600 12px var(--head); letter-spacing: .2em; color: var(--muted); }
.file-no b { color: var(--gold); }
.saved { color: var(--muted); opacity: 0; transition: opacity .3s; }
.saved.show { opacity: 1; }
.bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .06); overflow: hidden; margin-bottom: 26px; }
.bar i { display: block; height: 100%; width: 0; background: var(--gold-grad); transition: width .5s cubic-bezier(.2, .9, .2, 1); box-shadow: 0 0 12px var(--gold); }

.step { border: 0; margin: 0; padding: 0; min-width: 0; display: none; }
.step.active { display: block; animation: stepIn .45s cubic-bezier(.2, .9, .2, 1); }
.step.back { animation-name: stepBack; }
@keyframes stepIn { from { opacity: 0; transform: translateX(30px) } to { opacity: 1; transform: none } }
@keyframes stepBack { from { opacity: 0; transform: translateX(-30px) } to { opacity: 1; transform: none } }
legend { font: 700 24px/1.2 var(--head); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 22px; padding: 0; display: flex; align-items: center; gap: 12px; }
.step-ico { font-size: 22px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: rgba(224, 178, 90, .08); border: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; position: relative; }
.field > span { font-size: 14px; font-weight: 500; color: #cdd4e6; }
.field.scenario > span { padding: 14px 16px; border-radius: 12px; background: rgba(47, 107, 255, .07); border-left: 3px solid var(--blue); line-height: 1.55; }
.field.scenario b { display: block; font: 700 13px var(--head); letter-spacing: .15em; text-transform: uppercase; color: #8fb0ff; margin-bottom: 4px; }
.field.scenario i { color: #d5dbea; }
.field input, .field textarea {
  width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(3, 7, 18, .5);
  color: var(--text); font: inherit; font-size: 15px; outline: 0; resize: vertical; transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input::placeholder, .field textarea::placeholder { color: #5d6782; }
.field input:focus, .field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(224, 178, 90, .12); background: rgba(3, 7, 18, .7); }
.field input[type=number] { -moz-appearance: textfield; }
.field input::-webkit-outer-spin-button, .field input::-webkit-inner-spin-button { -webkit-appearance: none; }
.field .count { align-self: flex-end; font-size: 12px; color: var(--muted); margin-top: -2px; }
.field .count.ok { color: var(--ok); }
.err { display: none; color: var(--err); font-size: 13px; }
.field.bad input, .field.bad textarea { border-color: var(--err); box-shadow: 0 0 0 4px rgba(255, 93, 108, .1); }
.field.bad .err, .err.show { display: block; }
.field.bad { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-5px) } 40%, 80% { transform: translateX(5px) } }
.help { margin-top: -4px; font-size: 14px; color: var(--muted); border-radius: 12px; border: 1px solid var(--line2); padding: 12px 16px; }
.help summary { cursor: pointer; color: #b9c2d9; font-weight: 500; }
.help p { margin: 10px 0 0; }
.help b { color: var(--text); }

.recap { display: grid; gap: 12px; margin-bottom: 22px; }
.recap-block { border: 1px solid var(--line2); border-radius: 14px; overflow: hidden; }
.recap-block h5 { margin: 0; padding: 10px 16px; font: 600 13px var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); background: rgba(224, 178, 90, .06); display: flex; justify-content: space-between; align-items: center; }
.recap-block h5 button { background: none; border: 0; color: var(--muted); cursor: pointer; font: 500 12px var(--body); letter-spacing: 0; text-transform: none; }
.recap-block h5 button:hover { color: #fff; }
.recap-block dl { margin: 0; padding: 8px 16px 12px; display: grid; grid-template-columns: 190px 1fr; gap: 6px 16px; font-size: 14px; }
.recap-block dt { color: var(--muted); }
.recap-block dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 7.5em; overflow: hidden; -webkit-mask: linear-gradient(#000 70%, transparent); mask: linear-gradient(#000 70%, transparent); }
.recap-block dd.short { -webkit-mask: none; mask: none; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 15px; padding: 14px 16px; border-radius: 12px; background: rgba(224, 178, 90, .05); border: 1px solid var(--line); }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box { width: 22px; height: 22px; flex: none; border-radius: 7px; border: 2px solid var(--gold); display: grid; place-items: center; transition: background .2s; margin-top: 1px; }
.check input:checked + .box { background: var(--gold-grad); }
.check input:checked + .box::after { content: '✓'; color: #1a1205; font-weight: 800; font-size: 14px; }
.check input:focus-visible + .box { box-shadow: 0 0 0 4px rgba(224, 178, 90, .25); }
.check a { color: var(--gold2); text-decoration: underline; text-underline-offset: 3px; }
#errRegolamento { margin-top: 8px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }

.form-msg { display: none; margin: 18px 0 0; padding: 12px 16px; border-radius: 12px; font-size: 14px; background: rgba(255, 93, 108, .1); border: 1px solid rgba(255, 93, 108, .35); color: #ffc2c8; }
.form-msg.show { display: block; }
.actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line2); }
.actions #next, .actions .btn-send { margin-left: auto; }
.btn-send { min-width: 210px; }
.btn-send.loading span { opacity: 0; }
.btn-send.loading svg { opacity: 0; }
.btn-send.loading::before { content: ''; position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(26, 18, 5, .25); border-top-color: #1a1205; animation: spin .8s linear infinite; }

.done, .closed { grid-column: 2; text-align: center; padding: 60px 30px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); position: relative; overflow: hidden; }
.done img { width: 90px; margin: 0 auto 18px; }
.done h3, .closed h3 { margin: 0 0 10px; font: 700 30px var(--head); text-transform: uppercase; }
.done p, .closed p { color: var(--muted); max-width: 480px; margin: 0 auto 26px; }
.done p b { color: var(--gold2); }
.stamp { position: absolute; top: 34px; right: -6px; transform: rotate(14deg); font: 700 26px/1 var(--head); letter-spacing: .25em; color: var(--ok); border: 4px solid var(--ok); padding: 10px 18px; border-radius: 10px; opacity: .85; animation: stamp .55s .2s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes stamp { from { transform: rotate(14deg) scale(2.6); opacity: 0 } to { transform: rotate(14deg) scale(1); opacity: .85 } }
.closed-ico { font-size: 44px; margin-bottom: 10px; }
.apply.is-closed .steps, .apply.is-done .steps { opacity: .35; pointer-events: none; }

/* ================= DISCORD ================= */
.dc { position: relative; border-radius: 30px; padding: 90px 30px; overflow: hidden; text-align: center; isolation: isolate;
  background: radial-gradient(120% 120% at 50% 0%, #2a2f8f 0%, #141a4a 45%, #0a0e26 100%); border: 1px solid rgba(88, 101, 242, .35); }
.dc-glow { position: absolute; inset: 0; z-index: -1; background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 30%), rgba(88, 101, 242, .45), transparent 50%); transition: background .1s; }
.dc-rings { position: absolute; left: 50%; top: 110px; z-index: -1; }
.dc-rings i { position: absolute; left: -60px; top: -60px; width: 120px; height: 120px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); animation: ring 4.5s linear infinite; }
.dc-rings i:nth-child(2) { animation-delay: 1.5s; }
.dc-rings i:nth-child(3) { animation-delay: 3s; }
@keyframes ring { from { transform: scale(.6); opacity: .8 } to { transform: scale(7); opacity: 0 } }
.dc-logo { width: 84px; height: 64px; color: #fff; stroke: none; margin: 0 auto 26px; display: block; filter: drop-shadow(0 0 30px rgba(88, 101, 242, .9)); animation: bob 3.5s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-4deg) } }
.kicker.light { color: #aab2ff; }
.dc h2 em { background: linear-gradient(180deg, #fff, #aab2ff); -webkit-background-clip: text; background-clip: text; }
.dc p { color: #c5cbf5; max-width: 520px; margin: 18px auto 0; font-size: 17px; }
.dc-stats { display: flex; justify-content: center; gap: 22px; margin-top: 22px; font-size: 14px; color: #c5cbf5; }
.dc-stats[hidden] { display: none; }
.dc-stats span { display: flex; align-items: center; gap: 8px; }
.dc-stats i { width: 9px; height: 9px; border-radius: 50%; background: #80848e; }
.dc-stats i.on { background: #23a55a; box-shadow: 0 0 10px #23a55a; }
.dc-stats b { color: #fff; }
.dc-btn { position: relative; display: inline-block; margin-top: 38px; padding: 2px; border-radius: 18px; overflow: hidden; transition: transform .25s; }
.dc-btn-border { position: absolute; inset: -150%; background: conic-gradient(from 0deg, transparent 0 60%, #fff 75%, #aab2ff 85%, transparent 100%); animation: spin 3s linear infinite; }
.dc-btn-inner { position: relative; display: flex; align-items: center; gap: 14px; height: 66px; padding: 0 34px; border-radius: 16px; background: var(--blurple); color: #fff; font: 700 18px var(--head); letter-spacing: .06em; text-transform: uppercase; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); transition: background .3s; }
.dc-btn-inner > svg:first-child { width: 30px; height: 24px; fill: #fff; stroke: none; }
.dc-btn .arrow { transition: transform .3s; }
.dc-btn:hover { transform: translateY(-3px) scale(1.03); }
.dc-btn:hover .dc-btn-inner { background: #4752e8; }
.dc-btn:hover .arrow { transform: translateX(5px); }
.dc-btn.off { pointer-events: none; filter: grayscale(.7); opacity: .7; }

/* ================= FOOTER ================= */
.foot { width: min(1180px, calc(100% - 32px)); margin: 130px auto 0; padding: 36px 0 40px; border-top: 1px solid var(--line2); display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; }
.foot-brand { display: flex; align-items: center; gap: 14px; }
.foot-brand img { width: 48px; }
.foot-brand b { display: block; font: 700 16px var(--head); letter-spacing: .06em; text-transform: uppercase; }
.foot-brand span { color: var(--muted); font-size: 13px; }
.foot nav { display: flex; gap: 22px; color: var(--muted); font-size: 14px; }
.foot nav a:hover { color: #fff; }
.foot-note { grid-column: 1 / -1; margin: 0; color: #5d6782; font-size: 13px; }

.to-top { position: fixed; right: 22px; bottom: 22px; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: rgba(13, 22, 46, .85); border: 1px solid var(--line); color: var(--gold); z-index: 40; opacity: 0; transform: translateY(20px); transition: opacity .3s, transform .3s; backdrop-filter: blur(10px); }
.to-top.show { opacity: 1; transform: none; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 30px); padding: 12px 20px; border-radius: 12px; background: #111a33; border: 1px solid var(--line); font-size: 14px; z-index: 90; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* comparsa allo scroll */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s cubic-bezier(.2, .9, .2, 1), transform .9s cubic-bezier(.2, .9, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.values .reveal:nth-child(2) { transition-delay: .1s; }
.values .reveal:nth-child(3) { transition-delay: .2s; }

/* ================= RESPONSIVE ================= */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 110px; gap: 10px; }
  .badge-wrap { order: -1; }
  .badge { width: min(380px, 84vw); }
  .lead { margin-left: auto; margin-right: auto; }
  .hero-cta, .hero-meta { justify-content: center; }
  .eyebrow { margin-bottom: 18px; }
  .scroll-hint { display: none; }
  .values { grid-template-columns: 1fr; }
  .apply { grid-template-columns: 1fr; }
  .steps { position: relative; top: 0; flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .steps li { flex: none; padding: 8px 10px; }
  .steps li span { display: none; }
  .steps li.active span { display: inline; }
  .steps li::after { display: none; }
  .done, .closed { grid-column: 1; }
}
@media (max-width: 760px) {
  .nav { gap: 10px; }
  .nav-links { position: absolute; top: calc(100% + 8px); left: 0; right: 0; flex-direction: column; padding: 10px; border-radius: 16px; background: rgba(8, 14, 30, .96); border: 1px solid var(--line); opacity: 0; pointer-events: none; transform: translateY(-8px); transition: opacity .25s, transform .25s; }
  .nav.open .nav-links { opacity: 1; pointer-events: auto; transform: none; }
  .nav-links a { padding: 14px; }
  .nav-right { margin-left: auto; }
  .status { display: none; }
  .burger { display: block; }
  .hero-meta { gap: 20px; }
  .eyebrow { font-size: 11px; letter-spacing: .12em; padding: 8px 12px; }
  .hero-meta b { font-size: 22px; }
  .row { grid-template-columns: 1fr; gap: 0; }
  .apply-card { padding: 22px 18px; }
  legend { font-size: 20px; }
  .recap-block dl { grid-template-columns: 1fr; gap: 2px; }
  .recap-block dt { margin-top: 8px; }
  .actions { flex-wrap: wrap; }
  .actions .btn { flex: 1; }
  .btn-send { min-width: 0; }
  .dc { padding: 70px 18px; }
  .dc-btn-inner { height: 58px; padding: 0 20px; font-size: 15px; }
  .foot { grid-template-columns: 1fr; }
  .tape-track span { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
