/* base.css — reset, typography and shared building blocks */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-gutter: stable;
  overscroll-behavior-x: none;
  background: var(--bg);
}
html.is-locked { overflow: hidden; }

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
  overflow-x: clip;
}

/* Smooth hand-off when the theme changes */
html.theme-fade, html.theme-fade * {
  transition: background-color 320ms ease, color 320ms ease, border-color 320ms ease, fill 320ms ease, stroke 320ms ease !important;
}
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 320ms; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
ul, ol { list-style: none; }
table { border-collapse: collapse; }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}

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

/* Type */
.eyebrow {
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.section-head { margin-bottom: var(--space-5); }
.section-head h2 {
  font-size: var(--fs-title);
  font-weight: 700;
  letter-spacing: var(--track-title);
  line-height: 1.12;
}
.section-head p {
  margin-top: var(--space-2);
  color: var(--text-2);
  font-size: var(--fs-callout);
  max-width: 70ch;
}
.section-head p + p { margin-top: var(--space-1); font-size: var(--fs-footnote); }
.link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent-line);
}
.link:hover { text-decoration-color: currentColor; }

.section { padding-block: var(--space-7) 0; }
.section:first-child { padding-top: var(--space-6); }

/* Press feedback: things react the moment they are pressed */
.pressable {
  transition: transform var(--dur-quick) var(--ease-spring), background-color var(--dur-quick) ease, border-color var(--dur-quick) ease, box-shadow var(--dur-ui) var(--ease-spring), color var(--dur-quick) ease;
}
.pressable:active { transform: scale(var(--press-scale)); transition-duration: 90ms; }

/* Scroll reveal (only when JavaScript is running and motion is allowed) */
.js .reveal { opacity: 0; transform: translateY(var(--reveal-distance)); }
.js .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.js .reveal.is-in.no-anim { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { transform: none; }
  .js .reveal.is-in { transition: opacity 240ms ease; }
}

/* Icons */
.icon { width: 1em; height: 1em; flex: none; }
.icon--stroke { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon--fill { fill: currentColor; }

noscript .noscript {
  display: block; max-width: 40rem; margin: 20vh auto; padding: 0 var(--gutter);
  font-size: var(--fs-lead); line-height: 1.6;
}
