/* ==========================================================================
   Base — reset, primitives, typography defaults, a11y, motion guards
   ========================================================================== */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* offset in-page anchors from the fixed header */
  scroll-padding-top: 96px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* clip (not hidden) — hides sideways bleed without turning the root into a
     stuck scroll container */
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  color: var(--c-ink);
  background: var(--c-white);
  overflow-x: clip;
}

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

img { height: auto; }

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

button { cursor: pointer; background: none; border: none; }

a {
  color: inherit;
  text-decoration: none;
}

:where(ul, ol)[role="list"] { list-style: none; padding: 0; }

:where(h1, h2, h3, h4) {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-display);
}

strong, b { font-weight: 700; }

/* --- Focus: visible, on-brand, never removed -------------------------------
   Default outline is ink — mint measures ~1.3:1 on white and fails the 3:1
   non-text-contrast minimum (WCAG 1.4.11) on the site's light sections.
   Dark/photo sections (and the nav while it floats transparent over the
   hero) get the mint outline back, where it has plenty of contrast. ------ */
:focus-visible {
  outline: 3px solid var(--c-ink);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-dark :focus-visible,
.section--dark :focus-visible,
[data-bg="dark"] :focus-visible,
[data-header][data-over="dark"] :focus-visible { outline-color: var(--c-mint); }

/* --- Screen-reader only ------------------------------------------------- */
.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: -100%;
  z-index: var(--z-overlay);
  background: var(--c-ink);
  color: var(--c-white);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-xs);
  transition: top var(--dur-2) var(--ease-out);
}
.skip-link:focus { top: var(--sp-4); }

/* --- Layout primitives ------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--content-max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--flush { padding-inline: 0; }

.section { position: relative; padding-block: var(--section-pad-y); }
.section--dark {
  background: var(--c-ink-3);
  color: var(--c-white);
}
.section--tight { padding-block: clamp(2.5rem, 1.7rem + 3.6vw, 4rem); }

/* editorial two-part section header: big title + right-aligned lede */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-7);
  margin-bottom: var(--sp-8);
}
.section-head__title {
  font-size: var(--fs-section);
  max-width: 12ch;
}
.section-head__lede {
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  letter-spacing: normal;
  max-width: 42ch;
  text-align: right;
  color: currentColor;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-3xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--c-ink);
}
.section--dark .eyebrow { color: var(--c-grey); }

/* --- Motion: scroll-reveal system ------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(var(--reveal-shift));
  transition:
    opacity var(--dur-4) var(--ease-out),
    transform var(--dur-4) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@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;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* utility */
.u-visually-flat { transform: none !important; }
.text-right { text-align: right; }
