/* ============================================================
   base.css — reset, document base, AI-native dark typography
   ============================================================ */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: var(--fw-regular);
  color: var(--color-text-muted);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "liga", "kern";
  min-height: 100vh;
  overflow-x: hidden;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
  text-wrap: balance;
  font-optical-sizing: auto;
}

h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); font-weight: var(--fw-bold); letter-spacing: -0.03em; }
h2 { font-size: var(--fs-h2); line-height: 1.1; letter-spacing: -0.025em; }
h3 { font-size: var(--fs-h3); line-height: 1.18; letter-spacing: -0.02em; }
h4 { font-size: var(--fs-h4); font-weight: var(--fw-semibold); }
h5 { font-size: var(--fs-h5); }

p { color: var(--color-text-muted); max-width: 68ch; }

a {
  color: var(--color-accent-ink);
  text-decoration: none;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}
a:hover { color: var(--color-accent-hover); }

ul, ol { padding-left: 1.1em; }
li { color: var(--color-text-muted); }

button,
input,
textarea,
select { font: inherit; color: inherit; }

button { cursor: pointer; background: none; border: none; }

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

::selection { background: var(--color-accent); color: var(--color-on-primary); }

hr { border: none; border-top: 1px solid var(--color-line); margin: var(--space-12) 0; }

code, kbd, samp { font-family: var(--font-mono); font-size: 0.9em; }

/* ---- Editorial type helpers ---- */
.deck {
  font-family: var(--font-serif-text);
  font-size: var(--fs-deck);
  line-height: 1.4;
  color: var(--color-text-muted);
  max-width: 56ch;
}
.pull-quote {
  font-family: var(--font-display);
  font-size: var(--fs-quote);
  font-style: italic;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-text);
  max-width: 24ch;
}
.has-dropcap::first-letter {
  font-family: var(--font-display);
  float: left;
  font-size: 3.4em;
  line-height: 0.74;
  padding-right: 0.08em;
  padding-top: 0.04em;
  color: var(--color-accent);
  font-weight: var(--fw-book);
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  background: var(--color-primary);
  color: var(--color-on-primary);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  z-index: var(--z-toast);
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: var(--space-4); }

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