@font-face {
  font-family: Anton;
  src: url("./fonts/anton-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

[data-race-screen] {
  --race-gutter: clamp(24px, 5.8vw, 110px);
  --race-ink: #080913;
  --race-silver: #c2c9d8;
  isolation: isolate;
  background: var(--race-ink);
  color: white;
  font: 16px/1.5 var(--body);
}
[data-race-screen] *, [data-race-screen] *::before, [data-race-screen] *::after { box-sizing: border-box; }
[data-race-screen] [hidden] { display: none !important; }

.race-scene { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.race-picture {
  position: absolute;
  inset: -3%;
  background: #080913 center / cover no-repeat;
}
.film-player { position: relative; overflow: hidden; container-type: size; pointer-events: none; }
.film-player > iframe, .film-player > video {
  display: block; position: absolute; border: 0; pointer-events: none; opacity: 0;
}
.film-player > iframe {
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: var(--frame-width, 100%); height: var(--frame-height, 100%);
}
.film-player > video { inset: 0; width: 100%; height: 100%; object-fit: var(--film-fit, contain); }
.film-player[data-ready] > :is(iframe, video) { opacity: 1; }
.film-cover {
  --film-fit: cover;
  --frame-width: max(100cqw, calc(100cqh * var(--film-ratio)));
  --frame-height: max(100cqh, calc(100cqw / var(--film-ratio)));
}
.race-picture > .film-player { width: 100%; height: 100%; }
.race-picture::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, #070810dc, #07081030 53%, transparent 76%),
    linear-gradient(0deg, #080913db, transparent 32%, transparent 72%, #08091391);
}
.race-scene > canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#waitlist-dialog .race-picture, #waitlist-dialog .race-scene > canvas { display: none; }
.waitlist-glass { position: absolute; inset: 0; background: var(--race-ink) center / cover no-repeat; }
#waitlist-dialog[open] .waitlist-glass { background-image: url("./waitlist-glass-still.webp"); }
.waitlist-glass::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 36% 66% at center, #080913b8, #08091352 65%, transparent),
    linear-gradient(180deg, #06061055, transparent 23%, transparent 80%, #06061052);
}
.waitlist-glass canvas { display: block; width: 100%; height: 100%; opacity: 0; }
.waitlist-glass canvas[data-ready] { opacity: 1; }
.race-layout {
  position: relative; display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100dvh;
  padding: max(18px, env(safe-area-inset-top)) max(var(--race-gutter), env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(var(--race-gutter), env(safe-area-inset-left));
}
.race-bar, .race-tools, .race-meta { display: flex; align-items: center; justify-content: space-between; }
.race-bar { min-height: 58px; gap: 14px; }
.race-bar a { display: inline-flex; }
.waitlist-home { min-height: 44px; align-items: center; }
.race-logo { display: block; width: clamp(78px, 7.3vw, 115px); height: auto; }
.race-tools { gap: 12px; }
.motion-control, .waitlist-close, .boost-control {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid #ffffff52; background: #0c0e1bdc; color: white;
  font: 700 13px/1.2 var(--body);
}
.motion-control:hover, .waitlist-close:hover { border-color: white; background: #1b1a29; }
.motion-symbol { width: 10px; height: 12px; border-inline: 3px solid currentColor; }
[data-motion="paused"] .motion-symbol {
  width: 0; height: 0; border: solid transparent; border-width: 6px 0 6px 9px; border-left-color: white;
}
[data-race-screen] :is(button, a, input):focus-visible {
  outline: 3px solid #ff9fe1; outline-offset: 4px;
}
.race-location, .waitlist-step {
  margin: 0; font-size: 11px; font-weight: 700; line-height: 1.4;
  letter-spacing: .13em; text-transform: uppercase;
}
.race-location { display: inline-flex; align-items: center; gap: 11px; }
.race-checks {
  width: 32px; height: 16px; flex: none; transform: skewX(-15deg);
  background: repeating-conic-gradient(var(--pink) 0 25%, transparent 0 50%) 0 0 / 16px 16px;
}

/* The native dialog owns the scene, keyboard focus and Escape handling. */
#waitlist-dialog {
  position: fixed; inset: 0; box-sizing: border-box; margin: 0; padding: 0; border: 0;
  width: 100%; max-width: none; height: 100%; height: 100dvh; max-height: none;
  overflow: auto; overscroll-behavior: contain;
}
#waitlist-dialog::backdrop { background: var(--race-ink, #080913); }
html:has(#waitlist-dialog[open]) { overflow: hidden; }
.waitlist-close { width: 44px; padding: 0; font: 400 27px/1 var(--body); }
#waitlist-dialog .race-layout {
  /* Equal outer rows keep the form centered in the viewport. */
  display: grid; grid-template-rows: 60px minmax(0, 1fr) 60px;
  height: 100%; min-height: 400px;
  padding-block: max(20px, env(safe-area-inset-top), env(safe-area-inset-bottom));
}
#waitlist-dialog .race-bar { align-self: start; }
.waitlist-floor { display: grid; grid-template-rows: minmax(0, 1fr); place-items: center; padding-block: 16px; }
.waitlist-card {
  --card-gutter: clamp(23px, 2.8vw, 40px);
  display: grid; grid-template-rows: minmax(0, 1fr) auto;
  width: min(100%, clamp(375px, 37vw, 448px)); max-height: 100%; overflow: hidden;
  border: 1px solid #bac3e147; border-radius: 18px; border-top-color: #eca3d7a6;
  background: linear-gradient(140deg, #1a1827fa, #0b0c16f7 64%);
  box-shadow: 0 22px 80px #02020a88;
}
.waitlist-scroll {
  min-height: 0; overflow: hidden auto; overscroll-behavior: contain; scroll-padding-block: 12px;
  padding: var(--card-gutter) var(--card-gutter) 12px;
}
#waitlist-nitro:not(:empty) {
  margin-bottom: 18px; overflow: hidden; border-radius: 9px; background: #06060a;
}
.nitro-film { background: #06060a center / contain no-repeat; }
#waitlist-nitro .nitro-film {
  width: 100%; aspect-ratio: 4 / 3; background-image: url("./candynats-nitro-poster.jpg");
  max-height: clamp(112px, calc(100dvh - 600px), 260px);
}
#waitlist-nitro [role="status"] { margin: 0; padding: 16px; }
@media (min-width: 701px) {
  /* Give the film and the active fields room in the same card. */
  .waitlist-card:has(#waitlist-nitro:not(:empty)) {
    --card-gutter: clamp(18px, 2.8vh, 28px);
    width: min(100%, 510px);
  }
}
.waitlist-step { color: var(--race-silver); font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.waitlist-segments { display: flex; gap: 5px; margin: 16px 0 22px; }
.waitlist-segments i { flex: 1; height: 3px; background: #393849; transform: skewX(-20deg); }
.waitlist-segments i:first-child,
[data-stage="name"] .waitlist-segments i:nth-child(2),
[data-stage="mobile"] .waitlist-segments i { background: var(--pink); box-shadow: 0 0 10px #ff00815e; }
#waitlist-title, .finish-copy h1 {
  font-family: Anton, Impact, sans-serif; font-weight: 400; text-transform: uppercase;
  transform: skewX(-5deg); transform-origin: left bottom; text-wrap: balance;
}
#waitlist-title { margin: 0 0 24px; font-size: clamp(40px, 4vw, 57px); line-height: 1.05; }
#waitlist-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
#waitlist-form fieldset p { color: var(--race-silver); }
#waitlist-form label { font-size: 14px; font-weight: 700; }
#waitlist-form input:not([type=checkbox]) {
  width: 100%; min-height: 48px; border: 1px solid #616477; border-radius: 7px;
  background: #080a13; color: white; padding: 10px 12px; font: 16px var(--body);
}
#waitlist-form input:not([type=checkbox]):focus { border-color: #f087cd; }
#waitlist-form label.waitlist-consent {
  display: flex; align-items: start; gap: 11px; margin-top: 9px; font-weight: 400; line-height: 1.5;
}
.waitlist-consent input { width: 18px; height: 18px; flex: none; margin: 2px 0 0; accent-color: var(--pink); }
.waitlist-error:not(:empty) { color: var(--error); margin-top: 12px; }
.waitlist-actions { padding: 12px var(--card-gutter) var(--card-gutter); }
#waitlist-next {
  display: flex; width: 100%; --slide: 0px;
  background:
    linear-gradient(180deg, #2404370d, var(--next-shade, #17032e52)) padding-box,
    linear-gradient(100deg, var(--pink) 5%, var(--violet) 53%, var(--blue) 96%) border-box;
  box-shadow: inset 0 1px 0 #ffffff80, -2px 2px 9px #ff008180, 2px 2px 10px #003fff99;
}
#waitlist-next::before { inset: auto 3% -4px; height: 8px; filter: blur(5px); }
#waitlist-next .action-label {
  padding-inline: calc(var(--icon-size) + 12px);
  font: 400 22px/1 Anton, Impact, sans-serif;
  letter-spacing: .07em; text-align: center;
}
#waitlist-next:disabled .action-label { text-transform: uppercase; }
#waitlist-next:active { --next-shade: #0e114b99; }
.waitlist-options { display: flex; align-items: center; flex-wrap: wrap; gap: 0 18px; }
.waitlist-finish, .waitlist-restart {
  display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px;
  color: white; text-decoration: underline; text-underline-offset: 4px; font-size: 13px;
}
.waitlist-restart { padding: 0; background: transparent; border: 0; }

.finish-page { margin: 0; }
.finish-page .race-picture {
  background-image: url("./confirmed-wide-poster.jpg");
  background-position: center;
}
@media (max-width: 700px), (pointer: coarse) and (orientation: landscape) and (max-height: 550px) {
  .finish-page .race-picture {
    background-image: url("./confirmed-track-poster.jpg");
  }
}
.finish-page .race-layout { padding-block-end: max(32px, env(safe-area-inset-bottom)); }
.finish-main { flex: 1; display: flex; align-items: center; padding-block: clamp(36px, 9vh, 100px); }
.finish-copy { max-width: 56%; }
.finish-copy .race-location { font-size: 13px; letter-spacing: .22em; }
.finish-copy h1 {
  width: max-content; margin: 16px 0 24px; font-size: clamp(76px, 9.2vw, 170px);
  line-height: 1; letter-spacing: -.025em; color: #fff8fc; text-shadow: 3px 3px 0 #b60062, 0 6px 28px #05050bd9;
}
.finish-copy h2 { margin: 0 0 8px; font-size: clamp(24px, 2.2vw, 42px); line-height: 1.15; letter-spacing: -.035em; }
.finish-message { max-width: 36ch; margin: 0; color: #eef0f5; line-height: 1.55; text-wrap: pretty; }
.finish-faq { margin-right: auto; align-self: center; display: inline-flex; align-items: center; min-height: 44px; color: var(--paper); font-weight: 700; text-underline-offset: .2em; }
.finish-faq:is(:hover, :focus-visible) { color: #ff9dcd; }
.finish-rail { display: flex; justify-content: flex-end; padding-top: 18px; border-top: 1px solid #dbe1ef47; }
.boost-control {
  min-height: 48px; padding-inline: 21px; border-color: #ff77c7;
  background: #a00052; box-shadow: inset 0 0 14px #ff00816b, 0 0 24px #ff008140;
  font-size: 14px; text-decoration: none;
}
.boost-control:hover, .boost-control:active, [data-boosting] .boost-control {
  background: #b00062; border-color: #ffe1f2; box-shadow: 0 0 26px #ff008199;
}
.boost-stripes { display: flex; align-items: center; gap: 3px; margin-right: 2px; transform: skewX(-22deg); }
.boost-stripes i { width: 4px; height: 14px; background: #ff7cbb; }
.boost-stripes i:nth-child(2) { background: #ffafdb; }
.boost-stripes i:last-child, [data-boosting] .boost-stripes i { background: white; }
.waitlist-boost {
  border-color: #ffffff70; background: #10101bbd; box-shadow: none;
}

.nitro-player {
  position: fixed; inset: 0; box-sizing: border-box; margin: 0; padding: 0; border: 0;
  width: 100%; max-width: none; height: 100%; height: 100dvh; max-height: none;
  overflow: hidden; background: #06060a; color: #fff; font: 16px/1.5 var(--body);
}
.nitro-player[open] { display: grid; place-items: center; }
.nitro-player::backdrop { background: #06060a; }
html:has(.nitro-player[open]) { overflow: hidden; }
.nitro-player .nitro-film {
  width: 100%; height: 100%; min-height: 0; background-image: url("./candynats-nitro-portrait-poster.jpg");
}
@media (max-aspect-ratio: 9/16) {
  .nitro-player[data-portrait] .nitro-film {
    --film-fit: cover;
    --frame-width: max(100cqw, calc(100cqh * var(--film-ratio)));
    --frame-height: max(100cqh, calc(100cqw / var(--film-ratio)));
    background-size: cover;
  }
}
.nitro-player [hidden] { display: none; }
.nitro-player [role=status] { margin: 24px; text-align: center; }
.nitro-controls {
  position: absolute; z-index: 1; top: max(14px, env(safe-area-inset-top));
  left: max(16px, env(safe-area-inset-left)); right: max(16px, env(safe-area-inset-right));
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; pointer-events: none;
}
.nitro-controls button { padding-inline: 12px; background: #101018; pointer-events: auto; white-space: nowrap; }
.nitro-sound {
  border-color: #ff91cc; box-shadow: 0 2px 12px #0009; font-size: 14px;
}
.nitro-sound[data-initial-prompt] {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.nitro-sound svg { color: #ff91cc; }
.nitro-sound[data-muted] .sound-waves, .nitro-sound:not([data-muted]) .sound-cross { display: none; }
.nitro-dismiss { margin-inline-start: auto; }
.nitro-dismiss span { font-size: 20px; line-height: 1; }
.nitro-sound:focus-visible, .nitro-dismiss:focus-visible { outline: 3px solid #ff9fe1; outline-offset: 3px; }

@media (max-width: 700px) {
  [data-race-screen] { --race-gutter: clamp(16px, 5vw, 32px); }
  .race-layout { padding-block-start: max(10px, env(safe-area-inset-top)); }
  .race-bar { min-height: 50px; }
  .race-tools { gap: 8px; }
  .race-picture {
    inset: -2% -4% auto; height: clamp(220px, 47svh, 520px); background-position: 72% 58%;
    mask-image: linear-gradient(to bottom, black 76%, transparent);
  }
  .race-picture::after { background: linear-gradient(0deg, var(--race-ink) 0%, transparent 27%, transparent 73%, #08091385); }
  .race-scene > canvas { mask-image: linear-gradient(to bottom, black 38%, transparent 61%); }
  .finish-page .race-picture { height: clamp(260px, 55svh, 620px); }
  .finish-main { align-items: end; padding: clamp(180px, 34svh, 400px) 0 clamp(28px, 6svh, 60px); }
  .finish-copy { max-width: 100%; }
  .finish-copy h1 { font-size: clamp(64px, 16vw, 105px); margin: 12px 0 18px; }
  .finish-copy h2 { font-size: clamp(24px, 6vw, 32px); }
  .finish-rail { padding-top: 12px; }
  .boost-control { min-height: 44px; padding-inline: 14px; font-size: 13px; }
}
@media (max-height: 590px) {
  .finish-main { padding-block: 28px; }
}
@media (prefers-reduced-motion: no-preference) {
  #waitlist-dialog[open] .waitlist-card { animation: waitlist-enter 320ms cubic-bezier(.15,.65,.3,1) both; }
  @keyframes waitlist-enter { from { opacity: 0; transform: translateY(10px); } }
}

/* A phone has one scrollable reading area between its toolbar and primary action. */
@media (max-width: 700px), (pointer: coarse) and (orientation: landscape) and (max-height: 550px) {
  #waitlist-dialog {
    --gutter: clamp(20px, 5.5vw, 36px);
    --left: max(var(--gutter), env(safe-area-inset-left));
    --right: max(var(--gutter), env(safe-area-inset-right));
    --track-height: clamp(0px, calc(var(--waitlist-height, 100dvh) * .5 - 195px), 224px);
    inset-block: var(--waitlist-top, 0px) auto;
    height: var(--waitlist-height, 100dvh);
    overflow: hidden;
  }
  #waitlist-dialog .race-layout {
    display: grid; grid-template: auto minmax(0, 1fr) / minmax(0, 1fr);
    height: 100%; min-height: 0; padding: 0; container: waitlist-app / size;
  }
  #waitlist-dialog .race-scene { position: absolute; }
  .waitlist-glass { display: none; }
  #waitlist-dialog .race-picture, #waitlist-dialog .race-scene > canvas { display: block; }
  #waitlist-dialog .race-picture {
    inset: -6px -3% auto; height: calc(var(--track-height) + 76px + env(safe-area-inset-top));
    background-image: url("./hero-desktop-poster.jpg"); background-position: 67% 61%; mask-image: none;
  }
  #waitlist-dialog .race-picture::after { background: linear-gradient(0deg, #08091342, transparent 32% 73%, #08091396); }
  #waitlist-dialog .race-bar {
    min-height: 60px; gap: 8px; padding: max(8px, env(safe-area-inset-top)) var(--right) 8px var(--left);
    background: linear-gradient(180deg, #080913dc, #08091388);
  }
  #waitlist-dialog .race-logo { width: clamp(62px, 18vw, 74px); }
  #waitlist-dialog .race-tools { gap: 7px; }
  #waitlist-dialog .motion-control { width: 44px; padding: 0; }
  #waitlist-dialog [data-motion-label] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #waitlist-dialog .waitlist-boost {
    min-height: 44px; padding-inline: 13px;
    border-color: #ffffff52; background: #11121ede; box-shadow: none; font-size: 13px;
  }
  #waitlist-dialog[data-boosting] .waitlist-boost { border-color: #fa8ec6; }
  .waitlist-floor { display: block; min-height: 0; min-width: 0; padding: 0; }
  #waitlist-dialog[open] .waitlist-card {
    width: 100%; height: 100%; padding: 0; margin: 0;
    border: 0; border-radius: 0; box-shadow: none; background: transparent; animation: none;
  }
  .waitlist-scroll {
    display: flex; flex-direction: column; padding: 0;
  }
  #waitlist-nitro { flex: none; }
  #waitlist-nitro:empty { height: var(--track-height); }
  #waitlist-nitro:not(:empty) { margin: 0; border-radius: 0; }
  #waitlist-nitro .nitro-film {
    max-height: clamp(80px, calc(var(--waitlist-height, 100dvh) - 400px), 38dvh);
  }
  .waitlist-content {
    flex: 1 0 auto; padding: 20px var(--right) 22px var(--left);
    border-top: 1px solid #454056;
    background: linear-gradient(155deg, #171622, #0c0d17 58%);
  }
  .waitlist-segments { margin: 12px 0 22px; }
  #waitlist-title {
    margin: 0 0 22px; font-size: clamp(36px, 10vw, 52px);
    line-height: 1.07; text-align: start; text-wrap: balance;
  }
  #waitlist-form input:not([type=checkbox]) { min-height: 52px; padding-inline: 14px; border-radius: 9px; background: #0a0c15; }
  #waitlist-form input + label:not(.waitlist-consent) { margin-top: 10px; }
  #waitlist-form label.waitlist-consent { min-height: 44px; margin-block: 8px 0; }
  #waitlist-form .waitlist-consent input { width: 20px; height: 20px; margin-top: 1px; }
  #waitlist-form .collection-notice { font-size: 13px; line-height: 1.55; }
  .waitlist-actions { padding: 0; }
  #waitlist-next {
    height: calc(56px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    border: 0; border-radius: 0;
    box-shadow: inset 0 2px 0 #ffffff80, 0 -1px 6px #c100ff75;
  }
  #waitlist-next::before { inset: -4px 0 auto; height: 6px; border-radius: 0; }
  #waitlist-next .action-icon {
    inset-block: 0 env(safe-area-inset-bottom); right: max(12px, env(safe-area-inset-right));
    margin-block: auto; transform: none;
  }
  #waitlist-next:focus-visible { outline-offset: -4px; }
}
@container waitlist-app (max-height: 520px) {
  .waitlist-content { padding-block: 12px 16px; }
  .waitlist-segments { margin: 8px 0 14px; }
  #waitlist-title { font-size: 32px; margin-bottom: 14px; }
}

@media (max-width: 374px) {
  .boost-control { white-space: nowrap; }
  .boost-stripes { display: none; }
  #waitlist-dialog .waitlist-boost { padding-inline: 8px; }
}
