/* SUPER SLOT CAR '98 — landing page.
   PIT KIT palette lifted from game/scripts/UIOverlay.gd:
   asphalt-navy panels, pit-lane amber, player cyan. */

@font-face {
  font-family: 'Silkscreen';
  src: url('../assets/fonts/Silkscreen-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'VT323';
  src: url('../assets/fonts/VT323-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink: #0e141c;        /* PIT_INK screen base */
  --ink-2: #0a0a14;      /* portrait frame ink */
  --panel: #17202c;      /* PIT_PANEL */
  --panel-2: #202b3a;    /* PIT_PANEL_LIGHT */
  --amber: #ffb300;      /* PIT_AMBER */
  --red: #ff4b3e;        /* PIT_RED */
  --cyan: #35c4ee;       /* PIT_CYAN */
  --lime: #69d84f;       /* PIT_LIME */
  --white: #f2f5f7;      /* PIT_WHITE */
  --steel: #8a97a8;      /* PIT_STEEL */
  --gold: #ffd454;
  --silver: #c7ccd6;

  --sprint: #3389d9;
  --gp: #33a659;
  --endurance: #d98c1a;
  --traffic: #cc4d80;
  --technical: #8c66e6;
  --duel: #bf1f33;

  --font-px: 'Silkscreen', 'Courier New', monospace;
  --font-crt: 'VT323', 'Courier New', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(1200px 500px at 50% -100px, #16202e 0%, transparent 70%),
    var(--ink);
  color: var(--white);
  font-family: var(--font-crt);
  font-size: 21px;
  line-height: 1.45;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--cyan); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--amber); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

::selection { background: var(--amber); color: var(--ink-2); }

/* ---------------------------------------------------------------- CRT */
.crt {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(3, 6, 10, 0.16) 0px,
      rgba(3, 6, 10, 0.16) 1px,
      transparent 1px,
      transparent 3px
    );
}
.crt::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 130% 100% at 50% 45%,
    transparent 60%, rgba(2, 4, 8, 0.38) 100%);
}
@media (prefers-reduced-motion: no-preference) {
  .crt { animation: crt-hum 6s steps(3) infinite; }
  @keyframes crt-hum {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.88; }
  }
}

/* ------------------------------------------------------ shared bits */
.checker-strip {
  height: 16px;
  background: repeating-conic-gradient(var(--silver) 0% 25%, var(--ink-2) 0% 50%)
              0 0 / 16px 16px;
  image-rendering: pixelated;
}

.pixel-frame {
  border: 3px solid var(--ink-2);
  box-shadow: 0 0 0 3px var(--panel-2), 8px 10px 0 rgba(0, 0, 0, 0.45);
}

.section {
  max-width: 1060px;
  margin: 0 auto;
  padding: 72px 20px 80px;
}
.section-alt {
  position: relative;
  max-width: none;
  background: linear-gradient(180deg, rgba(23, 32, 44, 0.9), rgba(23, 32, 44, 0.55));
  border-top: 3px solid var(--ink-2);
  border-bottom: 3px solid var(--ink-2);
}
.section-alt > * {
  max-width: 1060px;
  margin-left: auto;
  margin-right: auto;
}

.kicker {
  font-family: var(--font-px);
  font-size: 13px;
  letter-spacing: 0.35em;
  color: var(--cyan);
  margin-bottom: 10px;
}
h2 {
  font-family: var(--font-px);
  font-size: clamp(26px, 5.4vw, 44px);
  color: var(--amber);
  text-shadow: 4px 4px 0 var(--ink-2);
  line-height: 1.1;
  margin-bottom: 18px;
}
h3 { font-family: var(--font-px); line-height: 1.2; }

.section-lede {
  max-width: 46em;
  font-size: 23px;
  color: var(--silver);
  margin-bottom: 34px;
}
.section-lede strong, .step p strong { color: var(--white); }
.hot { color: var(--red); }

