/* cartercole.net — the events' themes (events.js). While an event is on, <html data-event="…">
   sets the same palette recipe the design eras use (styles.css: lightness and chroma per token, a
   hue offset from --h0), so the site repaints through the tokens and nothing else changes. Each
   event also names its own display face, and the era's controls step aside for it.

   The palettes are a first pass: the look is the tokens, the glow and the type. Each event's
   signature flourishes are small rules at the bottom of this file. */

/* ---------- Halloween (15 Oct to 1 Nov): ink-purple night, pumpkin, witch-green ---------- */
html[data-event="halloween"] {
  --h0: 55deg; --h1: -130deg; --h2: 75deg;
  --void-lc: 0.140 0.035; --void-o: 225deg;
  --panel-lc: 0.190 0.045; --panel-o: 225deg;
  --panel-2-lc: 0.220 0.050; --panel-2-o: 225deg;
  --line-lc: 0.340 0.080; --line-o: 230deg;
  --line-hi-lc: 0.460 0.120; --line-hi-o: 235deg;
  --text-lc: 0.930 0.030; --text-o: 60deg;
  --dim-lc: 0.680 0.060; --dim-o: 230deg;
  --cyan-lc: 0.740 0.190;
  --cyan-ink-lc: 0.760 0.170;
  --amber-lc: 0.660 0.220;
  --amber-ink-lc: 0.740 0.160;
  --alert-lc: 0.800 0.220;
  --alert-ink-lc: 0.800 0.200;
  --bright-lc: 0.980 0.020; --bright-o: 60deg;
  --on-accent-lc: 0.140 0.035; --on-accent-o: 225deg;
  --disp: "Creepster", "Chakra Petch", ui-monospace, monospace;
  --glow: 1; --crt: 1; --grid: .04; --radius: 4px; --bw: 1px; --bg-scale: .7;
  --bg-filter: opacity(1);
  --lift: 0 10px 34px -14px color-mix(in srgb, var(--cyan) 60%, transparent);
}

/* ---------- Thanksgiving (the week of the fourth Thursday in November): harvest gold, rust, cranberry ---------- */
html[data-event="thanksgiving"] {
  --h0: 62deg; --h1: -40deg; --h2: -95deg;
  --void-lc: 0.190 0.035; --void-o: 22deg;
  --panel-lc: 0.240 0.040; --panel-o: 22deg;
  --panel-2-lc: 0.280 0.045; --panel-2-o: 22deg;
  --line-lc: 0.420 0.070; --line-o: 25deg;
  --line-hi-lc: 0.550 0.100; --line-hi-o: 28deg;
  --text-lc: 0.940 0.020; --text-o: 80deg;
  --dim-lc: 0.740 0.050; --dim-o: 40deg;
  --cyan-lc: 0.800 0.150;
  --cyan-ink-lc: 0.820 0.140;
  --amber-lc: 0.660 0.170;
  --amber-ink-lc: 0.720 0.150;
  --alert-lc: 0.600 0.200;
  --alert-ink-lc: 0.720 0.170;
  --bright-lc: 0.990 0.010; --bright-o: 80deg;
  --on-accent-lc: 0.190 0.035; --on-accent-o: 22deg;
  --disp: "Fraunces", Georgia, serif;
  --glow: .5; --crt: 0; --grid: .03; --radius: 10px; --bw: 1px; --bg-scale: .6;
  --bg-filter: opacity(1);
  --lift: 0 12px 30px -16px rgb(0 0 0 / .6);
}

/* ---------- Christmas (1 to 26 December): pine-black, holly red, gold, green ---------- */
html[data-event="christmas"] {
  --h0: 25deg; --h1: 40deg; --h2: 120deg;
  --void-lc: 0.170 0.030; --void-o: 125deg;
  --panel-lc: 0.220 0.040; --panel-o: 125deg;
  --panel-2-lc: 0.260 0.050; --panel-2-o: 125deg;
  --line-lc: 0.380 0.070; --line-o: 125deg;
  --line-hi-lc: 0.500 0.100; --line-hi-o: 125deg;
  --text-lc: 0.950 0.012; --text-o: 85deg;
  --dim-lc: 0.740 0.040; --dim-o: 110deg;
  --cyan-lc: 0.640 0.200;
  --cyan-ink-lc: 0.720 0.180;
  --amber-lc: 0.860 0.150;
  --amber-ink-lc: 0.860 0.150;
  --alert-lc: 0.720 0.170;
  --alert-ink-lc: 0.800 0.160;
  --bright-lc: 0.990 0.010; --bright-o: 85deg;
  --on-accent-lc: 0.980 0.010; --on-accent-o: 85deg;
  --disp: "Mountains of Christmas", Georgia, serif;
  --glow: 0; --crt: 0; --grid: 0; --radius: 8px; --bw: 1px; --bg-scale: .8;
  --bg-filter: opacity(1);
  --lift: 0 12px 30px -16px rgb(0 0 0 / .6);
}

