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

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.62;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100dvh;
}

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

/* Stroke icons (Lucide-style) drawn from the sprite */
.icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  width: 1em; height: 1em;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
input, textarea, select { font: inherit; }

:focus-visible {
  outline: 2px solid var(--arcane);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--gold-glow); color: var(--ink); }

/* --- Headings --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
  font-optical-sizing: auto;
}
h1 { font-size: var(--step-5); letter-spacing: -0.032em; line-height: 0.98; }
h2 { font-size: var(--step-4); letter-spacing: -0.028em; }
h3 { font-size: var(--step-2); letter-spacing: -0.02em; line-height: 1.08; }
h4 { font-size: var(--step-1); letter-spacing: -0.01em; line-height: 1.15; }

p { text-wrap: pretty; }

strong { color: var(--ink); font-weight: 650; }
em { font-style: italic; }

/* --- Layout primitives --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 4vw, 2.5rem);
}
.container-wide { max-width: var(--container-wide); }

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(3rem, 5vw, 5rem); }

.stack > * + * { margin-top: var(--flow, 1.5rem); }

/* --- Eyebrow / kicker (used deliberately, not on every section) --- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.section-head { max-width: 62ch; }
.section-head .lead {
  margin-top: 1.1rem;
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 380;
  letter-spacing: -0.01em;
}

.lead-body { color: var(--muted); max-width: 60ch; }

/* --- Utility --- */
.mono { font-family: var(--font-mono); }
.text-gold { color: var(--gold); }
.text-arcane { color: var(--arcane); }
.text-ember { color: var(--ember); }
.text-ink { color: var(--ink); }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.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;
}
.skip-link {
  position: fixed; top: -100px; left: 12px; z-index: var(--z-toast);
  background: var(--gold); color: var(--on-primary); padding: 10px 16px;
  border-radius: var(--r-1); font-weight: 600; transition: top var(--dur-2) var(--ease-out);
}
.skip-link:focus { top: 12px; }

/* line accents */
.hr {
  height: 1px; border: 0;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  margin-block: var(--sp-7);
}
