:root {
  --bg: #06080e;
  --ink: #f4f7fb;
  --muted: #9aa7b8;
  --cyan: #1ad4de;
  --cyan-dark: #0a6b72;
  --gold: #ffd166;
  --orange: #ff7a18;
  --line: rgba(255, 255, 255, 0.12);
  --font-pixel: "Press Start 2P", monospace;
  --font-sans: "Space Grotesk", system-ui, sans-serif;
  --mx: 0.5;
  --my: 0.5;
  --grid-speed: 12s;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.5;
  background: var(--bg);
  overflow-x: hidden;
  cursor: crosshair;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.cursor-glow {
  position: fixed;
  width: 280px;
  height: 280px;
  margin: -140px 0 0 -140px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 50;
  background: radial-gradient(
    circle,
    rgba(26, 212, 222, 0.16),
    transparent 68%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
  mix-blend-mode: screen;
}

body.is-pointer .cursor-glow {
  opacity: 1;
}

/* ── Topbar ─────────────────────────────────────────── */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(16px, 4vw, 48px);
  background: linear-gradient(
    180deg,
    rgba(6, 8, 14, 0.95) 0%,
    rgba(6, 8, 14, 0.55) 70%,
    transparent
  );
}

.brand img {
  width: min(148px, 36vw);
  height: auto;
  image-rendering: pixelated;
  transition: transform 0.2s ease;
}

.brand:hover img {
  transform: scale(1.05);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.music-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(12, 16, 24, 0.85);
  color: var(--muted);
  font-family: var(--font-pixel);
  font-size: 8px;
  cursor: pointer;
  transition: 0.15s ease;
}

.music-toggle.is-on {
  color: #1a1200;
  background: var(--gold);
  border-color: #c99a3a;
}

.music-toggle:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.music-toggle.is-on:hover {
  color: #1a1200;
}

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 18px;
  border: 1px solid transparent;
  font-family: var(--font-pixel);
  font-size: 11px;
  line-height: 1.4;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease,
    filter 0.15s ease;
}

.btn span {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  opacity: 0.8;
}

.btn-sm {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 9px;
  color: #041014;
  background: var(--cyan);
  border-color: var(--cyan-dark);
}

.gp-icon {
  display: block;
  flex-shrink: 0;
}

.btn-primary {
  color: #041014;
  background: linear-gradient(180deg, #4cf0f8, var(--cyan));
  border-color: var(--cyan-dark);
  box-shadow: 0 8px 24px rgba(26, 212, 222, 0.25);
}

.btn-secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}

.btn:hover {
  transform: translateY(-3px) scale(1.02);
}

.btn-primary:hover {
  box-shadow: 0 12px 32px rgba(26, 212, 222, 0.4);
  filter: brightness(1.05);
}

.btn-primary.is-charging {
  animation: cta-pulse 0.45s ease infinite;
}

/* ── Hero ───────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px clamp(20px, 5vw, 56px) 64px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(900px 480px at 50% 0%, rgba(26, 212, 222, 0.16), transparent 60%),
    radial-gradient(700px 420px at 80% 75%, rgba(255, 122, 24, 0.1), transparent 55%),
    linear-gradient(180deg, #0b1220 0%, #06080e 55%, #04050a 100%);
}

.hero-stars span {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #fff;
  border-radius: 50%;
  opacity: 0.35;
  animation: twinkle 2.8s ease-in-out infinite;
}

.hero-grid {
  position: absolute;
  left: 50%;
  bottom: -10%;
  width: 200%;
  height: 42%;
  transform: translateX(calc(-50% + (var(--mx) - 0.5) * 40px))
    perspective(620px) rotateX(60deg);
  background-image:
    linear-gradient(rgba(26, 212, 222, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 212, 222, 0.16) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to top, #000 10%, transparent 92%);
  animation: grid-move var(--grid-speed) linear infinite;
  opacity: 0.35;
  transition: transform 0.15s linear;
}

.hero-glow {
  position: absolute;
  left: 50%;
  bottom: 6%;
  width: min(720px, 92vw);
  height: 130px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(26, 212, 222, 0.18), transparent 70%);
  filter: blur(10px);
}

.hero-horizon {
  display: none;
}

.hero-shell {
  position: relative;
  z-index: 2;
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 18px;
}

.hero-logo {
  width: min(340px, 80%);
  image-rendering: pixelated;
  filter: drop-shadow(0 6px 0 rgba(20, 10, 40, 0.8));
  transform: perspective(700px) rotateY(calc((var(--mx) - 0.5) * -8deg))
    rotateX(calc((var(--my) - 0.5) * 5deg));
  transition: transform 0.12s linear;
  animation: rise 0.8s ease both;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-pixel);
  font-size: clamp(15px, 2.6vw, 24px);
  line-height: 1.6;
  color: var(--gold);
  text-shadow: 3px 3px 0 #3b2200;
  animation: rise 0.8s ease 0.08s both;
}

.lede {
  margin: 0;
  max-width: 38ch;
  color: var(--muted);
  font-size: clamp(16px, 2.2vw, 19px);
  animation: rise 0.8s ease 0.16s both;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
  animation: rise 0.8s ease 0.22s both;
}

/* Stage: framed showcase for the live car + picker (right column) */
.hero-stage {
  width: 100%;
  max-width: 440px;
  justify-self: end;
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(26, 212, 222, 0.16);
  background: linear-gradient(180deg, rgba(14, 22, 36, 0.7), rgba(8, 12, 20, 0.5));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  animation: rise 0.8s ease 0.18s both;
}