/* ---------------------------------------------------------------- hero */
.hero {
  text-align: center;
  padding-bottom: 84px;
}
.presents {
  font-family: var(--font-px);
  font-size: 12px;
  letter-spacing: 0.5em;
  color: var(--steel);
  margin: 34px 16px 18px;
}
.logo { line-height: 0.95; }
.logo-super {
  display: block;
  font-family: var(--font-px);
  font-size: clamp(20px, 4.5vw, 38px);
  letter-spacing: 0.55em;
  text-indent: 0.55em; /* recentre tracked text */
  color: var(--cyan);
  text-shadow: 3px 3px 0 var(--ink-2);
  margin-bottom: 6px;
}
.logo-main {
  position: relative;
  display: inline-block;
  font-family: var(--font-px);
  font-size: clamp(44px, 11vw, 108px);
  color: var(--amber);
  text-shadow:
    0.045em 0.045em 0 var(--ink-2),
    0.09em 0.09em 0 rgba(255, 75, 62, 0.35);
  padding-right: 0.15em;
}
.logo-badge {
  position: absolute;
  top: -0.58em;
  right: -0.5em;
  display: inline-block;
  font-size: 0.42em;
  color: var(--white);
  background: var(--red);
  border: 4px solid var(--ink-2);
  padding: 0.12em 0.22em 0.06em;
  transform: rotate(-8deg);
  text-shadow: none;
  box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.45);
}
.tagline {
  font-family: var(--font-px);
  font-size: clamp(15px, 3.4vw, 26px);
  color: var(--white);
  letter-spacing: 0.14em;
  margin-top: 30px;
  text-shadow: 3px 3px 0 var(--ink-2);
}
.tagline::before, .tagline::after { content: '// '; color: var(--red); }
.tagline::after { content: ' //'; }

.hero-sub {
  max-width: 40em;
  margin: 18px auto 34px;
  padding: 0 20px;
  color: var(--silver);
  font-size: 22px;
}
.hero-sub strong { color: var(--amber); font-style: normal; }

.race-wrap {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  background: var(--ink);
  line-height: 0;
}
#race, .race-fallback {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 5;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* -------------------------------------------------------------- CTA */
.cta { margin-top: 40px; }
.btn-dl {
  display: inline-block;
  font-family: var(--font-px);
  font-size: clamp(16px, 3.6vw, 24px);
  color: var(--ink-2);
  background: var(--amber);
  text-decoration: none;
  padding: 18px 26px 16px;
  border: 4px solid var(--ink-2);
  box-shadow: 0 0 0 3px var(--amber), 7px 8px 0 rgba(0, 0, 0, 0.55);
  transition: transform 60ms steps(2), box-shadow 60ms steps(2);
}
.btn-dl:hover { background: var(--gold); color: var(--ink-2); }
.btn-dl:active {
  transform: translate(4px, 5px);
  box-shadow: 0 0 0 3px var(--amber), 2px 2px 0 rgba(0, 0, 0, 0.55);
}
.btn-glyph {
  display: inline-block;
  width: 0; height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 12px solid var(--ink-2);
  margin-right: 14px;
  vertical-align: 2px;
}
.dl-meta {
  margin-top: 16px;
  font-size: 20px;
  color: var(--steel);
  letter-spacing: 0.08em;
}
.dl-meta::before { content: '['; color: var(--panel-2); }
.dl-meta::after { content: ']'; color: var(--panel-2); }
.dl-msg { margin-top: 6px; font-size: 18px; color: var(--cyan); }

/* -------------------------------------------------------------- steps */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin: 40px 0 64px;
}
.step {
  background: var(--panel);
  border: 3px solid var(--ink-2);
  box-shadow: 0 0 0 2px var(--panel-2), 6px 7px 0 rgba(0, 0, 0, 0.4);
  padding: 22px 20px 24px;
  position: relative;
}
.step-num {
  font-family: var(--font-px);
  font-size: 34px;
  color: var(--ink);
  background: var(--amber);
  display: inline-block;
  padding: 4px 8px 2px;
  border: 3px solid var(--ink-2);
  margin: -40px 0 14px;
  box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.4);
}
.step h3 { font-size: 19px; color: var(--cyan); margin-bottom: 10px; }
.step:nth-child(2) h3 { color: var(--amber); }
.step:nth-child(3) h3 { color: var(--red); }
.step p { color: var(--silver); font-size: 20px; }

