/* Hallmark · tokens · theme: Almanac
 * axes — paper band: light (96.5%) · display style: display-grotesk · accent hue: warm (42°)
 * Anchor hue 68 (amber/oat), pulled from the Koseli roundel. Every neutral is tinted toward it.
 * Nothing in styles.css may declare a raw colour or font-family. Add a token here first.
 */

:root {
  /* ---- Paper & ink -------------------------------------------------- */
  --color-paper:      oklch(96.5% 0.012 68);   /* warm oat, never #fff */
  --color-paper-2:    oklch(93.5% 0.016 66);
  --color-paper-3:    oklch(90%   0.019 64);
  --color-rule:       oklch(83%   0.016 62);
  --color-rule-soft:  oklch(88%   0.014 64);
  --color-neutral:    oklch(58%   0.014 60);   /* non-text only — fails 4.5:1 on paper */
  --color-muted:      oklch(43%   0.016 58);   /* the secondary TEXT colour */
  --color-ink:        oklch(21%   0.018 55);   /* warm near-black, never #000 */

  /* ---- Chromatic ---------------------------------------------------- */
  --color-accent:      oklch(46% 0.155 42);    /* terracotta — the roundel's brick. 4.8:1 on paper */
  --color-accent-deep: oklch(38% 0.135 40);
  --color-accent-ink:  oklch(97% 0.010 68);    /* text ON an accent fill */
  --color-accent-wash: oklch(94% 0.030 48);
  --color-open:        oklch(46% 0.095 148);   /* functional: open. Never the only signal. */
  --color-shut:        oklch(48% 0.120 30);    /* functional: closed */
  --color-focus:       oklch(48% 0.170 250);   /* cool ring, reads against warm paper */

  /* Scrim over the hero photograph — a photo is not a token, so the
     legibility layer has to be. */
  --color-scrim:   oklch(12% 0.020 60 / 0.88);
  --color-scrim-0: oklch(12% 0.020 60 / 0);
  /* Text ON the scrim. Deliberately NOT redefined in dark mode — the scrim is
     dark in both themes, so flipping this to --color-paper would hide the
     hero caption on a dark-mode device. */
  --color-on-scrim: oklch(97% 0.010 68);

  /* ---- Type --------------------------------------------------------- */
  --font-display: "Cabinet Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body:    "Source Serif 4", ui-serif, Charter, Georgia, serif;
  /* Outlier carries ONE role: times and telephone numbers. Two slots, nothing else. */
  --font-outlier: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  /* Scale — major third (1.25) from a 16px base */
  --text-xs:   0.64rem;
  --text-sm:   0.8rem;
  --text-base: 1rem;
  --text-md:   1.25rem;
  --text-lg:   1.5625rem;
  --text-xl:   1.9531rem;
  --text-2xl:  2.4414rem;
  --text-3xl:  3.0518rem;
  --text-display:   clamp(2.25rem, 3.4vw + 1rem, 3.75rem);
  --text-display-s: clamp(1.9531rem, 2.4vw + 1rem, 2.75rem);

  /* ---- Space — 4pt base, named by role ------------------------------ */
  --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;
  --space-4xl: 9rem;

  /* ---- Rules & radii ------------------------------------------------ */
  --rule-hair: 1px;
  --rule-bold: 2px;
  --radius-none: 0;
  --radius-sm:   3px;
  --radius-pill: 999px;

  /* ---- Motion ------------------------------------------------------- */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:     cubic-bezier(0.7, 0, 0.84, 0);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms;
  --dur-short: 220ms;
  --dur-long:  420ms;

  /* ---- Elevation ---------------------------------------------------- */
  --z-base:     1;
  --z-raised:   10;
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-sticky-nav: 300;
  --z-modal:    400;
  --z-toast:    500;
  --z-tooltip:  600;

  /* ---- Chrome heights (N12 banner + bar) — on the 4pt grid ---------- */
  --banner-h: 40px;
  --bar-h:    64px;
  --dock-h:   48px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-paper:      oklch(16% 0.014 68);
    --color-paper-2:    oklch(20% 0.016 66);
    --color-paper-3:    oklch(24% 0.018 64);
    --color-rule:       oklch(34% 0.016 62);
    --color-rule-soft:  oklch(28% 0.014 64);
    --color-neutral:    oklch(50% 0.012 60);
    --color-muted:      oklch(76% 0.014 58);
    --color-ink:        oklch(94% 0.010 70);

    --color-accent:      oklch(72% 0.125 45);
    --color-accent-deep: oklch(64% 0.115 42);
    --color-accent-ink:  oklch(18% 0.018 55);
    --color-accent-wash: oklch(28% 0.040 48);
    --color-open:        oklch(74% 0.090 150);
    --color-shut:        oklch(72% 0.100 32);
    --color-focus:       oklch(74% 0.140 250);
  }
}

:root[data-theme="dark"] {
  --color-paper:      oklch(16% 0.014 68);
  --color-paper-2:    oklch(20% 0.016 66);
  --color-paper-3:    oklch(24% 0.018 64);
  --color-rule:       oklch(34% 0.016 62);
  --color-rule-soft:  oklch(28% 0.014 64);
  --color-neutral:    oklch(50% 0.012 60);
  --color-muted:      oklch(76% 0.014 58);
  --color-ink:        oklch(94% 0.010 70);

  --color-accent:      oklch(72% 0.125 45);
  --color-accent-deep: oklch(64% 0.115 42);
  --color-accent-ink:  oklch(18% 0.018 55);
  --color-accent-wash: oklch(28% 0.040 48);
  --color-open:        oklch(74% 0.090 150);
  --color-shut:        oklch(72% 0.100 32);
  --color-focus:       oklch(74% 0.140 250);
}
