/* Vasalto · Modo Navidad v1 (login 2.1.0)
   Capa decorativa sobre login.css: nieve, guirnalda de luces, nieve acumulada, cuenta atrás
   (el minijuego vive dentro del ERP). No cambia el formulario ni el flujo de acceso.
   Se carga solo del 1 de diciembre al 6 de enero (ver login.php). */

.navidad {
  --xm-navy: #13213f;
  --xm-navy-2: #1e3157;
  --xm-pine: #1f6b4a;
  --xm-pine-2: #2f8a5f;
  --xm-berry: #c8323a;
  --xm-berry-2: #e2535a;
  --xm-gold: #e9b949;
  --xm-gold-2: #f6d886;
  --xm-snow: #f7fbff;
  --xm-frost: #dbe8f5;
}

/* ---------- Escena ---------- */

.navidad .xmas-snow,
.navidad .xmas-lights,
.navidad .xmas-drift {
  position: absolute;
  pointer-events: none;
}

.navidad .xmas-snow {
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

/* Un velo frío muy suave para que la foto "huela" a invierno sin perder su luz */
.navidad .xmas-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(233, 185, 73, .10), transparent 60%),
    linear-gradient(180deg, rgba(19, 33, 63, .10) 0%, transparent 35%, rgba(19, 33, 63, .18) 100%);
}

/* Guirnalda */
.navidad .xmas-lights {
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  z-index: 3;
  overflow: visible;
}

.navidad .xmas-lights svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.navidad .xmas-lights path {
  fill: none;
  stroke: rgba(20, 32, 28, .78);
  stroke-width: 1.6;
}

.navidad .xmas-bulb {
  position: absolute;
  width: 9px;
  height: 14px;
  margin: -2px 0 0 -4.5px;
  transform-origin: 50% 0;
  color: var(--c);
}

.navidad .xmas-bulb::before {
  /* casquillo */
  content: "";
  position: absolute;
  left: 2px;
  top: 0;
  width: 5px;
  height: 4px;
  border-radius: 1px;
  background: #3b4a44;
}

.navidad .xmas-bulb::after {
  /* cristal */
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 9px;
  height: 11px;
  border-radius: 50% 50% 48% 48% / 40% 40% 60% 60%;
  background: radial-gradient(circle at 35% 30%, #fff 0 12%, currentColor 45%);
  box-shadow: 0 0 6px 1px currentColor, 0 0 18px 4px color-mix(in srgb, currentColor 45%, transparent);
  animation: xm-twinkle var(--d, 3.2s) ease-in-out var(--delay, 0s) infinite;
}

.navidad .xmas-bulb.c1 { --c: #ffd36b; }
.navidad .xmas-bulb.c2 { --c: #ff5a63; }
.navidad .xmas-bulb.c3 { --c: #5fe39a; }
.navidad .xmas-bulb.c4 { --c: #9fd0ff; }

@keyframes xm-twinkle {
  0%, 100% { opacity: 1; filter: brightness(1.05); }
  45% { opacity: .55; filter: brightness(.7); box-shadow: 0 0 3px 0 currentColor; }
  55% { opacity: .6; }
}

/* Nieve acumulada: por encima del degradado oscuro de .scene::after (z 2) y por debajo del saludo (z 3+),
   y lo bastante baja para no meterse bajo las píldoras de datos (el hero empieza a 28px como mínimo). */
.navidad .xmas-drift {
  left: 0;
  right: 0;
  bottom: -1px;
  height: clamp(14px, 2.6vh, 26px);
  z-index: 3;
  opacity: .92;
}

@media (max-width: 860px) {
  /* En móvil la hoja del formulario tapa el borde inferior de la foto */
  .navidad .xmas-drift { display: none; }
}

.navidad .xmas-drift svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Chip de cuenta atrás, en la fila de datos del hero */
.navidad .fact.xmas-count svg { color: var(--xm-gold-2); }
.navidad .fact.xmas-count b { color: var(--xm-gold-2); font-weight: 700; }

/* ---------- Tarjeta ---------- */

.navidad .side::after {
  /* ramita de acebo en la esquina de la tarjeta */
  content: "";
  position: absolute;
  top: 12px;
  right: 14px;
  width: 46px;
  height: 40px;
  pointer-events: none;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 40'%3E%3Cpath d='M22 20c-3-6-9-9-17-8 2 2 1 4 3 5-2 1-2 3-1 5 2-1 4 0 5 2 1-2 4-2 5-1 0-2 2-3 5-3z' fill='%231f6b4a'/%3E%3Cpath d='M24 20c4-5 11-6 18-3-2 1-2 4-4 4 1 2 1 4-1 5-1-2-4-1-5 0-1-2-3-2-5-1 0-2-1-4-3-5z' fill='%232f8a5f'/%3E%3Cpath d='M22 20c-3-6-9-9-17-8M24 20c4-5 11-6 18-3' stroke='%23164d36' stroke-width='.8' fill='none'/%3E%3Ccircle cx='21' cy='23' r='3.6' fill='%23c8323a'/%3E%3Ccircle cx='26.5' cy='22.5' r='3.4' fill='%23e2535a'/%3E%3Ccircle cx='24' cy='27.5' r='3.5' fill='%23b0262f'/%3E%3Ccircle cx='20' cy='22' r='1' fill='%23fff' opacity='.7'/%3E%3Ccircle cx='25.5' cy='21.5' r='.9' fill='%23fff' opacity='.7'/%3E%3C/svg%3E");
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .15));
}

/* ---------- Movimiento reducido ---------- */

@media (prefers-reduced-motion: reduce) {
  .navidad .xmas-bulb::after { animation: none; }
}
