/* Splash de arranque: logo, estrellas, anillo de radar y destello. Solo CSS; assets/arranque.js decide antes
   de pintar si sale (clase «con-splash», una vez por sesión) y assets/splash.js lo quita. El estado final de
   cada pieza es su estilo base: sin animación (reduced-motion) todo se ve quieto. */
.splash { display: none; }
.con-splash .splash {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  background: #000; color: #fff; text-align: center; overflow: hidden; cursor: pointer;
  transition: opacity .25s ease;
  /* Seguridad: si splash.js no llega a quitarlo, a los 2 s desaparece igual. */
  animation: splash-seguro 1ms linear 2s forwards;
}
.con-splash .splash.splash-fuera { opacity: 0; }
@keyframes splash-seguro { from, to { opacity: 0; visibility: hidden; pointer-events: none; } }

/* Estrellas: ~30 puntos con box-shadow, en dos capas que parpadean desfasadas. */
.splash-estrellas::before, .splash-estrellas::after {
  content: ""; position: absolute; top: 0; left: 0; width: 2px; height: 2px; border-radius: 50%; opacity: .7;
}
.splash-estrellas::before {
  box-shadow: 8vw 6vh #fff, 22vw 14vh #fff, 41vw 4vh #fff, 63vw 11vh #fff, 86vw 7vh #fff, 93vw 24vh #fff,
    12vw 31vh #fff, 74vw 33vh #fff, 4vw 52vh #fff, 95vw 49vh #fff, 17vw 71vh #fff, 81vw 68vh #fff,
    33vw 88vh #fff, 58vw 93vh #fff, 89vw 86vh #fff;
}
.splash-estrellas::after {
  width: 1px; height: 1px; opacity: .5;
  box-shadow: 15vw 3vh #fff, 52vw 9vh #fff, 77vw 19vh #fff, 3vw 21vh #ffe8a0, 31vw 22vh #fff, 97vw 36vh #fff,
    9vw 42vh #fff, 88vw 58vh #ffe8a0, 26vw 59vh #fff, 6vw 83vh #fff, 47vw 79vh #fff, 69vw 81vh #fff,
    96vw 96vh #fff, 20vw 95vh #ffe8a0, 72vw 3vh #fff;
}

.splash-centro { position: relative; display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.splash-radar { position: relative; display: grid; place-items: center; width: 14rem; height: 14rem; margin-bottom: 1rem; }

/* Anillo de radar: uno gira (arco encendido) y otro pulsa hacia fuera una vez. */
.splash-anillo { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; }
.splash-giro { border: 1.5px solid rgba(255, 200, 0, .16); border-top-color: #ffc800; border-right-color: rgba(255, 200, 0, .5); }
.splash-pulso { inset: 1.25rem; border: 1px solid rgba(255, 200, 0, .7); opacity: 0; }

/* Logo: el icono de la app, que se ilumina en amarillo. El destello cruza en diagonal una vez. */
.splash-logo {
  position: relative; width: 9rem; height: 9rem; border-radius: 22%; overflow: hidden;
  filter: brightness(1) drop-shadow(0 0 18px rgba(255, 200, 0, .35));
}
.splash-logo img { display: block; width: 100%; height: 100%; }
.splash-logo::after {
  content: ""; position: absolute; inset: -20%; opacity: 0;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 236, 170, .6) 50%, transparent 62%);
  transform: translateX(-110%);
}

.splash-nombre { margin: 0; font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.splash-firma { margin: 0; font-size: .78rem; color: #c8c8c8; } /* el splash es de marca: negro en los dos temas */

@media (prefers-reduced-motion: no-preference) {
  .splash-estrellas::before { animation: splash-titila 2.2s ease-in-out infinite alternate; }
  .splash-estrellas::after { animation: splash-titila 1.7s ease-in-out .4s infinite alternate; }
  .splash-giro { animation: splash-entra .3s ease .15s both, splash-gira 1.6s linear .15s infinite; }
  .splash-pulso { animation: splash-pulsa 1s ease-out .35s both; }
  .splash-logo { animation: splash-ilumina .9s cubic-bezier(.2, .7, .2, 1) both; }
  .splash-logo::after { animation: splash-destello .6s ease-in-out .75s both; }
  .splash-nombre { animation: splash-sube .4s ease .45s both; }
  .splash-firma { animation: splash-sube .4s ease .6s both; }
}
/* Movimiento reducido: app.css apaga toda animación; aquí solo un fundido breve del logo y la seguridad. */
@media (prefers-reduced-motion: reduce) {
  .con-splash .splash { animation: splash-seguro 1ms linear 2s forwards !important; }
  .con-splash .splash-logo { animation: splash-funde .25s ease both !important; }
}

@keyframes splash-titila { from { opacity: .25; } to { opacity: .75; } }
@keyframes splash-entra { from { opacity: 0; } }
@keyframes splash-gira { to { transform: rotate(360deg); } }
@keyframes splash-pulsa { from { opacity: .9; transform: scale(.8); } to { opacity: 0; transform: scale(1.45); } }
@keyframes splash-ilumina {
  from { opacity: 0; transform: scale(.9); filter: brightness(.45) drop-shadow(0 0 0 rgba(255, 200, 0, 0)); }
  60% { opacity: 1; filter: brightness(1.1) drop-shadow(0 0 30px rgba(255, 200, 0, .6)); }
}
@keyframes splash-destello { from { opacity: 1; transform: translateX(-110%); } to { opacity: 1; transform: translateX(110%); } }
@keyframes splash-sube { from { opacity: 0; transform: translateY(6px); } }
@keyframes splash-funde { from { opacity: 0; } }
