/* ===========================================================
   Seasonal themes — loaded only while a season is on.

   Everything is scoped to the html element's data-season attribute, so the
   file is inert without it. The accent tokens are the main lever: the WebGL
   light beams in the hero read --acc, --acc-2 and --acc-3 when they start,
   so three values recolour the whole site, light included. What follows
   catches the handful of places that hard-code the house purple.

   Every effect layer is pointer-events: none. A season is allowed to look
   at the visitor; it is never allowed to stand between them and a button.
   =========================================================== */

/* ---------------------------------------------------------------- shared */

.ssn-layer { position: fixed; inset: 0; pointer-events: none; z-index: 35; overflow: hidden; }
.ssn-hero { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.ssn-hero canvas, .ssn-layer canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* the countdown that rides in the announcement bar */
.ssn-count b { font-variant-numeric: tabular-nums; }
.announce__track span.ssn-count::before { content: none; }
.ssn-count i { font-style: normal; margin-right: 8px; }

/* the admin's preview pill */
.ssn-preview {
  position: fixed; left: 16px; bottom: 16px; z-index: 90;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 10px 8px 14px; border-radius: 999px;
  background: rgba(8, 6, 14, .88); border: 1px solid var(--acc-a45);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font: 700 semi-expanded 11px/1 var(--label); letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink);
}
.ssn-preview a { padding: 6px 10px; border-radius: 999px; background: var(--acc); color: #0b0912; text-decoration: none; }

/* ================================================================
   HALLOWEEN — "Nasty Night"
   ================================================================ */

:root[data-season="halloween"] {
  --bg: #09060a;
  --bg-2: #0f0a0f;
  --bg-3: #171016;
  --acc: #ff6a00;
  --acc-2: #b14dff;
  --acc-3: #39ff8a;
  --acc-ink: #ffb066;
  --acc-a12: rgba(255, 106, 0, .12);
  --acc-a25: rgba(255, 106, 0, .25);
  --acc-a45: rgba(255, 106, 0, .45);
}

/* the house purple, wherever it was written by hand */
[data-season="halloween"] .announce {
  background: linear-gradient(90deg, #1c0800, #2e0e02 50%, #1c0800);
  border-bottom-color: rgba(255, 106, 0, .28);
}
[data-season="halloween"] .announce a { text-decoration-color: var(--acc); }
[data-season="halloween"] .mascot__glow {
  background: radial-gradient(closest-side, rgba(255, 106, 0, .42), rgba(177, 77, 255, .14) 55%, transparent 72%);
}
[data-season="halloween"] .mascot__fig {
  filter: drop-shadow(-14px 0 26px rgba(255, 106, 0, .26)) drop-shadow(18px -6px 40px rgba(57, 255, 138, .12));
}
/* The visor glows pumpkin. A hue shift on the picture rather than a redrawn
   one: the helmet and jacket are black and the chains grey, so only the
   violet parts move — and only while the season is on. */
[data-season="halloween"] .mascot__fig img,
[data-season="halloween"] .promo__art img { filter: hue-rotate(118deg) saturate(1.2); }
[data-season="halloween"] .mascot__visor {
  background: radial-gradient(closest-side, rgba(255, 140, 20, .7), transparent);
}
[data-season="halloween"] .promo__art {
  background: radial-gradient(120% 80% at 50% 30%, rgba(255, 106, 0, .55), rgba(177, 77, 255, .15) 50%, transparent 75%), var(--bg-3);
}
[data-season="halloween"] .promo__code { border-color: rgba(255, 106, 0, .55); background: rgba(255, 106, 0, .07); }
[data-season="halloween"] .promo__code:hover { background: rgba(255, 106, 0, .14); }
[data-season="halloween"] .bundle {
  background: radial-gradient(800px 400px at 85% 20%, rgba(255, 106, 0, .2), transparent 60%),
              radial-gradient(700px 500px at 0% 100%, rgba(177, 77, 255, .18), transparent 60%), var(--bg-2);
}
[data-season="halloween"] #fwFill stop:nth-child(1) { stop-color: #ffb066; }
[data-season="halloween"] #fwFill stop:nth-child(2),
[data-season="halloween"] #fwFill stop:nth-child(3) { stop-color: #ff6a00; }
[data-season="halloween"] #fwLine stop:nth-child(1) { stop-color: #ffd7b0; }
[data-season="halloween"] #fwLine stop:nth-child(2) { stop-color: #ff8a2a; }

/* The giant NASTY behind the hero: a neon sign on its last legs. Dims at
   most twice in a second and never to black — well inside the three-flash
   limit for photosensitive visitors. */
[data-season="halloween"] .hero__ghost {
  -webkit-text-stroke: 1px rgba(255, 140, 40, .2);
  text-shadow: 0 0 40px rgba(255, 106, 0, .12);
  animation: ssnFlicker 9s infinite;
}
@keyframes ssnFlicker {
  0%, 62%, 66%, 71%, 100% { opacity: 1; }
  64% { opacity: .55; }
  69% { opacity: .7; }
}

/* fog drifts over the hero's lower edge; drawn by the script */
[data-season="halloween"] .ssn-fog { position: absolute; left: 0; right: 0; bottom: 0; height: 46%; pointer-events: none; z-index: -1; opacity: .9; }

/* eyes in the dark, either side of the hero */
.ssn-eyes { position: absolute; display: flex; gap: var(--gap, 14px); pointer-events: none; opacity: 0; transition: opacity 1.2s; }
.ssn-eyes.on { opacity: 1; }
.ssn-eye {
  position: relative; width: var(--w, 16px); height: calc(var(--w, 16px) * .62);
  border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%;
  background: radial-gradient(circle at 50% 55%, #fff6c8 0, #ffcf3a 26%, #ff7a00 58%, #ff4d00 72%, transparent 78%);
  box-shadow: 0 0 calc(var(--w, 16px) * 1.2) rgba(255, 140, 0, .55);
  transform-origin: 50% 50%;
}
.ssn-eye::after {
  /* the pupil, which the script slides towards the pointer */
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 22%; height: 62%; border-radius: 50%; background: #1a0500;
  transform: translate(calc(-50% + var(--px, 0px)), -50%);
}
.ssn-eyes.blink .ssn-eye { animation: ssnBlink .26s ease-in-out; }
@keyframes ssnBlink { 50% { transform: scaleY(.08); } }


/* a candle the visitor carries through the hero */
.ssn-candle {
  position: absolute; width: 520px; height: 520px; margin: -260px 0 0 -260px; left: 0; top: 0;
  border-radius: 50%; pointer-events: none; z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 150, 40, .16), rgba(255, 106, 0, .06) 45%, transparent 72%);
  opacity: 0; transition: opacity .6s;
}
.ssn-candle.on { opacity: 1; }

/* the spider, hanging from beneath the nav */
.ssn-spider {
  position: fixed; top: 0; right: clamp(18px, 7vw, 120px); z-index: 38;
  width: 36px; pointer-events: none;
  transform: translateY(var(--drop, -120px));
  transition: transform 1.6s cubic-bezier(.3, 1.35, .5, 1);
}
.ssn-spider .thread { position: absolute; left: 50%; bottom: 30px; width: 1px; height: 1200px; background: linear-gradient(transparent, rgba(255, 255, 255, .35)); }
.ssn-spider svg { position: relative; display: block; width: 36px; height: 36px; animation: ssnSway 3.4s ease-in-out infinite; transform-origin: 50% -400px; }
@keyframes ssnSway { 50% { transform: rotate(1.6deg); } }

/* bats crossing the screen */
.ssn-bat { position: absolute; left: 0; top: 0; width: var(--s, 34px); will-change: transform; }
.ssn-bat svg { display: block; width: 100%; overflow: visible; }
.ssn-bat .wing { transform-origin: 50% 40%; animation: ssnFlap .22s ease-in-out infinite alternate; }
@keyframes ssnFlap { to { transform: scaleY(.25); } }

/* slime along the footer's top edge */
.ssn-edge { position: absolute; left: 0; right: 0; top: -1px; height: 40px; pointer-events: none; z-index: 1; }
.ssn-edge svg { width: 100%; height: 100%; display: block; }
.ssn-drop { animation: ssnDrip 6s ease-in infinite; transform-box: fill-box; transform-origin: 50% 0; }
@keyframes ssnDrip {
  0%, 70% { transform: translateY(0) scaleY(1); opacity: 1; }
  85% { transform: translateY(6px) scaleY(1.5); opacity: 1; }
  100% { transform: translateY(60px) scaleY(.8); opacity: 0; }
}

/* the ghost of the "boo" easter egg */
.ssn-ghost { position: absolute; width: 120px; opacity: .92; filter: drop-shadow(0 0 30px rgba(255, 255, 255, .35)); }
.ssn-shake { animation: ssnShake .45s; }
@keyframes ssnShake {
  20% { transform: translate(-3px, 1px); } 40% { transform: translate(3px, -2px); }
  60% { transform: translate(-2px, 2px); } 80% { transform: translate(2px, -1px); }
}


/* ---------- Halloween scenery ---------- */

/* a jack-o'-lantern; the carved face flickers like a candle inside */
.ssn-pk { display: block; width: 100%; height: auto; overflow: visible;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .6)) drop-shadow(0 0 14px rgba(255, 120, 0, .32)); }
/* Only the pumpkins in the hero flicker. Every flickering face makes its
   pumpkin's glow be redrawn each frame; thirty of them at once is a cost
   the page should not pay for lanterns nobody is looking at. */
