/* The page wears the game's two styles. Neon is the default; Pastel applies
   when the visitor's device is in light mode, or when they pick it with the
   switch in the header (data-style wins over everything). Colors are the
   game's own palettes (assets/skins/*.tres). */
:root {
  color-scheme: dark;
  --ground: #0B0F1F;
  --ground-2: #1A1240;
  --ink: #F2F4FF;
  --ink-soft: #A7AED4;
  --line: rgba(61, 245, 255, 0.14);
  --player: #3DF5FF;
  --straight: #FF3DCB;
  --drifting: #A06BFF;
  --fast: #FFB23D;
  --title-accent: #FFE93D;
  --panel: rgba(20, 26, 51, 0.82);
  --panel-edge: rgba(61, 245, 255, 0.35);
  --panel-shadow: 0 0 32px rgba(61, 245, 255, 0.16);
  --btn-bg: rgba(20, 26, 51, 0.9);
  --btn-ink: #3DF5FF;
  --btn-edge: #3DF5FF;
  --btn-glow: 0 0 18px rgba(61, 245, 255, 0.35);
  --primary-bg: rgba(20, 26, 51, 0.9);
  --primary-ink: #FFE93D;
  --primary-edge: #FFE93D;
  --primary-glow: 0 0 20px rgba(255, 233, 61, 0.4);
  --frame: #05070F;
  --btn-radius: 14px;
  --scrim: rgba(11, 15, 31, 0.86);
  --display: "Chakra Petch", "Rajdhani", "Segoe UI", system-ui, sans-serif;
  --body: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]):not([data-style]) {
    color-scheme: light;
    --ground: #FDF3E7;
    --ground-2: #E7ECFB;
    --ink: #3B3F5C;
    --ink-soft: #676B8C;
    --line: rgba(91, 141, 239, 0.16);
    --player: #5B8DEF;
    --straight: #F28B82;
    --drifting: #B39DDB;
    --fast: #F6B26B;
    --title-accent: #5B8DEF;
    --panel: rgba(255, 255, 255, 0.9);
    --panel-edge: rgba(59, 63, 92, 0);
    --panel-shadow: 0 10px 28px rgba(59, 63, 92, 0.12);
    --btn-bg: #FFFFFF;
    --btn-ink: #3B3F5C;
    --btn-edge: rgba(59, 63, 92, 0);
    --btn-glow: 0 5px 0 rgba(59, 63, 92, 0.12);
    --primary-bg: #6CC7A8;
    --primary-ink: #2A2E47;
    --primary-edge: rgba(59, 63, 92, 0);
    --primary-glow: 0 5px 0 rgba(59, 63, 92, 0.14);
    --frame: #FFFFFF;
    --btn-radius: 999px;
    --scrim: rgba(253, 243, 231, 0.88);
  }
}
:root[data-theme="light"]:not([data-style]),
:root[data-style="pastel"] {
  color-scheme: light;
  --ground: #FDF3E7;
  --ground-2: #E7ECFB;
  --ink: #3B3F5C;
  --ink-soft: #676B8C;
  --line: rgba(91, 141, 239, 0.16);
  --player: #5B8DEF;
  --straight: #F28B82;
  --drifting: #B39DDB;
  --fast: #F6B26B;
  --title-accent: #5B8DEF;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-edge: rgba(59, 63, 92, 0);
  --panel-shadow: 0 10px 28px rgba(59, 63, 92, 0.12);
  --btn-bg: #FFFFFF;
  --btn-ink: #3B3F5C;
  --btn-edge: rgba(59, 63, 92, 0);
  --btn-glow: 0 5px 0 rgba(59, 63, 92, 0.12);
  --primary-bg: #6CC7A8;
  --primary-ink: #2A2E47;
  --primary-edge: rgba(59, 63, 92, 0);
  --primary-glow: 0 5px 0 rgba(59, 63, 92, 0.14);
  --frame: #FFFFFF;
  --btn-radius: 999px;
  --scrim: rgba(253, 243, 231, 0.88);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(180deg, var(--ground) 0%, var(--ground-2) 100%) fixed;
  background-color: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.4s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--player); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 24px; }
@media (max-width: 480px) { .wrap { padding-inline: 16px; } }

h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0; text-wrap: balance; letter-spacing: 0.01em; }
h2 { font-size: clamp(30px, 4.4vw, 44px); font-weight: 700; }
h3 { font-size: 22px; font-weight: 600; }
p { margin: 0; }
.eyebrow {
  font-family: var(--display); font-weight: 600; font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-soft);
}
.lede { font-size: 19px; color: var(--ink-soft); max-width: 34em; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; font-weight: 600; }

