/* Street Racers 2 landing page
   Follows the game's design system (sr2 frontend/DESIGN_SYSTEM.md):
   midnight canvas, glass panels, champagne/gold headings, amber CTAs, cyan accents. */
:root {
  --dark: #070d18;
  --bg: #0a1220;
  --title-fade: rgb(1, 10, 17);
  --panel: #0d1829;
  --well: #060b14;
  --border: rgba(71, 98, 130, 0.35);
  --border-strong: rgba(71, 98, 130, 0.6);
  --text: #f1f5f9;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --champagne: #e2d9b8;
  --gold-h2: #fef08a;
  --gold: #f59e0b;
  --gold-light: #fbbf24;
  --cyan: #38bdf8;
  --discord: #6366f1;
  --ice: #f59e0b;
  --ev: #38bdf8;
  --hy: #a3e635;
  --radius: 16px;
  --max: 1140px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--dark);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); }
a:hover { color: var(--text); }
::selection { background: rgba(56, 189, 248, 0.4); color: #fff; }

h1, h2, h3, h4 { line-height: 1.12; letter-spacing: 0.025em; margin: 0 0 0.5em; }
h1 {
  font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 900; text-transform: uppercase;
  color: var(--champagne);
  text-shadow: 0 0 20px rgba(245, 158, 11, 0.25), 0 2px 4px rgba(0, 0, 0, 0.6);
}
.h1-sub { display: block; font-size: 0.55em; color: var(--gold-h2); margin-top: 0.3em; }
h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 800; text-transform: uppercase;
  color: var(--gold-h2); text-shadow: 0 0 14px rgba(245, 158, 11, 0.2);
}
h3 { font-size: 1.2rem; font-weight: 700; color: var(--text); }
h4 { font-size: 1.1rem; font-weight: 600; color: #e2e8f0; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.container.narrow { max-width: 820px; }
@media (min-width: 720px) { .container { padding: 0 28px; } }
.center { text-align: center; justify-content: center; }

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--gold); color: #020617; padding: 8px 14px; border-radius: 8px;
}
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

.icon { width: 1.1em; height: 1.1em; flex: none; }
.num { font-family: var(--mono); font-weight: 700; color: var(--text); }

/* Glass panel (.game-panel) */
.panel, .card, .kit, .faq details, .table-wrap {
  position: relative;
  border: 1px solid rgba(51, 65, 85, 0.4);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(16, 27, 44, 0.88) 0%, rgba(10, 17, 28, 0.94) 100%);
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.panel { padding: 26px; }

/* Header (.game-status-strip feel) */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(90deg, rgba(11, 20, 36, 0.92), rgba(15, 29, 51, 0.9), rgba(11, 20, 36, 0.92));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}
.nav { display: flex; align-items: center; gap: 20px; height: 64px; }
.logo { display: inline-flex; align-items: center; flex: none; }
.logo img { height: 40px; width: auto; }
.nav-links { display: none; list-style: none; margin: 0 0 0 auto; padding: 0; gap: 24px; }
.nav-links a { color: var(--text-soft); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.nav-links a:hover { color: var(--gold-light); }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
@media (min-width: 880px) {
  .nav-links { display: flex; }
  .nav-actions { margin-left: 0; }
}
@media (max-width: 480px) { .hide-sm { display: none; } .logo img { height: 32px; } }

/* Buttons (.game-btn-primary / tertiary) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em; text-decoration: none;
  border-radius: 10px; padding: 11px 20px; font-size: 0.9rem; line-height: 1.2;
  transition: background .15s, box-shadow .15s, border-color .15s, transform .1s;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  color: #020617;
  background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  border: 1px solid #fde047;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-primary:hover {
  color: #020617;
  background: linear-gradient(180deg, #fde047 0%, #fbbf24 50%, #ea580c 100%);
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.btn-discord {
  color: #fff; font-weight: 700;
  background: linear-gradient(180deg, #818cf8 0%, #6366f1 55%, #4f46e5 100%);
  border: 1px solid rgba(165, 180, 252, 0.6);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-discord:hover { color: #fff; box-shadow: 0 4px 18px rgba(99, 102, 241, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.45); }
.btn-badge {
  display: inline-flex; padding: 2px 7px; border-radius: 999px;
  background: rgba(2, 6, 23, 0.9); color: #fcd34d; font-size: 0.65rem; font-weight: 900;
  border: 1px solid rgba(0, 0, 0, 0.4); text-shadow: none;
}
.btn-sm { padding: 8px 13px; font-size: 0.78rem; }
.btn-lg { padding: 15px 26px; font-size: 1rem; }

/* Hero: the game's title art, top-anchored, fading into --title-fade */
.hero {
  position: relative;
  background-color: var(--title-fade);
  background-image: url("/assets/img/hero.jpg");
  background-image: image-set(url("/assets/img/hero.webp") type("image/webp"), url("/assets/img/hero.jpg") type("image/jpeg"));
  background-repeat: no-repeat;
  background-position: top center;
  background-size: max(100%, 900px) auto;
  padding-top: calc(max(100vw, 900px) * 0.3 - 2rem);
  padding-bottom: 72px;
}
.hero-inner { max-width: 860px; text-align: center; }
.hero .lead { margin-left: auto; margin-right: auto; }
.eyebrow {
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--cyan); font-size: 0.8rem; margin-bottom: 0.8em;
}
.lead { font-size: clamp(1.02rem, 2vw, 1.18rem); color: var(--text-soft); max-width: 720px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 22px; justify-content: center; }
.hero-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; padding: 0; margin: 0; }
.hero-badges li {
  font-size: 0.78rem; font-weight: 600; color: var(--text-soft);
  border: 1px solid rgba(56, 189, 248, 0.25); border-radius: 999px; padding: 4px 12px;
  background: rgba(11, 20, 36, 0.8);
}

