/* ── Base styles ───────────────────────────────────────────────────────────
   Reset, typography, links, focus rings, transitions, reduced motion.
   ──────────────────────────────────────────────────────────────────────── */

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

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
}
[data-theme="dark"] {
  color-scheme: dark;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: var(--density-leading);
  color: var(--text);
  background: var(--bg);
  font-feature-settings: "ss01", "ss02";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ──────────────────────────────────────────────────────── */

h1.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 46px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
h2.display {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
h3.display {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.3;
  margin: 0;
}

.lede {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 62ch;
}

.eyebrow {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-mute);
}

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
}

.small {
  font-size: 12px;
  font-family: var(--font-ui);
}

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

.dimmed {
  color: var(--text-dim);
}

/* ── Links ───────────────────────────────────────────────────────────── */

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ── Focus ───────────────────────────────────────────────────────────── */

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

/* ── Scrollbar (subtle) ──────────────────────────────────────────────── */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-mute);
}

/* ── Transitions ─────────────────────────────────────────────────────── */

a, button, input, select, textarea {
  transition: color var(--ease-default),
              background var(--ease-default),
              border-color var(--ease-default),
              box-shadow var(--ease-default);
}

/* ── Reduced motion ──────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Selection ───────────────────────────────────────────────────────── */

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

/* ── Mark (search highlight) ─────────────────────────────────────────── */

mark {
  background: color-mix(in oklch, var(--saffron) 30%, transparent);
  color: inherit;
  padding: 1px 2px;
  border-radius: 2px;
}