/* ---------------------------------------------------------- card fan */
.hand {
  display: flex;
  justify-content: center;
  padding: 30px 0 26px;
}
.card {
  /* The imgs are REAL in-game card renders (frame, banner, rules text all
     baked in) — the wrapper stays chromeless and just fans them. */
  width: 200px;
  flex: 0 0 auto;
  transition: transform 140ms ease, z-index 0s;
}
.card img {
  display: block;
  width: 100%;
  height: auto;
  box-shadow: 7px 9px 0 rgba(0, 0, 0, 0.5);
  image-rendering: auto;
}

@media (min-width: 761px) {
  .hand { position: relative; height: 430px; align-items: flex-start; }
  .card { position: absolute; top: 30px; }
  /* six-card fan */
  .card:nth-child(1) { transform: translateX(-330px) rotate(-14deg) translateY(34px); }
  .card:nth-child(2) { transform: translateX(-200px) rotate(-8deg)  translateY(12px); }
  .card:nth-child(3) { transform: translateX(-68px)  rotate(-2.5deg); }
  .card:nth-child(4) { transform: translateX(68px)   rotate(2.5deg); }
  .card:nth-child(5) { transform: translateX(200px)  rotate(8deg)   translateY(12px); }
  .card:nth-child(6) { transform: translateX(330px)  rotate(14deg)  translateY(34px); }
  .card:hover, .card:focus-within { z-index: 5; }
  .card:hover img, .card:focus-within img {
    box-shadow: 0 0 0 3px var(--amber), 10px 14px 0 rgba(0, 0, 0, 0.55);
  }
  .card:nth-child(1):hover { transform: translateX(-330px) rotate(-6deg) translateY(6px) scale(1.07); }
  .card:nth-child(2):hover { transform: translateX(-200px) rotate(-3deg) translateY(-10px) scale(1.07); }
  .card:nth-child(3):hover { transform: translateX(-68px)  rotate(0deg)  translateY(-18px) scale(1.07); }
  .card:nth-child(4):hover { transform: translateX(68px)   rotate(0deg)  translateY(-18px) scale(1.07); }
  .card:nth-child(5):hover { transform: translateX(200px)  rotate(3deg)  translateY(-10px) scale(1.07); }
  .card:nth-child(6):hover { transform: translateX(330px)  rotate(6deg)  translateY(6px) scale(1.07); }
}
@media (max-width: 760px) {
  .hand {
    justify-content: flex-start;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 20px 4px 26px;
    -webkit-overflow-scrolling: touch;
  }
  .card { width: 176px; scroll-snap-align: center; }
  .card:nth-child(odd)  { transform: rotate(-1.5deg); }
  .card:nth-child(even) { transform: rotate(1.5deg); }
}

/* ------------------------------------------------------------ roster */
.roster {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 16px;
  margin: 36px auto 56px;
}
.roster img, .bosses img {
  width: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  box-shadow: 5px 6px 0 rgba(0, 0, 0, 0.45);
}
.roster li { transition: transform 120ms steps(3); }
.roster li:hover { transform: translateY(-6px); }

.bosses-title {
  font-size: clamp(17px, 3vw, 24px);
  color: var(--red);
  text-shadow: 3px 3px 0 var(--ink-2);
  margin-bottom: 22px;
}
.bosses-title::before { content: '! '; color: var(--amber); }
.bosses {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding-bottom: 8px;
}
.bosses li { max-width: 240px; }
.bosses img { max-width: 176px; }
.bosses p { margin-top: 12px; font-size: 19px; color: var(--silver); }
@media (max-width: 640px) {
  .bosses { grid-template-columns: 1fr; }
  .bosses li { display: flex; align-items: center; gap: 16px; max-width: none; }
  .bosses img { width: 116px; flex: 0 0 auto; }
  .bosses p { margin-top: 0; }
}