/* ---------- Fourth of July (4 July, one day): navy night, red, white and blue ---------- */
html[data-event="july4"] {
  --h0: 260deg; --h1: 90deg; --h2: 180deg;
  --void-lc: 0.150 0.060; --void-o: 0deg;
  --panel-lc: 0.200 0.070; --panel-o: 0deg;
  --panel-2-lc: 0.240 0.080; --panel-2-o: 0deg;
  --line-lc: 0.360 0.100; --line-o: 0deg;
  --line-hi-lc: 0.500 0.120; --line-hi-o: 0deg;
  --text-lc: 0.970 0.005; --text-o: 0deg;
  --dim-lc: 0.720 0.030; --dim-o: 0deg;
  --cyan-lc: 0.700 0.170;                 /* blue */
  --cyan-ink-lc: 0.780 0.150;
  --amber-lc: 0.600 0.220;                /* red (260 + 90 = 350) */
  --amber-ink-lc: 0.700 0.190;
  --alert-lc: 0.970 0.000;                /* white */
  --alert-ink-lc: 0.970 0.000;
  --bright-lc: 0.990 0.000; --bright-o: 0deg;
  --on-accent-lc: 0.150 0.060; --on-accent-o: 0deg;
  --disp: "Anton", Impact, sans-serif;
  --glow: 1; --crt: 0; --grid: .03; --radius: 0px; --bw: 1px; --bg-scale: .6;
  --bg-filter: opacity(1);
  --lift: 0 10px 34px -14px color-mix(in srgb, var(--amber) 55%, transparent);
}

/* ---------- New Year's (31 December to 1 January): black, gold and champagne ---------- */
html[data-event="newyear"] {
  --h0: 85deg; --h1: -15deg; --h2: -60deg;
  --void-lc: 0.130 0.010; --void-o: 0deg;
  --panel-lc: 0.180 0.012; --panel-o: 0deg;
  --panel-2-lc: 0.210 0.014; --panel-2-o: 0deg;
  --line-lc: 0.340 0.040; --line-o: 0deg;
  --line-hi-lc: 0.500 0.090; --line-hi-o: 0deg;
  --text-lc: 0.950 0.030; --text-o: 85deg;
  --dim-lc: 0.700 0.050; --dim-o: 85deg;
  --cyan-lc: 0.800 0.130;                 /* gold */
  --cyan-ink-lc: 0.840 0.120;
  --amber-lc: 0.900 0.070;                /* champagne (85 - 15 = 70) */
  --amber-ink-lc: 0.900 0.070;
  --alert-lc: 0.750 0.100;                /* rose gold (85 - 60 = 25) */
  --alert-ink-lc: 0.800 0.100;
  --bright-lc: 0.980 0.030; --bright-o: 85deg;
  --on-accent-lc: 0.130 0.010; --on-accent-o: 0deg;
  --disp: "Playfair Display", Georgia, serif;
  --glow: .6; --crt: 0; --grid: 0; --radius: 2px; --bw: 1px; --bg-scale: .6;
  --bg-filter: opacity(1);
  --lift: 0 10px 34px -14px color-mix(in srgb, var(--cyan) 55%, transparent);
}

/* ---------- Safer Internet Day (second Tuesday of February): teal, green and a warning orange ---------- */
html[data-event="safernet"] {
  --h0: 165deg; --h1: -40deg; --h2: -130deg;
  --void-lc: 0.150 0.030; --void-o: 0deg;
  --panel-lc: 0.200 0.040; --panel-o: 0deg;
  --panel-2-lc: 0.240 0.050; --panel-2-o: 0deg;
  --line-lc: 0.360 0.070; --line-o: 0deg;
  --line-hi-lc: 0.500 0.100; --line-hi-o: 0deg;
  --text-lc: 0.950 0.020; --text-o: 0deg;
  --dim-lc: 0.720 0.040; --dim-o: 0deg;
  --cyan-lc: 0.800 0.140;                 /* teal */
  --cyan-ink-lc: 0.840 0.130;
  --amber-lc: 0.780 0.180;                /* green (165 - 40 = 125) */
  --amber-ink-lc: 0.800 0.150;
  --alert-lc: 0.780 0.170;                /* warning orange (165 - 130 = 35) */
  --alert-ink-lc: 0.800 0.150;
  --bright-lc: 0.990 0.010; --bright-o: 0deg;
  --on-accent-lc: 0.150 0.030; --on-accent-o: 0deg;
  --disp: "Exo 2", system-ui, sans-serif;
  --glow: .5; --crt: 0; --grid: .03; --radius: 6px; --bw: 1px; --bg-scale: .6;
  --bg-filter: opacity(1);
  --lift: 0 10px 30px -14px color-mix(in srgb, var(--cyan) 50%, transparent);
}

