/* Boveda: el paso del login al sistema (src/boveda.ts). Cuatro hojas de petroleo con juntas de luz se
   cierran, el logo se enciende en el centro y, cuando lo de detras esta listo, se abren en diagonal.
   Entre /login y el mapa cambia la pagina: el visor pinta la boveda ya cerrada desde el primer
   cuadro (html.boveda-cerrada, assets/arranque/visor-cabeza.js). */
html:not(.boveda-cerrada) #boveda { display: none; }
.boveda { position: fixed; inset: 0; z-index: 10000; overflow: hidden; pointer-events: none; }
.boveda-hoja { position: absolute; width: 50%; height: 50%; background: linear-gradient(var(--g), #0d3c49, #031319); }
.boveda-hoja.h1 { left: 0; top: 0; --hx: -101%; --hy: -101%; --g: 135deg; }
.boveda-hoja.h2 { right: 0; top: 0; --hx: 101%; --hy: -101%; --g: 225deg; }
.boveda-hoja.h3 { left: 0; bottom: 0; --hx: -101%; --hy: 101%; --g: 45deg; }
.boveda-hoja.h4 { right: 0; bottom: 0; --hx: 101%; --hy: 101%; --g: 315deg; }
.boveda-junta { position: absolute; background: #62c7d6; box-shadow: 0 0 18px #62c7d6, 0 0 4px #f2feff; }
.boveda-junta.h { left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; }
.boveda-junta.v { top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; }
.boveda-halo { position: absolute; inset: 0; margin: auto; width: 60vmin; height: 60vmin; border-radius: 50%; background: radial-gradient(circle, #62c7d633, transparent 62%); }
.boveda-logo { position: absolute; inset: 0; margin: auto; width: clamp(96px, 15vmin, 160px); height: clamp(96px, 15vmin, 160px); filter: drop-shadow(0 0 22px #62c7d699); }
.boveda-onda { position: absolute; inset: 0; margin: auto; width: 80px; height: 80px; border-radius: 50%; border: 2px solid #62c7d6; box-shadow: 0 0 16px #62c7d688, inset 0 0 16px #62c7d655; opacity: 0; }

/* Se cierra. */
.boveda.cierra .boveda-hoja { animation: boveda-cierra .6s both cubic-bezier(.65, 0, .3, 1); }
.boveda.cierra .boveda-junta { animation: boveda-aparece .3s .5s both; }
.boveda.cierra .boveda-halo { animation: boveda-aparece .5s .55s both; }
.boveda.cierra .boveda-logo { animation: boveda-sello .6s .45s both cubic-bezier(.3, 1.4, .5, 1); }

/* Cerrada mientras carga, y se abre. */
.boveda.cerrada .boveda-logo, html.boveda-cerrada .boveda:not(.abre) .boveda-logo { animation: boveda-late 1.6s infinite ease-in-out; }
.boveda.abre .boveda-logo { animation: boveda-estalla .5s both cubic-bezier(.2, .8, .3, 1); }
.boveda.abre .boveda-onda { animation: boveda-onda .9s .05s both cubic-bezier(.1, .7, .3, 1); }
.boveda.abre .boveda-halo { animation: boveda-apaga .5s .1s both; }
.boveda.abre .boveda-junta { animation: boveda-apaga .35s .15s both; }
.boveda.abre .boveda-hoja { animation: boveda-abre .8s .2s both cubic-bezier(.7, 0, .2, 1); }

@keyframes boveda-cierra { from { transform: translate(var(--hx), var(--hy)); } }
@keyframes boveda-abre { to { transform: translate(var(--hx), var(--hy)); visibility: hidden; } }
@keyframes boveda-aparece { from { opacity: 0; } }
@keyframes boveda-apaga { to { opacity: 0; } }
@keyframes boveda-sello { from { opacity: 0; transform: scale(.3) rotate(-90deg); } }
@keyframes boveda-late { 50% { filter: drop-shadow(0 0 34px #62c7d6); } }
@keyframes boveda-estalla { 40% { transform: scale(1.12); filter: drop-shadow(0 0 40px #f2feff); } to { transform: scale(1.3); opacity: 0; } }
@keyframes boveda-onda { from { transform: scale(.3); opacity: 1; } to { transform: scale(14); opacity: 0; } }