.ssn-pk-face { animation: none; }
.ssn-pile .ssn-pk-face, .ssn-lone .ssn-pk-face, .ssn-stats-pk .ssn-pk-face { animation: ssnCandle 2.8s ease-in-out infinite; }
@keyframes ssnCandle {
  0%, 100% { opacity: 1; } 18% { opacity: .76; } 34% { opacity: .95; }
  52% { opacity: .82; } 70% { opacity: 1; } 86% { opacity: .88; }
}

/* the harvest moon behind the mascot, clouds drifting across it */
.ssn-moon { position: absolute; right: 2vw; top: 66px; width: clamp(220px, 29vw, 450px); z-index: -2; pointer-events: none; }
.ssn-moon > svg { position: relative; width: 100%; height: auto; display: block;
  filter: drop-shadow(0 0 36px rgba(255, 196, 110, .55)) drop-shadow(0 0 110px rgba(255, 120, 30, .38)); }
.ssn-cloud { position: absolute; left: 0; top: var(--y); width: var(--w); animation: ssnCloud linear infinite alternate; }
.ssn-cloud svg { width: 100%; height: auto; display: block; }
@keyframes ssnCloud { from { transform: translateX(-35%); } to { transform: translateX(105%); } }

/* the graveyard along the bottom of the hero */
.ssn-yard { position: absolute; left: 0; right: 0; bottom: 0; height: clamp(120px, 22vh, 220px); z-index: -1; pointer-events: none; }
.ssn-yard svg { width: 100%; height: 100%; display: block; }

