/* ============================================================================
   Reset + typography
   ========================================================================== */

*, *::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(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.62;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
/* `hidden` makes body a scroll container, which silently breaks every
   position:sticky inside it. `clip` clips without scrolling, so the two
   pinned stages keep working. */
@supports (overflow-x: clip) {
  body { overflow-x: clip; }
}

/* locked while the opening plays */
body.is-intro { overflow: hidden; height: 100%; }

h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, video, svg, canvas { display: block; max-width: 100%; }
img, video { height: auto; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 1px;
}

::selection { background: var(--gold-wash); color: var(--ink); }

/* --- headings ---------------------------------------------------------- */
.display {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.017em;
  font-optical-sizing: auto;
}

h1.display { font-size: var(--t-hero); }
h2.display { font-size: var(--t-h2); line-height: 1.06; }
h3.display { font-size: var(--t-h3); line-height: 1.18; letter-spacing: -0.01em; }

.italic { font-style: italic; }

/* Small caps label — the typographic unit the whole site is organised by.  */
.label {
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.label--gold { color: var(--gold); }

.lead {
  font-size: var(--t-lead);
  line-height: 1.58;
  color: var(--ink-2);
  max-width: var(--measure);
}

.muted { color: var(--ink-2); }
.measure { max-width: var(--measure); }

/* --- section header ---------------------------------------------------- */
.sec-head {
  display: grid;
  gap: 1.15rem;
  margin-bottom: clamp(2.5rem, 5vw, 4.25rem);
}
.sec-head__index {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.sec-head__index::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
  max-width: 7rem;
}

/* --- scroll reveal ----------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition:
    opacity var(--slow) var(--ease-out),
    transform var(--slow) var(--ease-out);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}
[data-reveal].is-in { will-change: auto; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
