/*
 * Christmas 2026: Santa's flypast (care ticket 5c0c4b79, Natalia 8 Nov).
 * Artwork: assets/christmas/hw-santa-sleigh.webp (from Abi's Canva, 9 Nov). Decorative only.
 * The script js/hw-christmas-santa.js adds the flyer and moves it as you scroll.
 * Remove this file, the script and their two tags in index.html after Christmas.
 */
.hw-xmas-flyer {
  position: fixed;
  z-index: 30;
  top: 22vh;
  left: 0;
  width: clamp(170px, 24vw, 340px);
  pointer-events: none;
  opacity: 0;
  translate: -40vw 0;
  will-change: translate, opacity;
}

.hw-xmas-flyer.is-flipped .hw-xmas-flyer-inner {
  scale: -1 1;
}

.hw-xmas-flyer-inner {
  position: relative;
}

.hw-xmas-flyer img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  rotate: -8deg;
  /* Soft cream glow so the sleigh still reads over dark sections. */
  filter: drop-shadow(0 0 6px rgba(250, 245, 236, 0.7)) drop-shadow(0 10px 10px rgba(46, 38, 32, 0.2));
}

/* Sleigh dust: specks the script sprinkles behind the sleigh. Each one drifts down and fades. */
.hw-xmas-dust {
  position: fixed;
  inset: 0;
  z-index: 29;
  pointer-events: none;
  overflow: hidden;
}

.hw-xmas-dust i {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--s);
  height: var(--s);
  margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 28%, var(--c) 55%, transparent 72%);
  box-shadow: 0 0 8px 2px var(--c), 0 0 2px rgba(150, 90, 10, 0.45);
  translate: var(--x) var(--y);
  opacity: 0;
}

.hw-xmas-dust i.is-star {
  border-radius: 0;
  background: var(--c);
  box-shadow: none;
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  filter: drop-shadow(0 0 4px var(--c)) drop-shadow(0 0 1px rgba(150, 90, 10, 0.6));
}

@media (prefers-reduced-motion: reduce) {
  .hw-xmas-flyer, .hw-xmas-dust { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes hw-xmas-bob {
    50% { translate: 0 -10px; rotate: -1deg; }
  }

  @keyframes hw-xmas-dust {
    0% { opacity: 0; transform: scale(0.4); }
    12% { opacity: 1; transform: scale(1); }
    45% { opacity: 1; transform: translate(calc(var(--dx) * 0.45), calc(var(--dy) * 0.35)) scale(0.9) rotate(calc(var(--r) * 0.4)); }
    55% { opacity: 0.55; }
    65% { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.2) rotate(var(--r)); }
  }

  .hw-xmas-flyer img { animation: hw-xmas-bob 2.4s ease-in-out infinite; }
  .hw-xmas-dust i { animation: hw-xmas-dust var(--d, 1.6s) ease-out forwards; }
}
