/* Tema Natale stagionale: attivo solo quando christmas.js aggiunge la classe sw-xmas a <html>. */

/* ---------- colori: rosso natalizio sugli accenti, bianco neve sui titoli ---------- */
html.sw-xmas {
  --blue-bright: #ff4f5e;
  --accent-1: #ff4f5e;
}

/* ---------- ghirlanda di luci in cima alla pagina ---------- */
.sw-garland {
  position: relative;
  z-index: 55;
  height: 30px;
  overflow: hidden;
  pointer-events: none;
}
.sw-garland svg { position: absolute; left: 0; top: 0; width: 100%; height: 30px; }
.sw-garland .wire { fill: none; stroke: #2c5a3c; stroke-width: 2; }
.sw-garland .bulb { animation: sw-twinkle 2.6s ease-in-out infinite; }
.sw-garland .bulb.r { fill: #ff3b4e; filter: drop-shadow(0 0 5px rgba(255, 59, 78, .9)); }
.sw-garland .bulb.g { fill: #3ddc84; filter: drop-shadow(0 0 5px rgba(61, 220, 132, .9)); animation-delay: .65s; }
.sw-garland .bulb.w { fill: #fff6dc; filter: drop-shadow(0 0 5px rgba(255, 246, 220, .95)); animation-delay: 1.3s; }
.sw-garland .bulb.y { fill: #ffd24a; filter: drop-shadow(0 0 5px rgba(255, 210, 74, .9)); animation-delay: 1.95s; }
@keyframes sw-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- atmosfera dietro i contenuti ---------- */
html.sw-xmas .sw-xsky {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 8% 0%, rgba(220, 40, 60, .16), transparent 70%),
    radial-gradient(800px 520px at 96% 100%, rgba(30, 160, 90, .13), transparent 70%),
    radial-gradient(1400px 260px at 50% 112%, rgba(235, 245, 255, .10), transparent 70%);
}

/* ---------- neve: fiocchi lenti, sopra la pagina ma mai cliccabili ---------- */
html.sw-xmas .sw-snow {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  overflow: hidden;
}
.sw-flake {
  position: absolute;
  top: -12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, .8);
  opacity: 0;
  will-change: transform, opacity;
  animation: sw-fall linear infinite;
}
.sw-flake.star {
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #fff;
  font: 400 14px/1 sans-serif;
  text-shadow: 0 0 6px rgba(255, 255, 255, .8);
}
@keyframes sw-fall {
  0% { transform: translate3d(0, -10px, 0); opacity: 0; }
  8% { opacity: var(--o, .8); }
  50% { transform: translate3d(var(--dx, 30px), 50vh, 0); }
  92% { opacity: var(--o, .8); }
  100% { transform: translate3d(calc(var(--dx, 30px) * -0.4), 102vh, 0); opacity: 0; }
}

/* ---------- barra promo TWEAKMAS (struttura in halloween.css) in colori natalizi ---------- */
html.sw-xmas .sw-promo {
  background: linear-gradient(90deg, #6d0d18 0%, #9b1324 50%, #0f5a33 100%);
  border-bottom-color: rgba(255, 255, 255, .25);
}
html.sw-xmas .sw-promo b { color: #fff; }
html.sw-xmas .sw-promo .sw-code { border-color: rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .12); }
html.sw-xmas .sw-promo a.sw-cta { color: #7a0f1c; background: #fff; box-shadow: 0 0 16px rgba(255, 255, 255, .35); }

@media (max-width: 760px) {
  .sw-garland { height: 24px; }
  .sw-garland svg { height: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html.sw-xmas .sw-snow { display: none; }
  .sw-garland .bulb { animation: none; }
}
