/* Fondo animado del login (js/login-escena.js). Colores fijos para que se vea igual en claro y en oscuro; la luz toma el color del tema. */
.escena-auth {
  --es-luz: var(--acento-claro-rgb, 95 179 224);
  --es-verde: 61 220 151;
  position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(900px 560px at 50% 42%, rgb(var(--es-luz) / .20), transparent 70%),
    radial-gradient(1100px 700px at 12% -10%, rgb(var(--es-luz) / .12), transparent 65%),
    linear-gradient(180deg, #0b1220 0%, #0f1a2e 55%, #0a1020 100%);
}
.escena-auth::after { /* viñeta: el borde se oscurece y el texto de la tarjeta siempre se lee */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(5, 9, 18, .55) 100%);
}
.es-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.es-piso polyline { fill: none; stroke: rgb(var(--es-luz) / .07); stroke-width: 1; }

.es-canal { fill: none; stroke: #0a1222; stroke-width: 22; stroke-linejoin: round; stroke-linecap: round; opacity: .9; }
.es-canal-borde { fill: none; stroke: rgb(var(--es-luz) / .28); stroke-width: 24; stroke-linejoin: round; stroke-linecap: round; opacity: .35; mix-blend-mode: screen; }
.es-hilo {
  fill: none; stroke: rgb(var(--es-luz) / .95); stroke-width: 3.2; stroke-linejoin: round; stroke-linecap: round;
  stroke-dasharray: 16 22; animation: esFluir 2.4s linear infinite; filter: drop-shadow(0 0 6px rgb(var(--es-luz) / .8));
}
@keyframes esFluir { to { stroke-dashoffset: -76; } }

.es-tapa { stroke: rgb(var(--es-luz) / .35); stroke-width: 1.2; }
.es-aro { fill: none; stroke: rgb(var(--es-luz) / .6); stroke-width: 2; }
.es-aro-onda { transform-box: fill-box; transform-origin: center; animation: esOnda 3.6s ease-out infinite; animation-delay: calc(var(--i, 0) * -.5s); }
.es-nodo {
  --i: 0; --h: 0; transform-origin: var(--ox, 0) var(--oy, 0);
  /* el área por la que pasa una bolita sube, crece y se ilumina; las demás quedan un poco más tenues */
  opacity: calc(.78 + var(--h) * .22); transform: translateY(calc(var(--h) * var(--lift, 14px) * -1)) scale(calc(1 + var(--h) * .12));
}
.es-halo { fill: rgb(var(--es-verde) / .22); stroke: rgb(var(--es-verde) / .75); stroke-width: 2; opacity: var(--h); }
.es-aro-on { fill: rgb(var(--es-verde) / .18); stroke: rgb(var(--es-verde)); stroke-width: 3; opacity: var(--h); }
.es-nodo .es-cubo { stroke: rgb(var(--es-luz) / calc(.6 + var(--h) * .4)); }
.es-nodo .es-icono { stroke: #ffffff; }
.es-rotulo .es-rotulo-on { fill: rgb(var(--es-verde)); stroke: none; opacity: var(--h); }
.es-rotulo .es-texto-on { fill: #05261a; font-weight: 700; opacity: var(--h); }
@keyframes esOnda { 0% { transform: scale(.7); opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }
.es-flota { animation: esFlotar 5s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -.7s); }
.es-nodo .es-flota { animation-delay: inherit; }
@keyframes esFlotar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.es-cubo { fill: rgba(18, 30, 52, .78); stroke: rgb(var(--es-luz) / .7); stroke-width: 1.5; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .45)); }
.es-icono { fill: none; stroke: #ffffff; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.es-rotulo rect { fill: rgba(12, 20, 38, .72); stroke: rgba(255, 255, 255, .22); stroke-width: 1; }
.es-rotulo text { fill: #e8f1fa; font: 600 15px/1 "Segoe UI", system-ui, -apple-system, sans-serif; letter-spacing: .02em; }

.es-paquete { filter: drop-shadow(0 0 8px rgb(var(--es-verde) / .9)); }

.es-panel-fondo { fill: rgba(14, 24, 44, .72); stroke: rgba(255, 255, 255, .28); stroke-width: 1.2; }
.es-punto { fill: rgba(255, 255, 255, .45); }
.es-lema-sup { fill: rgb(var(--es-verde)); font: 700 22px "Segoe UI", system-ui, -apple-system, sans-serif; letter-spacing: .24em; }
.es-lema-titulo { fill: #ffffff; font: 700 31px "Segoe UI", system-ui, -apple-system, sans-serif; }
.es-barra { fill: rgb(var(--es-luz) / .85); transform-box: fill-box; transform-origin: bottom; animation: esBarra 4.2s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes esBarra { 0%, 100% { transform: scaleY(var(--h, .6)); } 50% { transform: scaleY(calc(var(--h, .6) * 0.45 + .5)); } }
.es-linea { fill: none; stroke: rgb(var(--es-verde)); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: esDibujar 6s ease-in-out infinite; }
@keyframes esDibujar { 0% { stroke-dashoffset: 1; } 55%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -1; } }

.es-luces circle { fill: rgba(255, 255, 255, .55); animation: esSubir var(--t, 10s) linear infinite; animation-delay: var(--d, 0s); opacity: 0; }
@keyframes esSubir { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: .8; } 100% { transform: translateY(-120px); opacity: 0; } }

@media (orientation: portrait) { .es-rotulo { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .es-hilo, .es-aro-onda, .es-flota, .es-barra, .es-linea, .es-luces circle { animation: none; }
  .es-linea { stroke-dashoffset: 0; }
  .es-luces { display: none; }
}
.es-lema-gris { fill: rgba(255, 255, 255, .62); font-size: 10.5px; letter-spacing: .16em; }
.es-franja .es-barra { fill: rgb(var(--es-luz)); opacity: .95; }
.es-franja .es-linea { stroke-width: 3.4; filter: drop-shadow(0 0 5px rgb(var(--es-verde) / .8)); }

/* Celular (vertical): trazos más finos, porque la escena se arma a escala real de pantalla */
.es-vertical .es-canal { stroke-width: 12; }
.es-vertical .es-canal-borde { stroke-width: 14; }
.es-vertical .es-hilo { stroke-width: 2.2; stroke-dasharray: 9 15; animation-name: esFluirV; filter: drop-shadow(0 0 4px rgb(var(--es-luz) / .8)); }
@keyframes esFluirV { to { stroke-dashoffset: -72; } }
