*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: 420;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Materiality without an image asset: fixed pointer-events-none SVG-turbulence
   grain (taste-skill §6.E: fixed pseudo-element only, never a scrolling
   container). Inline data URI, zero network request. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.85" numOctaves="2" stitchTiles="stitch"/></filter><rect width="100%25" height="100%25" filter="url(%23n)"/></svg>');
  mix-blend-mode: overlay;
}

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

a {
  color: inherit;
  transition: color var(--duration) var(--ease);
}

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.container-wide {
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

h1, .display {
  font-size: var(--text-display);
  font-weight: 640;
  line-height: 1.02;
  letter-spacing: -0.03em;
  max-width: 20ch;
  text-wrap: balance;
}

h2, .headline {
  font-size: var(--text-headline);
  font-weight: 580;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h3, .title {
  font-size: var(--text-title);
  font-weight: 560;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.lede {
  font-size: 1.2rem;
  font-weight: 430;
  line-height: 1.58;
  color: var(--fg-muted);
  max-width: 58ch;
  margin-top: var(--space-3);
}

p, .body-copy {
  max-width: 65ch;
  color: var(--fg-muted);
}

/* rhythm: consistent head-to-copy gaps, no ad-hoc inline margins */
.eyebrow + h1, .eyebrow + .display { margin-top: var(--space-3); }
h2 + p, .headline + p, h2 + .body-copy, .headline + .body-copy { margin-top: var(--space-2); }
h1 + p, .display + p, h1 + .lede { margin-top: var(--space-3); }

.text-small { font-size: var(--text-small); color: var(--fg-faint); }

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

section { padding-block: var(--space-6); }
section + section { border-top: 1px solid var(--border); }

@media (max-width: 768px) {
  section { padding-block: var(--space-5); }
  h1, .display { max-width: none; }
}

/* the beam — one light line dispersing into the two accents. Used as the
   signature divider under section heads. */
.beam-rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: var(--beam);
  opacity: 0.75;
}

/* focus visibility, WCAG-conscious */
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent-verify-ink);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection { background: var(--accent-verify-soft); }

/* reveal-on-scroll: content lifts in once on first viewport entry. Hierarchy,
   not decoration — one shared ease, short, static under reduced motion. */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--duration-slow) var(--ease), transform var(--duration-slow) var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
