/* ==========================================================================
   BASE — reset, typography, utilities
   ========================================================================== */

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

html {
  -webkit-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;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  background: var(--paper);
  color: var(--paper-text);
  -webkit-font-smoothing: antialiased;
}

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

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

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

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

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.08; font-weight: 600; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { max-width: 62ch; }
.measure-wide { max-width: 74ch; }

em, .italic { font-style: italic; }

/* Focus visibility — never remove, only restyle */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }

/* ---- Layout ---- */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section { padding-block: var(--sp-9); }
.section--tight { padding-block: var(--sp-7); }

.surface-ink   { background: var(--ink); color: var(--ink-text); }
.surface-paper { background: var(--paper); color: var(--paper-text); }

.grid {
  display: grid;
  gap: var(--sp-6);
}
@media (min-width: 780px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

.stack { display: flex; flex-direction: column; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-4); }

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

.skip-link {
  position: absolute; left: var(--sp-4); top: -60px;
  background: var(--gold); color: var(--ink); padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius-sm); z-index: 200; transition: top var(--dur-fast) var(--ease);
  font-weight: 600;
}
.skip-link:focus { top: var(--sp-4); }

/* ---- Type utilities ---- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--gold-dim);
}

.lede { font-size: var(--fs-lead); color: var(--paper-text-muted); max-width: 60ch; }
.surface-ink .lede { color: var(--ink-text-muted); }

.mono { font-family: var(--font-mono); }

/* Lazy-loaded images: avoid layout shift */
img[loading="lazy"] { background: var(--paper-2); }

/* ---- Entrance motion ----
   Content is visible by default with no JS or scroll dependency (this
   matters for accessibility, SEO crawlers, and anyone whose JS is slow
   or blocked). Only the hero gets a one-shot, load-triggered fade-up via
   pure CSS. Everything else relies on hover states for motion instead of
   hide-until-scrolled tricks. */
[data-reveal], [data-reveal="stagger"] > * { opacity: 1; transform: none; }

@media (prefers-reduced-motion: no-preference) {
  .hero-fade-up {
    animation: fadeUp 700ms var(--ease) both;
  }
  .hero-fade-up.hero-fade-up--delay { animation-delay: 120ms; }
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
  }
}
