/* ============================================================
   Base — reset, elements, type utilities, layout primitives
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--text-on-dark);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* The width/height attributes on each <img> reserve layout space and stop
   the page shifting as images load, but without this the height attribute
   stays fixed while max-width shrinks the width — which squashes the image.
   Anything that needs a fixed height sets one on its own class. */
img { height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--hivis);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--hivis);
  color: var(--ink);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

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

.wrap {
  width: 100%;
  max-width: 78rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow { max-width: 58rem; }

section { padding-block: var(--space-section); }

.section--bone {
  background: var(--bone);
  color: var(--text-on-light);
}

/* ---------- Type ---------- */

.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--leading-display);
  letter-spacing: -0.015em;
  text-transform: uppercase;
  text-wrap: balance;
}

h1.display { font-size: var(--text-hero); }
h2.display { font-size: var(--text-h2); }

.h3 {
  font-family: var(--font-body);
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.lede {
  font-size: var(--text-lede);
  line-height: 1.55;
  max-width: var(--measure);
  color: var(--text-on-dark-mid);
}
.section--bone .lede { color: var(--text-on-light-mid); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--text-micro);
  font-weight: 700;
  letter-spacing: var(--tracking-micro);
  text-transform: uppercase;
  color: var(--hivis);
}
.section--bone .eyebrow { color: var(--text-on-light-mid); }

.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: currentColor;
}

/* The signature move: hi-vis highlight sweep behind a phrase */
.mark {
  background: var(--hivis);
  color: var(--ink);
  padding: 0 0.16em 0.04em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.muted { color: var(--text-on-dark-mid); }
.section--bone .muted { color: var(--text-on-light-mid); }

/* ---------- Section head ---------- */

.section-head {
  display: grid;
  gap: 1.1rem;
  margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}

.section-head .lede { margin-top: 0.25rem; }

@media (min-width: 62rem) {
  .section-head--split {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: end;
    column-gap: 3rem;
  }
  .section-head--split .eyebrow { grid-column: 1 / -1; }
}

/* ---------- Reveal ---------- */

/* Only hide reveal targets once JS has confirmed it can show them again. */
.js .reveal {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
}
.js .reveal.is-visible { opacity: 1; transform: translate3d(0, 0, 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
