/* ============================================================================
   COLOR THEMES  ·  the single place every colour in the site is decided
   ----------------------------------------------------------------------------
   To switch the whole site to another palette, open assets/theme.js and change
   the one value at the top. Nothing else needs touching.

     option1  ·  Midnight Cobalt  — the original palette: an illuminated
                 manuscript read at midnight, cobalt and silver-blue on black.
     option2  ·  Parish Manuscript — drawn from the parish seal: the brown of
                 the roundel, the cream of the name band, the gold of the
                 haloes, with the seal's sky and grass surviving as washes.

   HOW THE TOKENS WORK
   Every colour is stored as a bare RGB triplet (`4,6,15`) with a matching solid
   form beside it (`rgb(var(--ink-rgb))`). The triplet is what lets a rule ask
   for the same colour at partial opacity — `rgba(var(--ink-rgb),.6)` — which is
   most of what this stylesheet does. A palette that only shipped hex codes
   could not be themed, because the alpha variants would stay hard-coded.

   NAMING
   Names describe the ROLE, not the hue, so they stay honest across themes:
   `--accent` is cobalt blue in option 1 and gold in option 2. The old hue-named
   tokens (--gold, --crimson, --parchment) still exist at the bottom of
   styles.css as aliases, so older rules keep working.
   ========================================================================= */

/* ---------------------------------------------------------------------------
   OPTION 1 · MIDNIGHT COBALT   (also the no-JS default, see :root below)
   ------------------------------------------------------------------------ */
:root,
[data-theme="option1"]{
  --theme-name:"Midnight Cobalt";

  /* Surfaces — deepest to lightest. --ink is the page ground. */
  --void-rgb:2,3,10;          --void:rgb(var(--void-rgb));
  --ink-rgb:4,6,15;           --ink:rgb(var(--ink-rgb));
  --ink-2-rgb:7,13,32;        --ink-2:rgb(var(--ink-2-rgb));
  --panel-rgb:10,18,48;       --panel:rgb(var(--panel-rgb));
  --panel-2-rgb:13,33,62;     --panel-2:rgb(var(--panel-2-rgb));
  --slate-rgb:20,34,63;       --slate:rgb(var(--slate-rgb));
  --slate-2-rgb:20,42,78;     --slate-2:rgb(var(--slate-2-rgb));
  --steel-rgb:28,54,95;       --steel:rgb(var(--steel-rgb));
  --steel-2-rgb:36,64,112;    --steel-2:rgb(var(--steel-2-rgb));
  --edge-rgb:44,72,119;       --edge:rgb(var(--edge-rgb));

  /* Washes — the wide radial glows behind the hero and section headers. */
  --wash-rgb:30,58,122;       --wash:rgb(var(--wash-rgb));
  --wash-2-rgb:26,58,110;     --wash-2:rgb(var(--wash-2-rgb));
  --wash-3-rgb:13,31,74;      --wash-3:rgb(var(--wash-3-rgb));

  /* Accent — rules, hairlines, small caps, active states, the donate button. */
  --accent-1-rgb:61,106,176;   --accent-1:rgb(var(--accent-1-rgb));
  --accent-2-rgb:74,120,196;   --accent-2:rgb(var(--accent-2-rgb));
  --accent-3-rgb:109,154,223;  --accent-3:rgb(var(--accent-3-rgb));
  --accent-rgb:127,168,217;    --accent:rgb(var(--accent-rgb));
  --accent-hi-rgb:168,200,238; --accent-hi:rgb(var(--accent-hi-rgb));
  --accent-pale-rgb:218,232,255; --accent-pale:rgb(var(--accent-pale-rgb));

  /* Text. --text-warm is the workhorse: nearly all body copy is a fade of it. */
  --text-rgb:232,239,255;      --text:rgb(var(--text-rgb));
  --text-warm-rgb:245,234,211; --text-warm:rgb(var(--text-warm-rgb));
  --text-cool-rgb:240,248,255; --text-cool:rgb(var(--text-cool-rgb));
  --text-cool-2-rgb:230,240,255; --text-cool-2:rgb(var(--text-cool-2-rgb));
  --text-mute-rgb:197,210,238; --text-mute:rgb(var(--text-mute-rgb));

  /* Status. Green for a met goal, red for a form error — legible in any theme. */
  --ok-rgb:120,200,160;        --ok:#9be0b9;
  --danger-rgb:255,138,138;    --danger:#ff8a8a;
  --danger-hi:#ffb0b0;
  --danger-lo:#ff6868;
  --danger-bg:#3a0f10;
  --danger-bg-2:#5c1417;
}