/* Buttons: the game's own button styles */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 600; font-size: 18px; text-decoration: none;
  padding: 14px 26px; border-radius: var(--btn-radius); cursor: pointer;
  background: var(--btn-bg); color: var(--btn-ink);
  border: 2px solid var(--btn-edge); box-shadow: var(--btn-glow);
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.4s ease, color 0.4s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary-bg); color: var(--primary-ink); border-color: var(--primary-edge); box-shadow: var(--primary-glow); }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Header */
.site-header { padding-block: 20px; position: relative; z-index: 3; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: 0.02em; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.style-switch {
  display: inline-flex; padding: 4px; border-radius: 999px; gap: 4px;
  background: var(--panel); border: 1px solid var(--panel-edge); box-shadow: var(--panel-shadow);
}
.style-switch button {
  font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase;
  border: 0; background: transparent; color: var(--ink-soft); padding: 8px 16px; border-radius: 999px; cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}
.style-switch button[aria-pressed="true"] { background: var(--player); color: var(--ground); }
.style-label { font-size: 13px; color: var(--ink-soft); margin-right: 4px; }
.header-right { display: flex; align-items: center; gap: 10px; }
@media (max-width: 480px) { .style-label { display: none; } }

/* Hero: a small live version of the game runs behind the headline */
.hero { position: relative; overflow: hidden; padding-block: 40px 72px; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, var(--scrim) 0%, var(--scrim) 34%, transparent 64%);
}
.hero .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 1.4fr 0.6fr; gap: 40px; align-items: center; pointer-events: none; }
.hero .wrap a, .hero .wrap button { pointer-events: auto; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; }
.hero h1 { font-size: clamp(50px, 7.6vw, 92px); font-weight: 700; line-height: 0.95; }
.hero h1 .line-2 { display: block; color: var(--title-accent); transition: color 0.4s ease; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-note { font-size: 14px; color: var(--ink-soft); display: none; }
@media (hover: hover) and (pointer: fine) { .hero-note { display: block; } }
.phone {
  width: min(300px, 100%); aspect-ratio: 9 / 16; margin-inline: auto;
  border-radius: 36px; border: 10px solid var(--frame); overflow: hidden;
  box-shadow: var(--panel-shadow), 0 30px 60px rgba(0, 0, 0, 0.35);
  background: var(--ground);
}
.phone img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero::before { background: linear-gradient(180deg, var(--scrim) 0%, var(--scrim) 45%, transparent 80%); }
  .phone { width: min(260px, 80%); }
}

/* Sections */
section.block { padding-block: 72px; }
.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 36px; max-width: 42em; }

.plays { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.play { display: flex; flex-direction: column; gap: 10px; }
.play-icon { width: 56px; height: 56px; }
.play p { color: var(--ink-soft); }
@media (max-width: 820px) { .plays { grid-template-columns: 1fr; } }

.ramp { margin-top: 44px; padding: 28px; border-radius: 22px; background: var(--panel); border: 1px solid var(--panel-edge); box-shadow: var(--panel-shadow); }
.ramp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.ramp-bar { height: 14px; border-radius: 999px; background: linear-gradient(90deg, var(--player), var(--fast) 50%, var(--straight)); }
.ramp-ticks { display: flex; justify-content: space-between; margin-top: 10px; font-size: 15px; color: var(--ink-soft); }
.ramp-ticks span:last-child { color: var(--straight); }
.ramp-foot { margin-top: 18px; color: var(--ink-soft); max-width: 46em; }

.obstacles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.obstacle { display: grid; grid-template-columns: 72px 1fr; gap: 18px; align-items: start; padding: 22px; border-radius: 20px; border: 1px solid var(--line); }
.obstacle svg { width: 72px; height: 72px; }
.obstacle .speed { font-size: 14px; color: var(--ink-soft); margin-top: 6px; }
.obstacle .speed b { color: var(--ink); }
@media (max-width: 900px) { .obstacles { grid-template-columns: 1fr; } }

.styles { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.style-card { display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center; }
.style-card .phone { width: min(260px, 100%); }
.style-card h3 span { display: block; font-family: var(--body); font-weight: 600; font-size: 15px; color: var(--ink-soft); margin-top: 6px; letter-spacing: 0; }
@media (max-width: 640px) { .styles { grid-template-columns: 1fr; } }

.extras { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 48px; align-items: center; }
.extras ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.extras li { display: grid; grid-template-columns: 14px 1fr; gap: 14px; align-items: baseline; }
.extras li::before { content: ""; width: 10px; height: 10px; transform: rotate(45deg) translateY(-2px); background: var(--player); border-radius: 2px; }
.extras li strong { display: block; font-family: var(--display); font-weight: 600; font-size: 19px; }
.extras li span { color: var(--ink-soft); }
@media (max-width: 760px) { .extras { grid-template-columns: 1fr; } .extras .phone { order: 2; } }

.cta { text-align: center; padding-block: 88px; }
.cta .wrap { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.cta img.icon { width: 96px; height: 96px; border-radius: 24px; box-shadow: var(--panel-shadow); }
.cta h2 { font-size: clamp(34px, 5vw, 56px); }
.cta .fine { font-size: 14px; color: var(--ink-soft); }

footer { padding-block: 32px 48px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-soft); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
footer p { max-width: 60em; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .btn:hover { transform: none; }
}

/* Legal pages (privacy.html) */
.legal { padding-block: 32px 80px; }
.legal article { max-width: 44em; display: flex; flex-direction: column; gap: 18px; }
.legal h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 700; }
.legal h2 { font-size: 26px; margin-top: 22px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal strong { color: var(--ink); }
.legal ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
.legal a { color: var(--player); text-underline-offset: 3px; }
.legal .updated { font-family: var(--display); font-size: 15px; letter-spacing: 0.04em; }
.legal .intro { font-size: 19px; }
.legal .contact { padding: 22px 24px; border-radius: 18px; background: var(--panel); border: 1px solid var(--panel-edge); box-shadow: var(--panel-shadow); }
footer a { color: var(--ink-soft); }
