/* Seasonal theme overlays. Motion is disabled when the user or the OS asks. */
#holiday-layer {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  overflow: hidden;
}
#holiday-layer, #holiday-layer * { pointer-events: none; }

#holiday-fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 41;
}

/* palettes — subtle wash + accent shifts */
body.holiday-thanksgiving { --accent: #c05621; --accent-2: #dd6b20; }
body.holiday-christmas { --accent: #c53030; --accent-2: #2f855a; }
body.holiday-halloween { --accent: #dd6b20; --accent-2: #6b46c1; }
body.holiday-valentines { --accent: #c53030; --accent-2: #ed64a6; }
body.holiday-st_patricks { --accent: #2f855a; --accent-2: #38a169; }
body.holiday-easter { --accent: #9f7aea; --accent-2: #ed64a6; }
body.holiday-independence_day { --accent: #2b6cb0; --accent-2: #c53030; }
body.holiday-memorial_day { --accent: #2b6cb0; --accent-2: #c53030; }
body.holiday-labor_day { --accent: #2b6cb0; --accent-2: #4a5568; }
body.holiday-new_year { --accent: #d69e2e; --accent-2: #805ad5; }
body.holiday-birthday { --accent: #d53f8c; --accent-2: #ed8936; }

.holiday-ember { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(192,86,33,0.06), transparent 40%); }
.holiday-pine { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(47,133,90,0.05), transparent 38%); }
.holiday-night { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(45,55,72,0.04), transparent 36%); }

/* Christmas string lights (static when reduced-motion) */
.light-string {
  position: absolute; top: 0; left: 0; right: 0; height: 18px;
  display: flex; justify-content: space-around; padding: 0 8px;
  z-index: 42;
}
.bulb {
  width: 8px; height: 12px; border-radius: 4px 4px 6px 6px;
  animation: twinkle 1.6s ease-in-out infinite;
  box-shadow: 0 0 8px currentColor;
}
@keyframes twinkle { 0%,100% { opacity: 0.45; } 50% { opacity: 1; } }

/* 3D PNG characters — whole-image waddle, wave, and hop */
.char-actor {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 45;
  pointer-events: none;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.25));
  will-change: transform;
}
.char-actor img {
  display: block;
  height: 200px;
  width: auto;
  transform-origin: 50% 100%;
}

@keyframes waddle {
  0% { transform: rotate(-4deg) translateY(0); }
  25% { transform: rotate(0) translateY(-6px); }
  50% { transform: rotate(4deg) translateY(0); }
  75% { transform: rotate(0) translateY(-6px); }
  100% { transform: rotate(-4deg) translateY(0); }
}
@keyframes wave {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(5deg) translateY(-3px); }
}
@keyframes hop {
  0%, 100% { transform: translateY(0) scaleY(1); }
  10% { transform: translateY(0) scale(1.05, .92); }
  40% { transform: translateY(-40px) scale(.97, 1.04); }
  70% { transform: translateY(0) scale(1.06, .9); }
  85% { transform: translateY(0) scale(1); }
}
.walking img { animation: waddle .55s linear infinite; }
.waving img { animation: wave .6s ease-in-out infinite; }
.hopping img { animation: hop .9s ease-in-out 2; }
.flip img { scale: -1 1; }

@media (max-width: 767.98px) {
  .char-actor img { height: 130px; }
  .char-actor.char-walk-across,
  .char-actor.char-walk-in-wave { bottom: 64px; }
  .char-actor.char-peek-wave { bottom: 80px; }
}

@media (prefers-reduced-motion: reduce),
body.reduce-motion {
  .bulb { animation: none !important; }
  #holiday-fx { display: none !important; }
  .char-actor { display: none !important; }
}
body.decor-off #holiday-layer { display: none !important; }
body.decor-no-fullscreen #holiday-fx,
body.decor-no-fullscreen .light-string { display: none !important; }
body.decor-no-characters .char-actor { display: none !important; }
