/* CONSERVE · capa de Navidad (nieve, guirnalda de luces y el trineo de Papá Noel).
   Todo cuelga de .navidad en el <body>: fuera de temporada, o si el visitante la
   apaga desde el pie, no se pinta nada. El trineo y las luces son los mismos de
   fibraconet.com, repintados con la paleta de CONSERVE. */

#nieve {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 45; display: none;
}
.navidad #nieve { display: block; }

/* ---------------------------------------------------------------------------
   GUIRNALDA DE LUCES · cuelga del borde inferior de la barra
   --------------------------------------------------------------------------- */
.guirnalda { display: none; }
.navidad .guirnalda {
  display: flex; justify-content: space-evenly; align-items: flex-start;
  position: absolute; left: 0; right: 0; bottom: -22px; height: 26px;
  pointer-events: none;
}
.navidad .guirnalda::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, rgba(14,122,83,0) 0%, rgba(14,122,83,.45) 12%, rgba(14,122,83,.45) 88%, rgba(14,122,83,0) 100%);
}
/* El color del bombillo se declara una vez en `color`: de ahí salen el vidrio,
   el resplandor cercano y el halo, así siempre combinan. */
.navidad .bombillo {
  position: relative; width: 11px; height: 16px; margin-top: 4px;
  border-radius: 0 0 50% 50% / 0 0 62% 62%;
  color: #ff2b49; background: currentColor;
  box-shadow: 0 0 7px 1px currentColor, 0 0 16px 4px currentColor, inset 0 -3px 5px rgba(255,255,255,.5);
  animation: bombillo-brilla 2.2s ease-in-out infinite;
}
.navidad .bombillo::after {
  content: ''; position: absolute; inset: -13px -12px -17px -12px; border-radius: 50%;
  background: radial-gradient(circle, currentColor 0%, rgba(255,255,255,0) 65%);
  opacity: .42; pointer-events: none;
}
.navidad .bombillo::before {
  content: ''; position: absolute; top: -4px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 5px; border-radius: 1px; background: #5f7084;
}
.navidad .bombillo:nth-child(3n+2) { color: #12c76d; margin-top: 10px; }
.navidad .bombillo:nth-child(3n+3) { color: #ffc21e; }
@keyframes bombillo-brilla {
  0%, 100% { filter: brightness(1.35) saturate(1.15); }
  50% { filter: brightness(.55) saturate(.8); }
}

/* ---------------------------------------------------------------------------
   TRINEO · sale por la izquierda, cruza la pantalla y vuelve cada 42 segundos.
   El div de fuera hace el viaje y el de dentro el balanceo, para que los dos
   movimientos no se peleen por el mismo transform.
   --------------------------------------------------------------------------- */
.trineo { display: none; }
.navidad .trineo {
  display: block; position: fixed; top: 13vh; left: -340px; width: 300px;
  z-index: 31; pointer-events: none; will-change: transform;
  animation: trineo-cruza 42s linear infinite;
}
.navidad .trineo__vuelo { animation: trineo-flota 3.4s ease-in-out infinite alternate; }
.navidad .trineo__svg { width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 8px 14px rgba(6, 35, 21, .22)); }
@keyframes trineo-cruza {
  0% { transform: translateX(0); opacity: 0; }
  3% { opacity: 1; }
  42% { opacity: 1; }
  45%, 100% { transform: translateX(calc(100vw + 360px)); opacity: 0; }
}
@keyframes trineo-flota {
  from { transform: translateY(-9px) rotate(-1.5deg); }
  to { transform: translateY(9px) rotate(1.5deg); }
}

/* --- piezas del trineo --- */
.trineo-cuerpo { fill: #d81f39; }
.trineo-filo { stroke: #f0b92c; stroke-width: 3; fill: none; }
.trineo-patin { stroke: #8c1024; stroke-width: 4.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.trineo-rienda { stroke: #5c3a18; stroke-width: 1.8; fill: none; opacity: .7; }
.regalo-verde { fill: #0e7a53; }
.regalo-dorado { fill: #e3a81b; }
.regalo-cinta { stroke: #fff; stroke-width: 2.2; fill: none; }

/* --- Papá Noel --- */
.noel-abrigo { fill: #d81f39; }
.noel-cinturon { stroke: #2b2b33; stroke-width: 5; }
.noel-cara { fill: #f3c6a0; }
.noel-barba { fill: #fff; }
.noel-gorro { fill: #d81f39; }
.noel-pompon, .noel-guante { fill: #fff; }
.noel-ojo, .reno-ojo { fill: #2b1a0a; }
.noel-brazo { stroke: #d81f39; stroke-width: 7; fill: none; stroke-linecap: round; }

/* --- renos --- */
.reno-cuerpo { fill: #8a5a2b; }
.reno-pata { stroke: #8a5a2b; stroke-width: 3.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.reno-cuello { stroke: #8a5a2b; stroke-width: 8; fill: none; stroke-linecap: round; }
.reno-cuerno { stroke: #5c3a18; stroke-width: 2.4; fill: none; stroke-linecap: round; }
.reno-arnes { stroke: #c81e36; stroke-width: 3; fill: none; stroke-linecap: round; }
.reno-nariz { fill: #4a2f14; }
.reno-nariz-roja { fill: #ff2b49; filter: drop-shadow(0 0 6px #ff2b49); animation: bombillo-brilla 1.6s ease-in-out infinite; }
.trineo-chispas circle { fill: #ffe9a8; animation: chispa-trineo 1.3s ease-in-out infinite alternate; }
.trineo-chispas circle:nth-child(2) { animation-delay: .35s; }
.trineo-chispas circle:nth-child(3) { animation-delay: .7s; }
@keyframes chispa-trineo {
  from { opacity: .15; transform: translateX(0); }
  to { opacity: .75; transform: translateX(-6px); }
}

/* ---------------------------------------------------------------------------
   Interruptor discreto en el pie
   --------------------------------------------------------------------------- */
.interruptor-navidad {
  display: inline-flex; align-items: center; gap: 7px; background: none; border: 0;
  color: inherit; font: inherit; font-size: .85rem; cursor: pointer; padding: 0; opacity: .85;
}
.interruptor-navidad:hover { opacity: 1; text-decoration: underline; }

@media (max-width: 860px) {
  .navidad .trineo { width: 200px; top: 9vh; }
}
@media (max-width: 560px) {
  .navidad .guirnalda { bottom: -20px; }
  .navidad .bombillo { width: 9px; height: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .navidad #nieve { display: none; }
  .navidad .trineo { display: none; }
  .navidad .bombillo, .reno-nariz-roja, .trineo-chispas circle { animation: none; }
}
