/* ============================================================
   NorCam — Pantalla de carga (splash)
   ============================================================ */

.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 38%, #24456e 0%, #1a3554 45%, #0d1a2a 100%);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  opacity: 1;
  transition: opacity 0.55s ease;
}

.splash.is-done {
  opacity: 0;
  pointer-events: none;
}

/* Si ya se mostró en esta sesión, no vuelve a aparecer */
html.splash-skip .splash {
  display: none;
}

.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding: 32px;
  max-width: min(560px, 88vw);
  text-align: center;
}

/* Logo a color sobre tarjeta blanca (el logotipo es oscuro) */
.splash-logo {
  background: #fff;
  border-radius: 14px;
  padding: 18px 26px;
  width: 100%;
  max-width: 340px;
  height: auto;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.42);
  animation: splash-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Eslogan: arte en blanco, va directo sobre el fondo azul */
.splash-slogan {
  width: 100%;
  max-width: 420px;
  height: auto;
  animation: splash-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both;
}

.splash-bar {
  width: 190px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
  animation: splash-in 0.5s ease 0.36s both;
}

.splash-bar span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #7a2041, #c05070);
  animation: splash-slide 1.15s ease-in-out infinite;
}

.splash-text {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  animation: splash-in 0.5s ease 0.42s both;
}

/* ============================================================
   Loader de marca reutilizable (modelos 3D, panoramas 360, etc.)
   Se superpone al contenedor del visor, no a toda la pantalla.
   ============================================================ */
.nc-loader {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 42%, #24456e 0%, #1a3554 48%, #0d1a2a 100%);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  opacity: 1;
  transition: opacity 0.45s ease;
}

.nc-loader.is-done {
  opacity: 0;
  pointer-events: none;
}

.nc-loader .splash-inner {
  gap: 20px;
  animation: splash-in 0.45s ease both;
}

.nc-loader .splash-logo {
  max-width: 230px;
  padding: 13px 20px;
  border-radius: 11px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.38);
  animation: none;
}

.nc-loader .splash-slogan {
  max-width: 290px;
  animation: none;
}

.nc-loader .splash-bar,
.nc-loader .splash-text {
  animation: none;
}

@media (max-width: 600px) {
  .nc-loader .splash-logo { max-width: 190px; }
  .nc-loader .splash-slogan { max-width: 230px; }
}

@keyframes splash-in {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

@keyframes splash-slide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

@media (max-width: 600px) {
  .splash-inner { gap: 20px; }
  .splash-logo { max-width: 250px; padding: 14px 18px; }
  .splash-slogan { max-width: 300px; }
}

@media (prefers-reduced-motion: reduce) {
  .splash, .splash-logo, .splash-slogan, .splash-bar, .splash-text { animation: none; transition: none; }
  .splash-bar span { animation: none; width: 100%; }
}