/* --------------------------------------------------------- race grid */
.race-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 38px;
}
.race {
  --tint: var(--amber);
  background: var(--panel);
  border: 3px solid var(--ink-2);
  border-left: 8px solid var(--tint);
  box-shadow: 0 0 0 2px var(--panel-2), 5px 6px 0 rgba(0, 0, 0, 0.4);
  padding: 18px 18px 20px 20px;
  display: grid;
  grid-template-columns: 52px 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
}
.race h3 { font-size: 17px; color: var(--white); align-self: center; }
.race p { grid-column: 2; color: var(--steel); font-size: 19px; margin-top: 6px; }
.race-sprint    { --tint: var(--sprint); }
.race-gp        { --tint: var(--gp); }
.race-endurance { --tint: var(--endurance); }
.race-traffic   { --tint: var(--traffic); }
.race-technical { --tint: var(--technical); }
.race-duel      { --tint: var(--duel); }

/* CSS glyphs, one per race type */
.glyph {
  position: relative;
  width: 52px;
  height: 52px;
  grid-row: 1 / 3;
  align-self: start;
  background: var(--ink);
  border: 2px solid var(--panel-2);
}
/* lightning bolt */
.g-sprint::before {
  content: '';
  position: absolute;
  inset: 7px 13px;
  background: var(--sprint);
  clip-path: polygon(58% 0, 18% 55%, 44% 55%, 34% 100%, 82% 40%, 52% 40%);
}
/* chequered flag */
.g-gp::before {
  content: '';
  position: absolute;
  inset: 9px;
  background:
    repeating-conic-gradient(var(--gp) 0% 25%, var(--ink-2) 0% 50%) 0 0 / 15px 15px;
  image-rendering: pixelated;
}
/* s-road: two joined arcs */
.g-endurance::before, .g-endurance::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 5px solid var(--endurance);
  border-radius: 50%;
}
.g-endurance::before {
  top: 3px; left: 14px;
  border-left-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(45deg);
}
.g-endurance::after {
  bottom: 3px; left: 8px;
  border-right-color: transparent;
  border-top-color: transparent;
  transform: rotate(45deg);
}
/* three jammed cars */
.g-traffic::before {
  content: '';
  position: absolute;
  top: 8px; left: 10px;
  width: 10px; height: 15px;
  background: var(--traffic);
  box-shadow: 14px 6px 0 rgba(204, 77, 128, 0.72), 7px 21px 0 rgba(204, 77, 128, 0.45);
}
/* hairpin arrow */
.g-technical::before {
  content: '';
  position: absolute;
  top: 12px; left: 12px;
  width: 22px; height: 26px;
  border: 5px solid var(--technical);
  border-bottom-color: transparent;
  border-radius: 14px 14px 0 0;
}
.g-technical::after {
  content: '';
  position: absolute;
  left: 8px; bottom: 8px;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 9px solid var(--technical);
}
/* crossed duel bars */
.g-duel::before, .g-duel::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 34px; height: 6px;
  background: var(--duel);
  box-shadow: 0 0 0 1px var(--ink-2);
}
.g-duel::before { transform: translate(-50%, -50%) rotate(45deg); }
.g-duel::after  { transform: translate(-50%, -50%) rotate(-45deg); }

/* --------------------------------------------------------- archetypes */
.badge-113 {
  display: inline-block;
  font-family: var(--font-px);
  font-size: 15px;
  color: var(--ink-2);
  background: var(--gold);
  border: 3px solid var(--ink-2);
  padding: 4px 8px 2px;
  box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.4);
  transform: rotate(-2deg);
  margin-right: 8px;
}
.arch-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px 28px;
  margin-top: 30px;
}
.arch-list li {
  display: grid;
  grid-template-columns: 122px 1fr;
  align-items: start;
  gap: 12px;
  border-bottom: 2px dashed var(--panel-2);
  padding: 10px 2px 12px;
}
.arch-list p { color: var(--silver); font-size: 20px; }
.arch-chip {
  font-family: var(--font-px);
  font-size: 12px;
  text-align: center;
  color: var(--ink-2);
  padding: 6px 4px 4px;
  border: 2px solid var(--ink-2);
  box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.4);
}
.chip-engine   { background: var(--amber); }
.chip-scrap    { background: var(--red); color: var(--white); }
.chip-phantom  { background: var(--cyan); }
.chip-sponsor  { background: var(--lime); }
.chip-sabotage { background: var(--technical); color: var(--white); }
.chip-oneshot  { background: var(--silver); }
.garage-note {
  margin-top: 34px;
  color: var(--steel);
  font-size: 21px;
}
.garage-note strong { color: var(--gold); }