/* Sections */
.section { padding: 76px 0; }
.section-alt {
  background:
    linear-gradient(180deg, rgba(7, 13, 24, 0.82), rgba(7, 13, 24, 0.94)),
    url("/assets/img/page-bg.webp") center / cover no-repeat;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-lead { color: var(--text-muted); font-size: 1.05rem; max-width: 760px; margin-bottom: 32px; }
.sub-heading { margin-top: 52px; font-size: 1.4rem; text-transform: uppercase; color: var(--champagne); }
.mt { margin-top: 20px; }
.muted { color: var(--text-muted); }

.two-col { display: grid; gap: 24px; align-items: start; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1fr 1.4fr; gap: 48px; } }
.prose p { color: var(--text-soft); }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--text); }

/* Car showcase */
.showcase { padding: 8px 0 64px; overflow: hidden; }
.car-strip { margin-top: 24px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: rgba(56,189,248,.35) transparent; }
.car-strip ul { display: flex; gap: 8px; list-style: none; padding: 0 16px 8px; margin: 0 auto; width: max-content; }
.car-strip li {
  width: 168px; flex: none; border-radius: 14px; padding: 6px;
  background: radial-gradient(circle at 50% 70%, rgba(56, 189, 248, 0.12), transparent 70%);
}
.car-strip img { width: 100%; height: auto; }
@media (min-width: 720px) {
  .car-strip ul { flex-wrap: wrap; justify-content: center; width: auto; max-width: var(--max); }
  .car-strip li { width: 170px; }
}

/* Cards */
.grid { display: grid; gap: 18px; margin-top: 26px; }
@media (min-width: 720px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-2 { grid-template-columns: repeat(2, 1fr); } }
.card { padding: 24px; }
.card p { color: var(--text-soft); margin: 0; font-size: 0.95rem; }
.card-icon {
  width: 42px; height: 42px; display: grid; place-items: center; font-size: 1.3rem; margin-bottom: 14px;
  border-radius: 12px; background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.3);
}
.card-power { border-top: 3px solid var(--c); }
.card-power.ice { --c: var(--ice); }
.card-power.ev { --c: var(--ev); }
.card-power.hy { --c: var(--hy); }
.tag {
  display: inline-block; font-weight: 900; font-size: 0.75rem; letter-spacing: 0.12em; color: #020617;
  background: var(--c); border-radius: 6px; padding: 2px 9px; margin-bottom: 12px;
}

