/* Reset + element defaults */

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

figure {
  margin: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

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

button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  margin: 0 0 var(--s-4);
}

h1 {
  font-size: var(--text-5xl);
}

h2 {
  font-size: var(--text-3xl);
}

h3 {
  font-size: var(--text-xl);
}

h4 {
  font-size: var(--text-lg);
}

p {
  margin: 0 0 var(--s-4);
  color: var(--muted);
}

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

ul,
ol {
  margin: 0 0 var(--s-4);
  padding-left: 1.25rem;
  color: var(--muted);
}

small {
  font-size: var(--text-xs);
  color: var(--muted);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--s-4);
  z-index: 10000;
  padding: var(--s-3) var(--s-5);
  background: var(--ink);
  color: var(--surface);
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  top: var(--s-4);
}

/* Layout utilities */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--s-6);
}

@media (max-width: 639px) {
  .container {
    padding-inline: var(--s-4);
  }
}

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

@media (max-width: 639px) {
  .section {
    padding-block: var(--s-9);
  }
}

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

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(var(--reveal-y));
  transition:
    opacity 0.55s var(--ease-out),
    transform 0.55s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Eyebrow */
.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-4);
}

/* Text helpers */
.text-ink {
  color: var(--ink);
}

.text-muted {
  color: var(--muted);
}

.text-lede {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  max-width: 38rem;
}

.text-center {
  text-align: center;
}

.mx-auto {
  margin-inline: auto;
}

.max-w-prose {
  max-width: 42rem;
}

/* Page hero (subpages) */
.page-hero {
  padding-top: calc(var(--nav-h) + var(--s-10));
  padding-bottom: var(--s-10);
}

.breadcrumb {
  font-size: var(--text-xs);
  color: var(--muted);
  margin-bottom: var(--s-5);
}

.breadcrumb a {
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  margin-inline: var(--s-2);
  opacity: 0.5;
}
