/* Bus Empire website. Colours are the game's design tokens (docs/03_DESIGN_SYSTEM.md §1). */
:root {
  --brand-navy-900: #0A1220;
  --brand-navy-800: #101B2E;
  --brand-navy-700: #17263F;
  --brand-navy-600: #213454;
  --brand-gold-500: #F2B630;
  --brand-gold-400: #F7C95C;
  --brand-gold-700: #B8861B;
  --brand-saffron-500: #FF7A1A;
  --brand-teal-500: #19C3B0;
  --text-primary: #F5F7FA;
  --text-secondary: #A9B4C6;
  --text-disabled: #5E6B80;
  --text-on-gold: #1A1205;
  --state-success: #2FBF71;
  --state-danger: #F0464B;
  --state-warning: #FFB020;
  --state-info: #4C9BFF;
  --grad-premium: linear-gradient(180deg, #F7C95C, #E09B12);
  --grad-night: linear-gradient(180deg, #0A1220, #17263F);

  --font-display: Poppins, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-button: 14px;
  --radius-card: 18px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --max: 72rem;
  --prose: 46rem;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--brand-navy-900);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--brand-gold-500); text-underline-offset: 0.18em; }
a:hover { color: var(--brand-gold-400); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--brand-teal-500);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.25; margin: 0 0 0.6em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.75rem); font-weight: 600; }
h2 { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.6rem); font-weight: 600; margin-top: 2.2em; }
h3 { font-size: 1.1rem; font-weight: 600; margin-top: 1.6em; }
p, ul, ol, table { margin: 0 0 1em; }
ul, ol { padding-left: 1.3rem; }
li { margin-bottom: 0.35em; }
strong { color: var(--text-primary); }

.skip-link {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--brand-gold-500); color: var(--text-on-gold);
  padding: 0.6rem 1rem; border-radius: var(--radius-button); font-weight: 600; z-index: 10;
}
.skip-link:focus { top: 1rem; }

/* Header */
.site-header {
  background: var(--brand-navy-800);
  border-bottom: 1px solid var(--brand-navy-600);
}
.site-header .inner {
  max-width: var(--max); margin: 0 auto; padding: 0.75rem 1rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.25rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1.15rem;
  color: var(--text-primary); text-decoration: none;
}
.brand img { width: 36px; height: 36px; }
.brand span { color: var(--brand-gold-500); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.15rem 0.5rem; }
.site-nav li { margin: 0; }
.site-nav a {
  display: inline-block; padding: 0.55rem 0.6rem; min-height: 44px;
  color: var(--text-secondary); text-decoration: none; font-size: 0.95rem;
}
.site-nav a:hover { color: var(--text-primary); }
.site-nav a[aria-current="page"] { color: var(--brand-gold-500); font-weight: 600; }

/* Layout */
main { display: block; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 1rem; }
.prose { max-width: var(--prose); margin: 0 auto; padding: 2rem 1rem 3rem; }
.prose .lede { color: var(--text-secondary); font-size: 1.05rem; }
.meta { color: var(--text-secondary); font-size: 0.9rem; }
.muted { color: var(--text-secondary); }

/* Hero */
.hero { background: var(--grad-night); border-bottom: 1px solid var(--brand-navy-600); }
.hero .container { padding-top: 3rem; padding-bottom: 3rem; }
.eyebrow {
  display: inline-block; margin: 0 0 0.9rem; padding: 0.2rem 0.75rem; border-radius: 999px;
  background: var(--brand-navy-700); color: var(--brand-teal-500);
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.02em;
}
.hero h1 { max-width: 20ch; }
.hero h1 em { font-style: normal; color: var(--brand-gold-500); }
.hero p { max-width: 40rem; color: var(--text-secondary); font-size: 1.1rem; }

.store-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.store-row li { margin: 0; }
.store {
  display: inline-flex; flex-direction: column; justify-content: center;
  min-height: 56px; min-width: 12rem; padding: 0.5rem 1.1rem;
  border: 1.5px solid var(--brand-gold-500); border-radius: var(--radius-button);
  color: var(--text-primary); background: var(--brand-navy-800);
}
.store small { color: var(--brand-gold-500); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.store b { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.65rem 1.3rem; border-radius: var(--radius-button);
  background: var(--grad-premium); color: var(--text-on-gold);
  font-family: var(--font-display); font-weight: 600; text-decoration: none;
  transition: transform 220ms var(--ease);
}
.button:hover { color: var(--text-on-gold); transform: translateY(-1px); }
.button.secondary { background: transparent; border: 1.5px solid var(--brand-gold-500); color: var(--brand-gold-500); }

/* Cards */
.section { padding: 2.5rem 0; }
.section > .container > h2:first-child { margin-top: 0; }
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.card {
  background: var(--brand-navy-700); border-radius: var(--radius-card); padding: 1.1rem 1.1rem 0.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.card h3 { margin-top: 0; color: var(--brand-gold-500); }
.card p { color: var(--text-secondary); }

.callout {
  background: var(--brand-navy-800); border-left: 4px solid var(--brand-teal-500);
  border-radius: 0 var(--radius-card) var(--radius-card) 0; padding: 1rem 1.1rem 0.2rem; margin: 1.5rem 0;
}
.callout.gold { border-left-color: var(--brand-gold-500); }
.callout.warn { border-left-color: var(--state-warning); }

.toc { background: var(--brand-navy-800); border-radius: var(--radius-card); padding: 1rem 1.1rem 0.4rem; margin: 1.5rem 0; }
.toc h2 { margin-top: 0; font-size: 1.05rem; }
.toc ol { margin-bottom: 0.6rem; }

.steps { counter-reset: step; list-style: none; padding-left: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 2.6rem; margin-bottom: 0.8rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0.05rem;
  width: 1.8rem; height: 1.8rem; border-radius: 999px; display: grid; place-items: center;
  background: var(--brand-gold-500); color: var(--text-on-gold); font-weight: 700; font-size: 0.9rem;
}

/* Tables scroll inside their wrapper on narrow screens instead of the page. */
.table-wrap { overflow-x: auto; margin: 0 0 1.2rem; border-radius: 12px; border: 1px solid var(--brand-navy-600); }
table { border-collapse: collapse; width: 100%; min-width: 34rem; margin: 0; font-size: 0.93rem; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--brand-navy-600); }
th { background: var(--brand-navy-700); font-family: var(--font-display); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td { color: var(--text-secondary); }
td:first-child { color: var(--text-primary); }

kbd, .path {
  font-family: var(--font-body); font-weight: 600; color: var(--text-primary);
  background: var(--brand-navy-700); border: 1px solid var(--brand-navy-600);
  padding: 0.05rem 0.4rem; border-radius: 6px; -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* Footer */
.site-footer { background: var(--brand-navy-800); border-top: 1px solid var(--brand-navy-600); color: var(--text-secondary); font-size: 0.9rem; }
.site-footer .inner { max-width: var(--max); margin: 0 auto; padding: 1.5rem 1rem 2rem; }
.site-footer ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.site-footer a { color: var(--text-secondary); }
.site-footer a:hover { color: var(--brand-gold-500); }
.site-footer p { margin: 0.3rem 0; }

@media (min-width: 48rem) {
  .hero .container { padding-top: 5rem; padding-bottom: 5rem; }
  .prose { padding-top: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

@media print {
  body { background: #fff; color: #000; }
  .site-header, .site-footer, .skip-link { display: none; }
  a { color: #000; }
  td, .muted, .meta, .prose .lede { color: #000; }
}
