/* Hallmark · design-system: design.md · token block.
 * OKLCH paper + ink + accent. 4pt named spacing. Type + motion tokens.
 * Imported at the top of styles.css. Never declare a raw colour or font
 * outside this file — always reference a named token.
 */

:root {
  /* ── Paper + ink ── */
  --color-paper:        oklch(96.5% 0.008 90);
  --color-paper-2:      oklch(94%   0.012 88);
  --color-paper-3:      oklch(99%   0.004 90);
  --color-paper-4:      oklch(91%   0.014 86);
  --color-ink:          oklch(20%   0.018 155);
  --color-ink-2:        oklch(43%   0.016 155);
  /* ink-3 darkened 63% → 50% for WCAG 1.4.3 — it sets small mono meta text. */
  --color-ink-3:        oklch(50%   0.014 155);

  /* ── Rules ── */
  --color-rule:         oklch(20% 0.018 155 / 0.10);
  --color-rule-strong:  oklch(20% 0.018 155 / 0.20);

  /* ── Accent ── */
  --color-accent:       oklch(48% 0.13 152);
  --color-accent-soft:  oklch(68% 0.14 145);
  --color-accent-tint:  oklch(68% 0.14 145 / 0.08);
  --color-accent-glow:  oklch(68% 0.14 145 / 0.20);

  /* ── Amber (caveats only — never primary; 54% → 50% for text contrast) ── */
  --color-amber:        oklch(50% 0.11 55);
  --color-amber-tint:   oklch(54% 0.12 55 / 0.08);
  --color-amber-glow:   oklch(54% 0.12 55 / 0.20);

  /* ── Focus ── */
  --color-focus:        oklch(56% 0.16 152);

  /* ── Hairlines tinted by the accent (card borders, badges) ── */
  --color-accent-rule:  oklch(68% 0.14 145 / 0.35);
  --color-amber-rule:   oklch(54% 0.12 55 / 0.35);

  /* ── On-photo inks + scrims (farm band, photo overlays) ── */
  --color-scrim:        oklch(24% 0.03 155 / 0.55);
  --color-scrim-soft:   oklch(24% 0.03 155 / 0.35);
  --color-scrim-deep:   oklch(24% 0.03 155 / 0.65);
  --color-on-photo:       oklch(99% 0.004 90);
  --color-on-photo-soft:  oklch(99% 0.004 90 / 0.86);
  --color-on-photo-faint: oklch(99% 0.004 90 / 0.18);
  --color-on-photo-line:  oklch(99% 0.004 90 / 0.40);
  --color-on-photo-accent: oklch(88% 0.13 145);
  --color-paper-veil:   oklch(99% 0.004 90 / 0.85);
  --color-ink-veil:     oklch(20% 0.018 155 / 0.70);
  --color-video-wash:   oklch(27% 0.03 155);

  /* ── Fonts ── */
  --font-display:       'Fraunces', 'Georgia', serif;
  --font-body:          'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:          'JetBrains Mono', 'SF Mono', monospace;

  /* ── 4pt spacing ── */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs:  0.75rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2rem;
  --space-xl:  3rem;
  --space-2xl: 4.5rem;
  --space-3xl: 7rem;

  /* ── Type scale ── */
  --text-xs:       0.72rem;
  --text-sm:       0.85rem;
  --text-base:     1rem;
  --text-md:       1.05rem;
  --text-lg:       1.25rem;
  --text-xl:       1.5rem;
  --text-2xl:      2rem;
  --text-display-s: clamp(1.8rem, 3.6vw, 2.6rem);
  --text-display:   clamp(2.2rem, 5.5vw, 4.4rem);

  /* ── Measure (long-form reading column) ──
   * design.md asks for 60-65 characters on content pages and nothing enforced
   * it, so every long-form page picked its own px value.
   *
   * These are measured, not derived. In the browser, `ch` on .article resolves
   * against the inherited 16px, and Inter's `0` advance is 10.09px (0.63em),
   * while average lowercase prose at --text-md runs 8.01px/char. So one ch buys
   * 1.26 real characters: 50ch lands at ~63, inside the range. Re-measure if
   * the body font ever changes.
   *
   * --measure-wide is the breakout for tables, code blocks and figures, which
   * are unreadable inside the prose column.
   */
  --measure-prose: 50ch;
  --measure-wide:  67ch;

  /* ── Motion ── */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-short:   180ms;
  --dur-base:    260ms;

  /* ── Radii ── */
  --r-card:  14px;
  --r-pill:  999px;
  --r-input: 8px;

  /* ── Shadow (used sparingly — editorial favours hairlines) ── */
  --shadow-sm: 0 1px 2px oklch(20% 0.018 155 / 0.04);
  --shadow-md: 0 6px 20px oklch(20% 0.018 155 / 0.06);
}
