/* ============================================================
   VECTARCADE — Pure arcade havoc.
   Shared site styles. Game files remain untouched.
   ============================================================ */

:root {
  /* Surfaces — canonical Trail Blast palette */
  --bg-0:        #050010;
  --bg-1:        #0a0518;
  --bg-2:        #110a26;
  --bg-3:        #1a1230;
  --bg-card:     #0e0820;

  /* Hairlines */
  --line:        rgba(255,255,255,0.07);
  --line-2:      rgba(255,255,255,0.14);
  --line-3:      rgba(255,255,255,0.22);

  /* Text */
  --text:        #eef0fb;
  --text-2:      #b6b8c8;
  --text-mute:   #6c6d80;

  /* Brand accents — lifted from trail-blast.html */
  --cyan:        #00ffee;   /* PLAYER_COLOR */
  --cyan-deep:   #00b4c4;
  --cyan-soft:   #66e0ff;
  --magenta:     #ff00aa;   /* AI_COLORS[0] */
  --magenta-deep:#c81e4a;
  --amber:       #ffd400;   /* AI_COLORS[1] / signal microcopy */
  --purple:      #9d00ff;   /* AI_COLORS[2] */
  --green:       #00ff66;   /* AI_COLORS[3] */
  --orange:      #ff8800;   /* AI_COLORS[4] / boost flame */

  /* Type system */
  --f-display:   "Anton", "Saira Stencil One", Impact, "Arial Narrow", sans-serif;
  --f-body:      "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-pixel:     "VT323", "Press Start 2P", ui-monospace, "SF Mono", Menlo, monospace;

  /* Geometry */
  --maxw:        1200px;
  --pad-x:       28px;
  --r-sm:        4px;
  --r-md:        10px;
  --r-lg:        14px;

  /* Effects — tuned to canonical neon */
  --glow-cyan:    0 0 18px rgba(0,255,238,0.42);
  --glow-magenta: 0 0 18px rgba(255,0,170,0.40);
}

/* Reset / base ----------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  /* Ambient stage-light glows — canonical neon */
  background-image:
    radial-gradient(1100px 520px at 50% -10%, rgba(0,255,238,0.14), transparent 60%),
    radial-gradient(900px 600px at 100% 110%, rgba(255,0,170,0.12), transparent 55%),
    radial-gradient(700px 400px at 0% 50%, rgba(157,0,255,0.06), transparent 60%);
  background-attachment: fixed;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--text); text-decoration: none; }

button, input { font: inherit; color: inherit; }

/* Faint CRT vignette only — no full-page scanlines */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.55) 100%);
  z-index: 1;
}