/* ---------- Star Wars Day (4 May): space black, Imperial blue, crawl yellow ---------- */
html[data-event="starwars"] {
  --h0: 240deg; --h1: -140deg; --h2: 60deg;
  --void-lc: 0.090 0.020; --void-o: 0deg;
  --panel-lc: 0.140 0.030; --panel-o: 0deg;
  --panel-2-lc: 0.180 0.040; --panel-2-o: 0deg;
  --line-lc: 0.300 0.070; --line-o: 0deg;
  --line-hi-lc: 0.450 0.110; --line-hi-o: 0deg;
  --text-lc: 0.960 0.010; --text-o: 0deg;
  --dim-lc: 0.700 0.040; --dim-o: 0deg;
  --cyan-lc: 0.700 0.170;                 /* blue */
  --cyan-ink-lc: 0.780 0.150;
  --amber-lc: 0.900 0.170;                /* crawl yellow (240 - 140 = 100) */
  --amber-ink-lc: 0.900 0.150;
  --alert-lc: 0.970 0.000;                /* white */
  --alert-ink-lc: 0.970 0.000;
  --bright-lc: 0.990 0.005; --bright-o: 0deg;
  --on-accent-lc: 0.090 0.020; --on-accent-o: 0deg;
  --disp: "Orbitron", system-ui, sans-serif;
  --glow: .9; --crt: 0; --grid: .04; --radius: 0px; --bw: 1px; --bg-scale: .8;
  --bg-filter: opacity(1);
  --lift: 0 10px 34px -14px color-mix(in srgb, var(--amber) 45%, transparent);
}

/* ---------- Turing Day (23 June): tape-slate, magenta and a signal yellow ---------- */
html[data-event="turing"] {
  --h0: 200deg; --h1: 120deg; --h2: 240deg;
  --void-lc: 0.160 0.030; --void-o: 0deg;
  --panel-lc: 0.210 0.035; --panel-o: 0deg;
  --panel-2-lc: 0.250 0.040; --panel-2-o: 0deg;
  --line-lc: 0.360 0.060; --line-o: 0deg;
  --line-hi-lc: 0.500 0.090; --line-hi-o: 0deg;
  --text-lc: 0.950 0.020; --text-o: 0deg;
  --dim-lc: 0.720 0.040; --dim-o: 0deg;
  --cyan-lc: 0.800 0.140;                 /* tape blue */
  --cyan-ink-lc: 0.840 0.130;
  --amber-lc: 0.680 0.200;                /* magenta (200 + 120 = 320) */
  --amber-ink-lc: 0.760 0.170;
  --alert-lc: 0.860 0.160;                /* signal yellow (200 + 240 = 80) */
  --alert-ink-lc: 0.860 0.160;
  --bright-lc: 0.990 0.010; --bright-o: 0deg;
  --on-accent-lc: 0.160 0.030; --on-accent-o: 0deg;
  --disp: "Major Mono Display", ui-monospace, monospace;
  --glow: .8; --crt: 1; --grid: .05; --radius: 0px; --bw: 1px; --bg-scale: .7;
  --bg-filter: opacity(1);
  --lift: 0 10px 34px -14px color-mix(in srgb, var(--cyan) 50%, transparent);
}

