/* ============================================================================
   Theme token sets.

   A theme is a block of custom properties and nothing else — main.css reads
   only from these names. Adding a theme means one block here plus one entry in
   backend/app/services/theming.py. No JavaScript, no template changes.

   --logo-blend / --logo-plate exist because the logo is a JPEG on a hard white
   ground. On light themes `multiply` drops that white (and keeps the ring's
   drop shadow honest). On dark themes it would erase the artwork, so the logo
   sits on a deliberate light plate instead.
   ============================================================================ */

/* --- 1. Notary — the original look, formalised. Ships as the default. ------ */
:root,
[data-theme="notary"] {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f5f5f5;
  --ink: #000000;
  --ink-muted: #555555;
  --ink-faint: #8a8a8a;
  --accent: #000000;
  --accent-ink: #ffffff;
  --rule: #000000;
  --border: #cccccc;

  --ok: #1a7f3c;
  --ok-bg: #f0faf4;
  --warn: #7a6000;
  --warn-bg: #fefce8;
  --err: #c0002a;
  --err-bg: #fff0f3;
  --info: #1e40af;
  --info-bg: #dbeafe;

  --font-ui: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'Courier New', monospace;
  --size-base: 15px;
  --leading: 1.5;
  --head-tracking: 0;
  --brand-tracking: 0;

  --space: 0.85rem;
  --pad-cell: 0.35rem 0.5rem;
  --border-width: 1px;
  --rule-weight: 2px;
  --radius: 0;
  --badge-radius: 999px;

  --logo-blend: multiply;
  --logo-plate: transparent;
  --logo-plate-pad: 0;
  --logo-plate-pad-sm: 0;
}

/* --- 2. Parchment — a legal instrument. Sepia ground, registrar blue. ------ */
[data-theme="parchment"] {
  --bg: #f4eddc;
  --surface: #faf5e9;
  --surface-alt: #ece3cd;
  --ink: #2a2118;
  --ink-muted: #5f5140;
  --ink-faint: #8d7d67;
  --accent: #1f3a63;
  --accent-ink: #f8f3e6;
  --rule: #2a2118;
  --border: #d5c8ac;

  --ok: #3d6b34;
  --ok-bg: #e8f0dd;
  --warn: #8a5a12;
  --warn-bg: #f6ead2;
  --err: #8c2320;
  --err-bg: #f6e2df;
  --info: #1f3a63;
  --info-bg: #dde5f0;

  --font-ui: 'Iowan Old Style', Charter, 'Palatino Linotype', Palatino, Georgia, serif;
  --font-mono: 'Courier New', ui-monospace, monospace;
  --size-base: 16px;
  --leading: 1.65;
  --head-tracking: 0.01em;
  --brand-tracking: 0.06em;

  --space: 1.1rem;
  --pad-cell: 0.5rem 0.6rem;
  --border-width: 1px;
  --rule-weight: 2px;
  --radius: 0;
  --badge-radius: 2px;

  --logo-blend: multiply;
  --logo-plate: transparent;
  --logo-plate-pad: 0;
  --logo-plate-pad-sm: 0;
}

/* --- 3. Slate — dark. Layered surfaces, muted cyan, soft corners. --------- */
[data-theme="slate"] {
  --bg: #14171c;
  --surface: #1b1f26;
  --surface-alt: #222731;
  --ink: #dfe3e8;
  --ink-muted: #9aa2ad;
  --ink-faint: #6d7683;
  --accent: #4cc2d6;
  --accent-ink: #0d1216;
  --rule: #39414d;
  --border: #2a3039;

  --ok: #5fcf8e;
  --ok-bg: #1a3327;
  --warn: #e0b356;
  --warn-bg: #332b16;
  --err: #f08b83;
  --err-bg: #3a1f1d;
  --info: #7aa7f0;
  --info-bg: #1d2839;

  --font-ui: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --size-base: 15px;
  --leading: 1.6;
  --head-tracking: -0.01em;
  --brand-tracking: 0;

  --space: 1rem;
  --pad-cell: 0.45rem 0.6rem;
  --border-width: 1px;
  --rule-weight: 1px;
  --radius: 6px;
  --badge-radius: 4px;

  --logo-blend: normal;
  --logo-plate: #f2f4f6;
  --logo-plate-pad: 0.5rem;
  --logo-plate-pad-sm: 2px;
}

/* --- 4. Terminal — monospace, amber on black, tightest density. ----------- */
[data-theme="terminal"] {
  --bg: #0b0b09;
  --surface: #111110;
  --surface-alt: #1a1915;
  --ink: #e0c088;
  --ink-muted: #a68b5f;
  --ink-faint: #6f5e3f;
  --accent: #ffb000;
  --accent-ink: #0b0b09;
  --rule: #453a24;
  --border: #2e2a1f;

  --ok: #7fc26a;
  --ok-bg: #17220f;
  --warn: #ffb000;
  --warn-bg: #2a1f06;
  --err: #e5705f;
  --err-bg: #2a1310;
  --info: #6fb7c4;
  --info-bg: #0f2124;

  --font-ui: ui-monospace, 'SFMono-Regular', Menlo, Consolas, 'Courier New', monospace;
  --font-mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --size-base: 13px;
  --leading: 1.45;
  --head-tracking: 0.06em;
  --brand-tracking: 0.14em;

  --space: 0.7rem;
  --pad-cell: 0.25rem 0.45rem;
  --border-width: 1px;
  --rule-weight: 1px;
  --radius: 0;
  --badge-radius: 0;

  --logo-blend: normal;
  --logo-plate: #efe6d2;
  --logo-plate-pad: 0.5rem;
  --logo-plate-pad-sm: 2px;
}

/* --- 5. Meridian — modern product UI. Warm neutral, indigo accent. -------- */
[data-theme="meridian"] {
  --bg: #f7f6f4;
  --surface: #ffffff;
  --surface-alt: #f0efec;
  --ink: #1b1a19;
  --ink-muted: #6c6a66;
  --ink-faint: #9b9893;
  --accent: #4a4fb0;
  --accent-ink: #ffffff;
  --rule: #e0ded9;
  --border: #e0ded9;

  --ok: #1f7a4d;
  --ok-bg: #e6f4ec;
  --warn: #96600d;
  --warn-bg: #fbf0da;
  --err: #b3261e;
  --err-bg: #fbeae9;
  --info: #4a4fb0;
  --info-bg: #ececf8;

  --font-ui: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --size-base: 15px;
  --leading: 1.6;
  --head-tracking: -0.015em;
  --brand-tracking: -0.01em;

  --space: 1.15rem;
  --pad-cell: 0.55rem 0.7rem;
  --border-width: 1px;
  --rule-weight: 1px;
  --radius: 8px;
  --badge-radius: 6px;

  --logo-blend: multiply;
  --logo-plate: transparent;
  --logo-plate-pad: 0;
  --logo-plate-pad-sm: 0;
}
