/* recallit · tokens — "The Reading Room"
 * paper, ink, one mint mark reserved for the grade.
 * Source of truth for marketing/index.html + marketing/demo (via styles.css + demo.css).
 * Pack pages (marketing/packs/*) are a separate, still-Bubble stack (hum-tokens.css + hum.css)
 * and are unaffected by this file — see DESIGN.md.
 */
:root {
  color-scheme: light;

  /* ── paper (warm cream canvas) ─────────────────────────────── */
  --paper:      #fbf9f4;
  --paper-2:    #f4f1e9;
  --paper-3:    #ece8dd;
  --paper-sunk: #e4e0d5;

  /* ── ink (cool near-black, never pure black) ───────────────── */
  --ink:    #1b1b1e;
  --ink-2:  #3a3a40;
  --muted:  #77756e;
  --rule:   #e4e0d5;
  --rule-2: #d2cdbf;

  /* on dark surfaces (terminal, code) */
  --on-ink:   #fbf9f4;
  --on-ink-2: #b7b4a8;

  /* fixed terminal surface — a code block reads the same in both themes,
     it never flips with the page (real terminals don't repaint on OS theme). */
  --code-bg: #1b1b1e;
  --code-fg: #fbf9f4;

  /* ── mint — reserved for the grade, nothing else ───────────── */
  --mint:       #59e3ac;
  --mint-pale:  #d9f9ec;
  --mint-deep:  #1e7a5c;

  /* the other two grade tints (hard / again), same restraint */
  --pear-pale:  #fbf4dc;
  --pear-deep:  #8a6d1e;
  --coral-pale: #fbdcdc;
  --coral-deep: #a33d39;

  --focus: var(--mint-deep);

  /* ── type ───────────────────────────────────────────────────── */
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sans:  "Inter", ui-sans-serif, system-ui, sans-serif;

  --text-xs:   0.8125rem;
  --text-sm:   0.9375rem;
  --text-base: 1rem;
  --text-md:   1.125rem;
  --text-lg:   1.375rem;
  --text-xl:   1.75rem;
  --text-2xl:  2.125rem;
  --text-3xl:  clamp(1.875rem, 3.2vw + 0.5rem, 2.75rem);
  --text-display: clamp(2.375rem, 5vw + 0.5rem, 3.5rem);

  --lh-tight:   1.1;
  --lh-snug:    1.25;
  --lh-normal:  1.5;
  --lh-relaxed: 1.6;
  --tracking-display: -0.02em;
  --tracking-tight:   -0.01em;
  --tracking-label:    0.08em;

  /* ── space (4pt scale) ──────────────────────────────────────── */
  --space-3xs: 0.125rem;
  --space-2xs: 0.25rem;
  --space-xs:  0.5rem;
  --space-sm:  0.75rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --section-gap: 4rem;

  --page-max:    68rem;
  --page-gutter: clamp(1.25rem, 4vw, 2.5rem);
  --measure:     62ch;
  --kicker-col:  180px;

  /* ── shape ──────────────────────────────────────────────────── */
  --radius-card: 12px;
  --radius-sm:   8px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgba(27, 27, 30, 0.04), 0 14px 36px -16px rgba(27, 27, 30, 0.18);

  /* ── motion ─────────────────────────────────────────────────── */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-micro: 120ms;
  --dur-short: 220ms;
  --dur-long:  420ms;

  --z-nav: 300;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper:      #161614;
    --paper-2:    #1d1d1a;
    --paper-3:    #26261f;
    --paper-sunk: #202019;
    --ink:    #ebe6da;
    --ink-2:  #cfcabd;
    --muted:  #8d8a80;
    --rule:   #2b2a26;
    --rule-2: #3a3934;
    --on-ink:   #161614;
    --on-ink-2: #6f6c62;
    --mint:      #1e9382;
    --mint-pale: #1d4740;
    --mint-deep: #7de3bf;
    --pear-pale: #46402a;
    --pear-deep: #d8bd5a;
    --coral-pale: #5f2b2a;
    --coral-deep: #e29490;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 36px -16px rgba(0, 0, 0, 0.7);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper:      #161614;
  --paper-2:    #1d1d1a;
  --paper-3:    #26261f;
  --paper-sunk: #202019;
  --ink:    #ebe6da;
  --ink-2:  #cfcabd;
  --muted:  #8d8a80;
  --rule:   #2b2a26;
  --rule-2: #3a3934;
  --on-ink:   #161614;
  --on-ink-2: #6f6c62;
  --mint:      #1e9382;
  --mint-pale: #1d4740;
  --mint-deep: #7de3bf;
  --pear-pale: #46402a;
  --pear-deep: #d8bd5a;
  --coral-pale: #5f2b2a;
  --coral-deep: #e29490;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 36px -16px rgba(0, 0, 0, 0.7);
}

html { font-optical-sizing: auto; }