.stage-title {
  margin: 0;
  align-self: flex-start;
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--cyan);
}

.hero-drive {
  position: relative;
  width: 100%;
  height: 190px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.drive-car {
  width: auto;
  height: 170px;
  max-width: 90%;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 12px 0 rgba(0, 0, 0, 0.35));
  transform: translateX(calc((var(--mx) - 0.5) * 28px));
  transition: transform 0.12s linear, height 0.25s ease, opacity 0.2s ease;
  animation: drive-bob 0.9s ease-in-out infinite;
}

.drive-car.is-boost {
  height: 182px;
  filter: drop-shadow(0 12px 0 rgba(0, 0, 0, 0.35))
    drop-shadow(0 0 18px rgba(255, 122, 24, 0.6));
}

.drive-smoke {
  position: absolute;
  bottom: 16px;
  left: 50%;
  width: 48px;
  height: 14px;
  margin-left: -24px;
  border-radius: 50%;
  background: rgba(180, 200, 220, 0.2);
  filter: blur(4px);
  opacity: 0;
  transform: translateX(calc((var(--mx) - 0.5) * 28px));
  transition: opacity 0.2s ease, transform 0.12s linear;
}

.drive-car.is-boost + .drive-smoke {
  opacity: 1;
}

.nitro-meter {
  width: 100%;
  max-width: 260px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  opacity: 0.85;
}

.nitro-meter-label {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--orange);
}

.nitro-meter-track {
  height: 8px;
  border: 1px solid rgba(255, 122, 24, 0.4);
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.nitro-meter-fill {
  height: 100%;
  width: 18%;
  background: linear-gradient(90deg, var(--orange), var(--gold));
  box-shadow: 0 0 12px rgba(255, 122, 24, 0.45);
  transition: width 0.35s ease;
}

.hero-picker {
  display: flex;
  gap: 8px;
  justify-content: center;
  width: 100%;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.pick-car {
  flex: 1 1 0;
  max-width: 60px;
  aspect-ratio: 1 / 1.1;
  display: grid;
  place-items: center;
  padding: 6px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: 0.18s ease;
}

.pick-car img {
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.pick-car:hover {
  border-color: var(--cyan);
  transform: translateY(-3px);
}

.pick-car.is-active {
  border-color: var(--gold);
  background: rgba(255, 209, 102, 0.08);
  box-shadow: 0 0 0 1px rgba(255, 209, 102, 0.25);
}

/* ── Sections ───────────────────────────────────────── */
.section {
  position: relative;
  z-index: 2;
  padding: clamp(72px, 12vh, 120px) clamp(20px, 6vw, 72px);
  max-width: 980px;
  margin: 0 auto;
}

.section-alt {
  max-width: none;
  background: linear-gradient(
    180deg,
    rgba(255, 122, 24, 0.04),
    transparent 40%,
    rgba(26, 212, 222, 0.04)
  );
}

.section-intro {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 48px;
}

.eyebrow {
  margin: 0 0 12px;
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--cyan);
  letter-spacing: 0.06em;
}

.section h2 {
  margin: 0 0 12px;
  font-family: var(--font-pixel);
  font-size: clamp(15px, 2.8vw, 22px);
  line-height: 1.55;
}

.section-copy {
  margin: 0 auto;
  color: var(--muted);
  max-width: 40ch;
  font-size: 18px;
}

.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.feature {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 24px 56px 24px 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.2s ease, padding-left 0.2s ease;
  outline: none;
}

.feature:last-child {
  border-bottom: 1px solid var(--line);
}

.feature:hover,
.feature:focus-visible,
.feature.is-open {
  background: linear-gradient(
    90deg,
    rgba(26, 212, 222, 0.08),
    transparent 70%
  );
  padding-left: 12px;
}

.feature strong {
  font-family: var(--font-pixel);
  font-size: 12px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.5;
}

.feature span {
  color: var(--muted);
  font-size: 17px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.25s ease;
}

.feature:hover span,
.feature:focus-visible span,
.feature.is-open span {
  max-height: 80px;
  opacity: 1;
  margin-top: 2px;
}

.feature-tag {
  position: absolute;
  right: 0;
  top: 24px;
  font-family: var(--font-pixel);
  font-size: 10px;
  font-style: normal;
  color: rgba(26, 212, 222, 0.45);
  transition: color 0.2s ease, transform 0.2s ease;
}

.feature:hover .feature-tag,
.feature.is-open .feature-tag {
  color: var(--cyan);
  transform: scale(1.1);
}

.showcase {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(20px, 5vw, 48px);
  min-height: 180px;
}

.show-slot {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.show-slot img {
  width: clamp(56px, 12vw, 96px);
  image-rendering: pixelated;
  filter: drop-shadow(0 12px 0 rgba(0, 0, 0, 0.35));
  animation: bob 2.4s ease-in-out infinite;
}

.show-slot.is-center img {
  width: clamp(64px, 14vw, 110px);
  animation-delay: 0.2s;
}

.show-slot:hover {
  transform: translateY(-10px) scale(1.08);
}

.show-slot.is-racing img {
  animation: race-shake 0.12s linear infinite;
  filter: drop-shadow(0 12px 0 rgba(0, 0, 0, 0.35))
    drop-shadow(0 0 18px rgba(26, 212, 222, 0.55));
}

.showcase-hint {
  margin: 18px auto 0;
  text-align: center;
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--muted);
}

.final {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.final-logo {
  width: min(300px, 70vw);
  image-rendering: pixelated;
  margin-bottom: 8px;
  transition: transform 0.25s ease;
}

.final-logo:hover {
  transform: scale(1.04) rotate(-1deg);
}

.footer {
  padding: 28px 20px 48px;
  text-align: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

.footer strong {
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 10px;
  font-weight: 400;
}

.footer a:hover {
  color: var(--cyan);
}

.footer-note {
  margin: 8px 0 0;
  opacity: 0.7;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes grid-move {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 0 48px;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes drive-bob {
  0%,
  100% {
    transform: translateX(calc((var(--mx) - 0.5) * 40px)) translateY(0);
  }
  50% {
    transform: translateX(calc((var(--mx) - 0.5) * 40px)) translateY(-5px);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.2;
  }
  50% {
    opacity: 0.8;
  }
}

@keyframes cta-pulse {
  0%,
  100% {
    box-shadow: 0 8px 24px rgba(26, 212, 222, 0.25);
  }
  50% {
    box-shadow: 0 8px 36px rgba(255, 122, 24, 0.45);
  }
}

@keyframes race-shake {
  0% {
    transform: translateY(0) translateX(0);
  }
  25% {
    transform: translateY(-2px) translateX(1px);
  }
  50% {
    transform: translateY(1px) translateX(-1px);
  }
  75% {
    transform: translateY(-1px) translateX(1px);
  }
  100% {
    transform: translateY(0) translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-grid,
  .drive-car,
  .show-slot img,
  .hero-logo,
  .hero h1,
  .lede,
  .hero-cta,
  .hero-picker,
  .nitro-meter,
  .cursor-glow {
    animation: none !important;
    transition: none !important;
  }

  .cursor-glow {
    display: none;
  }
}

@media (max-width: 860px) {
  .hero-shell {
    grid-template-columns: 1fr;
    gap: 32px;
    justify-items: center;
  }

  .hero-copy {
    align-items: center;
    text-align: center;
  }

  .lede {
    margin-inline: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-stage {
    justify-self: center;
  }
}

@media (max-width: 560px) {
  .music-toggle-label {
    display: none;
  }

  .hero {
    padding-top: 100px;
  }

  .hero-cta {
    width: 100%;
  }

  .hero-cta .btn {
    flex: 1 1 100%;
    align-items: center;
    text-align: center;
  }

  .cursor-glow {
    display: none;
  }
}
