/* ==========================================================================
   Base — reset, document defaults, and the states every control inherits.
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--c-cream);
  color: var(--c-ink);
  font-family: var(--f-ui);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a {
  color: var(--c-accent);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}
a:hover { color: var(--c-accent-ink); }

/* One focus treatment everywhere — never removed, only styled. */
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- type primitives ----------------------------------------------------- */

.display {
  font-family: var(--f-display);
  font-weight: 400;
  line-height: var(--lh-display);
  letter-spacing: -0.02em;
}

.lede {
  font-family: var(--f-display);
  font-size: var(--t-lede);
  line-height: var(--lh-tight);
  text-wrap: pretty;
}

.script {
  font-family: var(--f-script);
  font-size: var(--t-script);
  color: var(--c-accent);
  line-height: 1.2;
}

/* Letterspaced small caps — the recurring editorial marker. */
.caps {
  font-size: var(--t-caps);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
}
.caps--sm { font-size: var(--t-micro); letter-spacing: var(--ls-caps-sm); }
.caps--quiet { color: var(--c-olive); }

.prose { max-width: var(--measure); text-wrap: pretty; }

.u-muted { color: var(--c-muted); }
.u-olive { color: var(--c-olive); }

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