/* ------------------------------------------------------ telemetry note */
#playtest { padding-top: 8px; padding-bottom: 56px; }
.telemetry-note {
  border: 3px dashed var(--steel);
  background: rgba(23, 32, 44, 0.6);
  padding: 22px 24px;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.telemetry-title {
  font-size: 16px;
  color: var(--steel);
  text-shadow: none;
  margin-bottom: 10px;
}
.telemetry-note p { color: var(--steel); font-size: 20px; }
.telemetry-note strong { color: var(--white); }

/* -------------------------------------------------------------- footer */
.footer {
  border-top: 3px solid var(--ink-2);
  background: var(--ink-2);
  text-align: center;
  padding-bottom: 42px;
}
.footer .checker-strip { margin-bottom: 30px; }
.footer-line {
  font-family: var(--font-px);
  font-size: 12px;
  color: var(--steel);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  padding: 0 16px;
}
.footer-line a { color: var(--amber); }
.footer-line a:hover { color: var(--cyan); }
.dot { color: var(--panel-2); }
.footer-fine {
  margin-top: 18px;
  font-size: 17px;
  color: var(--steel);
  padding: 0 16px;
}

/* ------------------------------------------- real-footage hero + clips */
#hero-vid {
  display: block;
  width: 100%;
  height: auto;
  background: var(--ink-2);
}
.footage-tag {
  margin: 0;
  padding: 8px 12px 7px;
  font-family: var(--font-px);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--amber);
  background: var(--ink-2);
  text-align: center;
}
.takedown-strip { margin-top: 44px; text-align: center; }
.takedown-vid {
  display: block;
  width: min(720px, 100%);
  height: auto;
  margin: 0 auto;
  border: 4px solid var(--ink-2);
  box-shadow: 0 0 0 3px var(--panel-2), 7px 9px 0 rgba(0, 0, 0, 0.5);
  background: var(--ink-2);
}
.takedown-cap {
  margin-top: 14px;
  font-family: var(--font-px);
  font-size: 14px;
  color: var(--hot, #e2493b);
  letter-spacing: 0.08em;
}
.roster-note {
  margin-top: 26px;
  text-align: center;
  font-size: 18px;
  color: var(--steel);
}

/* ------------------------------------------------------------ gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  margin-top: 34px;
}
.shot {
  margin: 0;
  background: var(--panel);
  border: 3px solid var(--ink-2);
  box-shadow: 0 0 0 2px var(--panel-2), 6px 8px 0 rgba(0, 0, 0, 0.5);
  padding: 8px;
}
.shot img { display: block; width: 100%; height: auto; border: 2px solid var(--ink-2); }
.shot figcaption {
  padding: 10px 6px 4px;
  font-size: 17px;
  line-height: 1.3;
  color: var(--silver);
}

/* -------------------------------------------------------- quick facts */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 34px;
}
.facts > div {
  background: var(--panel);
  border: 3px solid var(--ink-2);
  box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.45);
  padding: 14px 16px 12px;
}
.facts dt {
  font-family: var(--font-px);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--amber);
  margin-bottom: 6px;
}
.facts dd { margin: 0; font-size: 19px; color: var(--paper, #f2f5f7); }

/* --------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; gap: 34px; }
  .step-num { margin-top: -38px; }
}
@media (max-width: 640px) {
  body { font-size: 19px; }
  .section { padding: 56px 16px 60px; }
  .logo-badge { top: -0.72em; right: -0.12em; border-width: 3px; }
  .race-grid { grid-template-columns: 1fr; }
  .btn-dl { font-size: 15px; padding: 15px 16px 13px; }
  .btn-glyph { margin-right: 10px; }
}

/* ------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
