/* =========================================================
   ANDERSON COMPUTERS — PANTALLAS DE CARGA Y LOADERS CSS
   Animaciones vectoriales de engranaje, órbitas, neón y CCTV
   ========================================================= */

@keyframes spinClockwise {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes spinCounterClockwise {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

@keyframes orbitPulse {
  0%, 100% {
    stroke-dashoffset: 0;
    opacity: 0.92;
  }
  50% {
    stroke-dashoffset: -45;
    opacity: 1;
  }
}

@keyframes subtleFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

@keyframes neonPulseCyan {
  0%, 100% {
    filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.55)) drop-shadow(0 0 14px rgba(0, 229, 255, 0.25));
  }
  50% {
    filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.9)) drop-shadow(0 0 24px rgba(0, 229, 255, 0.45));
  }
}

@keyframes neonPulseRed {
  0%, 100% {
    filter: drop-shadow(0 0 6px rgba(230, 57, 70, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 13px rgba(230, 57, 70, 0.85));
  }
}

@keyframes radarSweep {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes recBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.2; }
}

@keyframes scanlineMove {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

/* Clases utilitarias de animación de loaders */
.gear-spin-slow {
  transform-origin: center;
  transform-box: fill-box;
  animation: spinClockwise 12s linear infinite;
}

.gear-spin-medium {
  transform-origin: center;
  transform-box: fill-box;
  animation: spinClockwise 7s linear infinite;
}

.gear-spin-reverse {
  transform-origin: center;
  transform-box: fill-box;
  animation: spinCounterClockwise 10s linear infinite;
}

.swoosh-flow {
  stroke-dasharray: 280 28;
  animation: orbitPulse 3.5s ease-in-out infinite;
}

.logo-float {
  animation: subtleFloat 3.6s ease-in-out infinite;
}

.glow-cyan {
  animation: neonPulseCyan 2.8s ease-in-out infinite;
}

.glow-red {
  animation: neonPulseRed 3.2s ease-in-out infinite;
}

.radar-rotate {
  transform-origin: center;
  animation: radarSweep 4s linear infinite;
}

.rec-dot {
  animation: recBlink 1.2s infinite;
}

/* Patrón CCTV Grid y Scanline */
.cctv-grid {
  background-size: 36px 36px;
  background-image:
    linear-gradient(to right, rgba(59, 118, 184, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(59, 118, 184, 0.08) 1px, transparent 1px);
}

.cctv-scanline {
  background: linear-gradient(
    to bottom,
    rgba(0, 229, 255, 0) 0%,
    rgba(0, 229, 255, 0.06) 50%,
    rgba(0, 229, 255, 0) 100%
  );
  height: 120px;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  animation: scanlineMove 6s linear infinite;
}

/* =========================================================
   SPLASH SCREEN PRINCIPAL INTEGRADO EN EL SITIO WEB
   ========================================================= */
#splash-screen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

/* Variante 1: Web Corporativa (Claro / Fidelidad Original) */
#splash-screen.splash-light {
  background: #ffffff;
  background-image: radial-gradient(#cbd5e1 1.2px, transparent 1.2px);
  background-size: 28px 28px;
  color: #1d224e;
}

#splash-screen.splash-light .splash-slogan {
  color: #1d224e;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  text-transform: none;
}

#splash-screen.splash-light .splash-progress-track {
  background: rgba(226, 232, 240, 0.9);
  border: 1px solid rgba(203, 213, 225, 0.8);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

#splash-screen.splash-light .splash-progress-fill {
  background: linear-gradient(90deg, #9b2226 0%, #3b76b8 50%, #1d224e 100%);
  box-shadow: 0 0 8px rgba(59, 118, 184, 0.4);
}

#splash-screen.splash-light .splash-status-row {
  color: #64748b;
}

#splash-screen.splash-light .splash-status-text {
  color: #3b76b8;
  font-weight: 600;
}

#splash-screen.splash-light .splash-status-dot {
  background: #3b76b8;
}

#splash-screen.splash-light #splash-percent-text {
  color: #1d224e !important;
}

/* Variante 2: Web Moderna (Dark Mode / Neón Tech) */
#splash-screen.splash-dark {
  background: radial-gradient(circle at center, #0f172a 0%, #020617 100%);
  color: #f8fafc;
}

body.loaded #splash-screen {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 380px;
  width: 90%;
  padding: 20px;
}

.splash-svg-box {
  width: 220px;
  max-width: 100%;
  margin-bottom: 12px;
}

.splash-title {
  font-family: 'Orbitron', 'Montserrat', sans-serif;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: #ffffff;
  margin: 6px 0 2px;
  text-transform: uppercase;
}

.splash-title span {
  color: #00e5ff;
}

.splash-slogan {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.splash-progress-track {
  width: 100%;
  max-width: 320px;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
}

.splash-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #e63946 0%, #3b82f6 50%, #00e5ff 100%);
  border-radius: 999px;
  box-shadow: 0 0 10px #00e5ff;
  transition: width 0.15s ease-out;
}

.splash-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 320px;
  margin-top: 10px;
  font-family: 'JetBrains Mono', monospace, sans-serif;
  font-size: 0.72rem;
  color: #cbd5e1;
  white-space: nowrap;
}

.splash-status-text {
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.splash-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00e5ff;
  display: inline-block;
  animation: recBlink 1s infinite;
}
