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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-canvas);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

button {
  font-family: inherit;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Typography */
h1,
h2,
h3 {
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2.5rem, 1.9rem + 3vw, 4.5rem);
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(1.9rem, 1.6rem + 1.4vw, 2.75rem);
  letter-spacing: -0.02em;
}

p {
  margin: 0;
  color: var(--color-text);
}

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

.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;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-accent);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
}

/* Layout helpers */
.wrap {
  width: 100%;
  max-width: var(--max-width-page);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 1rem + 2vw, 2.5rem);
}

.prose {
  max-width: var(--max-width-prose);
}

.section {
  padding-block: var(--space-section-y);
  border-bottom: var(--border-hairline);
}

.section:last-of-type {
  border-bottom: none;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: clamp(2rem, 1.6rem + 2vw, 3.5rem);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-content-gap);
}

/* Anchor offset so section headings clear the sticky header */
section[id] {
  scroll-margin-top: 90px;
}

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