/* =========================================================================
   Base — reset, document, typography
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--leading-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
  color: var(--text);
  text-wrap: balance;
}
h1 { font-size: var(--step-5); font-weight: 700; }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); letter-spacing: -0.01em; }
h4 { font-size: var(--step-1); letter-spacing: -0.005em; }

/* the logo's italic, used once per heading at most */
.hl { font-style: italic; color: var(--brand-text); padding-right: 0.06em; }
.section--dark .hl, .hero .hl { color: var(--brand); }

p { text-wrap: pretty; }

a { color: inherit; text-decoration-color: color-mix(in oklch, currentColor 35%, transparent); text-underline-offset: 0.18em; }

strong, b { font-weight: 600; }

.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

.icon { width: 1.2em; height: 1.2em; flex: none; display: inline-block; vertical-align: -0.18em; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}
.section--dark :focus-visible, .site-header :focus-visible, .site-footer :focus-visible, .hero :focus-visible { outline-color: var(--brand); }

::selection { background: var(--brand); color: var(--brand-ink); }

.skip-link {
  position: absolute;
  left: 50%; top: 0;
  translate: -50% -120%;
  z-index: var(--z-toast);
  background: var(--brand); color: var(--brand-ink);
  padding: 0.7rem 1.2rem; border-radius: 0 0 var(--r-sm) var(--r-sm);
  font-weight: 600; text-decoration: none;
  transition: translate var(--dur-fast) var(--ease-out-quart);
}
.skip-link:focus { translate: -50% 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }
