/* ==========================================================================
   Reset + typographic foundation
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--limewash);
  font-family: var(--body);
  font-size: var(--t-body);
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 350;
  line-height: 1.04;
  letter-spacing: -0.022em;
  margin: 0;
  /* Fraunces is variable on optical size — pushing opsz up gives the display
     cut (higher contrast, sharper joins) rather than the text cut. */
  font-variation-settings: 'opsz' 72;
  text-wrap: balance;
}

h1 { font-size: var(--t-hero); line-height: 0.95; letter-spacing: -0.035em; }
h2 { font-size: var(--t-xxl); }
h3 { font-size: var(--t-lg); }

p { margin: 0; }
p + p { margin-top: 1.1em; }

/* figure and blockquote carry a 40px side margin by default, which quietly
   insets any card built on them. */
figure, blockquote, dl, dd { margin: 0; }

a { color: inherit; }

button { font: inherit; color: inherit; background: none; border: 0; }

ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--amber); color: var(--ink); }

/* ---- utility type registers ---- */

/* Hour marks, eyebrows, captions. A third typeface would be noise — this is
   Instrument Sans pushed into a different register with tracking and scale. */
.util {
  font-family: var(--body);
  font-size: var(--t-util);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--muted);
}

.lede {
  font-size: var(--t-md);
  line-height: 1.55;
  color: var(--fg);
  max-width: 46ch;
}

.prose {
  max-width: var(--measure);
  color: var(--muted);
}

.on-light .prose { color: var(--ash-dark); }

/* ---- focus: always visible, never removed ---- */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- skip link ---- */
.skip {
  position: absolute;
  left: var(--s-2);
  top: -100px;
  z-index: 200;
  background: var(--amber);
  color: var(--ink);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  font-size: var(--t-sm);
  transition: top 0.2s var(--ease);
}
.skip:focus { top: var(--s-2); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ==========================================================================
   Motion — every animated property is gated on this media query
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
