:root {
  --color-bg-canvas: #e6e3dc;
  --color-bg-base: var(--color-bg-canvas);
  --color-text-secondary: #6e7369;
  --font-display: 'Nunito', 'Manrope', system-ui, sans-serif;
  --layout-height: 100vh;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-30: 120px;
}

@supports (height: 100dvh) {
  :root {
    --layout-height: 100dvh;
  }
}

[data-theme='dark'] {
  --color-bg-canvas: #1e1e1e;
  --color-bg-base: var(--color-bg-canvas);
  --color-text-secondary: #bfb396;
}

html,
body {
  margin: 0;
}

body {
  background-color: var(--color-bg-base);
}

.static-splash {
  background-color: var(--color-bg-base);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  inset: 0;
  overflow: hidden;
  position: fixed;
  width: 100%;
  z-index: 10000;
}

.static-splash__corner-tl,
.static-splash__corner-tr,
.static-splash__corner-br,
.static-splash__corner-bl,
.static-splash__cake {
  backface-visibility: hidden;
  pointer-events: none;
  position: absolute;
  will-change: transform, opacity;
  z-index: 0;
}

.static-splash__corner-tl {
  left: 0;
  max-width: min(40vw, 158px);
  opacity: 0;
  top: 0;
  transform: translate(-28px, -28px);
}

.static-splash__corner-tr {
  max-width: min(52vw, 209px);
  opacity: 0;
  right: 0;
  top: 0;
  transform: translate(28px, -28px);
}

.static-splash__corner-bl {
  bottom: 0;
  left: 0;
  max-width: min(63vw, 259px);
  opacity: 0;
  transform: translate(-28px, 28px);
}

.static-splash__corner-br {
  bottom: 0;
  max-width: min(73vw, 303px);
  opacity: 0;
  right: 0;
  transform: translate(28px, 28px);
}

.static-splash__cake {
  bottom: 0;
  left: 0;
  max-width: min(42vw, 173px);
  opacity: 0;
  transform: translate(-28px, 28px);
}

.static-splash--playing .static-splash__corner-tl {
  animation: static-splash-corner-tl 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.static-splash--playing .static-splash__corner-tr {
  animation: static-splash-corner-tr 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
}

.static-splash--playing .static-splash__corner-bl {
  animation: static-splash-corner-bl 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
}

.static-splash--playing .static-splash__corner-br {
  animation: static-splash-corner-br 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
}

.static-splash--playing .static-splash__cake {
  animation: static-splash-cake 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
}

.static-splash__brand {
  align-items: center;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  margin-top: calc(-1 * var(--space-30));
  padding: max(env(safe-area-inset-top, 0px), var(--space-8)) var(--space-6) var(--space-4);
  position: relative;
  z-index: 1;
}

.static-splash__rings {
  height: auto;
  margin-bottom: var(--space-6);
  opacity: 0;
  transform: scale(0.8) translate(6px, 14px);
  transform-origin: 50% 88%;
  width: min(118px, 31vw);
}

.static-splash__wordmark {
  height: auto;
  margin-bottom: var(--space-4);
  opacity: 0;
  transform: translateY(10px);
  width: min(209px, 51vw);
}

.static-splash__tagline {
  color: var(--color-text-secondary);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.4;
  margin: 0;
  opacity: 0;
  text-align: center;
  white-space: pre-wrap;
}

.static-splash--playing .static-splash__rings {
  animation:
    static-splash-rings-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both,
    static-splash-rings-wobble 2.2s ease-in-out 0.85s infinite;
}

.static-splash--playing .static-splash__wordmark {
  animation: static-splash-wordmark-in 0.5s ease-out 0.65s both;
}

.static-splash--playing .static-splash__tagline {
  animation: static-splash-fade-in 0.45s ease-out 1s both;
}

@media (height <= 825px) {
  .static-splash__corner-tl,
  .static-splash__corner-tr {
    max-height: 40vh;
    width: auto;
  }

  .static-splash__corner-bl,
  .static-splash__corner-br {
    max-height: 50vh;
    width: auto;
  }

  .static-splash__cake {
    max-height: 50vh;
    width: auto;
  }

  .static-splash__brand {
    margin-top: calc(-1 * var(--space-12));
  }
}

@supports (height: 100dvh) {
  @media (height <= 825px) {
    .static-splash__corner-tl,
    .static-splash__corner-tr {
      max-height: 40dvh;
    }

    .static-splash__corner-bl,
    .static-splash__corner-br,
    .static-splash__cake {
      max-height: 50dvh;
    }
  }
}

@keyframes static-splash-rings-in {
  from {
    opacity: 0;
    transform: scale(0.8) translate(6px, 14px);
  }

  to {
    opacity: 1;
    transform: rotate(0deg) translate(6px, 0);
  }
}

@keyframes static-splash-rings-wobble {
  0%,
  100% {
    transform: rotate(-10deg) translate(6px, 0);
  }

  50% {
    transform: rotate(10deg) translate(6px, 0);
  }
}

@keyframes static-splash-wordmark-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes static-splash-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes static-splash-corner-tl {
  from {
    opacity: 0;
    transform: translate(-28px, -28px);
  }

  to {
    opacity: 1;
    transform: translate(0, 0);
  }
}

@keyframes static-splash-corner-tr {
  from {
    opacity: 0;
    transform: translate(28px, -28px);
  }

  to {
    opacity: 1;
    transform: translate(0, 0);
  }
}

@keyframes static-splash-corner-bl {
  from {
    opacity: 0;
    transform: translate(-28px, 28px);
  }

  to {
    opacity: 1;
    transform: translate(0, 0);
  }
}

@keyframes static-splash-corner-br {
  from {
    opacity: 0;
    transform: translate(28px, 28px);
  }

  to {
    opacity: 1;
    transform: translate(0, 0);
  }
}

@keyframes static-splash-cake {
  from {
    opacity: 0;
    transform: translate(-28px, 28px);
  }

  to {
    opacity: 1;
    transform: translate(0, 0);
  }
}

.static-splash--fading {
  animation: static-splash-out 0.5s ease-in forwards;
  pointer-events: none;
}

@keyframes static-splash-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
    transform: scale(1.02);
  }
}

@media (prefers-reduced-motion: reduce) {
  .static-splash--playing .static-splash__rings,
  .static-splash--playing .static-splash__wordmark,
  .static-splash--playing .static-splash__tagline,
  .static-splash--playing .static-splash__corner-tl,
  .static-splash--playing .static-splash__corner-tr,
  .static-splash--playing .static-splash__corner-bl,
  .static-splash--playing .static-splash__corner-br,
  .static-splash--playing .static-splash__cake {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .static-splash--playing .static-splash__rings {
    animation: static-splash-rings-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
    transform: translate(6px, 0);
  }

  .static-splash--fading {
    animation: none;
    opacity: 0;
  }
}
