/**
 * ========================================
 * MOBIX SPLASH SCREEN — Premium Dark Boot
 * GSD-055 v1.0.0
 * ========================================
 * Animación de arranque tipo Opera Browser.
 * Oculta el tiempo de carga de tiles del mapa (1-2s).
 * RESTRICCIONES: Cero backdrop-filter, cero will-change.
 * Solo opacity + transform (GPU-safe iOS Safari).
 */

/* =========================================
   1. CONTENEDOR PRINCIPAL (Full Viewport)
   ========================================= */
.mox-splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  background: #000000;
  /* Empieza OCULTO: se activa via JS post-login con .mox-splash-active */
  display: none;
  align-items: center;
  justify-content: center;
  /* Transición de salida (triggered por .mox-splash-farewell) */
  transition:
    opacity 0.4s ease-out,
    transform 0.4s ease-out;
}

/* Activación post-login: JS añade esta clase en showApp() */
.mox-splash.mox-splash-active {
  display: flex;
}

/* =========================================
   2. CONTENEDOR INTERIOR (Logo + Texto)
   ========================================= */
.mox-splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: mox-splash-entrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* =========================================
   3. LOGO SVG
   ========================================= */
.mox-splash-logo {
  width: 72px;
  height: 72px;
  opacity: 0;
  animation: mox-splash-logo-in 0.5s ease-out 0.1s forwards;
}

/* =========================================
   4. TÍTULO TIPOGRÁFICO "MOBIX"
   ========================================= */
.mox-splash-title {
  font-family: "Montserrat", "Inter", sans-serif;
  font-size: 2.4rem;
  font-weight: 400;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  opacity: 0;
  animation: mox-splash-text-in 0.5s ease-out 0.25s forwards;
}

.mox-splash-title .brand-m,
.mox-splash-title .brand-x {
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #ffd700;
}

/* =========================================
   5. BARRA DE PROGRESO DORADA (Opera-Style)
   ========================================= */
.mox-splash-bar {
  width: 120px;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  margin-top: 8px;
  opacity: 0;
  animation: mox-splash-bar-appear 0.3s ease-out 0.5s forwards;
}

.mox-splash-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffd700, #ffa500);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
  animation: mox-splash-bar-fill 1.8s ease-in-out 0.6s forwards;
}

/* =========================================
   6. CLASE DE DESPEDIDA (JS la añade)
   ========================================= */
.mox-splash-farewell {
  opacity: 0 !important;
  transform: scale(1.04);
  pointer-events: none;
}

/* =========================================
   7. KEYFRAMES
   ========================================= */

/* Entrada del contenedor */
@keyframes mox-splash-entrance {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Aparición del logo */
@keyframes mox-splash-logo-in {
  from {
    opacity: 0;
    transform: scale(0.7);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Aparición del texto */
@keyframes mox-splash-text-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Aparición de la barra */
@keyframes mox-splash-bar-appear {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Llenado de la barra dorada */
@keyframes mox-splash-bar-fill {
  0% {
    width: 0%;
  }
  40% {
    width: 55%;
  }
  70% {
    width: 80%;
  }
  100% {
    width: 100%;
  }
}
