/* =============================================================
   Base — reset, typography, layout primitives, a11y
   ============================================================= */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-ink);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

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

ul,
ol {
  list-style: none;
}

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

/* --- Typography utilities (visual, independent of semantic level) --- */

/* Explicit h1 font-size (tag selector, not just .h-hero) avoids
   Chrome's deprecated nested-heading default sizing. */
h1 {
  font-size: var(--fs-hero);
}

.h-hero,
.h2,
.h3,
.h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-heading);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.h-hero {
  font-size: var(--fs-hero);
  line-height: var(--lh-tight);
  letter-spacing: -0.025em;
}

.h2 { font-size: var(--fs-h2); letter-spacing: -0.02em; }
.h3 { font-size: var(--fs-h3); }
.h4 { font-size: var(--fs-h4); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--color-accent);
}

.eyebrow::before {
  content: "";
  width: var(--space-5);
  height: 2px;
  background: var(--color-accent);
}

.lead {
  font-size: var(--fs-body-lg);
  color: var(--color-ink-muted);
  max-width: 62ch;
}

.text-muted { color: var(--color-ink-muted); }

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

.container {
  width: 100%;
  max-width: calc(var(--container-max) + var(--container-pad) * 2);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  padding-block: var(--space-section);
}

.section--alt {
  background: var(--color-paper-warm);
}

.section__head {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-9);
  max-width: 760px;
}

/* --- Accessibility --- */

.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 100;
  padding: var(--space-3) var(--space-5);
  background: var(--color-ink);
  color: var(--color-paper);
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
  transition: transform var(--dur-fast) var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --- Motion safety ---
   GSAP owns animated states via matchMedia; this is the CSS-side
   guarantee that nothing moves for reduced-motion users. */

@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;
  }
}