/* Layout primitives ----------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  position: relative;
  z-index: 2;
}

.rule {
  height: 1px;
  background: var(--line);
  margin: 0;
  border: 0;
}

/* Header ----------------------------------------------------- */
.site-header {
  padding: 22px 0;
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(180deg, rgba(5,5,7,0.92), rgba(5,5,7,0.65));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.brand .wordmark {
  /* Matches the hero wordmark — Inter Bold + per-letter neon colors.
     Glow shadows are scaled down so they read at header size. */
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0;
  color: var(--text);
  line-height: 1;
  text-transform: none;
}
.brand .wordmark .vw { display: inline-block; }
.brand .wordmark .vw-vect {
  color: #F2F6FF;
  text-shadow:
    0 0 6px  rgba(0,229,255,0.65),
    0 0 14px rgba(0,229,255,0.35);
}
.brand .wordmark .vw-a1 {
  color: #FF1744;
  text-shadow:
    0 0 6px  rgba(255,23,68,0.72),
    0 0 14px rgba(255,23,68,0.38);
}
.brand .wordmark .vw-r {
  color: #FF8C00;
  text-shadow:
    0 0 6px  rgba(255,140,0,0.72),
    0 0 14px rgba(255,140,0,0.38);
}
.brand .wordmark .vw-c {
  color: #FFD400;
  text-shadow:
    0 0 6px  rgba(255,212,0,0.72),
    0 0 14px rgba(255,212,0,0.38);
}
.brand .wordmark .vw-a2 {
  color: #00FF66;
  text-shadow:
    0 0 6px  rgba(0,255,102,0.72),
    0 0 14px rgba(0,255,102,0.38);
}
.brand .wordmark .vw-d {
  color: #00E5FF;
  text-shadow:
    0 0 6px  rgba(0,229,255,0.72),
    0 0 14px rgba(0,229,255,0.38);
}
.brand .wordmark .vw-e {
  color: #B026FF;
  text-shadow:
    0 0 6px  rgba(176,38,255,0.72),
    0 0 14px rgba(176,38,255,0.38);
}
.brand .crumb {
  font-family: var(--f-pixel);
  font-size: 16px;
  letter-spacing: 0.12em;
  color: var(--text-mute);
  text-transform: uppercase;
  margin-left: 4px;
}
.brand .crumb.cyan   { color: var(--cyan); }
.brand .crumb.mag    { color: var(--magenta); }

.nav {
  display: flex; gap: 24px;
}
.nav a {
  font-family: var(--f-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  padding: 8px 2px;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.nav a:hover { color: var(--text); border-color: var(--line-3); }

/* Ambient layer — live Orbit Blast asteroid sim on a fixed canvas.
   Sits behind every section. The hero's opaque background blocks it
   so the trail/ship canvas in the hero isn't competed with. */
#ambient-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}

/* Hero ------------------------------------------------------- */
.hero {
  padding: 96px 0 64px;
  text-align: center;
  position: relative;
  overflow: hidden;          /* contain atmosphere layers */
  isolation: isolate;        /* keep blend/blur effects local */
  /* Opaque base — blocks the fixed ambient shards from bleeding through.
     Mirrors body's ambient washes so the hero looks unchanged. */
  background:
    radial-gradient(1100px 520px at 50% -10%, rgba(0,255,238,0.10), transparent 60%),
    radial-gradient(900px 600px at 100% 110%, rgba(255,0,170,0.08), transparent 55%);
}
.hero > .container { position: relative; z-index: 3; }

/* Hero atmosphere — restrained, ~15% intensity ---------------- */
.hero-atmosphere {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero-atmosphere .hero-grid,
.hero-atmosphere .hero-shards {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}

/* Live Trail Blast canvas — running paintTrail + drawHoverBike */
.hero-atmosphere #havoc-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  opacity: 0.85;
  /* sit between grid (z=0) and content (z=3); above grid */
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen; /* trails over dark base = punchy */
}
.hero-atmosphere .hero-sweep {
  position: absolute;
  top: -10%; left: -25%; right: -25%; bottom: -10%;
  background: linear-gradient(
    115deg,
    transparent 38%,
    rgba(63,240,255,0.10) 48%,
    rgba(255,58,108,0.07) 52%,
    transparent 62%
  );
  filter: blur(28px);
  animation: hero-sweep 18s ease-in-out infinite;
  opacity: 0;
  will-change: transform, opacity;
}
@keyframes hero-sweep {
  0%   { transform: translateX(-22%) translateY(-4%); opacity: 0; }
  18%  { opacity: 1; }
  82%  { opacity: 1; }
  100% { transform: translateX(22%)  translateY(4%);  opacity: 0; }
}

/* Trail streaks — neon arcs racing across the hero ----------- */
.hero-atmosphere .hero-streaks {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.streak {
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 70 1400;
  stroke-dashoffset: 1500;
  will-change: stroke-dashoffset, opacity;
  filter: drop-shadow(0 0 6px rgba(63,240,255,0.75));
}
.streak.cyan  { stroke: rgba(63,240,255,0.85); }
.streak.mag   { stroke: rgba(255,58,108,0.80); filter: drop-shadow(0 0 6px rgba(255,58,108,0.70)); }
.streak.mix   { stroke: rgba(180,180,255,0.70); }
.streak-a { stroke-width: 2.2; animation: streak 4.8s linear infinite;       }
.streak-b { stroke-width: 1.8; animation: streak 7.4s linear infinite 1.6s;  }
.streak-c { stroke-width: 1.4; animation: streak 5.6s linear infinite 3.2s;  }
@keyframes streak {
  0%   { stroke-dashoffset: 1500; opacity: 0; }
  10%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { stroke-dashoffset: -200; opacity: 0; }
}

/* Vertical CRT scan beam ------------------------------------- */
.hero-atmosphere .hero-vscan {
  position: absolute; left: 0; right: 0;
  top: 0;
  height: 90px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(63,240,255,0.05) 30%,
    rgba(63,240,255,0.10) 50%,
    rgba(63,240,255,0.05) 70%,
    transparent 100%
  );
  filter: blur(6px);
  pointer-events: none;
  opacity: 0;
  animation: hero-vscan 14s ease-in-out infinite;
  will-change: transform, opacity;
}
@keyframes hero-vscan {
  0%   { transform: translateY(-120px); opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateY(820px);  opacity: 0; }
}

/* Floating shards — visible, more confident motion ----------- */
.shard {
  fill: none;
  stroke: rgba(63,240,255,0.55);
  stroke-width: 1.2;
  transform-box: fill-box;
  transform-origin: center;
  will-change: transform;
  filter: drop-shadow(0 0 4px rgba(63,240,255,0.45));
}
.shard.mag {
  stroke: rgba(255,58,108,0.55);
  filter: drop-shadow(0 0 4px rgba(255,58,108,0.45));
}

.shard-1 { animation: drift-1 26s ease-in-out infinite alternate; }
.shard-2 { animation: drift-2 30s ease-in-out infinite alternate; }
.shard-3 { animation: drift-3 24s ease-in-out infinite alternate; }
.shard-4 { animation: drift-4 32s ease-in-out infinite alternate; }
.shard-5 { animation: drift-5 22s ease-in-out infinite alternate; }
.shard-6 { animation: drift-6 28s ease-in-out infinite alternate; }

@keyframes drift-1 { from { transform: translate(0,0)     rotate(0); }  to { transform: translate(34px,-26px) rotate(110deg); } }
@keyframes drift-2 { from { transform: translate(0,0)     rotate(0); }  to { transform: translate(-42px,32px) rotate(-130deg); } }
@keyframes drift-3 { from { transform: translate(0,0)     rotate(0); }  to { transform: translate(28px,38px)  rotate(140deg); } }
@keyframes drift-4 { from { transform: translate(0,0)     rotate(0); }  to { transform: translate(-32px,-40px) rotate(-95deg); } }
@keyframes drift-5 { from { transform: translate(0,0)     rotate(0); }  to { transform: translate(22px,-46px) rotate(85deg); } }
@keyframes drift-6 { from { transform: translate(0,0)     rotate(0); }  to { transform: translate(-36px,22px) rotate(-150deg); } }

/* Hero atmosphere — mobile: keep grid, drop sweep, fewer shards */
@media (max-width: 640px) {
  .hero-atmosphere .hero-sweep { display: none; }
  .hero-atmosphere .shard-5,
  .hero-atmosphere .shard-6 { display: none; }
}
.hero .signal {
  display: inline-block;
  font-family: var(--f-pixel);
  font-size: 17px;
  letter-spacing: 0.32em;
  color: var(--amber);
  text-transform: uppercase;
  margin-bottom: 26px;
  opacity: 0.85;
}
.hero h1 {
  /* Classic neon-arcade marquee — Inter Bold, per-letter colors.
     VECT  = icy white + cyan glow (the cyber/system half)
     ARCADE = red / orange / yellow / green / cyan / violet (the rainbow neon half) */
  font-family: var(--f-body);
  font-weight: 700;
  font-size: clamp(48px, 9vw, 120px);
  line-height: 1.05;
  letter-spacing: 0;
  margin: 0 0 18px;
  color: var(--text);
}
.hero h1 .vw { display: inline-block; }
.hero h1 .vw-vect {
  color: #F2F6FF;
  text-shadow:
    0 0 14px rgba(0,229,255,0.65),
    0 0 32px rgba(0,229,255,0.40),
    0 0 70px rgba(0,229,255,0.20);
}
.hero h1 .vw-a1 {
  color: #FF1744;
  text-shadow:
    0 0 14px rgba(255,23,68,0.72),
    0 0 32px rgba(255,23,68,0.44),
    0 0 70px rgba(255,23,68,0.24);
}
.hero h1 .vw-r {
  color: #FF8C00;
  text-shadow:
    0 0 14px rgba(255,140,0,0.72),
    0 0 32px rgba(255,140,0,0.44),
    0 0 70px rgba(255,140,0,0.24);
}
.hero h1 .vw-c {
  color: #FFD400;
  text-shadow:
    0 0 14px rgba(255,212,0,0.72),
    0 0 32px rgba(255,212,0,0.44),
    0 0 70px rgba(255,212,0,0.24);
}
.hero h1 .vw-a2 {
  color: #00FF66;
  text-shadow:
    0 0 14px rgba(0,255,102,0.72),
    0 0 32px rgba(0,255,102,0.44),
    0 0 70px rgba(0,255,102,0.24);
}
.hero h1 .vw-d {
  color: #00E5FF;
  text-shadow:
    0 0 14px rgba(0,229,255,0.72),
    0 0 32px rgba(0,229,255,0.44),
    0 0 70px rgba(0,229,255,0.24);
}
.hero h1 .vw-e {
  color: #B026FF;
  text-shadow:
    0 0 14px rgba(176,38,255,0.72),
    0 0 32px rgba(176,38,255,0.44),
    0 0 70px rgba(176,38,255,0.24);
}
.hero .tagline {
  font-family: var(--f-display);
  font-size: clamp(20px, 3.2vw, 30px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 auto 28px;
  text-shadow:
    0 0 14px rgba(0,255,238,0.70),
    0 0 34px rgba(0,255,238,0.38);
}
.hero .sub {
  font-family: var(--f-body);
  font-size: clamp(15px, 1.6vw, 17px);
  color: var(--text-2);
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.55;
}
.hero .actions {
  display: flex; flex-wrap: wrap; gap: 14px;
  justify-content: center;
}

/* Buttons ---------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 16px 26px;
  border: 1.5px solid var(--line-3);
  background: transparent;
  color: var(--text);
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, border-color .15s ease, background .15s ease, box-shadow .2s ease, color .15s ease;
}
.btn:hover {
  transform: translateY(-1px);
  border-color: var(--text);
}
.btn-primary {
  border-color: var(--cyan);
  color: var(--text);
  background: linear-gradient(180deg, rgba(63,240,255,0.10), rgba(63,240,255,0.03));
  box-shadow: var(--glow-cyan);
}
.btn-primary:hover {
  border-color: var(--cyan);
  background: linear-gradient(180deg, rgba(63,240,255,0.22), rgba(63,240,255,0.06));
}
.btn-magenta {
  border-color: var(--magenta);
  color: var(--text);
  background: linear-gradient(180deg, rgba(255,58,108,0.10), rgba(255,58,108,0.03));
  box-shadow: var(--glow-magenta);
}
.btn-magenta:hover {
  background: linear-gradient(180deg, rgba(255,58,108,0.22), rgba(255,58,108,0.06));
}
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover { color: var(--text); }

/* Play shard — static right-pointing crystal, sits beside "Play" */
.btn .play-shard {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 12px;
  flex: 0 0 auto;
  fill: rgba(0,255,238,0.14);
  stroke: rgba(0,255,238,0.95);
  stroke-width: 1.6;
  stroke-linejoin: miter;
  filter: drop-shadow(0 0 5px rgba(0,255,238,0.55));
  transition: transform .12s ease, filter .15s ease;
}
.btn:hover .play-shard {
  transform: translateX(2px);
  filter: drop-shadow(0 0 7px rgba(0,255,238,0.75));
}

/* Sections --------------------------------------------------- */
.section {
  padding: 72px 0;
  position: relative;
  z-index: 2;
}
.section + .section { border-top: 1px solid var(--line); }
.section-label {
  font-family: var(--f-pixel);
  font-size: 16px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 14px;
}
.section-title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(28px, 4.5vw, 44px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 34px;
  color: var(--text);
}
.section-title .accent { color: var(--cyan); }
.section-title.mag .accent { color: var(--magenta); }

/* Featured panel — Trail Blast --
/* ============================================================
   Attract-screen homepage — no scroll, hero fills 100vh with
   symmetric top/bottom padding so the asteroid shards have
   equal "headroom" above and below the wordmark and POP visibly
   at both ends of the screen.
   ============================================================ */
body.attract-screen {
  overflow: hidden;
}
body.attract-screen .hero {
  min-height: 100vh;
  padding: 96px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.attract-screen .hero > .container {
  width: 100%;
}


/* Narrow phones (≤ 380px): keep the homepage hero wordmark from clipping */
@media (max-width: 380px) {
  .hero h1 {
    font-size: clamp(36px, 11vw, 60px);
    letter-spacing: -0.01em;
  }
  .hero .tagline { font-size: clamp(15px, 4vw, 20px); letter-spacing: 0.14em; }
  .hero .sub { font-size: 14px; padding: 0 8px; }
  body.attract-screen .hero { padding: 60px 0; }
}

/* Dynamic viewport height — handle mobile browser chrome (URL bar) more gracefully */
@supports (height: 100dvh) {
  body.attract-screen .hero { min-height: 100dvh; }
}
