/* ============================================================
   base.css — reset, document typography, prose
   ============================================================ */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--masthead-h) + 1.5rem);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-prose);
  font-size: var(--step-0);
  font-optical-sizing: auto;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color var(--dur-mid) var(--ease-in-out),
              color var(--dur-mid) var(--ease-in-out);
}

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

ul, ol { list-style: none; padding: 0; }

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

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

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

::selection {
  background: var(--signal);
  color: var(--bg);
}

/* ── headings: Archivo, expanded, machined ───────────────── */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: 'wdth' 112;
  line-height: 1.02;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

/* ── utility type ─────────────────────────────────────────── */
.eyebrow,
.chapter__index,
.scale__title,
.scale__foot,
.telemetry dt,
.portrait__caption,
.milestone__year,
.contact__label,
.colophon__meta,
.scroll-cue__label,
.domain__index {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.4;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--signal);
}

.eyebrow__tick {
  width: 1.75rem;
  height: var(--hair);
  background: currentColor;
  flex: none;
}

/* ── prose ────────────────────────────────────────────────── */
.prose {
  max-width: var(--measure);
  font-size: var(--step-0);
  line-height: 1.72;
  color: var(--ink-soft);
}

.prose > * + * { margin-top: var(--space-m); }

.prose__lead {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink);
  font-weight: 400;
}

.prose em { font-style: italic; }

/* Links inside body copy. The global reset strips underlines, so without this
   an inline link is indistinguishable from the text around it. */
.prose a,
.milestone__body a {
  color: inherit;
  background-image: linear-gradient(var(--signal), var(--signal));
  background-size: 100% var(--hair);
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: color var(--dur-fast) var(--ease-out);
}

.prose a:hover,
.milestone__body a:hover { color: var(--signal); }

/* Accessibility helpers */
.skip-link {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -140%);
  z-index: 100;
  padding: var(--space-2xs) var(--space-m);
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: transform var(--dur-fast) var(--ease-out);
}

.skip-link:focus-visible { transform: translate(-50%, 0); }
