html,
body {
  margin: 0;
  background: #1a1a1a;
}
:root {
  --color-splash-bg: #1a1a1a;
  --color-splash-text: #ffffff;
  --color-splash-progress-fill: #00c8ff;
  --gradient-splash-progress-track: linear-gradient(90deg, #363636 0%, #3f3f3f 100%);
  --width-splash-progress: 333px;
  --height-splash-progress: 15px;
  --radius-splash-progress: 20px;
  --size-splash-logo: 24px;
  --size-splash-animation: 168px;
  --font-size-splash-brand: 20px;
  --font-size-splash-tagline: 15px;
  --gap-splash-body: 6px;
  --splash-gap-tagline-progress: 15px;
  --splash-gap-progress-duck: 39px;
  --splash-brand-height: 24px;
  --splash-tagline-height: 18px;
  --splash-sticker-offset-x: 122px;
  --splash-sticker-offset-y-top: 112px;
  --splash-sticker-offset-y-bottom: 94px;
  --splash-sticker-scale: 0.72;
  --splash-sticker-size-frog: calc(115.71px * var(--splash-sticker-scale));
  --splash-sticker-size-helmet: calc(133.2px * var(--splash-sticker-scale));
  --splash-sticker-size-watch: calc(143.24px * var(--splash-sticker-scale));
  --splash-sticker-size-crystals: calc(130.02px * var(--splash-sticker-scale));
  --splash-progress-duration: 2.2s;
  --splash-compose-shift-y: -45px;
  --splash-fullscreen-top-inset: 0px;
  --layout-max-width: 430px;
  --layout-gutter: 30px;
  --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  --font-weight-bold: 700;
  --font-weight-light: 300;
}

.splash-screen {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  background: var(--color-splash-bg);
  box-sizing: border-box;
  overflow: hidden;
  position: fixed;
  inset: 0;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.48s ease;
}

.splash-screen--settled .splash-screen__sticker {
  opacity: 1;
  animation: none;
  transform: var(--sticker-to);
}

.splash-screen[hidden],
#boot-splash[hidden] {
  display: none !important;
}

.splash-screen--exit {
  opacity: 0;
  pointer-events: none;
}

.splash-screen__viewport {
  position: relative;
  width: 100%;
  max-width: var(--layout-max-width);
  height: 100dvh;
  margin: 0 auto;
}

.splash-screen__stickers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.splash-screen__sticker {
  position: absolute;
  left: 50%;
  top: calc(50% + var(--splash-compose-shift-y) + var(--splash-fullscreen-top-inset));
  object-fit: contain;
  user-select: none;
  pointer-events: none;
  opacity: 0;
  animation: splash-sticker-in 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.splash-screen__sticker--frog {
  width: var(--splash-sticker-size-frog);
  --sticker-from: translate(calc(-50% - var(--splash-sticker-offset-x)), calc(-50% - var(--splash-sticker-offset-y-top)))
    scale(0.52);
  --sticker-to: translate(calc(-50% - var(--splash-sticker-offset-x)), calc(-50% - var(--splash-sticker-offset-y-top)))
    scale(1);
  animation-delay: 0.04s;
}

.splash-screen__sticker--helmet {
  width: var(--splash-sticker-size-helmet);
  --sticker-from: translate(calc(-50% + var(--splash-sticker-offset-x)), calc(-50% - var(--splash-sticker-offset-y-top)))
    scale(0.52);
  --sticker-to: translate(calc(-50% + var(--splash-sticker-offset-x)), calc(-50% - var(--splash-sticker-offset-y-top)))
    scale(1);
  animation-delay: 0.14s;
}

.splash-screen__sticker--watch {
  width: var(--splash-sticker-size-watch);
  --sticker-from: translate(calc(-50% - var(--splash-sticker-offset-x)), calc(-50% + var(--splash-sticker-offset-y-bottom)))
    scale(0.52);
  --sticker-to: translate(calc(-50% - var(--splash-sticker-offset-x)), calc(-50% + var(--splash-sticker-offset-y-bottom)))
    scale(1);
  animation-delay: 0.22s;
}

.splash-screen__sticker--crystals {
  width: var(--splash-sticker-size-crystals);
  --sticker-from: translate(calc(-50% + var(--splash-sticker-offset-x)), calc(-50% + var(--splash-sticker-offset-y-bottom)))
    scale(0.52);
  --sticker-to: translate(calc(-50% + var(--splash-sticker-offset-x)), calc(-50% + var(--splash-sticker-offset-y-bottom)))
    scale(1);
  animation-delay: 0.3s;
}

.splash-screen__sticker-float {
  display: block;
  width: 100%;
  transform-origin: center center;
  animation: splash-sticker-float 3.9s ease-in-out infinite;
}

.splash-screen__sticker--helmet .splash-screen__sticker-float {
  animation-duration: 4.5s;
  animation-delay: -0.8s;
}

.splash-screen__sticker--watch .splash-screen__sticker-float {
  animation-duration: 4.1s;
  animation-delay: -1.4s;
}

.splash-screen__sticker--crystals .splash-screen__sticker-float {
  animation-duration: 4.7s;
  animation-delay: -0.4s;
}

.splash-screen__sticker-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.splash-screen__sticker--frog .splash-screen__sticker-img {
  transform: rotate(23deg);
}

.splash-screen__sticker--helmet .splash-screen__sticker-img {
  transform: scaleY(-1) rotate(142.5deg);
}

.splash-screen__sticker--watch .splash-screen__sticker-img {
  transform: rotate(37deg);
}

.splash-screen__sticker--crystals .splash-screen__sticker-img {
  transform: rotate(-36deg);
}

@keyframes splash-sticker-in {
  from {
    opacity: 0;
    transform: var(--sticker-from);
  }
  to {
    opacity: 1;
    transform: var(--sticker-to);
  }
}

@keyframes splash-sticker-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-2.4deg);
  }
  25% {
    transform: translate3d(4px, -9px, 0) rotate(2.2deg);
  }
  50% {
    transform: translate3d(-3px, -15px, 0) rotate(-1.6deg);
  }
  75% {
    transform: translate3d(3px, -7px, 0) rotate(3deg);
  }
}

