/* Tokens — named to map 1:1 onto a Tailwind v4 @theme for the Next.js port */
:root {
  --ink: #0a0a0a;
  --ink-2: #131313;
  --ink-3: #1c1b1b;
  --blood: #b3152b;
  --red: #d71d36;
  --bone: #efe9df;
  --ash: #8a8580;
  --line: rgba(239, 233, 223, .14);
  --display: "Anton", "Impact", sans-serif;
  --body: "Inter Tight", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --checker: conic-gradient(var(--red) 25%, var(--bone) 0 50%, var(--red) 0 75%, var(--bone) 0) 0 0 / var(--sq, 28px) var(--sq, 28px);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }
html { background: var(--ink); }
body {
  background: var(--ink);
  color: var(--bone);
  font: 400 clamp(16px, 1.1vw, 18px)/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; line-height: .9; letter-spacing: .005em; }
h2 { font-size: clamp(48px, 8vw, 132px); }
h3 { font-size: clamp(26px, 2.6vw, 40px); }
::selection { background: var(--red); color: var(--bone); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.kicker, .stamp { font: 700 12px/1.4 var(--mono); letter-spacing: .18em; text-transform: uppercase; }
.kicker { color: var(--red); margin-bottom: 18px; }
.kicker::before { content: ""; display: inline-block; width: 28px; height: 2px; background: currentColor; vertical-align: middle; margin-right: 12px; }
.stamp i { font-style: normal; color: var(--red); padding: 0 .5em; }
.muted { color: var(--ash); }

/* Buttons */
.btn {
  --s: 1;
  display: inline-flex; align-items: center; gap: .6em;
  padding: 18px 30px;
  background: var(--red); color: var(--bone);
  font: 400 22px/1 var(--display); text-transform: uppercase; letter-spacing: .04em; text-decoration: none;
  border: 0; cursor: pointer; white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  transform: scale(var(--s));
  transition: transform .35s cubic-bezier(.2, 1.6, .4, 1), background .2s;
}
.btn:hover { --s: 1.04; background: var(--blood); }
.btn:active { --s: .96; }
.btn span { transition: transform .3s; }
.btn:hover span { transform: translateX(5px); }
.btn--sm { padding: 12px 18px; font-size: 17px; }
.btn--block { width: 100%; justify-content: center; }

/* Top bar */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 16px var(--gutter);
  background: linear-gradient(var(--ink) 0%, transparent 100%);
}
.bar__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font: 400 12px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ash); }
.bar__brand b { color: var(--bone); font-weight: 700; display: block; }
.bar__brand img { width: 40px; height: auto; }
.bar__nav { display: flex; gap: 28px; margin-left: auto; }
.bar__nav a { font: 700 12px var(--mono); letter-spacing: .18em; text-transform: uppercase; text-decoration: none; color: rgba(239,233,223,.8); transition: color .2s; }
.bar__nav a:hover { color: var(--red); }

/* HERO */
.hero { position: relative; }
.hero__stage { position: relative; height: 100svh; min-height: 640px; overflow: hidden; isolation: isolate; }
.hero__stage > * { position: absolute; }
.hero__bg { inset: -6%; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; filter: saturate(1.1) contrast(1.05); }

.hero__word {
  inset: max(12%, 96px) 0 auto; display: grid; place-items: center;
  font: 400 clamp(120px, 27vw, 520px)/.8 var(--display); letter-spacing: -.01em; white-space: nowrap;
}
.hero__word > span { grid-area: 1 / 1; }
.hero__word-outline { color: transparent; -webkit-text-stroke: 2px rgba(239, 233, 223, .35); }
.hero__word-fill { color: var(--red); clip-path: inset(100% 0 0 0); mix-blend-mode: screen; }

