/* STAMPEDE website · styles.css · 2026-09-12 (lane 01 successor)
   Shared foundation for index.html and demo/: fonts, tokens, base, buttons, nav, badges, footer — rules the demo
   depends on are unchanged from the previous website. Home-page rules live in home.css (namespaced .h-*).
   Contract: DESIGN.md (website). Brand colours from the STAMPEDE brand kit; readability override recorded there:
   white hierarchy, body text ≥ 12:1 on black, visible 1 px rules, generous spacing. Radius 0 everywhere. */

/* ---------- fonts (self-hosted, SIL OFL 1.1 — licenses next to the files) ---------- */
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('assets/fonts/bricolage-grotesque-latin-wght-normal.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('assets/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('assets/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('assets/fonts/ibm-plex-mono-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  /* brand (unchanged hex values from the kit) */
  --black: #050505;
  --surface: #0d0a0a;
  --surface-2: #150f10;
  --active: #260d12;
  --red: #ff3344;
  --red-dark: #351419;
  --text: #f2f2f2;
  --secondary: #a3a3a3;

  /* website readability override (see DESIGN.md §2) */
  --body: #d2d2d2;          /* body copy, 13.6:1 on black */
  --muted: #9a9a9a;         /* captions only, 7.2:1 */
  --line: #3a1f24;          /* structural 1 px rules: brand dark red, one step brighter so it is visible */
  --line-strong: #5a2a31;   /* hover / emphasis rule */
  --focus: #f2f2f2;

  /* type */
  --display: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* rhythm */
  --wrap: 1200px;
  --gutter: 24px;
  --section-y: clamp(64px, 9vw, 120px);
  --control: 48px;

  /* motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --dur-press: 90ms;
  --dur-fast: 120ms;
  --shadow-pressed: 4px 4px 0 0 var(--red-dark);
}

/* ---------- base ---------- */
*, *::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: var(--black);
  color: var(--body);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3 {
  font-family: var(--display);
  color: var(--text);
  margin: 0;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(38px, 5.4vw, 68px); line-height: 1.02; font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.08; font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.2; font-weight: 600; }
p { margin: 0; }
em { font-style: normal; color: var(--text); }
strong { color: var(--text); font-weight: 600; }
a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--red); }
code, kbd, pre { font-family: var(--mono); }
code { color: var(--text); background: var(--surface-2); padding: 1px 5px; font-size: 0.94em; }
kbd {
  display: inline-block; min-width: 20px; padding: 0 5px; margin: 0 1px;
  border: 1px solid var(--secondary); color: var(--text); font-size: 12px; line-height: 18px; text-align: center; vertical-align: 1px;
}
img, video { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
dl, dd { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100; padding: 12px 16px;
  background: var(--text); color: var(--black); font-weight: 600; text-decoration: none;
}
.skip:focus-visible { top: 16px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* mono small type */
.caption, .eyebrow, .micro, .badge, .footer-note, dt {
  font-family: var(--mono);
}
.eyebrow { color: var(--red); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.caption { color: var(--muted); font-size: 13px; letter-spacing: 0.02em; }
.micro { color: var(--muted); font-size: 13px; }

/* shared copy blocks (used by demo/ and the home page) */
.lead { font-size: clamp(16px, 1.25vw, 18px); line-height: 1.65; max-width: 62ch; color: var(--body); }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; height: var(--control); padding: 0 20px;
  font-family: var(--mono); font-weight: 600; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase;
  text-decoration: none; border: 1px solid transparent; white-space: nowrap;
  transition: transform var(--dur-press) linear, box-shadow var(--dur-press) linear,
              background-color var(--dur-fast) ease, border-color var(--dur-fast) ease, color var(--dur-fast) ease;
}
.btn-lg { height: 56px; padding: 0 26px; font-size: 15px; }
.btn .arrow { font-family: var(--mono); font-weight: 400; }
.btn-primary { background: var(--red); color: var(--black); border-color: var(--red); box-shadow: var(--shadow-pressed); }
.btn-primary:active { transform: translate(2px, 2px); box-shadow: 0 0 0 0 var(--red-dark); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--secondary); }
.btn-ghost:active { transform: translate(1px, 1px); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: #ff4d5c; border-color: #ff4d5c; }
  .btn-ghost:hover { border-color: var(--text); background: var(--surface-2); }
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--black) 88%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-row { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.lockup { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }
.lockup .mark { width: 32px; height: 32px; }
.lockup .lockup-word { width: 122px; height: 24px; }
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--body); text-decoration: none; font-size: 14px; font-weight: 500;
}
.nav-links a:hover { color: var(--text); }
.nav-cta { margin-left: auto; display: flex; gap: 10px; }
@media (max-width: 959px) {
  .nav-links { display: none; }
  .nav-cta .btn-ghost { display: none; }
}
@media (max-width: 479px) {
  .nav-row { min-height: 60px; gap: 12px; }
  .nav-cta .btn { padding: 0 14px; font-size: 13px; }
}

/* ---------- sections ---------- */
.section { padding: var(--section-y) 0; border-bottom: 1px solid var(--line); }
.section-alt { background: var(--surface); }

.badge {
  display: inline-flex; align-items: center; gap: 8px; vertical-align: middle;
  padding: 2px 8px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; line-height: 18px;
  color: var(--text); border: 1px solid var(--secondary); white-space: nowrap;
}
.badge::before { content: ""; width: 8px; height: 8px; flex: none; }
.badge-shot::before   { background: var(--secondary); }
.badge-replay::before { border: 1px solid var(--text); background: transparent; }
.badge-live::before   { background: var(--text); }
.badge-live { border-color: var(--text); }
.tag-exp { display: inline-block; margin-left: 8px; padding: 1px 7px; border: 1px dashed var(--secondary); color: var(--secondary); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; vertical-align: 2px; }
@media (max-width: 599px) {
  .badge { white-space: normal; line-height: 1.4; }
}

/* ---------- footer ---------- */
.footer { padding: 28px 0 40px; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; font-size: 13px; color: var(--muted); }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 2px 8px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: var(--body); text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.footer-note { margin-left: auto; }
@media (max-width: 599px) { .footer-note { margin-left: 0; } }

/* standalone text links: 44 px hit area without changing the layout (negative margins cancel the padding) */
.footer-brand a {
  display: inline-block; padding: 12px 0; margin: -12px 0;
}

/* ---------- reduced motion: fewer, gentler; content identical ---------- */
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
