*, *::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;
  font-family: var(--font-text);
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 var(--sp-4);
  text-wrap: balance;
}
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); font-weight: 600; letter-spacing: 0; }

p { margin: 0 0 var(--sp-4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

img, svg, picture { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.25em; }
li { margin-bottom: var(--sp-2); }

hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-6) 0; }

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

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--sp-5); }
.wrap--narrow { max-width: var(--wrap-narrow); }

.section { padding-block: var(--sp-8); }
.section--tight { padding-block: var(--sp-7); }
.section--cream { background: var(--cream); }
.section--ink { background: var(--ink); color: var(--cream); }
.section--ink h1, .section--ink h2, .section--ink h3 { color: var(--cream); }

.stack > * + * { margin-top: var(--sp-4); }
.row { display: flex; gap: var(--sp-4); align-items: center; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.grow { flex: 1; }

.grid { display: grid; gap: var(--sp-5); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }

.eyebrow {
  font-family: var(--font-text);
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sea-deep);
  margin-bottom: var(--sp-3);
}
.section--ink .eyebrow { color: var(--sea); }

.lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 62ch; }
.section--ink .lede { color: color-mix(in srgb, var(--cream) 80%, transparent); }

.muted { color: var(--ink-mute); }
.small { font-size: var(--t-sm); }
.xs { font-size: var(--t-xs); }
.center { text-align: center; }
.center .lede { margin-inline: auto; }

.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: -100px; z-index: 200;
  background: var(--ink); color: var(--cream);
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-sm);
  transition: top var(--dur) var(--ease-out);
}
.skip-link:focus { top: var(--sp-4); }

/* Wide content must scroll inside itself; the page body never scrolls sideways. */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
