/* Base: reset, typography, focus, utilities, motion. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: "ss01" 0;
  background: var(--canvas);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.2; font-weight: 600; color: var(--ink); }
h1 { font-size: var(--fs-h1); font-weight: 650; letter-spacing: -0.02em; line-height: 1.12; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.01em; }
h3 { font-size: var(--fs-h3); }
h4 { font-size: 0.95rem; }
p { margin: 0 0 0.75em; }
small { font-size: var(--fs-caption); }
strong, b { font-weight: 600; }
img, svg { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-5) 0; }

a { color: inherit; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; transition: text-decoration-color var(--t-fast) var(--ease-out); }
a:hover { text-decoration-color: var(--ink); }

code { font-family: var(--mono); font-size: 0.86em; background: var(--surface-sunken); border: 1px solid var(--line); padding: 0.05em 0.35em; border-radius: var(--r-xs); }
kbd { font-family: var(--mono); font-size: 0.72em; font-weight: 500; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: var(--r-xs); padding: 0.05em 0.4em; background: var(--surface); color: var(--ink-2); }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 2px; }

::selection { background: var(--accent); color: var(--accent-ink); }
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-sm); }
h1:focus, h1:focus-visible, main:focus { box-shadow: none; }

.sr-only { 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; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.eyebrow .mono { text-transform: none; letter-spacing: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-eyebrow); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin: 0 0 6px; }
.lead { font-size: 1.05rem; color: var(--ink-2); max-width: 68ch; }
.sub { color: var(--ink-2); font-size: var(--fs-small); }
.hint { color: var(--ink-3); font-size: var(--fs-caption); }
.spacer { flex: 1; }
.stack > * + * { margin-top: var(--s-4); }
.measure { max-width: 68ch; }

/* icons */
.icon { width: 1.125em; height: 1.125em; flex: none; display: inline-block; vertical-align: -0.2em; stroke-width: 1.9; }
.icon.sm { width: 0.95em; height: 0.95em; }
.icon.lg { width: 1.4em; height: 1.4em; }

/* skip link */
.skip { position: absolute; left: -999px; top: 8px; background: var(--btn-primary); color: var(--btn-primary-ink); padding: 10px 14px; border-radius: var(--r-md); z-index: 300; text-decoration: none; }
.skip:focus { left: 8px; }

/* motion: view entrance + cascades */
@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse-ring { 0% { transform: scale(1); opacity: 0.55; } 80%, 100% { transform: scale(2.4); opacity: 0; } }
@keyframes blink-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
main.entering > * { animation: rise-in var(--t-slow) var(--ease-out) both; }
main.entering > *:nth-child(2) { animation-delay: 40ms; }
main.entering > *:nth-child(3) { animation-delay: 80ms; }
main.entering > *:nth-child(4) { animation-delay: 120ms; }
main.entering > *:nth-child(n + 5) { animation-delay: 160ms; }
.cascade > * { animation: rise-in var(--t-slow) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 35ms); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
