/* ============================================================================
 *  base.css — reset, typography, focus, motion, a11y primitives.
 *  (.hp honeypot must stay hidden — forms.js relies on it.)
 * ========================================================================== */

*, *::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; } }

body {
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--espresso);
  background: var(--oat);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

/* ---- Headings: Bricolage Grotesque display ----------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 640;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--espresso);
  text-wrap: balance;
}
h1 { font-size: var(--step-6); letter-spacing: -0.03em; }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); font-weight: 600; }
h4 { font-size: var(--step-1); font-weight: 600; }

p { text-wrap: pretty; }
strong, b { font-weight: 600; }

a { color: var(--clay-700); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--clay); }

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

:focus-visible { outline: 2.5px solid var(--clay); outline-offset: 3px; border-radius: 4px; }
:focus:not(:focus-visible) { outline: none; }
::selection { background: var(--clay-300); color: var(--espresso); }

/* ---- Honeypot + a11y --------------------------------------------------- */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.skip-link {
  position: absolute; left: 16px; top: -48px; background: var(--espresso); color: #fff;
  padding: 10px 16px; border-radius: var(--r-sm); z-index: 100; transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 16px; color: #fff; }

/* ---- Layout primitives -------------------------------------------------- */
.container { width: min(100% - 2 * var(--space-m), var(--container)); margin-inline: auto; }
.container--wide { --container: var(--container-wide); }
.section { padding-block: var(--space-3xl); }
.measure { max-width: var(--measure); }
.center { text-align: center; margin-inline: auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--font); font-size: var(--step--1); font-weight: 700;
  letter-spacing: 0.17em; text-transform: uppercase; color: var(--clay-700);
}
.eyebrow::before { content: ""; width: 1.9rem; height: 2px; background: var(--brass); border-radius: 2px; }
.eyebrow--center::after { content: ""; width: 1.9rem; height: 2px; background: var(--brass); border-radius: 2px; }

.lede { font-size: var(--step-1); line-height: 1.55; color: color-mix(in oklab, var(--espresso) 82%, var(--oat)); }

[data-form-success] { color: var(--clay-700); font-weight: 600; }
[data-form-error]   { color: oklch(52% 0.17 25); font-weight: 500; }

/* ---- Reveal on scroll (gated on html.js so content shows without JS) ---- */
html.js [data-reveal] {
  opacity: 0; transform: translateY(18px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
  will-change: opacity, transform;
}
html.js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
