:root {
  color-scheme: dark;
  font-family: "Lucida Console", "DejaVu Sans Mono", "Courier New", monospace;
  background: #020805;
  color: #c9ffda;
  --green: #67ff9c;
  --bright: #e7ffed;
  --dim: #50a46d;
  --amber: #e0a85e;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: #020805;
}

button,
a { font: inherit; }

button { color: inherit; }

.cinematic {
  position: relative;
  isolation: isolate;
  width: 100vw;
  height: 100dvh;
  min-height: 480px;
  overflow: hidden;
  background: #020805;
}

.scene,
.scene-shade,
.stars,
.scanlines,
.transition {
  position: absolute;
  inset: 0;
}

.intro-gate {
  position: absolute;
  z-index: 15;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 32px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgb(1 5 3 / .88), rgb(1 7 4 / .72), rgb(1 5 3 / .9)),
    radial-gradient(circle at center, transparent, rgb(0 0 0 / .72));
  text-align: center;
  transition: opacity .7s ease, visibility .7s ease;
}

.intro-gate::before {
  position: absolute;
  inset: clamp(18px, 4vw, 64px);
  border: 1px solid rgb(103 255 156 / .18);
  content: "";
  pointer-events: none;
}

.intro-gate.is-leaving {
  visibility: hidden;
  opacity: 0;
}

.gate-channel {
  margin: 0 0 24px;
  color: var(--amber);
  font-size: clamp(8px, .7vw, 11px);
  letter-spacing: .24em;
}

.intro-gate h1 {
  margin: 0;
  color: var(--bright);
  font-family: "Arial Narrow", "Liberation Sans Narrow", sans-serif;
  font-size: clamp(66px, 11vw, 170px);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: .78;
  text-transform: uppercase;
  text-shadow: 0 0 44px rgb(44 255 112 / .2);
}

.gate-copy {
  max-width: 590px;
  margin: 34px 0 26px;
  color: #8db39a;
  font-size: clamp(10px, .85vw, 13px);
  line-height: 1.7;
  letter-spacing: .04em;
}

.intro-gate button {
  min-height: 48px;
  padding: 13px 20px;
  border: 1px solid rgb(103 255 156 / .72);
  background: rgb(8 47 24 / .85);
  color: var(--bright);
  cursor: pointer;
  font-size: 10px;
  letter-spacing: .14em;
  transition: border-color .2s, background .2s, transform .2s;
}

.intro-gate button:hover,
.intro-gate button:focus-visible {
  border-color: var(--green);
  outline: none;
  background: rgb(13 61 31 / .96);
  transform: translateY(-2px);
}

.scene {
  z-index: -5;
  opacity: 0;
  transform: scale(1.045);
  background-position: center;
  background-size: cover;
  transition: opacity 1.5s ease, transform 9s ease-out;
}

.scene.is-visible {
  opacity: 1;
  transform: scale(1);
}

.scene-shade {
  z-index: -4;
  background:
    linear-gradient(90deg, rgb(1 5 3 / .92) 0%, rgb(1 6 3 / .58) 31%, transparent 62%),
    linear-gradient(0deg, rgb(1 4 2 / .86), transparent 42%),
    radial-gradient(ellipse at center, transparent 48%, rgb(0 0 0 / .62) 100%);
  transition: background 1s ease;
}

.cinematic[data-align="right"] .scene-shade {
  background:
    linear-gradient(270deg, rgb(1 5 3 / .9) 0%, rgb(1 6 3 / .6) 33%, transparent 65%),
    linear-gradient(0deg, rgb(1 4 2 / .84), transparent 42%),
    radial-gradient(ellipse at center, transparent 48%, rgb(0 0 0 / .62) 100%);
}

