/* Colour tokens: the one place palette values live. Every page links this file (homepage in <head>, subpages before
   site-shell.css). Change a colour here and it changes everywhere. tests/palette.test.mjs checks the contrast below.

   Dark: an indigo near-black that continues the hero's night, with stepped surfaces and a top highlight.
   Light: a cool lavender-white with a deeper violet. Both use ONE accent (violet). Status green on /about is the
   single documented exception (see DESIGN.md). */
:root {
  color-scheme: dark;

  /* Surfaces: page, card, raised. Each step is lighter than the one below. */
  --bg: #0a091a;
  --surface: #14122b;
  --surface-2: #1d1b3a;
  --line: #ffffff14;
  --line-strong: #2f2c52;
  --field-line: #6b67a3;           /* controls and icon buttons: 3.6:1 or better */
  --edge: inset 0 1px 0 #ffffff0d; /* top highlight on raised surfaces */

  /* Text */
  --text: #edecfb;
  --text-2: #b9b6d8;
  --text-3: #908cb7;
  --placeholder: #8480ad;
  --hover-line: #908cb7;
  --mute-word: #6f6ba0;            /* large text only */

  /* Photo captions sit on a dark scrim in both page themes. */
  --on-photo-text: #edecfb;
  --on-photo-accent: #bda9ff;

  /* The one accent. --violet fills actions (white text 5.8:1); --violet-text colours text and numbers. */
  --violet: #6d3ff0;
  --violet-hover: #7d55f5;
  --violet-text: #bda9ff;
  --accent: var(--violet-text);

  /* States */
  --error: #ffab94;
  --invalid: #ff8a6b;
  --field-ring: #bda9ff33;

  /* Hero canvas and form fields follow the page. */
  --hero-bg: var(--bg);
  --hero-ink: #e6e4fa;
  --input-bg: var(--bg);
}

html[data-theme="light"] {
  color-scheme: light;

  --bg: #f3f2fa;
  --surface: #ffffff;
  --surface-2: #e8e6f3;
  --line: #0000001a;
  --line-strong: #8582a0;
  --field-line: #8582a0;
  --edge: inset 0 1px 0 #ffffff;

  --text: #100e1c;
  --text-2: #3d3a52;
  --text-3: #5a5772;
  --placeholder: #706d8a;
  --hover-line: #5a5772;
  --mute-word: #8683a3;

  --violet: #5b2de3;               /* white text 7.2:1 */
  --violet-hover: #4f22cc;
  --violet-text: #4a22cf;

  --error: #b4361b;
  --invalid: #c2410c;
  --field-ring: #4a22cf26;

  --hero-bg: var(--bg);
  --hero-ink: #14112b;
  --input-bg: #ffffff;
}
