.app-splash {
  --app-splash-background:
    radial-gradient(circle at 47% 45%, rgba(37, 99, 235, 0.16), transparent 24rem),
    linear-gradient(145deg, #d5dde8 0%, #e9eef5 52%, #dce4ef 100%);
  --app-splash-orb-top: rgba(37, 99, 235, 0.16);
  --app-splash-orb-bottom: rgba(14, 165, 233, 0.1);
  --app-splash-wordmark-color: #03063b;
  --app-splash-icon-contrast-color: #03063b;
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: grid;
  overflow: hidden;
  place-items: center;
  background: var(--app-splash-background);
  color: #fff;
}

html.dark .app-splash,
html[data-tema='dark'] .app-splash {
  --app-splash-background:
    radial-gradient(circle at 47% 45%, rgba(37, 99, 235, 0.14), transparent 24rem),
    linear-gradient(145deg, #050b16 0%, #091224 54%, #0c1526 100%);
  --app-splash-orb-top: rgba(37, 99, 235, 0.18);
  --app-splash-orb-bottom: rgba(14, 165, 233, 0.12);
  --app-splash-wordmark-color: #e9eef5;
  --app-splash-icon-contrast-color: #e9eef5;
}

.app-splash[hidden] {
  display: none;
}

html.app-splash-is-pending,
html.app-splash-is-pending body {
  overflow: hidden;
}

html.app-splash-is-pending body > :not(#app-splash) {
  visibility: hidden !important;
}

html.app-splash-is-pending #app-loading,
html.app-splash-is-pending .app-loading {
  display: none !important;
}

html.app-splash-is-pending #app-splash[hidden] {
  display: grid !important;
}

.app-splash::before,
.app-splash::after {
  position: absolute;
  border-radius: 999px;
  content: '';
  filter: blur(34px);
  opacity: 0.42;
  pointer-events: none;
}

.app-splash::before {
  width: 18rem;
  height: 18rem;
  top: -9rem;
  right: -7rem;
  background: var(--app-splash-orb-top);
}

.app-splash::after {
  width: 16rem;
  height: 16rem;
  bottom: -9rem;
  left: -7rem;
  background: var(--app-splash-orb-bottom);
}

.app-splash--leaving {
  animation: app-splash-leave 360ms ease forwards;
}

.app-splash__brand {
  position: relative;
  display: grid;
  width: min(76vw, 46rem);
  justify-items: center;
  transform: translateY(-0.4rem);
}

.app-splash__logo {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 24px 48px rgba(2, 6, 23, 0.42));
}

.app-splash__icon-loader {
  transform-box: fill-box;
  transform-origin: center;
  animation: app-splash-icon-complete 420ms ease 880ms both;
}

.app-splash__piece {
  opacity: 0;
  transform: translateY(18px) scale(0.82) rotate(-8deg);
  transform-box: fill-box;
  transform-origin: center;
  animation: app-splash-piece 360ms cubic-bezier(0.2, 0.9, 0.24, 1.18) forwards;
  animation-delay: calc(80ms + (var(--app-splash-piece-index) * 86ms));
}

.app-splash__piece--white {
  fill: var(--app-splash-icon-contrast-color);
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.16));
}

.app-splash__wordmark {
  fill: var(--app-splash-wordmark-color);
}

.app-splash__letter {
  opacity: 0;
  transform: translateX(-14px) scale(0.97);
  transform-box: fill-box;
  transform-origin: center;
  animation: app-splash-letter 360ms ease forwards;
  animation-delay: calc(1000ms + (var(--app-splash-letter-index) * 115ms));
}

.app-splash__letter--e {
  opacity: 1;
  transform: none;
  animation: none;
}

.app-splash__letter--x {
  animation-delay: 1380ms;
}

.app-splash__e-bar {
  opacity: 0;
  transform: translateY(-72px) scaleY(0.9);
  transform-box: fill-box;
  transform-origin: center;
  filter: drop-shadow(0 0 0 rgba(248, 250, 252, 0));
  animation: app-splash-e-bar 440ms cubic-bezier(0.18, 0.92, 0.28, 1.18) forwards;
  animation-delay: calc(1680ms + (var(--app-splash-e-index) * 135ms));
}

.app-splash__software {
  fill: var(--app-splash-wordmark-color);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 60px;
  font-weight: 400;
  letter-spacing: -0.035em;
  opacity: 0;
  transform: translateY(10px);
  animation: app-splash-software 360ms ease 2260ms forwards;
}

@keyframes app-splash-piece {
  68% {
    opacity: 1;
    transform: translateY(-2px) scale(1.04) rotate(1deg);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0);
  }
}

@keyframes app-splash-icon-complete {
  50% {
    filter: drop-shadow(0 0 18px rgba(59, 130, 246, 0.42));
    transform: scale(1.025);
  }

  100% {
    filter: drop-shadow(0 12px 26px rgba(37, 99, 235, 0.18));
    transform: scale(1);
  }
}

@keyframes app-splash-letter {
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes app-splash-e-bar {
  0% {
    opacity: 0;
    transform: translateY(-72px) scaleY(0.9);
  }

  62% {
    opacity: 1;
    transform: translateY(7px) scaleY(1.03);
    filter: drop-shadow(0 0 18px rgba(248, 250, 252, 0.18));
  }

  82% {
    opacity: 1;
    transform: translateY(-2px) scaleY(1);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scaleY(1);
    filter: drop-shadow(0 0 0 rgba(248, 250, 252, 0));
  }
}

@keyframes app-splash-software {
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes app-splash-leave {
  to {
    opacity: 0;
    transform: scale(1.012);
    visibility: hidden;
  }
}

@media (max-width: 640px) {
  .app-splash__brand {
    width: min(86vw, 25rem);
  }

  .app-splash__software {
    font-size: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-splash,
  .app-splash *,
  .app-splash::before,
  .app-splash::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
  }
}
