/* ============================================
   SPLASH SCREEN — Grupos Online
   Tela de intro com logo + nome da marca
   ============================================ */

/* Overlay em tela cheia */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--color-white);
  overflow: hidden;
  transition:
    opacity 0.6s ease,
    visibility 0.6s ease;
}

/* Fundo decorativo com gradiente sutil */
.splash::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(33, 113, 185, 0.06) 0%,
    transparent 70%
  );
  pointer-events: none;
}

/* Container central */
.splash__content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-lg);
}

/* ===== LOGO ===== */
.splash__logo {
  border: 1px solid;
  box-shadow: var(--shadow-elevated);

  width: 240px;
  height: 240px;
  object-fit: contain;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.5);
  animation: splashLogoIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards;
  filter: drop-shadow(0 8px 24px rgba(33, 113, 185, 0.2));
}

/* ===== NOME DA MARCA ===== */
.splash__brand {
  display: flex;
  align-items: baseline;
  gap: 0.35em;
  font-family: var(--font-family-display);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: var(--font-weight-bold);
  opacity: 0;
  transform: translateY(20px);
  animation: splashFadeUp 0.7s ease-out 0.8s forwards;
}

.splash__brand-grupos {
  color: var(--color-blue-700);
}

.splash__brand-online {
  background: var(--gradient-orange);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== TAGLINE ===== */
.splash__tagline {
  font-family: var(--font-family-body);
  font-size: clamp(0.85rem, 2vw, 1rem);
  font-weight: var(--font-weight-light);
  color: var(--color-blue-300);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(12px);
  animation: splashFadeUp 0.6s ease-out 1.2s forwards;
}

/* ===== BARRA DE PROGRESSO ===== */
.splash__progress {
  width: 160px;
  height: 3px;
  background: var(--color-gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: var(--spacing-md);
  opacity: 0;
  animation: splashFadeUp 0.4s ease-out 1.4s forwards;
}

.splash__progress-bar {
  width: 0;
  height: 100%;
  background: var(--gradient-orange);
  border-radius: var(--radius-full);
  animation: splashProgress 1.2s ease-in-out 1.5s forwards;
}

/* ===== PARTÍCULAS DECORATIVAS ===== */
.splash__particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.splash__particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  opacity: 0;
}

.splash__particle:nth-child(1) {
  top: 20%;
  left: 15%;
  background: var(--color-blue-300);
  animation: splashParticle 2s ease-in-out 0.5s infinite;
}

.splash__particle:nth-child(2) {
  top: 30%;
  right: 20%;
  background: var(--color-orange-500);
  animation: splashParticle 2.5s ease-in-out 0.8s infinite;
}

.splash__particle:nth-child(3) {
  bottom: 25%;
  left: 25%;
  background: var(--color-orange-700);
  animation: splashParticle 1.8s ease-in-out 1s infinite;
}

.splash__particle:nth-child(4) {
  bottom: 35%;
  right: 15%;
  background: var(--color-blue-500);
  animation: splashParticle 2.2s ease-in-out 0.6s infinite;
}

.splash__particle:nth-child(5) {
  top: 45%;
  left: 8%;
  background: var(--color-orange-300);
  animation: splashParticle 2.8s ease-in-out 1.2s infinite;
}

/* ===== ESTADO: SAINDO ===== */
.splash--exiting {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ===== ESTADO: OCULTA (removida) ===== */
.splash--hidden {
  display: none;
}

/* ===== BODY: bloquear scroll durante splash ===== */
body.splash-active {
  overflow: hidden;
}

/* Pausar animação da navbar enquanto a splash está ativa */
body.splash-active .navbar {
  animation: none;
  transform: translateY(-100%);
}

/* Pausar animações do hero enquanto splash ativa */
body.splash-active .hero__badge,
body.splash-active .hero__title,
body.splash-active .hero__subtitle-container,
body.splash-active .hero__subtitle,
body.splash-active .hero__actions,
body.splash-active .hero__stats,
body.splash-active .hero__scroll-indicator {
  animation: none;
  opacity: 0;
  transform: translateY(30px);
}

body.splash-active .hero__scroll-indicator {
  transform: translateX(-50%) translateY(0);
}

/* Quando splash acabar, disparar animações do hero */
body.splash-done .hero__badge {
  animation: fadeUp 0.8s ease-out 0.2s forwards;
}

body.splash-done .hero__title {
  animation: fadeUp 0.8s ease-out 0.4s forwards;
}

body.splash-done .hero__subtitle-container {
  animation: fadeUp 0.8s ease-out 0.6s forwards;
}

body.splash-done .hero__subtitle {
  animation: fadeUp 0.8s ease-out 0.6s forwards;
}

body.splash-done .hero__actions {
  animation: fadeUp 0.8s ease-out 0.8s forwards;
}

body.splash-done .hero__stats {
  animation: fadeUp 0.8s ease-out 1s forwards;
}

body.splash-done .hero__scroll-indicator {
  animation:
    scrollIndicatorFade 0.5s ease-out 1.4s forwards,
    scrollIndicatorBounce 1.5s ease-in-out 1.9s infinite;
}

/* ============================================
   KEYFRAMES — SPLASH
   ============================================ */

@keyframes splashLogoIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes splashFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes splashProgress {
  to {
    width: 100%;
  }
}

@keyframes splashParticle {
  0%,
  100% {
    opacity: 0;
    transform: translateY(0) scale(0.5);
  }
  50% {
    opacity: 0.6;
    transform: translateY(-15px) scale(1);
  }
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */
@media (max-width: 768px) {
  .splash__logo {
    width: 140px;
    height: 140px;
  }

  .splash__progress {
    width: 120px;
  }
}

@media (max-width: 480px) {
  .splash__logo {
    width: 120px;
    height: 120px;
  }

  .splash__brand {
    font-size: 1.5rem;
  }

  .splash__tagline {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
  }

  .splash__progress {
    width: 100px;
  }
}
