:root {
  --startup-splash-navy: #071a3d;
  --startup-splash-blue: #0d58aa;
  --startup-splash-gold: #ffd25c;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

.startup-splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  min-height: 100dvh;
  padding:
    max(24px, env(safe-area-inset-top))
    24px
    max(24px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  place-items: center;
  overflow: hidden;
  color: #fff;
  text-align: center;
  background:
    linear-gradient(180deg, rgb(3 20 55 / 18%) 0%, rgb(3 17 41 / 48%) 56%, rgb(3 14 34 / 94%) 100%),
    url('/assets/art/back-to-school-keyart.webp') 50% 44% / cover no-repeat,
    linear-gradient(145deg, var(--startup-splash-blue), var(--startup-splash-navy));
  isolation: isolate;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.startup-splash::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: '';
  background:
    radial-gradient(circle at 50% 28%, rgb(255 231 146 / 24%), transparent 25%),
    linear-gradient(90deg, transparent, rgb(255 255 255 / 5%), transparent);
  pointer-events: none;
}

.startup-splash[data-state='leaving'] {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.startup-splash__brand {
  display: grid;
  width: min(320px, calc(100vw - 48px));
  padding: 22px 22px 20px;
  box-sizing: border-box;
  gap: 7px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 28px;
  background: rgb(5 17 43 / 72%);
  box-shadow: 0 24px 70px rgb(0 0 0 / 34%);
  backdrop-filter: blur(14px);
}

.startup-splash__brand img {
  width: 82px;
  height: 82px;
  padding: 7px;
  object-fit: contain;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 32px rgb(0 0 0 / 32%);
}

.startup-splash__brand strong {
  margin-top: 4px;
  color: #fff;
  font: 800 clamp(1.45rem, 7vw, 2rem) / 1.45 Tahoma, Arial, sans-serif;
  text-shadow: 0 3px 12px rgb(0 0 0 / 55%);
}

.startup-splash__brand span {
  color: rgb(255 255 255 / 76%);
  font: 500 0.78rem / 1.8 Tahoma, Arial, sans-serif;
}

.startup-splash__progress {
  position: relative;
  width: min(210px, 72vw);
  height: 7px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(255 255 255 / 13%);
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 30%);
}

.startup-splash__progress i {
  position: absolute;
  inset-block: 0;
  left: -42%;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f3a915, var(--startup-splash-gold), #fff2b0);
  box-shadow: 0 0 16px rgb(255 210 92 / 72%);
  animation: startup-splash-progress 1.15s ease-in-out infinite;
}

@keyframes startup-splash-progress {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(340%);
  }
}

@media (max-height: 560px) {
  .startup-splash__brand {
    padding: 15px 18px;
  }

  .startup-splash__brand img {
    width: 62px;
    height: 62px;
    border-radius: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .startup-splash {
    transition: none;
  }

  .startup-splash__progress i {
    width: 58%;
    animation: none;
    transform: translateX(72%);
  }
}
