/* ---------------------------------------------------------
   theme.css — the colour system for light and dark.
   Every colour in styles.css, editorial.css, book.css and pages.css
   comes from a token defined here, so the dark theme is one block.
   Load order: styles.css, book.css, editorial.css, theme.css, pages.css.
   Light is the default; the dark theme is switched by
   <html data-theme="dark"> (see partials.js and the inline head script).
--------------------------------------------------------- */

:root {
  color-scheme: light;

  /* surfaces */
  --page: #f8f5ec;
  --card: #fffdf8;
  --band: #efe6d6;
  --tint: #f4dfe2;            /* the blush wash behind Let's Connect */
  --field: #f8f5ec;           /* form inputs */
  --media: #1e1e1e;           /* letterbox behind video and reels */

  /* text and lines */
  --fg: #1e1e1e;
  --fg-2: #3b332c;
  --fg-3: #4a423c;
  --fg-4: #5c5248;
  --fg-5: #6b6158;
  --rule: rgba(30, 26, 23, 0.14);
  --rule-mid: rgba(30, 26, 23, 0.28);
  --rule-strong: rgba(30, 26, 23, 0.55);

  /* accent: maroon in light, a soft rose in dark */
  --accent: #5e1a28;
  --on-accent: #f8f5ec;
  --accent-deep: #45121d;
  --soft: #ebc4cb;            /* blush fills: active nav, blush button */
  --on-soft: #45121d;
  --hi: #b35d70;              /* kicker and italic accent words */
  --gold: #d4af7c;
  --gold-deep: #a8843f;

  /* dark bands (About, the book stage, lightbox): dark in BOTH themes */
  --dark: #1c1816;
  --dark-2: #120e0c;
  --on-dark: #f8f5ec;
  --on-dark-2: #d9cfc3;
  --on-dark-3: #cabfae;
  --on-dark-line: rgba(248, 245, 236, 0.18);
  --on-dark-line-strong: rgba(248, 245, 236, 0.5);
  --on-dark-pink: #ebc4cb;
  --on-dark-rgb: 248, 245, 236;
  --dark-2-rgb: 18, 14, 12;
  --tape-rgb: 235, 196, 203;
  --print: #f3eee4;           /* the white border of a printed photo */
  --fg-rgb: 30, 26, 23;

  /* shadows and feedback */
  --shade: 30, 26, 23;
  --shadow-soft: 0 24px 60px -34px rgba(var(--shade), 0.35);
  --shadow: 0 6px 0 rgba(30, 26, 23, 0.9);
  --shadow-sm: 0 3px 0 rgba(30, 26, 23, 0.9);
  --ok: #2d6a3e;
  --danger: #a3263a;
  --focus: #5e1a28;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --page: #16120f;
  --card: #211b17;
  --band: #2a221c;
  --tint: #2b1f23;
  --field: #16120f;
  --media: #0e0b09;

  --fg: #f3ece0;
  --fg-2: #e6dccd;
  --fg-3: #d2c7b8;
  --fg-4: #bfb3a4;
  --fg-5: #a99d8e;
  --rule: rgba(243, 236, 224, 0.14);
  --rule-mid: rgba(243, 236, 224, 0.28);
  --rule-strong: rgba(243, 236, 224, 0.5);

  --accent: #e58fa5;
  --on-accent: #16120f;
  --accent-deep: #f6cdd7;
  --soft: #4a2a35;
  --on-soft: #f6d6de;
  --hi: #e58fa5;
  --gold: #e3a52a;
  --gold-deep: #e3a52a;

  --dark: #0f0c0a;
  --dark-2: #080605;

  --shade: 0, 0, 0;
  --fg-rgb: 243, 236, 224;
  --shadow-soft: 0 24px 60px -34px rgba(0, 0, 0, 0.7);
  --shadow: 0 6px 0 rgba(243, 236, 224, 0.18);
  --shadow-sm: 0 3px 0 rgba(243, 236, 224, 0.18);
  --ok: #7ccf93;
  --danger: #ff8a98;
  --focus: #e58fa5;
}

/* The older token names from styles.css and editorial.css point at the new system,
   so any rule still written with them follows the theme too. */
:root {
  --ivory: var(--page);
  --paper-2: var(--card);
  --blush: var(--soft);
  --blush-soft: var(--tint);
  --blush-deep: var(--hi);
  --maroon: var(--accent);
  --maroon-deep: var(--accent-deep);
  --charcoal: var(--fg);
  --line: var(--rule);
  --line-strong: var(--rule-strong);

  --cream: var(--page);
  --paper: var(--card);
  --sand: var(--band);
  --ink: var(--fg);
  --ink-soft: var(--fg-4);
  --coral: var(--soft);
  --coral-deep: var(--hi);
  --mustard: var(--gold);
  --mustard-deep: var(--gold-deep);
  --denim: var(--accent);
  --border: 2px solid var(--fg);
}
