/* ==========================================================================
   base.css — reset, type ramp bound to the tokens, links, focus, layout
   primitives. No component styling here.
   ========================================================================== */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: var(--ls-display);
  line-height: var(--lh-head);
  margin: 0;
  text-wrap: pretty;
}

h1 { font-size: var(--t-h1); line-height: var(--lh-display); }
h2 { font-size: var(--t-h3); }
h3 { font-size: var(--t-h5); }

p { margin: 0 0 var(--s-3); }
p:last-child { margin-bottom: 0; }

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--blue-dark); }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}

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

/* --- layout primitives ---------------------------------------------------- */

.wrap {
  max-width: var(--page-max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.grid {
  display: grid;
  grid-template-columns: var(--grid);
  gap: var(--s-7);
}

.col-4  { grid-column: span 4; }
.col-5  { grid-column: span 5; }
.col-7  { grid-column: span 7; }
.col-8  { grid-column: span 8; }
.col-12 { grid-column: 1 / -1; }

.stack { display: flex; flex-direction: column; }
.row   { display: flex; align-items: center; }

/* --- shared type utilities ------------------------------------------------ */

.eyebrow {
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  line-height: 1.4;
}
.eyebrow--mute { color: var(--slate-lt); }
.eyebrow--onnavy { color: var(--on-navy-lbl); }

.lead {
  font-size: var(--t-body);
  line-height: var(--lh-body);
  color: var(--body);
  max-width: 42ch;
}
.page-head .lead, .hero .lead, .featured__text .lead { max-width: none; }

.standfirst {
  font-family: var(--font-display);
  font-size: var(--t-lead);
  font-style: italic;
  line-height: var(--lh-tight);
  color: var(--blue-dark);
}

.prose { max-width: var(--measure-long); }
.prose p { font-size: var(--t-body); line-height: 1.78; color: var(--body); margin-bottom: var(--s-3); }

.skip-link {
  position: absolute;
  left: var(--s-3);
  top: -100px;
  z-index: 50;
  background: var(--navy);
  color: var(--on-navy);
  padding: var(--s-2) var(--s-4);
  border-radius: var(--radius-btn);
  font-size: var(--t-cap);
  font-weight: 600;
  transition: top 0.15s ease;
}
.skip-link:focus { top: var(--s-3); color: var(--on-navy); }

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

@media (max-width: 900px) {
  .grid { gap: var(--s-6); }
  .col-4, .col-5, .col-7, .col-8 { grid-column: 1 / -1; }
}

/* hidden must beat component display rules (the work filter uses el.hidden) */
[hidden] { display: none !important; }