/* big webs in the hero's top corners; the right one hangs in front of the moon */
.ssn-web { position: absolute; top: 0; width: clamp(190px, 24vw, 360px); opacity: .32; pointer-events: none; z-index: -1; }
.ssn-web svg { width: 100%; height: auto; display: block; overflow: visible; }
.ssn-web--tl { left: 0; }
.ssn-web--tr { right: 0; transform: scaleX(-1); opacity: .42; }

/* pumpkins piled at the mascot's feet */
.ssn-pile { position: absolute; right: 5vw; bottom: 1vh; width: clamp(210px, 22vw, 340px); height: clamp(120px, 13vw, 190px); z-index: 2; pointer-events: none; }
.ssn-pile > span { position: absolute; display: block; }
.ssn-pile__a { left: 22%; bottom: 4%; width: 54%; z-index: 2; }
.ssn-pile__b { left: 0; bottom: 0; width: 36%; z-index: 3; transform: rotate(-7deg); }
.ssn-pile__c { right: 0; bottom: 0; width: 33%; z-index: 3; transform: rotate(6deg); }
.ssn-pile__d { left: 38%; bottom: 66%; width: 26%; z-index: 1; transform: rotate(-4deg); }
.ssn-lone { position: absolute; left: 24vw; bottom: 1vh; width: clamp(54px, 5vw, 84px); z-index: -1; pointer-events: none; }

