/* Pantalla de carga — fondo de marca con haz de luz y partículas (canvas). */
.splash {
  position: fixed; inset: 0; z-index: 100; overflow: hidden; display: grid; place-items: center;
  color: #fff;
  background:
    radial-gradient(90% 70% at 12% -12%, color-mix(in oklab, var(--marca) 30%, #ffffff 70%) 0%, transparent 55%),
    radial-gradient(60% 50% at 100% 110%, color-mix(in oklab, var(--acento) 16%, transparent), transparent 60%),
    linear-gradient(158deg,
      color-mix(in oklab, var(--marca) 92%, #ffffff) 0%,
      color-mix(in oklab, var(--marca) 78%, #12100E) 42%,
      color-mix(in oklab, var(--marca) 42%, #080605) 100%);
  transition: opacity .4s ease, visibility .4s;   /* Panel 244 · antes .6s */
}
/* Haces de luz diagonales, muy suaves */
.splash::before, .splash::after {
  content: ""; position: absolute; top: -30%; width: 38vw; height: 160%; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .16), transparent);
  filter: blur(18px); transform: rotate(24deg);
}
.splash::before { left: 8%; animation: haz 14s ease-in-out infinite alternate; }
.splash::after { left: 30%; width: 18vw; opacity: .7; animation: haz 18s ease-in-out infinite alternate-reverse; }
@keyframes haz { from { transform: rotate(24deg) translateX(-4vw); } to { transform: rotate(24deg) translateX(6vw); } }

.splash canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.splash-centro { position: relative; z-index: 1; display: grid; justify-items: center; gap: 18px; text-align: center; padding: 24px; }
.splash-disco {
  width: 124px; height: 124px; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  /* Panel 149: con un logo de fondo liso, el disco toma ese color (splash.js) y el logo lo
     llena: así no se ve el cuadrado del PNG dentro del círculo. */
  background: var(--disco-fondo, linear-gradient(145deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .78)));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .7) inset,
    0 18px 50px -12px rgba(0, 0, 0, .35),
    0 0 0 10px rgba(255, 255, 255, .08),
    0 0 80px 10px color-mix(in oklab, var(--marca) 45%, transparent);
  animation: respira 3.2s ease-in-out infinite;
  transition: transform .45s ease, opacity .45s ease;
}
.splash-disco .marca-logo { width: 86px; height: 86px; object-fit: contain; }
/* Logo con fondo liso (el caso normal: PNG o JPG con fondo blanco): ocupa el disco entero,
   el círculo recorta las esquinas, que son de su mismo color. */
.splash-disco.logo-lleno .marca-logo { width: 92%; height: 92%; }
/* Logo que es una foto o con fondo de varios colores: la llena como una foto de perfil. */
.splash-disco.logo-foto .marca-logo { width: 100%; height: 100%; object-fit: cover; }
/* Logo transparente (PNG/SVG sin fondo): sobre blanco y algo más grande que antes. */
.splash-disco.logo-transparente { --disco-fondo: #fff; }
.splash-disco.logo-transparente .marca-logo { width: 74%; height: 74%; }
@keyframes respira {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255,255,255,.7) inset, 0 18px 50px -12px rgba(0,0,0,.35), 0 0 0 10px rgba(255,255,255,.08), 0 0 60px 6px color-mix(in oklab, var(--marca) 40%, transparent); }
  50%      { box-shadow: 0 0 0 1px rgba(255,255,255,.7) inset, 0 18px 50px -12px rgba(0,0,0,.35), 0 0 0 16px rgba(255,255,255,.05), 0 0 100px 16px color-mix(in oklab, var(--marca) 55%, transparent); }
}
.splash-nombre { font-family: var(--font-marca); font-weight: 500; font-size: clamp(24px, 3vw, 32px); letter-spacing: .005em; margin: 4px 0 0; text-shadow: 0 2px 18px rgba(0, 0, 0, .25); }
.splash-estado { margin: 0; font-size: 14px; color: rgba(255, 255, 255, .78); }
.splash-progreso { width: 120px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.splash-progreso i { display: block; width: 40%; height: 100%; border-radius: inherit; background: rgba(255, 255, 255, .85); animation: progreso 1.4s ease-in-out infinite; }
@keyframes progreso { from { transform: translateX(-110%); } to { transform: translateX(260%); } }

.splash-pie {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  margin: 0; padding: 0 16px; text-align: center; font-size: 12px; letter-spacing: .02em; color: rgba(255, 255, 255, .72);
}

.splash--cambio .splash-disco { transform: scale(.86); opacity: .2; }
.splash--fuera { opacity: 0; visibility: hidden; }
.splash--fuera .splash-centro { transform: scale(1.04); transition: transform .4s ease; }

@media (prefers-reduced-motion: reduce) {
  .splash::before, .splash::after, .splash-disco, .splash-progreso i { animation: none; }
}
