:root {
  color-scheme: dark;
  --color-background: #111113;
  --color-surface: #1c1b1d;
  --color-text: #e8e2d8;
  --color-muted: #a9a198;
  --color-gold: #e8b75d;
  --color-gold-light: #f8d594;
  --color-red: #bd2432;
  --font-sans: 'Avenir Next', Avenir, 'Segoe UI', sans-serif;
  --font-display: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--color-background);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--color-text);
  background:
    linear-gradient(rgb(255 255 255 / 1%), transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 1%), transparent 1px),
    radial-gradient(circle at 50% -20%, #3b2a19 0, #1b1b1e 38%, var(--color-background) 72%);
  background-size: 72px 72px, 72px 72px, auto;
  font-family: var(--font-sans);
}

body::before {
  position: fixed;
  z-index: 10;
  inset: 0;
  border: 8px solid var(--color-background);
  box-shadow: inset 0 0 0 1px rgb(232 183 93 / 22%);
  content: '';
  pointer-events: none;
}

.launch-page {
  position: relative;
  display: grid;
  min-height: 100svh;
  padding: 36px clamp(28px, 6vw, 96px) 28px;
  overflow: hidden;
  grid-template-rows: auto 1fr auto;
  isolation: isolate;

  .launch-page__glow {
    position: absolute;
    z-index: -2;
    width: 42vw;
    height: 42vw;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.13;
  }

  .launch-page__glow--gold {
    top: -26vw;
    left: 8vw;
    background: var(--color-gold);
  }

  .launch-page__glow--red {
    right: -22vw;
    bottom: -30vw;
    background: var(--color-red);
  }

  .launch-page__header,
  .launch-page__footer {
    display: flex;
    width: 100%;
    max-width: 1440px;
    margin-inline: auto;
    align-items: center;
    justify-content: space-between;
  }

  .launch-page__header {
    gap: 28px;
  }

  .launch-page__logo {
    width: 168px;
    height: auto;
  }

  .launch-page__status {
    display: flex;
    gap: 10px;
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 700;
    align-items: center;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  .launch-page__status::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-gold);
    box-shadow: 0 0 18px var(--color-gold);
    content: '';
  }

  .launch-page__hero {
    display: grid;
    width: 100%;
    max-width: 1440px;
    margin-inline: auto;
    padding-block: clamp(36px, 6vh, 96px);
    align-items: center;
    gap: clamp(52px, 8vw, 128px);
    grid-template-columns: minmax(0, 1.04fr) minmax(360px, 0.96fr);
  }

  .launch-page__copy {
    max-width: 740px;
  }

  .launch-page__eyebrow {
    display: flex;
    margin: 0 0 24px;
    gap: 12px;
    color: var(--color-gold-light);
    font-size: 12px;
    font-weight: 800;
    align-items: center;
    letter-spacing: 0.24em;
    text-transform: uppercase;
  }

  .launch-page__eyebrow span {
    width: 44px;
    height: 1px;
    background: var(--color-gold);
  }

  h1 {
    max-width: 720px;
    margin: 0;
    color: #fff8e9;
    font-family: var(--font-display);
    font-size: clamp(58px, min(7.3vw, 10.5vh), 116px);
    font-weight: 400;
    line-height: 0.88;
    letter-spacing: 0.012em;
    text-wrap: balance;
    text-transform: uppercase;
    text-shadow: 0 5px 32px rgb(0 0 0 / 62%);
  }

  .launch-page__intro {
    max-width: 620px;
    margin: 30px 0 0;
    color: var(--color-muted);
    font-size: clamp(17px, 1.5vw, 21px);
    line-height: 1.65;
  }

  .launch-page__seal {
    display: inline-flex;
    margin-top: 34px;
    padding: 11px 17px 11px 12px;
    border: 1px solid rgb(232 183 93 / 48%);
    border-radius: 4px;
    gap: 10px;
    color: var(--color-gold-light);
    background: rgb(41 34 22 / 64%);
    font-size: 12px;
    font-weight: 800;
    align-items: center;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  .launch-page__seal-crown {
    display: grid;
    width: 28px;
    height: 28px;
    border-radius: 2px;
    color: #1a1410;
    background: var(--color-gold);
    font-size: 18px;
    place-items: center;
  }

  .launch-page__footer {
    padding-top: 24px;
    border-top: 1px solid rgb(232 183 93 / 20%);
    gap: 32px;
    color: #817a73;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
  }

  .launch-page__footer p {
    margin: 0;
  }
}

.dice-scene {
  position: relative;
  min-height: 500px;
  perspective: 900px;

  .dice-scene__orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(34vw, 480px);
    height: min(34vw, 480px);
    border: 1px solid rgb(232 183 93 / 22%);
    border-radius: 50%;
    box-shadow:
      0 0 0 34px rgb(232 183 93 / 3%),
      0 0 0 68px rgb(232 183 93 / 2%);
    transform: translate(-50%, -50%);
  }

  .dice-scene__orbit::before,
  .dice-scene__orbit::after {
    position: absolute;
    border: 1px solid rgb(232 183 93 / 12%);
    border-radius: 50%;
    content: '';
  }

  .dice-scene__orbit::before {
    inset: 12%;
  }

  .dice-scene__orbit::after {
    inset: 34%;
    background: radial-gradient(circle, rgb(232 183 93 / 14%), transparent 72%);
  }

  .dice-scene__spark {
    position: absolute;
    color: var(--color-gold);
    text-shadow: 0 0 18px rgb(232 183 93 / 78%);
    animation: shimmer 3.2s ease-in-out infinite;
  }

  .dice-scene__spark--one {
    top: 13%;
    left: 20%;
    font-size: 32px;
  }

  .dice-scene__spark--two {
    right: 11%;
    bottom: 23%;
    font-size: 24px;
    animation-delay: -1.1s;
  }

  .dice-scene__spark--three {
    top: 26%;
    right: 16%;
    font-size: 18px;
    animation-delay: -2.2s;
  }
}

