/** Splash screen styles — loaded before the Vite bundle to prevent FOUC. */

#app-splash {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  opacity: 1;
  transition: opacity 400ms ease-out;
  will-change: opacity;
}

#app-splash.is-hidden {
  opacity: 0;
  pointer-events: none;
}

#app-splash .splash-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
  animation: splash-pulse 1800ms ease-in-out infinite;
}

#app-splash .splash-bar {
  position: relative;
  width: 220px;
  height: 3px;
  background: #eef0f3;
  border-radius: 999px;
  overflow: hidden;
}

#app-splash .splash-bar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #6b46ff, transparent);
  border-radius: 999px;
  animation: splash-slide 1400ms cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

#app-splash .splash-text {
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  letter-spacing: 0.2px;
}

@keyframes splash-pulse {
  0%, 100% { transform: scale(1);    opacity: 1;   }
  50%       { transform: scale(0.94); opacity: 0.7; }
}

@keyframes splash-slide {
  0%   { left: -40%; }
  100% { left: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  #app-splash .splash-logo,
  #app-splash .splash-bar::before { animation: none; }
}
