/* Base: reset, typography, layout primitives. */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  font-feature-settings: "ss01", "ss02", "cv11";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
svg { fill: currentColor; }

a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

input, textarea, select {
  font: inherit;
  color: inherit;
}

/* ---------- Typography ------------------------------------------ */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: var(--text);
  text-wrap: balance;
}

h1 { font-size: var(--step-5); font-weight: 900; letter-spacing: -0.02em; }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); line-height: 1.05; }
h4 { font-size: var(--step-1); font-weight: 700; line-height: 1.1; }

p { max-width: 65ch; text-wrap: pretty; }
p.lede { font-size: var(--step-1); line-height: 1.45; color: var(--text-muted); max-width: 50ch; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step--1);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--accent);
}

.display-number {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--step-5);
  line-height: 0.85;
  letter-spacing: -0.03em;
  color: var(--brand-deep);
  font-variant-numeric: tabular-nums;
}

/* ---------- Layout primitives ------------------------------------ */

.page {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-pad);
}

.section {
  padding-block: clamp(64px, 10vw, 144px);
}

.section--tight { padding-block: clamp(48px, 6vw, 88px); }

.rule {
  border: 0;
  height: 1px;
  background: var(--rule);
}

.stack { display: flex; flex-direction: column; }
.stack-sm { gap: var(--space-sm); }
.stack-md { gap: var(--space-md); }
.stack-lg { gap: var(--space-lg); }
.stack-xl { gap: var(--space-xl); }

/* Focus ring — always visible for keyboard users. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--brand-deep);
  color: var(--cream-50);
  padding: 12px 16px;
  z-index: 100;
  transition: top var(--dur-fast) var(--ease-out-quart);
}
.skip-link:focus { top: 16px; }

/* Reveal on scroll (used by JS) */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms var(--ease-out-expo), transform 600ms var(--ease-out-expo);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
