/* Navidad en ivotai.com (30-nov-2026). Todo cuelga de html.navidad, que solo pone navidad.js
   del 30-nov al 6-ene (o con ?navidad=1). Sin esa clase este archivo no cambia nada. */

/* ---------- guirnalda de lucecitas ---------- */
html.navidad .nv-guir{position:absolute;left:0;right:0;height:18px;pointer-events:none;z-index:1;overflow:visible}
html.navidad .nv-guir--menu{top:100%;margin-top:-2px}
html.navidad .nv-guir--pagina{top:0;z-index:30}
html.navidad .nv-guir-svg{display:block;overflow:visible}
html.navidad .nv-hilo{fill:none;stroke:rgba(10,10,11,.26);stroke-width:1}
html.navidad.navidad-oscura .nv-hilo{stroke:rgba(255,255,255,.3)}
/* Fluidez (30-nov): las lucecitas van en 8 capas SVG (una por fase de titileo) y solo la capa cambia
   de opacidad: la anima la tarjeta gráfica. Los círculos son los mismos de antes. */
html.navidad .nv-focos-capa{position:absolute;left:0;top:0;animation:nv-titila 3.4s ease-in-out infinite}
html.navidad .nv-foco--blanco{fill:#fff;stroke:rgba(10,10,11,.2);stroke-width:.8;filter:drop-shadow(0 0 2px rgba(255,255,255,.9)) drop-shadow(0 1px 1.5px rgba(10,10,11,.18))}
html.navidad .nv-foco--verde{fill:#34d399;stroke:#047857;stroke-width:.6;filter:drop-shadow(0 0 3px rgba(52,211,153,.85))}
html.navidad.navidad-oscura .nv-foco--blanco{stroke:none;filter:drop-shadow(0 0 3px rgba(255,255,255,.9))}
@keyframes nv-titila{0%,100%{opacity:1}45%{opacity:.35}60%{opacity:.9}}

/* ---------- medias colgando de las puntas ---------- */
html.navidad .nv-media{position:absolute;top:0;width:26px;height:40px;display:none}
html.navidad .nv-media svg{display:block;width:100%;height:100%;overflow:visible}
html.navidad .nv-media--izq{left:12px;transform-origin:50% 0;animation:nv-mece 5.5s ease-in-out infinite}
html.navidad .nv-media--der{right:12px;transform-origin:50% 0;animation:nv-mece 6.2s ease-in-out -2s infinite}
html.navidad .nv-media--der svg{transform:scaleX(-1)}
html.navidad .nv-media-hilo{fill:none;stroke:rgba(10,10,11,.35);stroke-width:1}
html.navidad .nv-media-pie{fill:#10b981;stroke:#047857;stroke-width:.8}
html.navidad .nv-media-raya{fill:none;stroke:rgba(255,255,255,.75);stroke-width:1.3}
html.navidad .nv-media-puno{fill:#fff;stroke:rgba(10,10,11,.28);stroke-width:1}
html.navidad .nv-media-brillo{fill:#fff;opacity:.85}
html.navidad.navidad-oscura .nv-media-hilo{stroke:rgba(255,255,255,.4)}
@keyframes nv-mece{0%,100%{transform:rotate(-4deg)}50%{transform:rotate(4deg)}}
@media (min-width:900px){html.navidad .nv-media{display:block}}

/* ---------- arbolito de nodos de luz ----------
   Fluidez (30-nov): base quieta + cada luz en su propia capa que solo cambia de opacidad
   (la anima la tarjeta gráfica). 1cqw = 1 unidad del dibujo original de 100 × 140. */
html.navidad .nv-arbol{pointer-events:none}
html.navidad .nv-arbol-lienzo{position:relative;width:100%;aspect-ratio:100/140;container-type:inline-size}
html.navidad .nv-arbol-svg{display:block;width:100%;height:100%;overflow:visible}
html.navidad .nv-arbol-base,html.navidad .nv-capa-lineas{position:absolute;left:0;top:0}
html.navidad .nv-linea{stroke:#10b981;stroke-width:.9;stroke-linecap:round;opacity:.14}
html.navidad .nv-capa-lineas{opacity:0;animation:nv-luz 7s ease-in-out infinite}
html.navidad .nv-capa-lineas .nv-linea{opacity:.71}
html.navidad .nv-tronco{fill:none;stroke:rgba(10,10,11,.35);stroke-width:1.6;stroke-linecap:round}
html.navidad.navidad-oscura .nv-tronco{stroke:rgba(255,255,255,.35)}
html.navidad .nv-nodo{fill:#d1fae5;stroke:#10b981;stroke-width:1;opacity:.3}
html.navidad .nv-nodo--blanco{fill:#fff;stroke:#047857;opacity:.35}
html.navidad .nv-capa-nodos{opacity:0;animation:nv-luz 7s ease-in-out infinite}
html.navidad .nv-arbol-base,html.navidad .nv-capa-nodos{position:absolute;left:0;top:0}
html.navidad .nv-nodo-luz{fill:#34d399;stroke:#10b981;stroke-width:1;filter:drop-shadow(0 0 3px rgba(52,211,153,.95))}
html.navidad .nv-nodo-luz--blanco{fill:#fff;stroke:#047857;filter:drop-shadow(0 0 3px rgba(255,255,255,1)) drop-shadow(0 0 2px rgba(52,211,153,.8))}
html.navidad .nv-arbol.nv-pausa *{animation-play-state:paused}
@keyframes nv-luz{0%{opacity:0}12%,68%{opacity:1}84%,100%{opacity:0}}
html.navidad .nv-estrella-capa{position:absolute;left:42.5cqw;top:1.5cqw;width:15cqw;height:15cqw;animation:nv-estrella 7s ease-in-out infinite}
html.navidad .nv-estrella-svg{position:absolute;left:0;top:0;filter:drop-shadow(0 0 2cqw rgba(52,211,153,.6))}
html.navidad .nv-estrella-brillo{filter:drop-shadow(0 0 6cqw #34d399);opacity:0;animation:nv-brillo 7s ease-in-out infinite}
html.navidad .nv-estrella{fill:#34d399;stroke:#047857;stroke-width:.6}
@keyframes nv-estrella{0%,100%{transform:scale(.85) rotate(0deg)}50%{transform:scale(1.12) rotate(45deg)}}
@keyframes nv-brillo{0%,100%{opacity:0}50%{opacity:1}}

/* portada: al lado del robot (lo coloca navidad.js) */
html.navidad .nv-arbol--portada{position:absolute;z-index:1;opacity:0;animation:nv-aparece .8s cubic-bezier(.22,1,.36,1) 1.3s forwards}
/* demás páginas: junto al título o encima del pie */
html.navidad .nv-arbol--titulo{position:absolute;z-index:2;opacity:0;animation:nv-aparece .8s cubic-bezier(.22,1,.36,1) .4s forwards}
html.navidad .nv-arbol--pie{width:62px;margin:28px auto 18px}
@keyframes nv-aparece{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

/* ---------- gorro del robot (portada) ---------- */
/* El robot se achica un poco y baja para que el gorro quepa sin cortarse arriba */
@media (min-width:941px){
  html.navidad-portada .bot>picture img{inset:16% 6% 5% 6%;width:88%;height:79%}
}
@media (max-width:940px){
  html.navidad-portada .bot>picture img{inset:15% 9% 8% 9%;width:82%;height:77%}
}
html.navidad .nv-gorro{position:absolute;z-index:1;display:block;pointer-events:none;opacity:0;background:center/100% 100% no-repeat;
  filter:drop-shadow(0 6px 8px rgba(4,60,44,.22))}
html.navidad .nv-gorro.nv-listo{animation:nv-gorro .7s cubic-bezier(.22,1,.36,1) 1.05s forwards}
@keyframes nv-gorro{from{opacity:0;transform:translateY(-18px) rotate(-6deg)}to{opacity:1;transform:none}}

/* ---------- gorrito sobre el botón de idioma (demás páginas) ---------- */
html.navidad .nv-con-gorrito{position:relative;overflow:visible}
/* (fluidez 30-nov) versión chica del gorro (81 px, 2 KB en vez de 47 KB): se ve igual a este tamaño */
html.navidad .nv-gorrito{position:absolute;right:-7px;top:-9px;width:27px;height:14px;pointer-events:none;
  background:url(/navidad/gorro-mini.webp?v=1) center/contain no-repeat;transform:rotate(16deg);filter:drop-shadow(0 1px 1px rgba(0,0,0,.18))}

/* ---------- nieve ---------- */
html.navidad .nv-nieve{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:15}

/* ---------- botón de música ---------- */
html.navidad .nv-musica{position:fixed;z-index:38;left:18px;bottom:calc(18px + env(safe-area-inset-bottom));width:40px;height:40px;border-radius:50%;
  display:grid;place-items:center;padding:0;cursor:pointer;color:#0a0a0b;background:rgba(255,255,255,.94);border:1px solid rgba(10,10,11,.1);
  box-shadow:0 1px 2px rgba(10,10,11,.05),0 8px 22px rgba(10,10,11,.1);transition:transform .2s,border-color .2s}
html.navidad .nv-musica:hover{border-color:rgba(10,10,11,.3)}
html.navidad .nv-musica:focus-visible{outline:2px solid #10b981;outline-offset:2px}
html.navidad .nv-musica svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
html.navidad .nv-musica.nv-sonando{color:#047857}
html.navidad .nv-musica.nv-sonando::after{content:"";position:absolute;inset:-1px;border-radius:50%;border:1px solid rgba(16,185,129,.55);animation:nv-onda 2.4s ease-out infinite}
@keyframes nv-onda{from{transform:scale(1);opacity:1}to{transform:scale(1.45);opacity:0}}
html.navidad.navidad-oscura .nv-musica{color:#e8e8ea;background:rgba(20,20,24,.92);border-color:rgba(255,255,255,.14)}
html.navidad.navidad-oscura .nv-musica.nv-sonando{color:#6ee7b7}

/* ---------- reducir movimiento: todo quieto, encendido ---------- */
@media (prefers-reduced-motion:reduce){
  html.navidad .nv-focos-capa,html.navidad .nv-media,html.navidad .nv-capa-lineas,html.navidad .nv-capa-nodos,html.navidad .nv-estrella-capa,
  html.navidad .nv-estrella-brillo,html.navidad .nv-musica.nv-sonando::after{animation:none !important}
  html.navidad .nv-capa-nodos{opacity:1}
  html.navidad .nv-nodo-luz{filter:none}
  html.navidad .nv-capa-lineas{opacity:.65}
  html.navidad .nv-arbol--portada,html.navidad .nv-arbol--titulo,html.navidad .nv-gorro.nv-listo{animation:none !important;opacity:1}
}