.hero__fighter {
  left: 50%; bottom: 0; translate: -50% 0;
  height: 94%; aspect-ratio: 1408 / 2349;
  transform-origin: 50% 30%;
  /* the cutout ends at mid-thigh: fade it out so there is no hard edge (applies to img + WebGL canvas) */
  -webkit-mask-image: linear-gradient(#000 70%, rgba(0,0,0,.6) 84%, transparent 98%);
  mask-image: linear-gradient(#000 70%, rgba(0,0,0,.6) 84%, transparent 98%);
}
.hero__mirko, .hero__gl { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: bottom; }
.hero__gl { opacity: 0; transition: opacity .4s; }
.hero__fighter.is-gl .hero__gl { opacity: 1; }
.hero__fighter.is-gl .hero__mirko { opacity: 0; }

.hero__smoke {
  inset: auto -20% -8% -20%; height: 55%;
  background: url(assets/smoke.webp) center / cover;
  mix-blend-mode: screen; opacity: .55;
  mask-image: linear-gradient(transparent, #000 40%);
  pointer-events: none;
}
.hero__vignette {
  inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 45%, rgba(10,10,10,.85) 100%),
    linear-gradient(transparent 60%, var(--ink) 100%);
}

.hero__ui { left: var(--gutter); bottom: clamp(28px, 7vh, 72px); max-width: 640px; z-index: 5; }
.hero__ui .stamp { margin-bottom: 18px; }
.hero__title { font-size: clamp(56px, 6.4vw, 120px); line-height: 1; margin-bottom: 18px; white-space: nowrap; }
.hero__title .line { display: block; overflow: hidden; padding: .06em 0 .02em; margin: -.06em 0 -.02em; }
.hero__title .line > span { display: inline-block; }
.hero__title em { font-style: normal; color: var(--red); }
.hero__kicker { margin-bottom: 14px; }
.hero__title .line--sub { font-size: .42em; line-height: 1.05; margin-top: .1em; }
.hero__mod { font: 400 13px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ash); margin-bottom: 26px; }
.hero__cta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.seats { font: 400 13px/1.3 var(--mono); color: var(--ash); }
.seats b { color: var(--bone); font-weight: 700; }

.countdown { right: var(--gutter); bottom: clamp(28px, 7vh, 72px); z-index: 5; padding: 18px 22px 0; background: linear-gradient(rgba(10,10,10,.0), rgba(10,10,10,.55)); }
.countdown__label { display: flex; align-items: center; gap: 10px; font: 700 11px var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--ash); margin-bottom: 10px; }
.countdown__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(215,29,54,.6); animation: pulse 1s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(215,29,54,.6); } 100% { box-shadow: 0 0 0 10px rgba(215,29,54,0); } }
.countdown__row { display: flex; align-items: flex-start; gap: 10px; }
.cd-unit { display: grid; justify-items: start; }
.cd-num { display: flex; font: 400 clamp(44px, 4.4vw, 72px)/1 var(--display); font-variant-numeric: tabular-nums; }
.cd-d { position: relative; display: block; width: .56em; height: 1em; overflow: hidden; }
.cd-d > span { position: absolute; inset: 0; text-align: center; }
.cd-unit:last-child .cd-num { color: var(--red); }
.cd-unit small { font: 400 10px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ash); margin-top: 6px; }
.cd-sep { font: 400 clamp(32px, 3.2vw, 52px)/1.2 var(--display); font-style: normal; color: var(--red); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .25; } }
.countdown__bar { height: 3px; margin-top: 16px; background: rgba(239,233,223,.12); }
.countdown__bar span { display: block; height: 100%; width: 100%; background: var(--red); transform-origin: 0 50%; transform: scaleX(0); }

