/*
 * Colour palettes — background + menu/panel tint, picked in the Tweaks panel or
 * set site-wide in Theme settings. Loaded only when a palette other than the
 * default is active (see inc/enqueue.php).
 *
 * Everything here is variable overrides, nothing structural: the theme already
 * paints every surface from --bg / --panel / --panel-solid / --panel-hi /
 * --hairline, so a palette is just a new set of those five values. That is why
 * a preset can never break a layout — and why a custom colour (Theme settings →
 * Appearance) is the same mechanism with values typed by hand.
 *
 * Each palette ships a dark and a light variant, because the visitor can flip
 * the light/dark switch independently of the colour choice.
 */

/* ---------------------------------------------------------------- midnight
   Deep blue-black. The theme's own look, kept as an explicit choice. */
html[data-palette="midnight"] {
  --bg: #0a0b10;
  --panel: rgba(22, 23, 32, 0.62);
  --panel-solid: #14151d;
  --panel-hi: rgba(32, 34, 46, 0.78);
  --hairline: rgba(255, 255, 255, 0.08);
}

/* ------------------------------------------------------------------ carbon
   Neutral graphite — no colour cast at all, photos keep their own tones. */
html[data-palette="carbon"] {
  --bg: #0d0d0f;
  --panel: rgba(26, 26, 29, 0.66);
  --panel-solid: #17171a;
  --panel-hi: rgba(38, 38, 42, 0.8);
  --hairline: rgba(255, 255, 255, 0.075);
}

/* ------------------------------------------------------------------- ocean
   Cold teal-navy. */
html[data-palette="ocean"] {
  --bg: #071016;
  --panel: rgba(15, 32, 42, 0.64);
  --panel-solid: #0e1c25;
  --panel-hi: rgba(22, 45, 58, 0.8);
  --hairline: rgba(160, 220, 255, 0.1);
}

/* -------------------------------------------------------------------- plum
   Warm purple-black — pairs with the violet accent the theme ships. */
html[data-palette="plum"] {
  --bg: #100a16;
  --panel: rgba(31, 21, 43, 0.64);
  --panel-solid: #1b1226;
  --panel-hi: rgba(44, 30, 60, 0.8);
  --hairline: rgba(220, 190, 255, 0.1);
}

/* ------------------------------------------------------------------ forest
   Dark green — calm, low-glare on long browsing sessions. */
html[data-palette="forest"] {
  --bg: #08120d;
  --panel: rgba(17, 34, 26, 0.64);
  --panel-solid: #0f1f18;
  --panel-hi: rgba(25, 48, 37, 0.8);
  --hairline: rgba(180, 255, 210, 0.09);
}

/* ------------------------------------------------------------------- ember
   Near-black with a warm brown cast; skin tones read warmer against it. */
html[data-palette="ember"] {
  --bg: #120c09;
  --panel: rgba(36, 24, 18, 0.64);
  --panel-solid: #1e1410;
  --panel-hi: rgba(52, 35, 26, 0.8);
  --hairline: rgba(255, 210, 170, 0.1);
}

/* ------------------------------------------------------------------- slate
   Lighter grey-blue: a softer dark for people who find pure black harsh. */
html[data-palette="slate"] {
  --bg: #14161c;
  --panel: rgba(31, 35, 45, 0.66);
  --panel-solid: #1d2029;
  --panel-hi: rgba(43, 48, 61, 0.8);
  --hairline: rgba(255, 255, 255, 0.09);
}

/* ---------------------------------------------------------------- contrast
   Pure black. Best on OLED (unlit pixels) and for maximum poster contrast. */
html[data-palette="contrast"] {
  --bg: #000000;
  --panel: rgba(18, 18, 18, 0.7);
  --panel-solid: #0c0c0c;
  --panel-hi: rgba(30, 30, 30, 0.85);
  --hairline: rgba(255, 255, 255, 0.1);
}

/* -------------------------------------------------------------------------
 * Light variants. The light scheme needs its own tints — inverting a dark
 * palette produces muddy greys, so each one is authored, not computed.
 * ------------------------------------------------------------------------- */
html[data-theme="light"][data-palette="midnight"] {
  --bg: #f4f5fa; --panel: rgba(255,255,255,0.74); --panel-solid: #ffffff;
  --panel-hi: rgba(255,255,255,0.93); --hairline: rgba(10,11,16,0.08);
}
html[data-theme="light"][data-palette="carbon"] {
  --bg: #f4f4f5; --panel: rgba(255,255,255,0.76); --panel-solid: #ffffff;
  --panel-hi: rgba(255,255,255,0.94); --hairline: rgba(0,0,0,0.08);
}
html[data-theme="light"][data-palette="ocean"] {
  --bg: #eef6f9; --panel: rgba(255,255,255,0.76); --panel-solid: #ffffff;
  --panel-hi: rgba(240,250,255,0.95); --hairline: rgba(6,60,80,0.1);
}
html[data-theme="light"][data-palette="plum"] {
  --bg: #f7f1fb; --panel: rgba(255,255,255,0.78); --panel-solid: #ffffff;
  --panel-hi: rgba(252,246,255,0.95); --hairline: rgba(60,20,80,0.1);
}
html[data-theme="light"][data-palette="forest"] {
  --bg: #eef7f1; --panel: rgba(255,255,255,0.78); --panel-solid: #ffffff;
  --panel-hi: rgba(244,253,247,0.95); --hairline: rgba(10,60,35,0.1);
}
html[data-theme="light"][data-palette="ember"] {
  --bg: #faf3ee; --panel: rgba(255,255,255,0.78); --panel-solid: #ffffff;
  --panel-hi: rgba(255,249,244,0.95); --hairline: rgba(70,40,20,0.1);
}
html[data-theme="light"][data-palette="slate"] {
  --bg: #eef0f4; --panel: rgba(255,255,255,0.78); --panel-solid: #ffffff;
  --panel-hi: rgba(250,251,253,0.95); --hairline: rgba(20,25,40,0.09);
}
html[data-theme="light"][data-palette="contrast"] {
  --bg: #ffffff; --panel: rgba(255,255,255,0.9); --panel-solid: #ffffff;
  --panel-hi: #ffffff; --hairline: rgba(0,0,0,0.14);
}