/* World map */
.world {
  position: relative; margin-top: 52px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.7), 0 0 20px rgba(56, 189, 248, 0.15);
}
.world img { width: 100%; }
.world-copy { padding: 22px 24px; background: linear-gradient(180deg, rgba(16, 27, 44, 0.95), rgba(10, 17, 28, 0.98)); }
.world-copy h3 { color: var(--champagne); text-transform: uppercase; }
.world-copy p { color: var(--text-soft); margin: 0; }
@media (min-width: 860px) {
  .world-copy {
    position: absolute; left: 20px; bottom: 20px; max-width: 420px; border-radius: 14px;
    background: rgba(10, 17, 28, 0.86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border: 1px solid rgba(51, 65, 85, 0.5);
  }
}

/* Rookie kit */
.rookies {
  background:
    linear-gradient(180deg, rgba(7, 13, 24, 0.94) 0%, rgba(7, 13, 24, 0.8) 40%, rgba(7, 13, 24, 0.96) 100%),
    url("/assets/img/garage.webp") center / cover no-repeat;
}
.kit-grid { display: grid; gap: 20px; }
@media (min-width: 860px) { .kit-grid { grid-template-columns: 1.3fr 1fr; align-items: start; } }
.kit { padding: 28px; }
.kit-rookie {
  border: 1px solid rgba(245, 158, 11, 0.5);
  background: linear-gradient(180deg, rgba(24, 37, 58, 0.92) 0%, rgba(14, 23, 38, 0.96) 100%);
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.7), 0 0 20px rgba(245, 158, 11, 0.2), inset 0 1px 0 rgba(251, 191, 36, 0.3);
}
.kit h3 { font-size: 1.5rem; text-transform: uppercase; color: var(--champagne); }
.kit-label {
  display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--text-muted); margin-bottom: 8px;
}
.kit-rookie .kit-label { color: var(--gold-light); }
.checklist { list-style: none; padding: 0; margin: 0 0 24px; }
.checklist li { position: relative; padding-left: 30px; margin-bottom: 10px; color: var(--text-soft); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 0.3em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23020617'%3E%3Cpath d='M8 13.6 4.4 10l-1.4 1.4L8 16.4 17 7.4 15.6 6z'/%3E%3C/svg%3E") center/14px no-repeat;
}
.kit-veteran .checklist li::before { background-color: var(--cyan); }
.kit .muted { margin: 0; font-size: 0.92rem; }

.steps { list-style: none; padding: 0; margin: 44px 0 0; display: grid; gap: 18px; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.steps h3 { font-size: 1.05rem; text-transform: uppercase; margin-bottom: 0.25em; }
.steps p { color: var(--text-muted); margin: 0; font-size: 0.93rem; }
.step-num {
  flex: none; width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center;
  font-family: var(--mono); font-weight: 900; font-size: 1.2rem; color: #020617;
  background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  border: 1px solid #fde047; box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

/* Comparison table */
.table-wrap { overflow-x: auto; margin-top: 26px; }
.compare { width: 100%; border-collapse: collapse; min-width: 520px; }
.compare th, .compare td { text-align: left; padding: 13px 18px; border-bottom: 1px solid rgba(30, 41, 59, 0.6); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare tbody tr:hover { background: rgba(56, 189, 248, 0.06); }
.compare thead th {
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; font-weight: 800;
  background: rgba(13, 22, 38, 0.85); color: var(--text-muted);
}
.compare thead th:last-child { color: var(--gold-light); }
.compare tbody th { color: var(--text-muted); font-weight: 600; font-size: 0.92rem; }
.compare td { color: var(--text-muted); font-size: 0.95rem; }
.compare td:last-child { color: var(--text); font-weight: 600; }

/* FAQ */
.faq { margin-top: 22px; display: grid; gap: 10px; }
.faq details { padding: 0 20px; border-radius: 12px; }
.faq details[open] { border-color: rgba(56, 189, 248, 0.3); }
.faq summary { cursor: pointer; list-style: none; padding: 17px 30px 17px 0; position: relative; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; color: var(--gold-light); font-weight: 400;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--text-soft); padding-bottom: 18px; margin: 0; }

/* Final CTA */
.cta-final {
  text-align: center;
  background: radial-gradient(600px 300px at 50% 0%, rgba(245, 158, 11, 0.16), transparent 70%), var(--title-fade);
  border-top: 1px solid var(--border);
}
.cta-final .lead { margin: 0 auto; }

/* Footer */
.site-footer { padding: 44px 0 26px; border-top: 1px solid rgba(30, 41, 59, 0.8); background: rgba(2, 6, 23, 0.6); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-inner .logo img { height: 44px; }
.footer-inner .muted { margin-top: 12px; font-size: 0.9rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.92rem; }
.footer-links a:hover { color: var(--text); }
.copyright { margin-top: 26px; color: #64748b; font-size: 0.82rem; }

/* Language switcher */
.lang-switch {
  display: flex; align-items: center; list-style: none; margin: 0; padding: 2px; gap: 2px;
  border: 1px solid var(--border); border-radius: 10px; background: rgba(6, 11, 20, 0.6);
}
.lang-switch a {
  display: block; padding: 5px 7px; border-radius: 7px; font-size: 0.75rem; font-weight: 800;
  letter-spacing: 0.06em; line-height: 1.2; color: var(--text-muted); text-decoration: none;
}
.lang-switch a:hover { color: var(--gold-light); }
.lang-switch a[aria-current="page"] { color: #020617; background: var(--gold); }
@media (max-width: 480px) { .lang-switch a { padding: 5px 5px; } }
