:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #080908;
  color: #f8f7ef;
}

* {
  box-sizing: border-box;
}

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

body {
  overflow: hidden;
}

.page {
  position: relative;
  display: grid;
  min-height: 100svh;
  isolation: isolate;
  place-items: start center;
  padding: clamp(24px, 5vw, 72px);
  background: #080908 url("assets/poster.jpg") center / cover no-repeat;
}

.hero-video,
.scrim {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-video {
  z-index: -3;
  object-fit: cover;
  opacity: 0;
  transition: opacity 900ms ease;
}

.hero-video.is-ready {
  opacity: 1;
}

.scrim {
  z-index: -2;
  background:
    radial-gradient(circle at center, rgba(8, 9, 8, 0.18), rgba(8, 9, 8, 0.48) 58%, rgba(8, 9, 8, 0.72)),
    linear-gradient(0deg, rgba(8, 9, 8, 0.46), rgba(8, 9, 8, 0.12));
}

.hero {
  width: min(680px, 100%);
  padding-top: clamp(42px, 11vh, 112px);
  text-align: center;
}

h1 {
  position: relative;
  max-width: 12ch;
  margin: 0 auto;
  font-family: "Audiowide", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(24px, 3.7vw, 52px);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: 0;
  text-transform: uppercase;
  color: rgba(248, 247, 239, 0.68);
  text-shadow: 0 0 26px rgba(232, 198, 95, 0.12), 0 8px 38px rgba(0, 0, 0, 0.36);
}

.glitch::before,
.glitch::after {
  position: absolute;
  inset: 0;
  content: attr(data-text);
  white-space: pre-line;
  pointer-events: none;
  opacity: 0.38;
  mix-blend-mode: screen;
}

.glitch::before {
  color: rgba(71, 218, 255, 0.48);
  transform: translate(-1px, 0);
  animation: glitch-shift 2.8s infinite steps(1);
}

.glitch::after {
  color: rgba(255, 70, 112, 0.42);
  transform: translate(1px, 0);
  animation: glitch-slice 3.4s infinite steps(1);
}

.lead {
  margin: 16px auto 0;
  font-size: clamp(13px, 0.9vw, 15px);
  font-weight: 700;
  line-height: 1.45;
  color: rgba(248, 247, 239, 0.48);
}

@keyframes glitch-shift {
  0%, 88%, 100% {
    clip-path: inset(0 0 0 0);
    transform: translate(0, 0);
  }

  89% {
    clip-path: inset(9% 0 68% 0);
    transform: translate(-4px, 1px);
  }

  91% {
    clip-path: inset(58% 0 16% 0);
    transform: translate(3px, -1px);
  }

  93% {
    clip-path: inset(34% 0 42% 0);
    transform: translate(-2px, 0);
  }
}

@keyframes glitch-slice {
  0%, 82%, 100% {
    clip-path: inset(0 0 0 0);
    transform: translate(0, 0);
  }

  83% {
    clip-path: inset(72% 0 8% 0);
    transform: translate(4px, 0);
  }

  85% {
    clip-path: inset(18% 0 62% 0);
    transform: translate(-3px, -1px);
  }

  87% {
    clip-path: inset(44% 0 31% 0);
    transform: translate(2px, 1px);
  }
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .page {
    min-height: 100dvh;
    padding: 28px 22px;
    place-items: start center;
  }

  .scrim {
    background:
      radial-gradient(circle at center, rgba(8, 9, 8, 0.18), rgba(8, 9, 8, 0.62) 64%, rgba(8, 9, 8, 0.84)),
      linear-gradient(0deg, rgba(8, 9, 8, 0.58), rgba(8, 9, 8, 0.16));
  }

  h1 {
    max-width: 100%;
    font-size: clamp(22px, 5.8vw, 28px);
    line-height: 1.08;
    overflow-wrap: break-word;
  }

  .lead {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-video {
    display: none;
  }

  .glitch::before,
  .glitch::after {
    animation: none;
  }
}