.scroll-cue { left: 50%; bottom: 18px; translate: -50% 0; z-index: 5; font: 400 10px var(--mono); letter-spacing: .3em; text-transform: uppercase; color: var(--ash); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.scroll-cue span { width: 1px; height: 36px; background: linear-gradient(var(--red), transparent); animation: cue 1.6s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

.checker-wipe {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 10; pointer-events: none;
  display: grid; grid-template-columns: repeat(8, 1fr);
}
.checker-wipe i { aspect-ratio: 1; background: var(--red); transform: scale(0); }
.checker-wipe i:nth-child(16n+2), .checker-wipe i:nth-child(16n+4), .checker-wipe i:nth-child(16n+6), .checker-wipe i:nth-child(16n+8),
.checker-wipe i:nth-child(16n+9), .checker-wipe i:nth-child(16n+11), .checker-wipe i:nth-child(16n+13), .checker-wipe i:nth-child(16n+15) { background: var(--bone); }

/* MANIFESTO */
.manifesto { padding: clamp(120px, 22vh, 240px) var(--gutter) clamp(80px, 14vh, 160px); text-align: center; position: relative; }
.manifesto__quote { font: 400 clamp(44px, 7.2vw, 128px)/.92 var(--display); text-transform: uppercase; max-width: 15ch; margin: 0 auto 28px; }
.manifesto__by { font: 400 13px var(--mono); color: var(--ash); letter-spacing: .1em; }

/* split reveal */
.split-word-mask { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; }
.split-word { display: inline-block; }

/* PROGRAM */
.section-head { padding: 0 var(--gutter) 64px; }
.program { padding-bottom: 20vh; }
.rounds { padding: 0 var(--gutter); display: grid; gap: 4vh; }
.round {
  position: sticky; top: 14vh;
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: clamp(20px, 5vw, 80px);
  min-height: 52vh; padding: clamp(28px, 4vw, 64px);
  background: var(--ink-2); border: 1px solid var(--line);
  transform-origin: 50% 0;
  overflow: hidden;
}
.round::after { content: ""; position: absolute; right: 0; top: 0; width: 84px; height: 84px; background: var(--checker); --sq: 21px; opacity: .9; clip-path: polygon(100% 0, 100% 100%, 0 0); }
.round:nth-child(2) { background: var(--ink-3); }
.round:nth-child(3) { background: #201010; }
.round:nth-child(4) { background: var(--blood); }
.round__no { font: 400 clamp(120px, 20vw, 320px)/.8 var(--display); color: transparent; -webkit-text-stroke: 2px var(--red); }
.round:nth-child(4) .round__no { -webkit-text-stroke-color: var(--bone); }
.round__time { font: 700 14px var(--mono); color: var(--red); letter-spacing: .2em; margin-bottom: 12px; }
.round:nth-child(4) .round__time { color: var(--bone); }
.round h3 { margin-bottom: 14px; }
.round p:last-child { max-width: 46ch; color: rgba(239,233,223,.78); }

/* LEGENDA */
.legend { position: relative; background: var(--bone); color: var(--ink); }
.legend__pin { height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.legend__head { padding: 0 var(--gutter); margin-bottom: 5vh; }
.legend__head em { font-style: normal; color: var(--red); }
.legend__track { display: flex; gap: 2vw; padding: 0 var(--gutter); width: max-content; }
.era { width: clamp(260px, 26vw, 400px); padding: 28px; border-top: 3px solid var(--ink); flex: none; }
.era--big { background: var(--ink); color: var(--bone); border-color: var(--red); }
.era__year { font: 700 13px var(--mono); letter-spacing: .14em; color: var(--red); margin-bottom: 16px; }
.era h3 { margin-bottom: 12px; }
.era p:last-child { font-size: 15px; opacity: .8; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(10,10,10,.15); }
.stats div { padding: 48px var(--gutter); border-right: 1px solid rgba(10,10,10,.15); }
.stats div:last-child { border-right: 0; }
.stats b { display: block; font: 400 clamp(64px, 9vw, 150px)/.9 var(--display); color: var(--red); font-variant-numeric: tabular-nums; }
.stats span { font: 700 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; }

/* REEL */
.reel { padding: 18vh var(--gutter); display: grid; justify-items: center; gap: 48px; }
.reel__frame { position: relative; width: min(100%, 1280px); aspect-ratio: 16 / 9; overflow: hidden; background: #000; clip-path: inset(18% 22%); }
.reel__frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 6%; transform: scale(1.25); filter: contrast(1.1) saturate(.9); }
.reel__scan { position: absolute; inset: 0; background: repeating-linear-gradient(transparent 0 3px, rgba(0,0,0,.25) 3px 4px); mix-blend-mode: multiply; }
.reel__label { position: absolute; left: 24px; top: 20px; font: 700 12px var(--mono); letter-spacing: .2em; display: flex; align-items: center; gap: 10px; }
.rec { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: rec 1s steps(2) infinite; }
@keyframes rec { 50% { opacity: 0; } }
.reel__caption { font: 400 clamp(32px, 4.4vw, 72px)/.95 var(--display); text-transform: uppercase; text-align: center; max-width: 20ch; }

/* SIGNUP */
.signup { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 120px); padding: 14vh var(--gutter); background: var(--ink-2); position: relative; }
.signup::before { content: ""; position: absolute; inset: 0 0 auto; height: 8px; background: var(--checker); --sq: 16px; }
.signup h2 { margin-bottom: 24px; }
.signup__intro > p:not(.kicker):not(.seats) { max-width: 44ch; color: rgba(239,233,223,.8); margin-bottom: 36px; }
.meter { height: 10px; background: rgba(239,233,223,.08); margin-bottom: 14px; }
.meter span { display: block; height: 100%; width: 0; background: var(--red); }
.seats--big { font-size: 16px; }
.seats--big b { font: 400 40px var(--display); color: var(--red); }

.form { display: grid; gap: 20px; align-content: start; position: relative; }
.field label { display: block; font: 700 11px var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--ash); margin-bottom: 8px; }
.field small { font-weight: 400; letter-spacing: 0; text-transform: none; }
.field input, .field select {
  width: 100%; padding: 16px 0; background: transparent; color: var(--bone);
  font: 500 20px var(--body); border: 0; border-bottom: 2px solid var(--line); border-radius: 0;
  transition: border-color .2s;
}
.field select { appearance: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23d71d36' stroke-width='2' fill='none'/%3E%3C/svg%3E") right center no-repeat; }
.field select option { background: var(--ink-2); }
.field input:focus, .field select:focus { outline: 0; border-color: var(--red); }
.field.is-bad input { border-color: var(--red); }
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.err { font: 400 12px var(--mono); color: var(--red); min-height: 1.2em; margin-top: 6px; }
.form__note { font: 400 11px var(--mono); color: var(--ash); text-align: center; }
.form__ok { position: absolute; inset: 0; display: grid; align-content: center; gap: 14px; background: var(--ink-2); }
.form__ok[hidden] { display: none; }
.form__ok .stamp { color: var(--red); }
.form__ok h3 { font-size: clamp(40px, 5vw, 80px); }

/* VENUE */
.venue { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 5vw, 96px); padding: 16vh var(--gutter); align-items: center; }
.venue h2 { margin-bottom: 20px; }
.venue .stamp { margin-bottom: 20px; color: var(--ash); }
.venue__info > p:last-child { max-width: 44ch; color: rgba(239,233,223,.8); }
.venue__map { aspect-ratio: 4 / 3; border: 1px solid var(--line); overflow: hidden; }
.venue__map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(1) invert(.92) contrast(.9); }

/* FAQ */
.faq { padding: 8vh var(--gutter) 16vh; max-width: 1100px; }
.faq h2 { margin-bottom: 40px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 24px 48px 24px 0; position: relative; font: 400 clamp(22px, 2.2vw, 32px)/1.1 var(--display); text-transform: uppercase; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; translate: 0 -50%; font-family: var(--mono); color: var(--red); font-size: 28px; transition: rotate .3s; }
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { padding: 0 0 24px; max-width: 60ch; color: rgba(239,233,223,.8); }

/* SPONSORS */
.sponsors { padding: 0 var(--gutter) 12vh; text-align: center; }
.checker-strip { height: 28px; background: var(--checker); margin: 0 calc(-1 * var(--gutter)) 12vh; }
.sponsors ul { list-style: none; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: clamp(24px, 5vw, 72px); }
.sponsors li { font: 400 clamp(22px, 2.4vw, 34px) var(--display); color: var(--ash); opacity: .55; transition: color .25s, opacity .25s; }
.sponsors li:hover { color: var(--bone); opacity: 1; }

/* FOOTER */
.foot { padding: 0 var(--gutter) 32px; overflow: hidden; }
.foot__giant { font: 400 26vw/.78 var(--display); color: var(--red); text-align: center; margin: 0 calc(-1 * var(--gutter)); letter-spacing: -.01em; }
.foot__row { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: 28px; border-top: 1px solid var(--line); font: 400 12px var(--mono); }

/* grain */
.grain {
  position: fixed; inset: -50%; z-index: 100; pointer-events: none; opacity: .07;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain .9s steps(6) infinite;
}
@keyframes grain { 0%,100% { transform: translate(0,0); } 20% { transform: translate(-4%,3%); } 40% { transform: translate(3%,-5%); } 60% { transform: translate(-6%,-2%); } 80% { transform: translate(5%,4%); } }


/* mobile sticky CTA */
.sticky-cta { display: none; }

@media (max-width: 860px) {
  .sticky-cta { display: flex; justify-content: center; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 55; transform: translateY(140%); transition: transform .4s cubic-bezier(.2,.8,.2,1); }
  .sticky-cta.is-on { transform: none; }
}

/* Mobile */
@media (max-width: 860px) {
  .bar__nav { display: none; }
  .bar__brand span { display: none; }
  .hero__fighter { height: 78%; bottom: 14%; }
  .hero__word { inset: 14% 0 auto; }
  .hero__ui { right: var(--gutter); bottom: 150px; }
  .hero__title { font-size: 12.5vw; }
  .hero__mod { font-size: 11px; margin-bottom: 18px; }
  .hero__ui { text-shadow: 0 2px 14px rgba(0,0,0,.85); }
  .hero__ui .stamp { font-size: 10.5px; letter-spacing: .1em; white-space: nowrap; }
  .countdown { left: 0; right: 0; bottom: 0; padding: 14px var(--gutter) 0; }
  .countdown__row { justify-content: space-between; }
  .cd-num { font-size: 40px; }
  .cd-sep { font-size: 30px; }
  .scroll-cue { display: none; }
  .round { grid-template-columns: 1fr; min-height: 0; gap: 8px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats div:nth-child(2) { border-right: 0; }
  .signup, .venue { grid-template-columns: 1fr; }
  .legend__track { gap: 4vw; }
  .era { width: 78vw; padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .grain, .scroll-cue span, .rec, .countdown__dot, .cd-sep { animation: none; }
  .hero__word-fill { clip-path: none; opacity: .25; }
  .reel__frame { clip-path: none; }
  .checker-wipe { display: none; }
}
