/* Shown from the first byte until the portal is ready. Plain CSS: it paints before the app's styles load. */
html { background: #fbfafe; }
html.dark { background: #111214; }

.splash {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #fbfafe;
  color: #4700ed;
  z-index: 100;
}
html.dark .splash { background: #111214; color: #ecedf0; }

.splash-inner { display: grid; justify-items: center; gap: 22px; }
.splash-logo { width: 148px; height: auto; animation: splash-in 420ms ease-out both; }

.splash-bar {
  position: relative;
  width: 120px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9e6f2;
  animation: splash-in 420ms 120ms ease-out both;
}
html.dark .splash-bar { background: #2a2c31; }
.splash-bar::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 40%;
  border-radius: inherit;
  background: #4700ed;
  animation: splash-slide 1.1s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
html.dark .splash-bar::after { background: #c6f16d; }

@keyframes splash-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes splash-slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

@media (prefers-reduced-motion: reduce) {
  .splash-logo, .splash-bar { animation: none; }
  .splash-bar::after { animation: none; width: 100%; opacity: 0.5; }
}
