/* ==========================================================================
   Base — reset, typography, layout helpers, accessibility, motion
   ========================================================================== */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Solid strip under the iOS status bar / notch, so content never shows through it */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 60;
  background: var(--bg);
}

h1, h2, h3 { margin: 0; font-family: var(--font); color: var(--ink); text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
img, video, svg { max-width: 100%; }

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

/* ---------- Layout ---------- */

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

.section { padding-block: clamp(72px, 10vw, 128px); }

/* Sections that follow another section directly: no top padding, so leave room
   for the fixed nav when the menu jumps to them */
.section--flush-top { padding-top: 0; scroll-margin-top: var(--nav-offset); }

/* ---------- Section headings ---------- */

.section-head { display: flex; flex-direction: column; gap: 14px; }

.eyebrow {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.title {
  font-size: clamp(34px, 4.6vw, 58px);
  font-weight: 750;
  line-height: 1.04;
  letter-spacing: -.03em;
}
.title--md { font-size: clamp(32px, 4vw, 50px); line-height: 1.05; }
.title--sm { font-size: clamp(26px, 2.8vw, 38px); line-height: 1.08; }

.lead { max-width: 58ch; font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); }

/* ---------- Accessibility ---------- */

.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 80;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}
.skip-link:focus { top: calc(env(safe-area-inset-top, 0px) + 12px); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Reveal on scroll ----------
   Content is visible by default; script only nudges below-the-fold blocks
   (adds .is-below) and slides them up as they enter. */

.reveal { transition: transform .9s var(--ease-out); }
.reveal.is-below { transform: translateY(24px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal.is-below { transform: none; }
}