.die {
  position: absolute;
  display: grid;
  width: clamp(148px, 14vw, 206px);
  aspect-ratio: 1;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 16%;
  box-shadow:
    0 42px 70px rgb(0 0 0 / 52%),
    inset 0 1px 1px rgb(255 255 255 / 24%),
    inset 0 -8px 16px rgb(0 0 0 / 22%);
  grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  transform-style: preserve-3d;

  .die__pip {
    width: 22%;
    aspect-ratio: 1;
    border-radius: 50%;
    align-self: center;
    justify-self: center;
  }

  .die__pip--top-left {
    grid-area: 1 / 1;
  }

  .die__pip--top-right {
    grid-area: 1 / 3;
  }

  .die__pip--center {
    grid-area: 2 / 2;
  }

  .die__pip--bottom-left {
    grid-area: 3 / 1;
  }

  .die__pip--bottom-right {
    grid-area: 3 / 3;
  }
}

.die--dark {
  z-index: 2;
  top: 22%;
  left: 12%;
  background: linear-gradient(145deg, #38363a, #121214 76%);
  transform: rotate(-16deg) rotateX(8deg) rotateY(12deg);
  animation: float-dark 7s ease-in-out infinite;

  .die__pip {
    background: var(--color-gold-light);
    box-shadow:
      inset 0 2px 3px rgb(255 255 255 / 48%),
      0 0 12px rgb(232 183 93 / 24%);
  }
}

.die--red {
  z-index: 3;
  right: 5%;
  bottom: 13%;
  background: linear-gradient(145deg, #e14652, #8c101f 76%);
  transform: rotate(13deg) rotateX(-7deg) rotateY(-9deg);
  animation: float-red 8s ease-in-out infinite;

  .die__pip {
    background: #fff3db;
    box-shadow: inset 0 2px 3px rgb(255 255 255 / 72%);
  }
}

@keyframes float-dark {
  0%,
  100% {
    transform: rotate(-16deg) rotateX(8deg) rotateY(12deg) translateY(0);
  }

  50% {
    transform: rotate(-13deg) rotateX(8deg) rotateY(12deg) translateY(-14px);
  }
}

@keyframes float-red {
  0%,
  100% {
    transform: rotate(13deg) rotateX(-7deg) rotateY(-9deg) translateY(0);
  }

  50% {
    transform: rotate(10deg) rotateX(-7deg) rotateY(-9deg) translateY(16px);
  }
}

@keyframes shimmer {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.9) rotate(0deg);
  }

  50% {
    opacity: 1;
    transform: scale(1.15) rotate(14deg);
  }
}

@media (max-width: 900px) {
  .launch-page {
    .launch-page__hero {
      padding-block: 72px 52px;
      gap: 48px;
      grid-template-columns: 1fr;
    }

    .launch-page__copy {
      position: relative;
      z-index: 4;
    }

    h1 {
      max-width: 760px;
      font-size: clamp(58px, 13vw, 94px);
    }
  }

  .dice-scene {
    min-height: 380px;
    margin-top: -24px;

    .dice-scene__orbit {
      width: 360px;
      height: 360px;
    }
  }

  .die--dark {
    left: 22%;
  }

  .die--red {
    right: 20%;
  }
}

@media (max-height: 760px) and (min-width: 901px) {
  .launch-page {
    padding-top: 28px;

    .launch-page__logo {
      width: 144px;
    }

    .launch-page__intro {
      margin-top: 22px;
      font-size: 16px;
    }

    .launch-page__seal {
      margin-top: 22px;
    }

    .launch-page__footer {
      padding-top: 18px;
    }
  }

  .dice-scene {
    min-height: 390px;
  }
}

@media (max-width: 600px) {
  body::before {
    border-width: 5px;
  }

  .launch-page {
    padding: 24px 24px 20px;

    .launch-page__logo {
      width: 136px;
    }

    .launch-page__status {
      max-width: 110px;
      font-size: 9px;
      line-height: 1.45;
    }

    .launch-page__hero {
      padding-block: 70px 30px;
    }

    h1 {
      font-size: clamp(52px, 17vw, 76px);
      line-height: 0.92;
    }

    .launch-page__intro {
      margin-top: 24px;
      font-size: 16px;
      line-height: 1.55;
    }

    .launch-page__seal {
      margin-top: 28px;
    }

    .launch-page__footer {
      align-items: flex-start;
      flex-direction: column;
      gap: 10px;
      font-size: 9px;
      line-height: 1.5;
    }
  }

  .dice-scene {
    min-height: 310px;

    .dice-scene__orbit {
      width: 270px;
      height: 270px;
    }
  }

  .die {
    width: 126px;
  }

  .die--dark {
    top: 15%;
    left: 8%;
  }

  .die--red {
    right: 4%;
    bottom: 10%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .die,
  .dice-scene .dice-scene__spark {
    animation: none;
  }
}
