:root {
  color-scheme: dark;
  --gold: #ffd557;
  --gold-deep: #ff9f1c;
  --blue: #52c8ff;
  --ink: #020413;
  --white: #fff8dd;
}

* {
  box-sizing: border-box;
}

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

body {
  overflow-x: hidden;
  background: var(--ink);
  color: var(--white);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button {
  font: inherit;
}

.scene {
  position: relative;
  display: grid;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  place-items: center;
  padding: clamp(24px, 4vw, 54px);
}

.hero-art,
.starfield,
.vignette,
.scanlines {
  position: absolute;
  inset: 0;
}

.hero-art {
  z-index: -6;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.02);
}

.starfield {
  z-index: -5;
  opacity: 0.65;
  mix-blend-mode: screen;
}

.vignette {
  z-index: -4;
  background:
    radial-gradient(circle at 50% 52%, rgb(2 4 19 / 0.1), rgb(2 4 19 / 0.58) 66%, rgb(2 4 19 / 0.9)),
    linear-gradient(180deg, rgb(2 4 19 / 0.3), rgb(2 4 19 / 0.78) 78%);
}

.scanlines {
  z-index: -3;
  pointer-events: none;
  opacity: 0.13;
  background-image: linear-gradient(rgb(255 255 255 / 0.22) 1px, transparent 1px);
  background-size: 100% 7px;
}

.hero {
  position: relative;
  z-index: 4;
  width: min(980px, 100%);
  margin-inline: auto;
  text-align: center;
  transform: translateY(-8svh);
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--gold);
  font-size: clamp(0.8rem, 1.2vw, 0.96rem);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgb(255 213 87 / 0.55);
}

h1 {
  margin: 0;
  color: var(--white);
  font-size: clamp(3.2rem, 12vw, 9.8rem);
  line-height: 0.88;
  letter-spacing: 0;
  text-wrap: balance;
  text-shadow:
    0 0 16px rgb(255 213 87 / 0.28),
    0 10px 36px rgb(0 0 0 / 0.74);
}

.subtitle {
  width: min(690px, 100%);
  margin: 24px auto 0;
  color: rgb(255 248 221 / 0.88);
  font-size: clamp(1.08rem, 2vw, 1.5rem);
  line-height: 1.4;
  text-shadow: 0 4px 18px rgb(0 0 0 / 0.74);
  text-wrap: balance;
}