.splash-screen__brand-row {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(
    50% - var(--splash-compose-shift-y) - var(--splash-fullscreen-top-inset) +
      (var(--height-splash-progress) / 2) + var(--splash-gap-tagline-progress) +
      var(--splash-tagline-height) + var(--gap-splash-body)
  );
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  z-index: 3;
}

.splash-screen__logo {
  display: block;
  width: var(--size-splash-logo);
  height: var(--size-splash-logo);
  object-fit: contain;
  flex-shrink: 0;
  transform: scaleY(-1) rotate(180deg);
}

.splash-screen__brand {
  margin: 0;
  font-family: var(--font-family-base);
  font-size: var(--font-size-splash-brand);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  color: var(--color-splash-text);
}

.splash-screen__tagline {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(
    50% - var(--splash-compose-shift-y) - var(--splash-fullscreen-top-inset) +
      (var(--height-splash-progress) / 2) + var(--splash-gap-tagline-progress)
  );
  margin: 0;
  font-family: var(--font-family-base);
  font-size: var(--font-size-splash-tagline);
  font-weight: var(--font-weight-light);
  line-height: 1.2;
  height: var(--splash-tagline-height);
  color: var(--color-splash-text);
  text-align: center;
  white-space: nowrap;
  z-index: 3;
}

.splash-screen__progress {
  position: absolute;
  left: 50%;
  top: calc(50% + var(--splash-compose-shift-y) + var(--splash-fullscreen-top-inset));
  transform: translate(-50%, -50%);
  width: min(var(--width-splash-progress), calc(100% - 2 * var(--layout-gutter)));
  height: var(--height-splash-progress);
  margin: 0;
  border-radius: var(--radius-splash-progress);
  background: var(--gradient-splash-progress-track);
  overflow: hidden;
  z-index: 3;
}

.splash-screen__progress-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--color-splash-progress-fill);
  animation: splash-progress-fill var(--splash-progress-duration) ease-out forwards;
}

@keyframes splash-progress-fill {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}

.splash-screen__animation {
  position: absolute;
  left: 50%;
  top: calc(
    50% + var(--splash-compose-shift-y) + var(--splash-fullscreen-top-inset) +
      (var(--height-splash-progress) / 2) + var(--splash-gap-progress-duck)
  );
  transform: translateX(-50%);
  width: var(--size-splash-animation);
  height: var(--size-splash-animation);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}

.splash-screen__animation svg {
  width: 100% !important;
  height: 100% !important;
}

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

  .splash-screen__sticker {
    opacity: 1;
    animation: none;
    transform: var(--sticker-to);
  }

  .splash-screen__sticker-float,
  .splash-screen__progress-fill {
    animation: none;
  }

  .splash-screen__progress-fill {
    width: 100%;
  }
}
