/* Shared base for the Spot & Rally afterlife prototypes.
   Tokens follow the original DESIGN.md: warm open surfaces, coral spot, blue rally. */
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/InstrumentSans-Medium.ttf") format("truetype");
  font-weight: 400 549;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/InstrumentSans-SemiBold.ttf") format("truetype");
  font-weight: 550 700;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Medium.ttf") format("truetype");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --foreground: oklch(0.205 0.01 260);
  --foreground-muted: oklch(0.45 0.012 260);
  --background: oklch(0.985 0.002 260);
  --surface: #ffffff;
  --surface-2: oklch(0.965 0.003 260);
  --border: oklch(0.905 0.004 260);
  --border-strong: oklch(0.82 0.006 260);
  --sponsor: #f04b25;
  --sponsor-strong: #bf3217;
  --sponsor-soft: #fdeee9;
  --amplifier: #1558f5;
  --amplifier-strong: #0f45c4;
  --amplifier-soft: #eaf0fe;
  --positive: #0b7438;
  --radius: 12px;
  --radius-sm: 8px;
  --font-sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 450;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--amplifier-strong); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--amplifier); }
h1, h2, h3 { text-wrap: balance; margin: 0; letter-spacing: -0.035em; line-height: 1.08; font-weight: 650; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--amplifier); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 10;
  background: var(--foreground); color: var(--background);
  padding: 8px 14px; border-radius: var(--radius-sm); text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--background); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklch, var(--background) 92%, transparent);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--foreground); text-decoration: none;
  font-weight: 650; font-size: 1.08rem; letter-spacing: -0.03em;
}
.brand:hover { color: var(--foreground); }
.brand img { width: 40px; height: 40px; }
.header-nav { display: flex; gap: 20px; align-items: center; }
.header-nav a {
  color: var(--foreground-muted); text-decoration: none; font-weight: 500; font-size: 0.95rem;
}
.header-nav a:hover, .header-nav a[aria-current="page"] { color: var(--foreground); }

.data-label {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--foreground-muted); font-weight: 500;
}

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 0.98rem; letter-spacing: -0.01em;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform 150ms var(--ease-out), background-color 150ms, border-color 150ms, color 150ms;
}
.button:active { transform: scale(0.97); }
.button-primary { background: var(--foreground); color: var(--background); }
.button-primary:hover { background: oklch(0.3 0.012 260); color: var(--background); }
.button-blue { background: var(--amplifier); color: #fff; }
.button-blue:hover { background: var(--amplifier-strong); color: #fff; }
.button-coral { background: var(--sponsor-strong); color: #fff; }
.button-coral:hover { background: #a52a12; color: #fff; }
.button-secondary { background: var(--surface); color: var(--foreground); border-color: var(--border-strong); }
.button-secondary:hover { border-color: var(--foreground); color: var(--foreground); }

.signal { display: inline-block; width: 12px; height: 12px; flex: none; }
.signal-spot { background: var(--sponsor); border-radius: 50%; }
.signal-orbit { background: var(--amplifier); border-radius: 50%; }
.signal-paddle { background: var(--foreground); border-radius: 3px; height: 6px; width: 16px; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px var(--gutter) 36px;
  display: flex; flex-wrap: wrap; gap: 10px 32px; justify-content: space-between;
  color: var(--foreground-muted); font-size: 0.88rem;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; }
}
