@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./fonts/space-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark;
  --title-spacing: -0.01em;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background-color: #02030a;
  color: #fff;
  font-family: "Space Grotesk", "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.splash {
  --roll-duration: 720ms;
  --roll-easing: cubic-bezier(0.76, 0, 0.24, 1);
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: radial-gradient(
    125% 95% at 50% 112%,
    #8fbbef 0%,
    #5c92d2 13%,
    #3d70ae 28%,
    #2d4a80 45%,
    #1a2b4e 62%,
    #0e1a31 80%,
    #071023 100%
  );
}

.splash__tint {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--roll-duration) var(--roll-easing);
}

.splash__tint--commerce {
  background: radial-gradient(
    125% 95% at 50% 112%,
    #8ef0bd 0%,
    #53c99b 13%,
    #2f9478 28%,
    #226a5c 45%,
    #174a41 62%,
    #0c2b25 80%,
    #051410 100%
  );
}

.splash__tint--mobile {
  background: radial-gradient(
    125% 95% at 50% 112%,
    #9ccaff 0%,
    #5e9bf0 13%,
    #3f70c0 28%,
    #2f4f92 45%,
    #243a6c 62%,
    #122142 80%,
    #070f20 100%
  );
}

.splash__tint--gamedev {
  background: radial-gradient(
    125% 95% at 50% 112%,
    #f0a2e4 0%,
    #d96fce 13%,
    #a84fae 28%,
    #71377e 45%,
    #522a5c 62%,
    #2d1636 80%,
    #14081a 100%
  );
}

.splash[data-tint="commerce"] .splash__tint--commerce,
.splash[data-tint="mobile"] .splash__tint--mobile,
.splash[data-tint="gamedev"] .splash__tint--gamedev {
  opacity: 1;
}

.splash__sky {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: manipulation;
}

.splash__title {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  margin: 0;
  margin-right: calc(var(--title-spacing) * -1);
  color: #fff;
  font-size: clamp(3rem, 11vw, 10rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: var(--title-spacing);
  pointer-events: none;
  user-select: none;
}

.splash__prefix {
  text-shadow:
    0 0 0.06em rgba(255, 255, 255, 0.55),
    0 0 0.45em rgba(132, 189, 255, 0.38),
    0 0 1.2em rgba(92, 150, 235, 0.24);
}

.splash__roller {
  position: relative;
  display: inline-block;
  box-sizing: content-box;
  width: 2.95em;
  height: 1em;
  padding-right: 50vw;
  margin-right: -50vw;
  overflow: hidden;
  transition: width var(--roll-duration) var(--roll-easing);
}

.splash__track {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transform: translateY(calc(var(--roll-index, 0) * -1em));
  transition: transform var(--roll-duration) var(--roll-easing);
}

.splash__word {
  width: max-content;
  height: 1em;
  line-height: 1;
  white-space: nowrap;
}

.splash__word--space {
  color: #ffffff;
}

.splash__word--commerce {
  color: #4ade80;
}

.splash__word--mobile {
  color: #5aa9ff;
}

.splash__word--gamedev {
  color: #f25fdd;
}

.splash__track--instant {
  transition: none;
}

.splash__roller--instant {
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .splash__roller,
  .splash__track,
  .splash__tint {
    transition: none;
  }
}