/* ---------------------------------------------------------------------------
   OPTION 2 · PARISH MANUSCRIPT   — keyed to the parish seal
   ------------------------------------------------------------------------ */
[data-theme="option2"]{
  --theme-name:"Parish Manuscript";

  /* Surfaces — the seal's brown roundel taken down to a ground dark enough to
     read cream text on, then stepped back up toward the roundel's own brown. */
  --void-rgb:14,8,4;          --void:rgb(var(--void-rgb));
  --ink-rgb:26,15,8;          --ink:rgb(var(--ink-rgb));
  --ink-2-rgb:37,21,11;       --ink-2:rgb(var(--ink-2-rgb));
  --panel-rgb:47,28,15;       --panel:rgb(var(--panel-rgb));
  --panel-2-rgb:58,35,20;     --panel-2:rgb(var(--panel-2-rgb));
  --slate-rgb:66,41,25;       --slate:rgb(var(--slate-rgb));
  --slate-2-rgb:76,47,29;     --slate-2:rgb(var(--slate-2-rgb));
  --steel-rgb:92,58,43;       --steel:rgb(var(--steel-rgb));   /* the roundel */
  --steel-2-rgb:110,72,50;    --steel-2:rgb(var(--steel-2-rgb));
  --edge-rgb:126,86,58;       --edge:rgb(var(--edge-rgb));

  /* Washes — the wide ambient glows behind the hero and section headers.
     These began as the seal's literal sky-blue and grass-green, but at the .3-.5
     opacity the layout uses them, a saturated blue or green over a brown ground
     stops reading as light and starts reading as a stain — the services band
     came out visibly swampy. They are pulled back toward the ground here, so
     they read as candlelight pooling on brown while keeping the seal's three
     notes distinct: warm light, a memory of grass, and earth. */
  --wash-rgb:96,66,34;        --wash:rgb(var(--wash-rgb));     /* amber light */
  --wash-2-rgb:74,74,52;      --wash-2:rgb(var(--wash-2-rgb)); /* muted olive */
  --wash-3-rgb:46,28,15;      --wash-3:rgb(var(--wash-3-rgb)); /* earth */

  /* Accent — the gold of the two haloes. */
  --accent-1-rgb:168,122,42;   --accent-1:rgb(var(--accent-1-rgb));
  --accent-2-rgb:196,149,47;   --accent-2:rgb(var(--accent-2-rgb));
  --accent-3-rgb:223,180,74;   --accent-3:rgb(var(--accent-3-rgb));
  --accent-rgb:232,194,90;     --accent:rgb(var(--accent-rgb));
  --accent-hi-rgb:245,217,126; --accent-hi:rgb(var(--accent-hi-rgb));
  --accent-pale-rgb:250,235,192; --accent-pale:rgb(var(--accent-pale-rgb));

  /* Text — the cream of the name band the parish name is lettered on. */
  --text-rgb:245,238,220;      --text:rgb(var(--text-rgb));
  --text-warm-rgb:242,234,209; --text-warm:rgb(var(--text-warm-rgb));
  --text-cool-rgb:250,244,230; --text-cool:rgb(var(--text-cool-rgb));
  --text-cool-2-rgb:245,236,215; --text-cool-2:rgb(var(--text-cool-2-rgb));
  --text-mute-rgb:212,192,154; --text-mute:rgb(var(--text-mute-rgb));

  /* Status — green pulled toward the seal's grass; red left alone. */
  --ok-rgb:124,179,66;         --ok:#a4d16a;
  --danger-rgb:255,138,138;    --danger:#ff8a8a;
  --danger-hi:#ffb0b0;
  --danger-lo:#ff6868;
  --danger-bg:#3a0f10;
  --danger-bg-2:#5c1417;
}

/* ---------------------------------------------------------------------------
   SHARED · not themed
   The heavenly light breaking over the hero is a light source, not a brand
   colour, so it stays the colour of light in both themes.
   ------------------------------------------------------------------------ */
:root{
  --halo-1-rgb:255,253,245;
  --halo-2-rgb:255,245,220;
  --halo-3-rgb:255,250,235;
  --halo-4-rgb:255,250,220;
  --halo-5-rgb:255,245,210;
  --shadow-rgb:0,0,0;
}