.stars {
  z-index: -3;
  opacity: .24;
  background-image:
    radial-gradient(circle at 14% 22%, #baffce 0 1px, transparent 1.5px),
    radial-gradient(circle at 72% 31%, #baffce 0 1px, transparent 1.5px),
    radial-gradient(circle at 43% 78%, #baffce 0 1px, transparent 1.5px),
    radial-gradient(circle at 88% 65%, #baffce 0 1px, transparent 1.5px);
  animation: star-drift 18s linear infinite alternate;
}

.scanlines {
  z-index: 8;
  pointer-events: none;
  opacity: .16;
  mix-blend-mode: screen;
  background: repeating-linear-gradient(transparent 0 3px, rgb(87 255 143 / .13) 3px 4px);
}

.cinematic-header,
.cinematic-footer {
  position: absolute;
  z-index: 10;
  left: clamp(20px, 5vw, 80px);
  right: clamp(20px, 5vw, 80px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cinematic-header { top: clamp(20px, 5vh, 52px); }
.cinematic-footer { bottom: clamp(20px, 5vh, 50px); }

.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--bright);
  font-size: clamp(11px, 1vw, 15px);
  font-weight: 700;
  letter-spacing: .2em;
  text-decoration: none;
  text-shadow: 0 0 14px rgb(90 255 143 / .35);
}

.wordmark-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--green);
  color: var(--green);
  font-size: 10px;
  letter-spacing: 0;
  box-shadow: inset 0 0 14px rgb(51 255 117 / .14), 0 0 12px rgb(51 255 117 / .12);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.skip,
.sound,
.continue {
  border: 1px solid rgb(103 255 156 / .36);
  background: rgb(1 10 5 / .55);
  color: #a9dcb9;
  cursor: pointer;
  font-size: 10px;
  letter-spacing: .14em;
  transition: border-color .2s, color .2s, background .2s;
}

.skip,
.sound { min-height: 36px; padding: 10px 12px; }
.continue { display: none; padding: 12px 18px; }

.skip:hover,
.skip:focus-visible,
.sound:hover,
.sound:focus-visible,
.continue:hover,
.continue:focus-visible {
  border-color: var(--green);
  outline: none;
  background: rgb(12 50 28 / .72);
  color: var(--bright);
}

.sound {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.sound[aria-pressed="true"] {
  border-color: rgb(103 255 156 / .68);
  color: var(--green);
}

.sound-bars {
  display: flex;
  height: 12px;
  align-items: end;
  gap: 2px;
}

.sound-bars i {
  display: block;
  width: 2px;
  height: 35%;
  background: currentColor;
}

.sound[aria-pressed="true"] .sound-bars i { animation: sound-bar .8s ease-in-out infinite alternate; }
.sound[aria-pressed="true"] .sound-bars i:nth-child(2) { animation-delay: -.35s; }
.sound[aria-pressed="true"] .sound-bars i:nth-child(3) { animation-delay: -.6s; }

kbd {
  margin-left: 7px;
  color: var(--dim);
  font: inherit;
}

.story {
  position: absolute;
  z-index: 4;
  bottom: clamp(100px, 14vh, 160px);
  left: clamp(24px, 8vw, 138px);
  width: min(700px, 52vw);
  transition: left .8s ease, right .8s ease, opacity .35s ease, transform .8s ease;
}

.cinematic[data-align="right"] .story {
  right: clamp(24px, 8vw, 138px);
  left: auto;
}

.story.is-changing {
  opacity: 0;
  transform: translateY(12px);
}

.cinematic[data-kind="title"] .story {
  top: 50%;
  bottom: auto;
  width: min(560px, 43vw);
  transform: translateY(-40%);
}

.cinematic[data-kind="title"] .story.is-changing { transform: translateY(-36%); }

.cinematic[data-kind="crew"] .story {
  top: clamp(92px, 13vh, 132px);
  bottom: auto;
  width: min(720px, 48vw);
  max-height: calc(100dvh - 210px);
  overflow-y: auto;
  scrollbar-width: none;
}

.cinematic[data-kind="crew"] .story::-webkit-scrollbar { display: none; }

.chapter {
  min-height: 1.2em;
  margin: 0 0 18px;
  color: var(--amber);
  font-size: clamp(9px, .8vw, 12px);
  letter-spacing: .22em;
  text-transform: uppercase;
}

.chapter::before { content: "// "; opacity: .55; }

.scene-title {
  margin: 0;
  color: var(--bright);
  font-family: "Arial Narrow", "Liberation Sans Narrow", sans-serif;
  font-size: clamp(28px, 3.5vw, 58px);
  font-weight: 800;
  letter-spacing: .1em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 0 36px rgb(44 255 112 / .15);
}

.cinematic[data-kind="title"] .scene-title {
  font-size: clamp(52px, 8vw, 128px);
  letter-spacing: -.045em;
  line-height: .8;
}

.cinematic[data-kind="crew"] .scene-title {
  font-size: clamp(32px, 4vw, 64px);
  letter-spacing: .035em;
}

.scene-title::after {
  content: "";
  display: block;
  width: clamp(74px, 9vw, 150px);
  height: 2px;
  margin: 24px 0 22px;
  background: linear-gradient(90deg, var(--green), transparent);
  box-shadow: 0 0 12px rgb(72 255 131 / .6);
}

.scene-copy {
  min-height: 5.2em;
  margin: 0;
  color: #c5dec9;
  font-size: clamp(13px, 1.15vw, 18px);
  line-height: 1.75;
  letter-spacing: .025em;
  text-wrap: balance;
}

.scene-copy.is-typing::after {
  content: "";
  display: inline-block;
  width: .55em;
  height: 1em;
  margin-left: .25em;
  vertical-align: -.15em;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: cursor .65s steps(1) infinite;
}

.crew-manifest {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.crew-manifest[hidden] { display: none; }

.crew-manifest li {
  min-width: 0;
  padding: 7px 9px;
  border-left: 2px solid rgb(103 255 156 / .52);
  background: linear-gradient(90deg, rgb(6 35 20 / .72), transparent);
}

.crew-manifest strong,
.crew-manifest span { display: block; }

.crew-manifest strong {
  overflow: hidden;
  color: var(--bright);
  font-size: clamp(10px, .78vw, 13px);
  letter-spacing: .08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.crew-manifest span {
  margin-top: 4px;
  color: var(--dim);
  font-size: clamp(8px, .65vw, 10px);
  line-height: 1.3;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.scene-signal {
  margin: 18px 0 0;
  color: var(--green);
  font-size: clamp(9px, .75vw, 11px);
  letter-spacing: .15em;
  text-transform: uppercase;
}

.control-hint {
  margin: 0 0 0 auto;
  color: #779885;
  font-size: 9px;
  letter-spacing: .13em;
}

.control-hint span { color: #b3d9bf; }

.transition {
  z-index: 20;
  display: grid;
  visibility: hidden;
  place-items: center;
  opacity: 0;
  background: #010704;
  color: var(--green);
  font-size: clamp(11px, 1vw, 15px);
  letter-spacing: .25em;
  transition: opacity .8s ease, visibility .8s;
}

.transition.is-active { visibility: visible; opacity: 1; }
.transition span { animation: signal 1s steps(2) infinite; }

@keyframes cursor { 50% { opacity: 0; } }
@keyframes signal { 50% { opacity: .45; } }
@keyframes star-drift { to { transform: translate3d(14px, -8px, 0); } }
@keyframes sound-bar { to { height: 100%; } }

@media (max-width: 760px) {
  .cinematic { min-height: 420px; }
  .scene { background-position: 58% center; }
  .scene-shade,
  .cinematic[data-align="right"] .scene-shade {
    background: linear-gradient(0deg, rgb(1 5 3 / .96) 0%, rgb(1 5 3 / .76) 50%, transparent 100%);
  }
  .story,
  .cinematic[data-align="right"] .story,
  .cinematic[data-kind="title"] .story,
  .cinematic[data-kind="crew"] .story {
    top: auto;
    right: 24px;
    bottom: 92px;
    left: 24px;
    width: auto;
    transform: none;
  }
  .story.is-changing,
  .cinematic[data-kind="title"] .story.is-changing { transform: translateY(8px); }
  .cinematic[data-kind="crew"] .story {
    max-height: calc(100dvh - 164px);
  }
  .scene-title { font-size: clamp(40px, 15vw, 74px); }
  .cinematic[data-kind="crew"] .scene-title { font-size: clamp(28px, 8vw, 44px); }
  .scene-title::after { margin: 16px 0 14px; }
  .scene-copy { min-height: 4.8em; font-size: 12px; line-height: 1.55; }
  .cinematic[data-kind="crew"] .scene-copy { min-height: 3.4em; }
  .crew-manifest { gap: 5px 10px; margin-top: 10px; }
  .crew-manifest li { padding: 5px 7px; }
  .scene-signal { display: none; }
  .wordmark > span:last-child { display: none; }
  .sound [data-music-label] { display: none; }
  .control-hint { display: none; }
  .continue { display: block; }
  .intro-gate { padding: 24px; }
  .intro-gate h1 { font-size: clamp(58px, 20vw, 100px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
