
#app-splash {
  --splash-bg: #F8F8F8;
  --splash-logo: #28333E;
  --splash-track: #E5E8EB;
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: var(--splash-bg);
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

#app-splash.app-splash--dark {
  --splash-bg: #28333E;
  --splash-logo: #FFFFFF;
  --splash-track: #424D57;
}

#app-splash.app-splash--hide {
  opacity: 0;
  visibility: hidden;
}

#app-splash.app-splash--hide .app-splash__logo {
  transform: scale(1.04);
}

.app-splash__logo {
  width: min(280px, 60vw);
  height: auto;
  overflow: visible;
  transition: transform 0.45s ease;
}

.app-splash__logo path {
  fill: var(--splash-logo);
  fill-opacity: 0;
  stroke: #FFA600;
  stroke-width: 0.6;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation:
    app-splash-draw 1s cubic-bezier(0.65, 0, 0.35, 1) forwards,
    app-splash-fill 0.45s ease-out 0.85s forwards;
}

.app-splash__bar {
  position: relative;
  width: min(180px, 40vw);
  height: 3px;
  border-radius: 3px;
  background: var(--splash-track);
  overflow: hidden;
  opacity: 0;
  animation: app-splash-fade-in 0.3s ease 0.9s forwards;
}

.app-splash__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;
  border-radius: 3px;
  background: #FFA600;
  animation: app-splash-slide 1.1s ease-in-out 0.9s infinite;
}

@keyframes app-splash-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes app-splash-fill {
  to {
    fill-opacity: 1;
    stroke-opacity: 0;
  }
}

@keyframes app-splash-fade-in {
  to {
    opacity: 1;
  }
}

@keyframes app-splash-slide {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(250%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-splash__logo path {
    animation: none;
    fill-opacity: 1;
    stroke: none;
  }

  .app-splash__bar {
    animation: none;
    opacity: 1;
  }

  .app-splash__bar::after {
    animation: none;
    width: 100%;
  }
}