/* the witch crossing the moon */
.ssn-witch { position: absolute; left: 0; top: 0; width: clamp(110px, 11vw, 170px); z-index: -2; pointer-events: none;
  filter: drop-shadow(0 0 2px rgba(255, 170, 80, .6)); }
.ssn-witch svg { width: 100%; height: auto; display: block; }

/* pumpkin lights hang a little lower than the Christmas ones */
[data-season="halloween"] .ssn-lights { height: 46px; }

/* every product card: a pumpkin on its top edge, a web in its picture */
.ssn-card-pk { position: absolute; right: 16px; top: -24px; width: 42px; z-index: 4; pointer-events: none; transform: rotate(8deg); }
.ssn-card-web { position: absolute; right: 0; top: 0; width: 34%; max-width: 130px; transform: scaleX(-1); opacity: .5; pointer-events: none; z-index: 2; }
.ssn-card-web svg { width: 100%; height: auto; display: block; overflow: visible; }

/* a small lantern before every section label */
.ssn-eyebrow { display: inline-block; width: 15px; margin-right: 9px; vertical-align: -3px; pointer-events: none; }

/* webs in the corners of the large panels */
.ssn-block-web { position: absolute; top: 0; width: clamp(110px, 12vw, 190px); opacity: .24; pointer-events: none; z-index: 1; }
.ssn-block-web svg { width: 100%; height: auto; display: block; overflow: visible; }
.ssn-block-web--tl { left: 0; }
.ssn-block-web--tr { right: 0; transform: scaleX(-1); }

/* pumpkins resting on the stats bar */
.ssn-stats-pk { position: absolute; top: -34px; width: 48px; z-index: 3; pointer-events: none; }
.ssn-stats-pk--l { left: calc(var(--gutter) + 28px); transform: rotate(-6deg); }
.ssn-stats-pk--r { right: calc(var(--gutter) + 28px); transform: rotate(7deg); }

/* a row of lanterns sitting in the slime along the footer's top edge —
   inside it, because the footer clips anything that pokes out above */
.ssn-foot-pk { position: absolute; left: 0; right: 0; top: 2px; display: flex; justify-content: space-around; padding: 0 5vw; pointer-events: none; z-index: 2; }
.ssn-foot-pk span { display: block; width: clamp(30px, 3.2vw, 46px); transform: rotate(calc((var(--i) - 3) * 3deg)); }

/* spiders that hang inside a block and scroll away with it */
.ssn-spider--local { position: absolute; z-index: 2; }

/* the ghost that drifts across now and then */
.ssn-ghost--drift { width: 90px; opacity: 0; filter: drop-shadow(0 0 24px rgba(255, 255, 255, .4)); }

@media (max-width: 759px) {
  /* On a phone the headline runs the full width, so the moon moves up into
     the corner behind the nav and dims: white type must never sit on it. */
  .ssn-moon { right: -16vw; top: 18px; width: 50vw; opacity: .55; }
  .ssn-web { width: 140px; opacity: .22; }
  .ssn-web--tr { opacity: .26; }
  .ssn-preview { left: 8px; bottom: 8px; padding: 6px 6px 6px 10px; font-size: 9.5px; gap: 6px; }
  .ssn-preview a { padding: 5px 8px; }
  .ssn-pile { right: 2vw; width: 46vw; height: 28vw; }
  .ssn-lone { display: none; }
  .ssn-stats-pk { width: 36px; top: -26px; }
}

/* ================================================================
   CHRISTMAS — "Nasty Noel"
   ================================================================ */

:root[data-season="christmas"] {
  --bg: #050811;
  --bg-2: #080d1a;
  --bg-3: #0e1528;
  --acc: #e8b54a;
  --acc-2: #e0344b;
  --acc-3: #4fb3ff;
  --acc-ink: #ffd98a;
  --acc-a12: rgba(232, 181, 74, .12);
  --acc-a25: rgba(232, 181, 74, .25);
  --acc-a45: rgba(232, 181, 74, .45);
}