/* ---------- World Emoji Day (17 July): plum, pink, sky blue and orange ---------- */
html[data-event="emoji"] {
  --h0: 320deg; --h1: -120deg; --h2: 60deg;
  --void-lc: 0.200 0.060; --void-o: -40deg;
  --panel-lc: 0.250 0.070; --panel-o: -40deg;
  --panel-2-lc: 0.290 0.080; --panel-2-o: -40deg;
  --line-lc: 0.420 0.110; --line-o: -40deg;
  --line-hi-lc: 0.560 0.140; --line-hi-o: -40deg;
  --text-lc: 0.970 0.020; --text-o: 60deg;
  --dim-lc: 0.780 0.050; --dim-o: -20deg;
  --cyan-lc: 0.780 0.180;                 /* pink */
  --cyan-ink-lc: 0.820 0.160;
  --amber-lc: 0.780 0.140;                /* sky blue (320 - 120 = 200) */
  --amber-ink-lc: 0.820 0.120;
  --alert-lc: 0.800 0.180;                /* orange (320 + 60 = 20) */
  --alert-ink-lc: 0.800 0.160;
  --bright-lc: 0.990 0.010; --bright-o: 60deg;
  --on-accent-lc: 0.200 0.060; --on-accent-o: -40deg;
  --disp: "Fredoka", system-ui, sans-serif;
  --glow: .6; --crt: 0; --grid: 0; --radius: 16px; --bw: 2px; --bg-scale: .7;
  --bg-filter: opacity(1);
  --lift: 0 12px 30px -14px color-mix(in srgb, var(--cyan) 50%, transparent);
}

/* ---------- National Dog Day (26 August): apricot, warm brown and sky ---------- */
html[data-event="dogday"] {
  --h0: 70deg; --h1: -50deg; --h2: 150deg;
  --void-lc: 0.190 0.030; --void-o: -15deg;
  --panel-lc: 0.240 0.040; --panel-o: -15deg;
  --panel-2-lc: 0.280 0.045; --panel-2-o: -15deg;
  --line-lc: 0.420 0.070; --line-o: -15deg;
  --line-hi-lc: 0.550 0.100; --line-hi-o: -15deg;
  --text-lc: 0.950 0.020; --text-o: 40deg;
  --dim-lc: 0.750 0.050; --dim-o: 0deg;
  --cyan-lc: 0.800 0.140;                 /* apricot */
  --cyan-ink-lc: 0.840 0.130;
  --amber-lc: 0.600 0.160;                /* warm brown-red (70 - 50 = 20) */
  --amber-ink-lc: 0.720 0.140;
  --alert-lc: 0.780 0.100;                /* sky (70 + 150 = 220) */
  --alert-ink-lc: 0.820 0.100;
  --bright-lc: 0.990 0.010; --bright-o: 40deg;
  --on-accent-lc: 0.190 0.030; --on-accent-o: -15deg;
  --disp: "Patrick Hand", cursive;
  --glow: .3; --crt: 0; --grid: .02; --radius: 14px; --bw: 1px; --bg-scale: .6;
  --bg-filter: opacity(1);
  --lift: 0 12px 30px -16px rgb(0 0 0 / .6);
}

/* ---------- while an event is on: the era's controls step aside ---------- */
html[data-event] .topbar__era, html[data-event] .topbar__bg, html[data-event] .topbar__lock,
html[data-event] .topbar__rnd, html[data-event] .topbar__song, html[data-event] #era,
html[data-event] .bgeras__panel { display: none !important; }

/* the event's chip in the topbar, where the ERA dial sits: it names the event and links the calendar */
.topbar__event { color: var(--amber-ink); text-decoration: none; letter-spacing: .06em; white-space: nowrap; }
.topbar__event:not([hidden]) { display: inline-flex; align-items: center; }
.topbar__event:hover, .topbar__event:focus-visible { color: var(--text); }

/* ---------- flourishes ---------- */
html[data-event="halloween"] h1 { text-shadow: 0 0 .35em color-mix(in srgb, var(--cyan) 70%, transparent); }
html[data-event="christmas"] .topbar { border-bottom: 3px double var(--alert); }
html[data-event="newyear"] .topbar { box-shadow: inset 0 -1px 0 var(--amber); }
html[data-event="july4"] .topbar { border-bottom: 3px solid var(--amber); box-shadow: 0 3px 0 var(--cyan); }


/* ---------- the calendar page (templates/calendar.html) ---------- */
.calendar { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 12px; }
.calendar__item { border: var(--bw) solid var(--line); background: var(--panel); border-radius: var(--radius);
  padding: 14px 16px; display: grid; gap: 4px; }
.calendar__item[data-state="on"] { border-color: var(--cyan); box-shadow: var(--lift); }
.calendar__item[data-state="past"] { opacity: .6; }
.calendar__name { font-family: var(--disp); font-size: 1.5rem; margin: 0; color: var(--bright); }
.calendar__when { margin: 0; color: var(--dim); }
.calendar__status { margin: 0; color: var(--amber-ink); letter-spacing: .06em; }
.calendar__preview { justify-self: start; }
.calendar__switch { margin: 18px 0; }
