/* =====================================================================
   BH5 — Base / reset / typography
   ===================================================================== */

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

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

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* faint engineering blueprint grid, barely-there */
  background-image:
    linear-gradient(to right, rgba(15,26,22,.022) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15,26,22,.022) 1px, transparent 1px);
  background-size: 48px 48px;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
picture { display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { font-weight: 600; line-height: var(--lh-snug); letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); letter-spacing: -0.035em; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.03em; }
h3 { font-size: var(--fs-h3); }
p  { text-wrap: pretty; }

:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-sm); }

::selection { background: var(--blue-700); color: #fff; }

/* ---------- shared utility primitives ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); }
.section { padding-block: var(--space-section); }
.prose { max-width: var(--maxw-prose); }
.lead { font-size: var(--fs-lead); color: var(--text-muted); line-height: 1.5; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  display: inline-flex; align-items: center; gap: .55rem;
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: var(--accent); display: inline-block;
}
.eyebrow.on-dk { color: var(--accent-on-dk); }
.eyebrow.on-dk::before { background: var(--accent-on-dk); }

.mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1; }
.muted { color: var(--text-muted); }

/* skip link */
.skip {
  position: absolute; left: -999px; top: 0; background: var(--ink-900); color: #fff;
  padding: .6rem 1rem; border-radius: var(--r-sm); z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

/* reveal-on-scroll (progressive; no-JS shows everything) */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
