/* ============================================================
   Base — Reset, Typography, Body, Links, Utilities
   Editorial scale: serif display headings, restrained sizes.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  background: var(--paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 560;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}
h1 em, h2 em, h3 em, .h-hero em, .h-page em, .h-section em {
  font-style: italic;
  font-weight: 500;
  color: var(--pine);
}

/* ---- Heading scale (deliberately restrained) ---- */
.h-hero   { font-size: clamp(2.3rem, 4.2vw, 3.4rem); line-height: 1.06; letter-spacing: -0.02em; }
.h-page   { font-size: clamp(2rem, 3.6vw, 2.9rem); line-height: 1.08; }
.h-section{ font-size: clamp(1.55rem, 2.6vw, 2.15rem); }
.h-card   { font-size: 1.12rem; letter-spacing: -0.005em; font-family: var(--font-body); font-weight: 650; }
.h-label  { font-size: 0.98rem; letter-spacing: 0; font-family: var(--font-body); font-weight: 650; }

/* ---- Body text variants ---- */
.text-lead { color: var(--text-secondary); font-size: clamp(1rem, 1.3vw, 1.1rem); line-height: 1.7; max-width: 44rem; }
.text-body { color: var(--text-secondary); line-height: 1.7; font-size: 0.96rem; }
.text-small{ font-size: 0.84rem; color: var(--text-muted); }
.text-xs   {
  font-family: var(--font-mono);
  font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3);
}

/* ---- Gradient text (accent word inside headings) ---- */
.gradient-text {
  font-style: italic; font-weight: 500;
  background: linear-gradient(100deg, var(--pine) 20%, var(--teal) 80%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.gradient-text-warm {
  font-style: italic; font-weight: 500;
  background: linear-gradient(100deg, var(--gold-strong), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---- Ledger utilities (signature motif) ---- */
.rule-gold { display: inline-block; width: 2.25rem; height: 2px; background: var(--gold); vertical-align: middle; }
.mono { font-family: var(--font-mono); }
.folio {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-4);
}

/* ---- Utility classes ---- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.mt-sm { margin-top: 1rem; }
.mt-md { margin-top: 2rem; }
.mt-lg { margin-top: 3rem; }
.mt-xl { margin-top: 4.5rem; }
.mb-sm { margin-top: 1rem; }
.mb-md { margin-bottom: 2rem; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.inline-flex { display: inline-flex; align-items: center; }

/* ---- Selection ---- */
::selection { background: var(--gold-soft); color: var(--ink); }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }

/* ---- Focus ring ---- */
:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; border-radius: var(--radius-sm); }
