/* v94 · fondo animado GLOBAL (capa fija #siteBg creada por site-bg.js en todas las páginas): red de rutas con luces viajando entre ciudades (SVG+CSS puro, sin recursos externos) */
/* Colores del fondo = SOLO variables de tema (themes.css: --th-h/--th-ss/--th-sa/--th-la). Un tema nuevo que defina esas variables se adapta solo;
   si necesita algo distinto basta con redefinir --hb (rutas/nodos), --hb-hi (luces) o --hb-bg (velo de lectura, formato "H S L") en [data-theme="x"] .site-bg.
   Sin colores fijos aquí: el tema blanco invierte toda la página con un filtro y esto se invierte con ella. */
.site-bg{position:fixed;inset:0;z-index:-1;pointer-events:none;overflow:hidden;
 --hb:hsl(calc(198.8 + var(--th-h)) calc(89.7% * var(--th-sa)) calc(58.2% + var(--th-la)));
 --hb-hi:hsl(calc(195 + var(--th-h)) calc(100% * var(--th-sa)) calc(94% + var(--th-la) / 6));
 --hb-bg:calc(224 + var(--th-h)) calc(60% * var(--th-ss)) 4.9%}
/* El fondo opaco del body taparía la capa (z-index:-1): se deja transparente; el color base sigue en html. */
html:has(#siteBg) body,html:has(#siteBg) .public-hero{background:transparent}
.site-bg svg{display:block;width:100%;height:100%}
.site-bg::before{content:"";position:absolute;inset:-20%;background:radial-gradient(38% 42% at 72% 38%,hsl(calc(198.8 + var(--th-h)) calc(89.7% * var(--th-sa)) calc(50% + var(--th-la)) / .22),transparent 70%),radial-gradient(30% 36% at 88% 82%,hsl(calc(215 + var(--th-h)) calc(80% * var(--th-sa)) calc(50% + var(--th-la)) / .18),transparent 70%);animation:hbGlow 18s ease-in-out infinite alternate}
.site-bg::after{content:"";position:absolute;inset:0;background:hsl(var(--hb-bg) / .62)}
.site-bg.has-hero::after{background:
 linear-gradient(90deg,hsl(var(--hb-bg) / .93) 0,hsl(var(--hb-bg) / .62) 42%,hsl(var(--hb-bg) / .12) 85%),
 linear-gradient(0deg,hsl(var(--hb-bg) / .85) 0,transparent 22%)}
.site-bg.in-app::after{background:hsl(var(--hb-bg) / .78)}
.hb-net{transform-origin:800px 450px;animation:hbDrift 46s ease-in-out infinite alternate;will-change:transform}
.hb-roads path{fill:none;stroke:var(--hb);stroke-opacity:.42;stroke-width:1.8}
.hb-lights path,.hb-halo path{fill:none;stroke:var(--hb);stroke-linecap:round;stroke-dasharray:70 930;stroke-dashoffset:1000;animation:hbRun 9s linear infinite}.hb-lights path{stroke-width:3.6;stroke:var(--hb-hi);stroke-opacity:.95}.hb-halo path{stroke-width:11;stroke-opacity:.28}
.hb-nodes circle{fill:var(--hb);fill-opacity:.95}
.hb-nodes .hb-ping{fill:none;stroke:var(--hb);stroke-width:2;transform-box:fill-box;transform-origin:center;animation:hbPing 5s ease-out infinite}
.site-bg.hb-off *{animation-play-state:paused}
@keyframes hbGlow{from{transform:translate(-4%,3%) scale(1)}to{transform:translate(5%,-4%) scale(1.12)}}
@keyframes hbRun{to{stroke-dashoffset:0}}
@keyframes hbPing{0%{transform:scale(1);opacity:.7}100%{transform:scale(7);opacity:0}}
@keyframes hbDrift{from{transform:translate(-26px,14px) scale(1.07)}to{transform:translate(26px,-14px) scale(1.12)}}
@media(max-width:760px){.hb-nodes .hb-ping{display:none}.site-bg.has-hero::after{background:linear-gradient(0deg,hsl(var(--hb-bg) / .8),hsl(var(--hb-bg) / .55))}}
/* "Reducir movimiento": sin zoom/desplazamiento ni pulsos; luces y resplandor siguen, muy lentos y sin parpadeo (fondo decorativo, bajo contraste) */
@media(prefers-reduced-motion:reduce){.hb-net,.hb-nodes .hb-ping{animation:none}.hb-nodes .hb-ping{display:none}.hb-lights path,.hb-halo path{animation-duration:22s!important}.site-bg::before{animation-duration:48s}}