.launch {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  border: 1px solid rgb(255 213 87 / 0.72);
  border-radius: 999px;
  padding: 12px 20px;
  background: rgb(3 6 22 / 0.5);
  color: var(--white);
  cursor: pointer;
  font-weight: 800;
  box-shadow:
    inset 0 0 22px rgb(255 213 87 / 0.12),
    0 0 28px rgb(82 200 255 / 0.24);
  backdrop-filter: blur(12px);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.launch:hover,
.launch:focus-visible {
  border-color: var(--gold);
  box-shadow:
    inset 0 0 24px rgb(255 213 87 / 0.24),
    0 0 40px rgb(255 213 87 / 0.34);
  transform: translateY(-2px);
}

.launch:focus-visible {
  outline: 3px solid rgb(82 200 255 / 0.72);
  outline-offset: 4px;
}

.launch-icon {
  width: 24px;
  height: 24px;
  clip-path: polygon(50% 0, 60% 38%, 100% 50%, 60% 62%, 50% 100%, 40% 62%, 0 50%, 40% 38%);
  background: radial-gradient(circle, #fff 0 18%, var(--gold) 24% 48%, transparent 54%);
  filter: drop-shadow(0 0 10px rgb(255 213 87 / 0.85));
}

.crawl-stage {
  position: absolute;
  z-index: 3;
  bottom: -9svh;
  left: 50%;
  width: min(820px, 94vw);
  height: min(54svh, 500px);
  overflow: hidden;
  perspective: 600px;
  transform: translateX(-50%);
  pointer-events: none;
  mask-image: linear-gradient(transparent, black 24%, black 84%, transparent);
}

.crawl {
  position: absolute;
  right: 0;
  bottom: -60%;
  left: 0;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 3.25vw, 3rem);
  font-weight: 800;
  line-height: 1.36;
  text-align: center;
  text-shadow:
    0 0 18px rgb(255 213 87 / 0.65),
    0 4px 16px rgb(0 0 0 / 0.92);
  transform: rotateX(60deg) translateY(0);
  transform-origin: 50% 100%;
  animation: crawl 38s linear infinite;
}

.crawl h2,
.crawl .episode {
  text-align: center;
}

.crawl h2 {
  margin: 0 0 26px;
  font-size: 1.25em;
}

.crawl p {
  margin: 0 0 30px;
}

.episode {
  margin-bottom: 10px;
  text-transform: uppercase;
}

.laser {
  position: absolute;
  z-index: 2;
  width: min(34vw, 430px);
  height: 7px;
  border-radius: 999px;
  transform-origin: center;
  opacity: 0.85;
  pointer-events: none;
}

.laser-blue {
  right: -7vw;
  top: 24svh;
  background: linear-gradient(90deg, transparent, #dff7ff, var(--blue));
  box-shadow: 0 0 18px var(--blue), 0 0 42px rgb(82 200 255 / 0.76);
  transform: rotate(-18deg);
  animation: laserDriftBlue 6s ease-in-out infinite;
}

.laser-gold {
  left: -8vw;
  bottom: 21svh;
  background: linear-gradient(90deg, var(--gold-deep), #fff2a8, transparent);
  box-shadow: 0 0 18px var(--gold-deep), 0 0 42px rgb(255 159 28 / 0.7);
  transform: rotate(14deg);
  animation: laserDriftGold 6.5s ease-in-out infinite;
}

.ship {
  position: absolute;
  z-index: 1;
  width: 56px;
  height: 24px;
  opacity: 0.82;
  filter: drop-shadow(0 0 12px rgb(82 200 255 / 0.45));
  clip-path: polygon(0 44%, 70% 0, 100% 50%, 70% 100%, 0 56%, 16% 50%);
  background: linear-gradient(90deg, #28344c, #d8b77a 48%, #5ed1ff 51%, transparent 57%);
}

.ship-one {
  top: 18svh;
  left: 14vw;
  animation: shipOne 18s linear infinite;
}

.ship-two {
  right: 9vw;
  bottom: 31svh;
  width: 38px;
  height: 17px;
  opacity: 0.62;
  transform: rotate(-7deg);
  animation: shipTwo 24s linear infinite;
}

.burst-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.spark {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 16px rgb(255 213 87 / 0.95);
  animation: spark 900ms ease-out forwards;
}

@keyframes crawl {
  from {
    transform: rotateX(60deg) translateY(0);
  }

  to {
    transform: rotateX(60deg) translateY(-132%);
  }
}

@keyframes laserDriftBlue {
  50% {
    transform: translate(-18px, 6px) rotate(-18deg);
  }
}

@keyframes laserDriftGold {
  50% {
    transform: translate(20px, -5px) rotate(14deg);
  }
}

@keyframes shipOne {
  from {
    transform: translate(-18vw, 6svh) rotate(-13deg);
  }

  to {
    transform: translate(110vw, -18svh) rotate(-13deg);
  }
}

@keyframes shipTwo {
  from {
    transform: translate(24vw, 8svh) rotate(-8deg);
  }

  to {
    transform: translate(-112vw, -6svh) rotate(-8deg);
  }
}

@keyframes spark {
  from {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }

  to {
    opacity: 0;
    transform: translate(var(--spark-x), var(--spark-y)) scale(0.15);
  }
}

@media (max-width: 760px) {
  .scene {
    min-height: 100dvh;
    padding: 22px;
  }

  .hero {
    transform: translateY(-6svh);
  }

  .subtitle {
    margin-top: 18px;
  }

  .launch {
    max-width: 100%;
    justify-content: center;
    white-space: normal;
  }

  .crawl-stage {
    bottom: -6svh;
    width: 96vw;
    height: 47svh;
    perspective: 520px;
    mask-image: linear-gradient(transparent, black 26%, black 84%, transparent);
  }

  .crawl {
    bottom: -56%;
    font-size: clamp(1.25rem, 6.4vw, 1.95rem);
    line-height: 1.36;
  }

  .laser {
    width: 58vw;
  }

  .laser-blue {
    right: -24vw;
    top: 22svh;
  }

  .laser-gold {
    left: -28vw;
    bottom: 20svh;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