[data-season="christmas"] .announce {
  background: linear-gradient(90deg, #12060a, #2a0a12 50%, #12060a);
  border-bottom-color: rgba(232, 181, 74, .28);
}
[data-season="christmas"] .announce a { text-decoration-color: var(--acc); }
[data-season="christmas"] .mascot__glow {
  background: radial-gradient(closest-side, rgba(232, 181, 74, .36), rgba(224, 52, 75, .14) 55%, transparent 72%);
}
[data-season="christmas"] .mascot__fig {
  filter: drop-shadow(-14px 0 26px rgba(232, 181, 74, .22)) drop-shadow(18px -6px 40px rgba(79, 179, 255, .16));
}
[data-season="christmas"] .mascot__fig img,
[data-season="christmas"] .promo__art img { filter: hue-rotate(-62deg) saturate(1.15) brightness(1.04); }
/* an ice-blue visor, to go with the winter moon behind it */
[data-season="christmas"] .mascot__visor {
  background: radial-gradient(closest-side, rgba(150, 210, 255, .7), transparent);
}
[data-season="christmas"] .promo__art {
  background: radial-gradient(120% 80% at 50% 30%, rgba(232, 181, 74, .5), rgba(224, 52, 75, .15) 50%, transparent 75%), var(--bg-3);
}
[data-season="christmas"] .promo__code { border-color: rgba(232, 181, 74, .55); background: rgba(232, 181, 74, .07); }
[data-season="christmas"] .promo__code:hover { background: rgba(232, 181, 74, .14); }
[data-season="christmas"] .bundle {
  background: radial-gradient(800px 400px at 85% 20%, rgba(232, 181, 74, .18), transparent 60%),
              radial-gradient(700px 500px at 0% 100%, rgba(224, 52, 75, .16), transparent 60%), var(--bg-2);
}
[data-season="christmas"] #fwFill stop:nth-child(1) { stop-color: #ffe7b0; }
[data-season="christmas"] #fwFill stop:nth-child(2),
[data-season="christmas"] #fwFill stop:nth-child(3) { stop-color: #e8b54a; }
[data-season="christmas"] #fwLine stop:nth-child(1) { stop-color: #fff6dc; }
[data-season="christmas"] #fwLine stop:nth-child(2) { stop-color: #e8b54a; }
[data-season="christmas"] .hero__ghost { -webkit-text-stroke: 1px rgba(255, 220, 140, .16); }

/* snow settles on top of every card */
.ssn-cap {
  position: absolute; left: 10px; right: 10px; top: -7px; height: 16px; z-index: 3; pointer-events: none;
  background:
    radial-gradient(14px 9px at 12% 70%, #fff 60%, transparent 62%),
    radial-gradient(22px 12px at 30% 62%, #fff 60%, transparent 62%),
    radial-gradient(18px 10px at 52% 70%, #fff 60%, transparent 62%),
    radial-gradient(26px 13px at 74% 60%, #fff 60%, transparent 62%),
    radial-gradient(14px 9px at 92% 72%, #fff 60%, transparent 62%),
    linear-gradient(#fff, #fff) 0 100% / 100% 6px no-repeat;
  border-radius: 10px 10px 4px 4px;
  filter: drop-shadow(0 2px 3px rgba(120, 160, 220, .35));
  opacity: .92;
}

/* the fairy lights hanging below the nav */
.ssn-lights { position: absolute; left: 0; right: 0; top: 100%; height: 30px; pointer-events: none; overflow: visible; }
.ssn-lights svg { width: 100%; height: 100%; display: block; overflow: visible; }
.ssn-bulb { animation: ssnTwinkle 2.8s ease-in-out infinite; }
@keyframes ssnTwinkle {
  0%, 100% { opacity: 1; }
  45% { opacity: .35; }
}

/* icicles along the footer's top edge */
.ssn-icicle { transform-box: fill-box; transform-origin: 50% 0; }

/* a shooting star over the hero */
.ssn-star {
  position: absolute; width: 170px; height: 2px; border-radius: 2px; pointer-events: none; z-index: -1;
  background: linear-gradient(90deg, rgba(255, 236, 190, 0), rgba(255, 244, 214, .95));
  filter: drop-shadow(0 0 6px rgba(255, 220, 140, .85));
  transform: rotate(22deg); opacity: 0;
  animation: ssnShoot 1.25s ease-out forwards;
}
@keyframes ssnShoot {
  0% { opacity: 0; transform: rotate(22deg) translateX(0); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: rotate(22deg) translateX(360px); }
}

/* the sleigh of the "hohoho" easter egg */
.ssn-sleigh { position: absolute; width: 260px; opacity: .95; filter: drop-shadow(0 0 18px rgba(255, 220, 140, .55)); }


/* ---------- Christmas scenery ---------- */

.ssn-gift, .ssn-orn, .ssn-holly { display: block; width: 100%; height: auto; overflow: visible; }
.ssn-gift { filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .55)); }
.ssn-orn { filter: drop-shadow(0 0 10px rgba(255, 220, 140, .35)); }
.ssn-holly { filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .5)); }

/* the winter moon is cooler, and so is its light */
.ssn-moon--winter > svg { filter: drop-shadow(0 0 34px rgba(200, 225, 255, .6)) drop-shadow(0 0 110px rgba(110, 170, 255, .35)); }

/* stars that twinkle across the top of the sky */
.ssn-sky { position: absolute; inset: 0 0 40% 0; z-index: -2; pointer-events: none; }
.ssn-sky i { position: absolute; border-radius: 50%; background: #fff; box-shadow: 0 0 6px rgba(255, 255, 255, .9); animation: ssnTwinkleStar 3s ease-in-out infinite; }
@keyframes ssnTwinkleStar { 0%, 100% { opacity: .9; transform: scale(1); } 50% { opacity: .25; transform: scale(.6); } }

/* pine garlands with baubles, hanging from the hero's top corners */
.ssn-garland { position: absolute; top: 0; width: clamp(200px, 25vw, 380px); z-index: -1; pointer-events: none; }
.ssn-garland svg { width: 100%; height: auto; display: block; overflow: visible; }
.ssn-garland--tl { left: 0; }
.ssn-garland--tr { right: 0; transform: scaleX(-1); }

.ssn-snowman { width: clamp(64px, 6vw, 96px); bottom: 0; z-index: -1; }
.ssn-santa { width: clamp(180px, 18vw, 280px); }

/* every product card: holly on its corner, above the snow */
.ssn-card-holly { position: absolute; right: 12px; top: -18px; width: 54px; z-index: 4; pointer-events: none; transform: rotate(10deg); }

/* a bauble before every section label */
.ssn-eyebrow--orn { width: 13px; vertical-align: -4px; }

.ssn-block-garland { position: absolute; top: 0; width: clamp(120px, 13vw, 210px); opacity: .9; pointer-events: none; z-index: 1; }
.ssn-block-garland svg { width: 100%; height: auto; display: block; overflow: visible; }
.ssn-block-garland--tl { left: 0; }
.ssn-block-garland--tr { right: 0; transform: scaleX(-1); }

.ssn-foot-gifts span { width: clamp(28px, 3vw, 42px); }

@media (max-width: 759px) {
  .ssn-garland { width: 150px; }
  .ssn-snowman { display: none; }
}

/* ---------------------------------------------------------------- calm */

/* A visitor who asked for less motion gets the costume without the
   choreography. The same applies when the owner picks "subtle". */
@media (prefers-reduced-motion: reduce) {
  [data-season] .hero__ghost,
  [data-season] .ssn-spider svg,
  [data-season] .ssn-bat .wing,
  [data-season] .ssn-drop,
  [data-season] .ssn-pk-face,
  [data-season] .ssn-cloud,
  [data-season] .ssn-sky i,
  [data-season] .ssn-bulb { animation: none !important; }
}
[data-season-fx="subtle"] .hero__ghost,
[data-season-fx="subtle"] .ssn-drop,
[data-season-fx="subtle"] .ssn-pk-face,
[data-season-fx="subtle"] .ssn-sky i,
[data-season-fx="subtle"] .ssn-bulb { animation: none !important; }
