/* =====================================================================
   Decoración navideña · Parrandón (Colegio Gonzaga)
   Se carga solo si NAVIDAD=true en .env. Todo es decorativo:
   pointer-events: none, se oculta al imprimir y respeta
   "reducir movimiento" del sistema operativo.
   ===================================================================== */

:root {
  --nv-rojo:   #c11733;
  --nv-dorado: #f6c932;
  --nv-verde:  #1f8a5b;
  --nv-azul:   #113f84;
  --nv-blanco: #fff7e0;
  --nv-cable:  #1e4d36;
}

/* ---------- 1. Guirnalda de luces ---------- */
.nv-luces {
  position: relative;
  height: 34px;
  overflow: hidden;
  pointer-events: none;
  /* cable ondulado: un festón cada 52 px */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='20'%3E%3Cpath d='M0 3 Q26 19 52 3' fill='none' stroke='%231e4d36' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: 0 0;
  display: flex;
  justify-content: flex-start;
  z-index: 5;
}
.nv-luces i {
  flex: 0 0 52px;
  position: relative;
  height: 100%;
}
/* casquillo */
.nv-luces i::before {
  content: "";
  position: absolute;
  left: 50%; top: 9px;
  width: 6px; height: 5px;
  margin-left: -3px;
  border-radius: 1px;
  background: #3c4a42;
}
/* bombillo */
.nv-luces i::after {
  content: "";
  position: absolute;
  left: 50%; top: 13px;
  width: 10px; height: 15px;
  margin-left: -5px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background: var(--c, var(--nv-rojo));
  box-shadow: 0 0 6px 1px var(--c, var(--nv-rojo));
  animation: nv-titilar 2.4s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
.nv-luces i:nth-child(5n+1) { --c: var(--nv-rojo);   --d: 0s; }
.nv-luces i:nth-child(5n+2) { --c: var(--nv-dorado); --d: .5s; }
.nv-luces i:nth-child(5n+3) { --c: var(--nv-verde);  --d: 1s; }
.nv-luces i:nth-child(5n+4) { --c: #3b82f6;          --d: 1.5s; }
.nv-luces i:nth-child(5n+5) { --c: var(--nv-blanco); --d: 2s; }
.nv-luces i:nth-child(even)::after { transform: rotate(8deg); }
.nv-luces i:nth-child(odd)::after  { transform: rotate(-8deg); }

@keyframes nv-titilar {
  0%, 100% { opacity: 1;   box-shadow: 0 0 9px 2px var(--c); filter: saturate(1.2); }
  50%      { opacity: .45; box-shadow: 0 0 1px 0 var(--c);   filter: saturate(.7); }
}

/* ---------- 2. Esferas colgantes (cabecera pública) ---------- */
.nv-esferas {
  position: absolute;
  top: -2px; right: 12px;
  display: flex; gap: 14px;
  pointer-events: none;
  z-index: 4;
}
.nv-esfera {
  transform-origin: 50% 0;
  animation: nv-mecer 4.5s ease-in-out infinite;
}
.nv-esfera:nth-child(2) { animation-duration: 5.2s; animation-delay: -1.2s; }
.nv-esfera:nth-child(3) { animation-duration: 3.9s; animation-delay: -2.4s; }
@keyframes nv-mecer {
  0%, 100% { transform: rotate(4deg); }
  50%      { transform: rotate(-4deg); }
}
@media (max-width: 640px) {
  .nv-esferas { right: 4px; gap: 6px; transform: scale(.72); transform-origin: top right; }
}

/* ---------- 3. Estrella que titila ---------- */
.nv-estrella {
  display: inline-block;
  animation: nv-brilla 2.8s ease-in-out infinite;
  filter: drop-shadow(0 0 4px rgba(246, 201, 50, .8));
}
@keyframes nv-brilla {
  0%, 100% { transform: scale(1) rotate(0deg);   opacity: 1; }
  50%      { transform: scale(.82) rotate(18deg); opacity: .75; }
}

/* ---------- 4. Ramita de acebo en las tarjetas ---------- */
.nv-acebo {
  position: absolute;
  pointer-events: none;
  width: 64px; height: 52px;
  z-index: 2;
}
.nv-acebo--der { top: -14px; right: -10px; transform: rotate(18deg); }
.nv-acebo--izq { top: -14px; left: -10px;  transform: scaleX(-1) rotate(18deg); }

/* ---------- 5. Brillo en los botones dorados ---------- */
.nv-brillo { position: relative; overflow: hidden; isolation: isolate; }
.nv-brillo::after {
  content: "";
  position: absolute; inset: -40% auto -40% -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.75), transparent);
  transform: skewX(-18deg);
  animation: nv-destello 3.8s ease-in-out infinite;
  z-index: -1;
  pointer-events: none;
}
@keyframes nv-destello {
  0%, 55% { left: -60%; }
  80%, 100% { left: 130%; }
}

/* ---------- 6. Nieve, confeti y botón de nieve ---------- */
#nv-nieve, #nv-confeti {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
#nv-nieve   { z-index: 40; }
#nv-confeti { z-index: 60; }

.nv-boton-nieve {
  position: fixed;
  right: 16px; bottom: 16px;
  z-index: 50;
  width: 44px; height: 44px;
  border-radius: 9999px;
  border: 1px solid #cbd5e1;
  background: rgba(255,255,255,.92);
  box-shadow: 0 4px 14px rgba(15, 23, 42, .12);
  font-size: 20px; line-height: 1;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease;
}
.nv-boton-nieve:hover { transform: scale(1.07); }
.nv-boton-nieve[aria-pressed="false"] { opacity: .55; filter: grayscale(1); }

/* ---------- 7. Saludo del pie ---------- */
.nv-saludo {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  color: var(--nv-rojo);
}

/* ---------- 8. Cinta "Navidad" en los boletos ---------- */
.nv-cinta {
  position: absolute;
  top: 18px; right: -34px;
  width: 140px;
  transform: rotate(35deg);
  background: var(--nv-rojo);
  color: #fff;
  text-align: center;
  font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: 3px 0;
  box-shadow: 0 2px 6px rgba(193, 23, 51, .35);
  z-index: 3;
}
.nv-cinta::before { content: "✦ "; color: var(--nv-dorado); }
.nv-cinta::after  { content: " ✦"; color: var(--nv-dorado); }

/* ---------- Accesibilidad e impresión ---------- */
@media (prefers-reduced-motion: reduce) {
  .nv-luces i::after, .nv-esfera, .nv-estrella, .nv-brillo::after { animation: none !important; }
  #nv-nieve { display: none; }
}
@media print {
  .nv-luces, .nv-esferas, #nv-nieve, #nv-confeti, .nv-boton-nieve { display: none !important; }
  .nv-brillo::after { display: none; }
}
