/* =====================================================================
   SEASONAL LAYER (holiday / Christmas)
   Active only when <html data-season="holiday">. The inline script in
   <head> sets that attribute inside the date window.
   This file only re-tints tokens and adds a few touches. It never
   changes layout, so the site looks finished with the layer on or off.
   To switch off for good, delete this file, holiday.js and the season
   line in <head>.
   ===================================================================== */

[data-season="holiday"] {
  /* Palette: evergreen, cranberry, warm gold, frost. Use one accent at a time. */
  --holiday-cranberry: oklch(0.48 0.16 18);   /* 6.5:1 on white: safe for text */
  --holiday-gold:      oklch(0.82 0.12 85);   /* text only on dark; hairlines and icons on light */
  --holiday-evergreen: oklch(0.32 0.055 162);
  --holiday-frost:     oklch(0.965 0.012 230);

  /* Boosty keeps its brand blue in season (the logo is blue). The season shows
     through snow, frost glow, a gold hairline and one seasonal line instead. */
  --bg-alt: light-dark(var(--holiday-frost), #0f0f11);
  --snow-color: light-dark(#b4c3d6, #ffffff);
  --frost-glow: light-dark(oklch(0.93 0.03 230 / 0.9), oklch(0.42 0.06 230 / 0.45));
}

/* .season-only elements are hidden by base.css when the layer is off, so
   deleting this file is always safe. */

/* Snow host: snow falls behind the content, inside this element only */
[data-season="holiday"] [data-snow] {
  position: relative;
  isolation: isolate;
  background-image: radial-gradient(110% 70% at 50% 0%, var(--frost-glow), transparent 62%);
}
[data-snow] > canvas.snow {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%;
  pointer-events: none;
  color: var(--snow-color);          /* holiday.js reads the resolved color from here */
}

/* A whisper of gold under the nav: one detail, not tinsel */
[data-season="holiday"] .nav { box-shadow: inset 0 -1px 0 color-mix(in oklch, var(--holiday-gold) 45%, transparent); }

/* Gold eyebrow on dark sections */
[data-season="holiday"] .scheme-dark .eyebrow,
[data-season="holiday"] .eyebrow--season { color: light-dark(var(--holiday-cranberry), var(--holiday-gold)); }

/* Snow on/off control: visible, small and keyboard-reachable (WCAG 2.2.2) */
.snow-toggle {
  position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 60;
  display: inline-flex; align-items: center; gap: 0.4em;
  min-height: 36px; padding: 0.45em 0.95em;
  border-radius: var(--r-pill);
  border: 1px solid var(--hairline);
  background: var(--nav-bg-solid); color: var(--text);
  font-size: var(--fs-small);
  box-shadow: var(--shadow-soft);
}
.snow-toggle[aria-pressed="false"] { opacity: 0.8; }
.snow-toggle:hover { opacity: 1; }
