/* ==========================================================================
   JUANITO BARBER SHOP · LUXURY OPENING SPLASH & PWA ENHANCEMENTS
   Apertura cinematográfica dorada del logotipo oficial con estética Street-Luxury
   ========================================================================== */

#pwa-splash {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 999999;
  background: #06070a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.55s ease;
  pointer-events: all;
  user-select: none;
  -webkit-user-select: none;
}

#pwa-splash.splash-dismissed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Puertas doradas de apertura (Aperture / Doors) */
.splash-doors {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.splash-door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.5%;
  background: linear-gradient(135deg, #090b10 0%, #050608 100%);
  transition: transform 0.85s cubic-bezier(0.77, 0, 0.175, 1);
  will-change: transform;
}

.splash-door-left {
  left: 0;
  border-right: 1.5px solid rgba(212, 175, 55, 0.45);
  box-shadow: inset -10px 0 30px rgba(0, 0, 0, 0.85);
}

.splash-door-right {
  right: 0;
  border-left: 1.5px solid rgba(212, 175, 55, 0.45);
  box-shadow: inset 10px 0 30px rgba(0, 0, 0, 0.85);
}

/* Estado abierto de las puertas */
#pwa-splash.doors-open .splash-door-left {
  transform: translateX(-102%);
}

#pwa-splash.doors-open .splash-door-right {
  transform: translateX(102%);
}

/* Glow de fondo y destello */
.splash-backdrop-glow {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.28) 0%, rgba(212, 175, 55, 0.08) 45%, transparent 70%);
  filter: blur(35px);
  z-index: 2;
  animation: splashPulse 2s infinite alternate ease-in-out;
}

@keyframes splashPulse {
  0% { transform: scale(0.85); opacity: 0.55; }
  100% { transform: scale(1.25); opacity: 0.95; }
}

/* Contenedor central */
.splash-center {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

/* Anillos rotativos y logotipo */
.splash-emblem-box {
  position: relative;
  width: 140px;
  height: 140px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px dashed rgba(212, 175, 55, 0.55);
  animation: splashSpin 12s linear infinite;
}

.splash-ring-inner {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-top-color: #d4af37;
  border-bottom-color: #d4af37;
  animation: splashSpinRev 6s linear infinite;
}

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

@keyframes splashSpinRev {
  100% { transform: rotate(-360deg); }
}

/* Logo con efecto de apertura / desdoble */
.splash-logo-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #d4af37;
  box-shadow: 0 0 35px rgba(212, 175, 55, 0.6), 0 10px 25px rgba(0,0,0,0.8);
  transform: scale(0.65) rotateY(90deg);
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
  will-change: transform, opacity;
}

#pwa-splash.doors-open .splash-logo-img {
  transform: scale(1) rotateY(0deg);
  opacity: 1;
}

/* Título de Marca */
.splash-brand-title {
  font-family: 'Cinzel', 'Playfair Display', serif, sans-serif;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.15em;
  background: linear-gradient(135deg, #fff7d6 0%, #d4af37 50%, #aa8010 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
  text-transform: uppercase;
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.25s, opacity 0.6s ease 0.25s;
}

#pwa-splash.doors-open .splash-brand-title {
  transform: translateY(0);
  opacity: 1;
}

.splash-brand-sub {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: #a3a3a3;
  text-transform: uppercase;
  margin-bottom: 22px;
  transform: translateY(10px);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.35s, opacity 0.6s ease 0.35s;
}

#pwa-splash.doors-open .splash-brand-sub {
  transform: translateY(0);
  opacity: 0.85;
}

/* Barra de carga rápida */
.splash-progress-track {
  width: 140px;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.splash-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #d4af37, #fef08a, #d4af37);
  border-radius: 99px;
  box-shadow: 0 0 10px #d4af37;
  transition: width 0.95s cubic-bezier(0.25, 1, 0.5, 1);
}

#pwa-splash.doors-open .splash-progress-bar {
  width: 100%;
}

/* Botón flotante para instalar PWA (si está disponible) */
.pwa-install-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  z-index: 99990;
  background: linear-gradient(135deg, rgba(20, 24, 33, 0.96) 0%, rgba(9, 11, 16, 0.98) 100%);
  border: 1px solid rgba(212, 175, 55, 0.45);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(212, 175, 55, 0.2);
  border-radius: 999px;
  padding: 8px 18px 8px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  opacity: 0;
  pointer-events: none;
}

.pwa-install-banner.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.pwa-install-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid #d4af37;
  object-fit: cover;
}

.pwa-install-text {
  text-align: left;
}

.pwa-install-text b {
  display: block;
  font-size: 13px;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.pwa-install-text span {
  font-size: 11px;
  color: #d4af37;
  font-weight: 600;
}

.pwa-btn-action {
  background: linear-gradient(135deg, #d4af37 0%, #aa8010 100%);
  color: #000;
  font-weight: 800;
  font-size: 12px;
  padding: 7px 14px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  letter-spacing: 0.4px;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.35);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.pwa-btn-action:active {
  transform: scale(0.95);
  filter: brightness(1.1);
}

.pwa-btn-close {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 16px;
  cursor: pointer;
  padding: 2px;
  line-height: 1;
}
