/* ============================================================
   cwarner.com — DIRECTION 2 tokens (editorial)
   Archetype C — Editorial single-column. The deliberate opposite of
   Direction 1 (F, field-dossier): serif not grotesque, hairline rules
   not filled bands, one narrow column not a datasheet grid, ivory +
   forest-green not basalt + terracotta. Same true content, restrained.
   Every value the build uses comes from a token here.
   ============================================================ */

@font-face {
  font-family: "Fraunces"; src: url("assets/fraunces-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: optional;
}
@font-face {
  font-family: "Fraunces"; src: url("assets/fraunces-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: optional;
}
@font-face {
  font-family: "Fraunces"; src: url("assets/fraunces-900.woff2") format("woff2");
  font-weight: 900; font-style: normal; font-display: optional;
}

:root {
  color-scheme: dark light;

  /* — Type — */
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --font-label: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* — Palette (light) — */
  --paper:      #f7f2e8;  /* warm ivory */
  --paper-2:    #f0e9da;  /* faint recessed tint */
  --ink:        #211e18;  /* warm near-black */
  --ink-soft:   #554d40;
  --ink-faint:  #6c6353;  /* AA on ivory */
  --line:       #ddd2bf;  /* hairline */
  --line-strong:#c7b9a1;

  --pine:       #2f5d4a;  /* forest-green primary accent */
  --pine-deep:  #234636;
  --pine-soft:  #d7e2d7;
  --gold:       #7e5c14;  /* muted brass secondary; darkened for AA on ivory */
  --gold-soft:  #e7dcc2;

  /* — Fixed ink band (theme-independent, for the one dark pullband) — */
  --band:        #1c2620; /* deep forest-black, FIXED */
  --on-band:     #f2ecdd;
  --on-band-soft:#c3bca9;
  --pine-on-band:#8fc3a6; /* brightened for AA on fixed band */
  --gold-on-band:#d8b978;

  /* — Serif type scale (editorial: larger, airier, 1.30-ish) — */
  --step--1: clamp(0.82rem, 0.79rem + 0.16vw, 0.92rem);
  --step-0:  clamp(1.06rem, 1.0rem + 0.3vw, 1.24rem);   /* generous reading body */
  --step-1:  clamp(1.3rem, 1.2rem + 0.5vw, 1.6rem);
  --step-2:  clamp(1.6rem, 1.4rem + 1.0vw, 2.3rem);
  --step-3:  clamp(2.1rem, 1.7rem + 1.9vw, 3.4rem);
  --step-4:  clamp(2.7rem, 2.0rem + 3.2vw, 5.0rem);
  --step-5:  clamp(3.2rem, 2.2rem + 5.0vw, 6.8rem);     /* the display headline */

  --label:   0.72rem;
  --tracking-label: 0.22em;
  --tracking-tight: -0.02em;

  /* — Spacing (generous editorial rhythm) — */
  --space-1: 0.4rem;
  --space-2: 0.7rem;
  --space-3: 1.1rem;
  --space-4: 1.8rem;
  --space-5: 2.8rem;
  --space-6: 4.4rem;
  --space-7: clamp(4.5rem, 3rem + 5vw, 8rem);  /* between major beats */

  --measure: 34rem;      /* the single-column reading measure */
  --measure-wide: 46rem; /* wider elements (index, pullquotes) */
  --gutter: clamp(1.3rem, 0.6rem + 3vw, 2.6rem);

  --rule: 1px;
  --radius: 0px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --focus: 0 0 0 2px var(--paper), 0 0 0 4px var(--pine);
}

/* Dark palette — applied for system preference (unless manually set light)
   AND for the manual dark toggle. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #15130d;
    --paper-2:    #1c1912;
    --ink:        #f2ecdd;
    --ink-soft:   #c8bfab;
    --ink-faint:  #9c917b;
    --line:       #33301f;
    --line-strong:#4a4530;
    --pine:       #7bb99b;
    --pine-deep:  #62a486;
    --pine-soft:  #1e2c24;
    --gold:       #cba869;
    --gold-soft:  #2a2415;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper:      #15130d;
  --paper-2:    #1c1912;
  --ink:        #f2ecdd;
  --ink-soft:   #c8bfab;
  --ink-faint:  #9c917b;
  --line:       #33301f;
  --line-strong:#4a4530;
  --pine:       #7bb99b;
  --pine-deep:  #62a486;
  --pine-soft:  #1e2c24;
  --gold:       #cba869;
  --gold-soft:  #2a2415;
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }
