/* ============================================================
   Base — reset, elements, typography, utilities.
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--sp-4));
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-text);
  font-size: var(--fs-400);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--lh-snug);
  letter-spacing: -.015em;
  font-variation-settings: "SOFT" 20, "WONK" 0;
}

h1 { font-size: var(--fs-800); line-height: var(--lh-tight); letter-spacing: -.025em; }
h2 { font-size: var(--fs-700); }
h3 { font-size: var(--fs-600); }

p { margin: 0 0 var(--sp-4); }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: .18em; }
a:hover { text-decoration-color: currentColor; }

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

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

ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.15em; }
li { margin-bottom: .35em; }

hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-7) 0; }

strong, b { font-weight: 600; }

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

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

/* ---- Layout helpers ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--sp-8); }
@media (min-width: 900px) { .section { padding-block: var(--sp-9); } }

.section--tint  { background: var(--paper-2); }
.section--mauve { background: var(--paper-3); }
.section--dark  { background: var(--ink-dark); color: #F2EEEC; }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }

.stack > * + * { margin-top: var(--sp-4); }

/* ---- Type utilities ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin: 0 0 var(--sp-3);
  font-family: var(--font-text);
  font-size: var(--fs-200);
  font-weight: 600;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: var(--coral);
}
.eyebrow--plain::before { display: none; }

.lead {
  font-size: var(--fs-500);
  color: var(--ink-2);
  max-width: 56ch;
}

.muted { color: var(--ink-3); }
.small { font-size: var(--fs-300); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}
.section-head p { max-width: 52ch; }

/* Visually hidden but available to screen readers. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100px;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: var(--sp-4); }

/* ---- Reveal on scroll (progressive: visible by default without JS) ---- */
[data-reveal] { opacity: 1; }
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
