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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
}

body.has-mobile-bar {
  padding-bottom: 0;
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4, p, ul, ol, figure {
  margin-top: 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink);
}

h1 { font-size: var(--h1); margin-bottom: var(--space-4); }
h2 { font-size: var(--h2); margin-bottom: var(--space-4); }
h3 { font-size: var(--h3); margin-bottom: var(--space-3); }

p { margin-bottom: 0.9rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:hover { color: var(--accent-hover); }

ul, ol { padding-left: 1.15rem; }

:focus { outline: none; }

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

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: 0;
  transform: translateY(-120%);
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1rem;
  z-index: 80;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.container-wide {
  width: min(76rem, calc(100% - 2rem));
  margin-inline: auto;
}

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

.muted { color: var(--muted); }
.lead {
  font-size: var(--lead);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 42rem;
}

.eyebrow {
  display: inline-block;
  margin-bottom: var(--space-3);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.section {
  padding-block: var(--section);
}

.section-head {
  max-width: 40rem;
  margin-bottom: var(--space-6);
}

.section-dark {
  background: var(--dark);
  color: var(--on-dark);
}

.section-dark h2,
.section-dark h3 { color: var(--on-dark); }

.section-dark .muted,
.section-dark .lead { color: var(--on-dark-muted); }

.section-alt { background: #000; }

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

.js .reveal.is-in {
  animation: rise 0.45s ease;
}

@keyframes rise {
  from { transform: translateY(8px); }
  to { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal.is-in { animation: none; }
}

@media (max-width: 480px) {
  .container,
  .container-wide { width: min(var(--max), calc(100% - 1.5rem)); }
}
