/* ============================================================================
   Seasonal overlays — Thanksgiving/fall, then winter with a touch of Christmas.
   assets/season.js adds html.sn-fall or html.sn-winter only inside each date
   window, so outside those windows nothing here matches and the site is its
   normal self. Halloween lives in halloween.css and expires Nov 1, which is
   exactly when fall starts.

   Everything is decoration: aria-hidden, pointer-events:none, and it holds
   still under prefers-reduced-motion.
   ========================================================================== */

/* ── shared: drifting particles (leaves in fall, snow in winter) ────────── */
.sn-sky { position: fixed; inset: 0; pointer-events: none; z-index: 38; overflow: hidden; }
.sn-bit { position: absolute; top: -6vh; will-change: transform;
          animation: snFall var(--sn-dur, 14s) linear var(--sn-del, 0s) infinite; }
.sn-bit svg, .sn-bit i { display: block; }
@keyframes snFall {
  0%   { transform: translate3d(0, -10vh, 0) rotate(0deg); opacity: 0; }
  8%   { opacity: var(--sn-op, .9); }
  92%  { opacity: var(--sn-op, .9); }
  100% { transform: translate3d(var(--sn-drift, 40px), 108vh, 0) rotate(var(--sn-spin, 320deg)); opacity: 0; }
}

/* ── shared: cursor follower (leaf / snowflake) ─────────────────────────── */
.sn-cur-on, .sn-cur-on a, .sn-cur-on button, .sn-cur-on summary { cursor: none; }
.sn-cur-on input, .sn-cur-on textarea, .sn-cur-on select { cursor: auto; }
.sn-cursor { position: fixed; left: 0; top: 0; z-index: 2147483000; width: 34px; height: 34px;
             margin: -17px 0 0 -17px; pointer-events: none; will-change: transform;
             filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35)); }
.sn-cursor svg { width: 100%; height: 100%; display: block; animation: snTwirl 3.4s ease-in-out infinite; }
@keyframes snTwirl { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(14deg); } }


/* ── the scene that replaces the rolling hills ──────────────────────────── */
.sn-scene { position: absolute; left: 0; right: 0; bottom: 0; height: min(50vh, 400px);
            pointer-events: none; z-index: 1; overflow: visible; }
.sn-scene svg { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
                width: max(1200px, 104%); height: auto; }

/* ── FALL ───────────────────────────────────────────────────────────────── */
.sn-fall .svc-hill--far,  .sn-fall .tst-hill--far  { background: #C98A3C !important; }
.sn-fall .svc-hill--mid,  .sn-fall .tst-hill--mid  { background: #A4632A !important; }
.sn-fall .svc-hill--near, .sn-fall .tst-hill--near { background: #7A4420 !important; }
.sn-fall .tst-bush { background: #5E3217 !important; }
/* the floating dots become glowing harvest lanterns */
.sn-fall .svc-fly, .sn-fall .sn-fly {
  background: transparent !important; border-radius: 0 !important;
  width: auto !important; height: auto !important;
  box-shadow: 0 0 20px 8px rgba(226, 142, 48, .3) !important;
}
.sn-leaf-glow { animation: snGlow 3.2s ease-in-out infinite; }
@keyframes snGlow { 0%, 100% { opacity: 1; } 50% { opacity: .62; } }
/* the turkey gives a slow strut */
.sn-turkey { animation: snStrut 5.5s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes snStrut {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  25%      { transform: translateX(14px) rotate(-2deg); }
  60%      { transform: translateX(26px) rotate(2deg); }
}

/* ── WINTER ─────────────────────────────────────────────────────────────── */
.sn-winter .svc-hill--far,  .sn-winter .tst-hill--far  { background: #DCE6EE !important; }
.sn-winter .svc-hill--mid,  .sn-winter .tst-hill--mid  { background: #C3D4E2 !important; }
.sn-winter .svc-hill--near, .sn-winter .tst-hill--near { background: #A9BFD2 !important; }
.sn-winter .tst-bush { background: #8FA9BF !important; }
.sn-winter .svc-fly, .sn-winter .sn-fly {
  background: transparent !important; border-radius: 0 !important;
  width: auto !important; height: auto !important;
  box-shadow: 0 0 18px 7px rgba(255, 226, 150, .3) !important;
}
/* string-light bulbs breathe in and out, each on its own beat */
.sn-bulb { animation: snTwinkle var(--sn-tw, 2.4s) ease-in-out infinite; }
@keyframes snTwinkle { 0%, 100% { opacity: 1; } 45% { opacity: .35; } }


/* ── fall: supplied artwork ─────────────────────────────────────────────── */
/* paper-art leaf pile hung across the top of every page, behind the nav */
/* the panoramic autumn landscape stands in for the hills */
.sn-fall .svc-hill, .sn-fall .tst-hill, .sn-fall .tst-bush { display: none !important; }
.sn-scene-art {
  position: absolute; left: 0; right: 0; bottom: 0;
  aspect-ratio: 1700 / 1020;              /* the PNG's own shape */
  background: url("season/autumn-landscape.png") bottom center / 100% 100% no-repeat;
}



/* ── winter: supplied artwork ───────────────────────────────────────────── */
.sn-winter .svc-hill, .sn-winter .tst-hill, .sn-winter .tst-bush { display: none !important; }
.sn-village {
  position: absolute; left: 0; right: 0; bottom: 0;
  aspect-ratio: 1800 / 1271;
  background: url("season/winter-village.webp") bottom center / 100% 100% no-repeat;
  /* the night sky dissolves upward so it meets the page without a hard edge */
  /* short fade: the moon sits ~18% down and must stay bright */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 11%, #000 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 11%, #000 100%);
}
/* Santa crosses the scene, passing in front of the moon */
.sn-santa {
  /* the moon sits around 18% down the village art — cross it there */
  position: absolute; top: 16%; left: 0; width: 17%;
  aspect-ratio: 900 / 348; pointer-events: none;
  background: url("season/santa.webp") center / contain no-repeat;
  animation: snSleigh 26s linear infinite;
}
@keyframes snSleigh {
  0%   { transform: translate(-30vw, 10px) scale(.82); opacity: 0; }
  12%  { opacity: 1; }
  50%  { transform: translate(52vw, -26px) scale(1); }
  88%  { opacity: 1; }
  100% { transform: translate(128vw, 6px) scale(.86); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .sn-cur-on, .sn-cur-on a, .sn-cur-on button { cursor: auto; }
  .sn-cursor, .sn-sky { display: none; }
  .sn-leaf-glow, .sn-bulb, .sn-turkey, .sn-cursor svg, .sn-santa { animation: none !important; }
}

@media (max-width: 700px) {
  .sn-scene { height: 32vh; }
  .sn-sky { display: none; }        /* save the battery on phones */
}
