
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--sp-6));
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-stretch: var(--wdth-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  color: var(--color-text-secondary);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums lining-nums;
  overflow-x: clip;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; margin: 0; padding: 0; }

img, svg, video, canvas { display: block; max-width: 100%; }
img, video { height: auto; }

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; }

a { color: var(--color-text-link); text-decoration-thickness: 1px; text-underline-offset: 3px; }

hr {
  border: 0;
  border-top: var(--border-hair) solid var(--color-divider);
  margin: var(--space-block) 0;
}

::selection { background: var(--orange-200); color: var(--ink-900); }

.display, .h1, .h2, .h3, .h4,
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-stretch: var(--wdth-display);
  color: var(--color-text-primary);
  text-wrap: balance;

  overflow-wrap: break-word;
  min-width: 0;
}

.display { font-size: var(--fs-display); line-height: 1.06; letter-spacing: var(--ls-display); font-weight: var(--fw-semibold); }
.h1, h1  { font-size: var(--fs-h1);  line-height: var(--lh-h1);  letter-spacing: var(--ls-h1);  font-weight: var(--fw-semibold); }
.h2, h2  { font-size: var(--fs-h2);  line-height: var(--lh-h2);  letter-spacing: var(--ls-h2);  font-weight: var(--fw-semibold); }
.h3, h3  { font-size: var(--fs-h3);  line-height: var(--lh-h3);  letter-spacing: var(--ls-h3);  font-weight: var(--fw-bold); }
.h4, h4  { font-size: var(--fs-h4);  line-height: var(--lh-h4);  letter-spacing: var(--ls-h4);  font-weight: var(--fw-bold); }

.body-lg { font-size: var(--fs-body-lg); line-height: var(--lh-body-lg); }
.body    { font-size: var(--fs-body);    line-height: var(--lh-body); }
.body-sm { font-size: var(--fs-body-sm); line-height: var(--lh-body); }
.caption { font-size: var(--fs-caption); line-height: var(--lh-tight); color: var(--color-text-muted); }

.eyebrow {
  display: flex; align-items: center; gap: var(--sp-3);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--color-accent-strong);
  line-height: var(--lh-flat);
  margin-bottom: var(--sp-5);
}
.eyebrow::before {
  content: ""; width: 28px; height: var(--border-rule);
  background: var(--color-accent); flex: none;
}
.eyebrow--invert { color: var(--orange-300); }
.eyebrow--invert::before { background: var(--orange-400); }
.eyebrow--plain::before { display: none; }

.lead {
  font-size: var(--fs-body-lg);
  line-height: var(--lh-body-lg);
  color: var(--color-text-secondary);
  max-width: var(--measure);
}

:where(h1, h2, h3, .display, .h1, .h2, .h3) + .lead { margin-top: var(--sp-5); }

.measure      { max-width: var(--measure); }
.measure-tight{ max-width: var(--measure-tight); }
.measure-wide { max-width: var(--measure-wide); }

.text-primary  { color: var(--color-text-primary); }
.text-secondary{ color: var(--color-text-secondary); }
.text-muted    { color: var(--color-text-muted); }
.text-accent   { color: var(--color-accent-strong); }
.text-brand    { color: var(--color-primary); }

.prose > * + * { margin-top: var(--sp-5); }
.prose h2 { margin-top: var(--sp-9); }
.prose h3 { margin-top: var(--sp-8); }
.prose p, .prose li { max-width: var(--measure); }
.prose strong { font-weight: var(--fw-bold); color: var(--color-text-primary); }
.prose a { color: var(--color-text-link); font-weight: var(--fw-semibold); }

.on-dark,
.on-dark .h1, .on-dark .h2, .on-dark .h3, .on-dark .h4,
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4,
.on-dark .display { color: var(--color-text-onbrand); }
.on-dark .lead,
.on-dark .text-secondary { color: var(--blue-200); }
.on-dark .text-muted,
.on-dark .caption { color: var(--blue-300); }
.on-dark a { color: var(--white); }
.on-dark hr { border-color: var(--color-divider-invert); }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: var(--state-focus-width) solid var(--state-focus-ring);
  outline-offset: var(--state-focus-offset);
  border-radius: var(--radius-xs);
}
.on-dark :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible,
.is-invert :focus-visible {
  outline-color: var(--state-focus-ring-in);
}

.skip-link {
  position: absolute; left: var(--sp-4); top: var(--sp-4);
  z-index: var(--z-toast);
  transform: translateY(-200%);
  background: var(--color-primary); color: var(--white);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius-md);
  font-weight: var(--fw-bold); font-size: var(--fs-body-sm);
  text-decoration: none;
  transition: transform var(--dur-fast) var(--ease-standard);
}
.skip-link:focus { transform: translateY(0); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

[data-reveal-ready] .reveal {
  opacity: 0;
  transform: translateY(var(--reveal-shift));
  transition: opacity var(--dur-reveal) var(--ease-enter),
              transform var(--dur-reveal) var(--ease-enter);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal-ready] .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal-ready] .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

.stack-1 > * + * { margin-top: var(--sp-1); }
.stack-2 > * + * { margin-top: var(--sp-2); }
.stack-3 > * + * { margin-top: var(--sp-3); }
.stack-4 > * + * { margin-top: var(--sp-4); }
.stack-5 > * + * { margin-top: var(--sp-5); }
.stack-6 > * + * { margin-top: var(--sp-6); }
.stack-8 > * + * { margin-top: var(--sp-8); }
.stack-9 > * + * { margin-top: var(--sp-9); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
.mt-9 { margin-top: var(--sp-9); }
.no-wrap { white-space: nowrap; }
