/* ============================================================
   Opus Aureum Limited: theme tokens (taste, editorial luxury base).
   Subject names: vellum (the page a work is written on), lamp black
   (the ink), sepia (secondary ink), aurum leaf (gold leaf, the fill),
   aurum ink (gold dark enough to read as text), nocturne (the dark ground).
   Dark remap sits under @media screen so print resolves the light theme.
   Check: python3 scripts/check_contrast.py theme.css
   ============================================================ */

:root {
  --font-display: "Cormorant", "Cormorant Garamond", Garamond, Georgia, "Times New Roman", serif;
  --font-body: "Onest", "Helvetica Neue", Arial, sans-serif;
  --w-display: 500;
  --tr-display: -0.02em;
  --tr-h2: -0.015em;
  --lh-display: 0.9;
  --radius: 2px;
  --radius-sm: 2px;
  --radius-button: 999px;
  --case-eyebrow: uppercase;
  --tr-eyebrow: 0.32em;
  --ease-out: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-draw: cubic-bezier(0.65, 0, 0.35, 1);
  --dur: 900ms;

  /* vellum, light ground */
  --bg: #f4efe4;
  --surface: #fbf8f1;
  --surface-2: #ebe3d2;
  /* lamp black and sepia inks */
  --ink: #17130d;
  --muted-strong: #463d31;
  --muted: #5e5343;
  --line: #ddd3bf;
  --line-strong: #c2b598;
  /* the folio band: lamp black field */
  --ink-field: #16120c;
  --on-ink: #f3ecdc;
  --on-ink-muted: #c4b8a0;
  --on-ink-gold: #dcbd6c;
  /* aurum: leaf as a fill, ink as text, signal for focus and lines */
  --accent: #8a6619;
  --accent-fill: #c9a14a;
  --accent-on-fill: #17130d;
  --accent-text: #7a5913;
  --accent-soft: #efe4c6;
  --art-line: #a98235;
  /* fields */
  --field-1: #ebe3d2;
  --field-1-ink: #17130d;
  --field-2: #c9a14a;
  --field-2-ink: #17130d;
  --field-3: #16120c;
  --field-3-ink: #f3ecdc;
  /* gold leaf highlight and shadow inside the leaf field */
  --leaf-hi: #e4c777;
  --leaf-lo: #b68d38;
  color-scheme: light dark;
}

@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0d0a;
    --surface: #17140f;
    --surface-2: #1d1913;
    --ink: #f2ead9;
    --muted-strong: #d4c8b0;
    --muted: #ab9e86;
    --line: rgba(242, 234, 217, 0.12);
    --line-strong: rgba(242, 234, 217, 0.24);
    --ink-field: #19160f;
    --on-ink: #f2ead9;
    --on-ink-muted: #c4b8a0;
    --on-ink-gold: #dcbd6c;
    --accent: #d8b765;
    --accent-fill: #d2ae5a;
    --accent-on-fill: #0f0d0a;
    --accent-text: #dcbf74;
    --accent-soft: rgba(216, 183, 101, 0.12);
    --art-line: #c9a454;
    --field-1: #1d1913;
    --field-1-ink: #f2ead9;
    --field-2: #c29d4c;
    --field-2-ink: #0f0d0a;
    --field-3: #19160f;
    --field-3-ink: #f2ead9;
    --leaf-hi: #d9b965;
    --leaf-lo: #a9843a;
  }
}
@media screen {
  :root[data-theme="dark"] {
    --bg: #0f0d0a;
    --surface: #17140f;
    --surface-2: #1d1913;
    --ink: #f2ead9;
    --muted-strong: #d4c8b0;
    --muted: #ab9e86;
    --line: rgba(242, 234, 217, 0.12);
    --line-strong: rgba(242, 234, 217, 0.24);
    --ink-field: #19160f;
    --on-ink: #f2ead9;
    --on-ink-muted: #c4b8a0;
    --on-ink-gold: #dcbd6c;
    --accent: #d8b765;
    --accent-fill: #d2ae5a;
    --accent-on-fill: #0f0d0a;
    --accent-text: #dcbf74;
    --accent-soft: rgba(216, 183, 101, 0.12);
    --art-line: #c9a454;
    --field-1: #1d1913;
    --field-1-ink: #f2ead9;
    --field-2: #c29d4c;
    --field-2-ink: #0f0d0a;
    --field-3: #19160f;
    --field-3-ink: #f2ead9;
    --leaf-hi: #d9b965;
    --leaf-lo: #a9843a;
  }
  :root[data-theme="light"] { color-scheme: light; }
  :root[data-theme="dark"] { color-scheme: dark; }
}
