/* Every component the site is assembled from. Ordered roughly as the page uses
   them: chrome, then the hero, then the modules, then the tail. */

/* ===========================================================================
   Preloader
   =========================================================================== */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: #03050700;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

/* Only ever shown when main.js decides to show it, so a page without
   JavaScript is never held behind a curtain it cannot lift. */
.preloader.is-active {
  background: #030507;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.preloader.is-leaving {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 620ms var(--ease-out),
    visibility 0s linear 620ms;
}

.preloader__mark {
  position: relative;
  display: grid;
  gap: var(--space-s);
  justify-items: center;
  text-align: center;
}

.preloader__word {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(1.5rem, 1rem + 2.4vw, 2.6rem);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #e9eef4;
  padding-left: 0.34em;
  opacity: 0;
  animation: preloader-word 900ms var(--ease-out) 180ms forwards;
}

.preloader__scan {
  width: min(58vw, 26rem);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rift-blue), transparent);
  transform: scaleX(0);
  transform-origin: 50% 50%;
  box-shadow: var(--glow-rift);
  animation: preloader-scan 1100ms var(--ease-out) forwards;
}

.preloader__status {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--occupied-cyan) 80%, transparent);
  opacity: 0;
  animation: preloader-word 700ms var(--ease-out) 520ms forwards;
}

@keyframes preloader-word {
  from {
    opacity: 0;
    letter-spacing: 0.5em;
  }
  to {
    opacity: 1;
    letter-spacing: 0.34em;
  }
}

@keyframes preloader-scan {
  0% {
    transform: scaleX(0);
  }
  60% {
    transform: scaleX(1);
  }
  100% {
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .preloader__word,
  .preloader__status {
    animation: none;
    opacity: 1;
  }
  .preloader__scan {
    animation: none;
    transform: scaleX(1);
  }
}

/* ===========================================================================
   Header and navigation
   =========================================================================== */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, rgb(3 6 9 / 0.82), rgb(3 6 9 / 0));
  transition:
    background var(--speed-ui-slow) var(--ease-out),
    border-color var(--speed-ui-slow) var(--ease-out);
  border-bottom: 1px solid transparent;
}

.site-header.is-stuck {
  background: rgb(5 8 11 / 0.88);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom-color: var(--hairline);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  width: min(100% - var(--gutter) * 2, var(--page-max));
  margin-inline: auto;
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 0.6ch;
  font-family: var(--font-display);
  font-weight: 200;
  font-size: var(--step--1);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.wordmark__mark {
  width: 1.05rem;
  height: 1.05rem;
  flex: none;
  align-self: center;
}

.wordmark__tail {
  color: var(--occupied-cyan);
}

.site-nav {
  margin-left: auto;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(0.4rem, 0.1rem + 1vw, 1.4rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__link {
  position: relative;
  display: block;
  padding: 0.55rem 0.35rem;
  font-family: var(--font-display);
  font-size: var(--step--1);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color var(--speed-ui) var(--ease-out);
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  color: var(--ink);
}

/* The active state is the tear: a short, irregular fracture under the word. */
.site-nav__link::after {
  content: '';
  position: absolute;
  left: 0.35rem;
  right: 0.35rem;
  bottom: 0.3rem;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--rift-blue), var(--rift-white), transparent);
  clip-path: polygon(0 40%, 14% 0, 32% 70%, 52% 10%, 70% 80%, 86% 20%, 100% 55%, 100% 100%, 0 100%);
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
  transition:
    transform var(--speed-ui-slow) var(--ease-out),
    opacity var(--speed-ui-slow) var(--ease-out);
}

.site-nav__link[aria-current='true']::after,
.site-nav__link[aria-current='page']::after,
.site-nav__link:hover::after {
  transform: scaleX(1);
  opacity: 1;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  margin-left: var(--space-s);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: var(--space-2xs);
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-m);
  font-family: var(--font-display);
  font-size: var(--step--1);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  min-height: 44px;
}

.nav-toggle__bars {
  display: grid;
  gap: 4px;
  width: 18px;
}

.nav-toggle__bars span {
  height: 1.5px;
  background: currentColor;
}

@media (max-width: 1023px) {
  .site-nav {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }
  .site-header__actions {
    display: none;
  }
}

/* On the narrowest screens the wordmark gives up its tracking rather than
   pushing the menu button off the edge. */
@media (max-width: 480px) {
  .wordmark {
    letter-spacing: 0.14em;
  }
  .nav-toggle {
    padding-inline: 0.7rem;
  }
}

/* The full-screen menu. Its opening transition is the tear. */
.nav-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgb(4 7 10 / 0.97);
  color: var(--ink);
  z-index: 200;
}

.nav-dialog::backdrop {
  background: rgb(2 4 6 / 0.7);
}

.nav-dialog[open] {
  display: grid;
}

.nav-dialog__inner {
  display: grid;
  align-content: center;
  gap: var(--space-l);
  padding: calc(var(--header-height) + var(--space-l)) var(--gutter) var(--space-xl);
  height: 100%;
  overflow-y: auto;
  animation: nav-open 420ms var(--ease-out);
}

@keyframes nav-open {
  from {
    clip-path: polygon(0 48%, 100% 44%, 100% 52%, 0 56%);
    opacity: 0.4;
  }
  to {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    opacity: 1;
  }
}

.nav-dialog__close {
  position: absolute;
  top: calc(var(--header-height) / 2 - 1.375rem);
  right: var(--gutter);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-m);
}

.nav-dialog__list {
  display: grid;
  gap: var(--space-2xs);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-dialog__link {
  display: flex;
  align-items: baseline;
  gap: var(--space-s);
  padding: var(--space-xs) 0;
  min-height: 44px;
  font-family: var(--font-display);
  font-weight: 200;
  font-size: var(--step-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--occupied-cyan) 14%, transparent);
}

.nav-dialog__index {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--occupied-cyan);
  letter-spacing: 0.1em;
}

/* ===========================================================================
   Buttons and chips
   =========================================================================== */

.button {
  --button-ink: var(--ink-inverse);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  min-height: 48px;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--button-ink);
  background: linear-gradient(135deg, var(--rift-white), var(--rift-blue));
  border-radius: var(--radius-s);
  clip-path: polygon(
    var(--chamfer) 0,
    100% 0,
    100% calc(100% - var(--chamfer)),
    calc(100% - var(--chamfer)) 100%,
    0 100%,
    0 var(--chamfer)
  );
  transition:
    transform var(--speed-ui) var(--ease-out),
    box-shadow var(--speed-ui) var(--ease-out),
    filter var(--speed-ui) var(--ease-out);
  box-shadow: var(--glow-rift);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 0 34px -4px color-mix(in srgb, var(--rift-blue) 75%, transparent);
}

.button:active {
  transform: translateY(0);
}

.button--ghost {
  --button-ink: var(--ink);
  background: color-mix(in srgb, var(--surface-3) 70%, transparent);
  border: 1px solid var(--hairline-strong);
  box-shadow: none;
  backdrop-filter: blur(6px);
}

.button--ghost:hover,
.button--ghost:focus-visible {
  border-color: var(--rift-blue);
  box-shadow: none;
}

.button--quiet {
  --button-ink: var(--ink-soft);
  background: none;
  border: 1px solid var(--hairline);
  box-shadow: none;
  clip-path: none;
  border-radius: var(--radius-m);
}

.button__icon {
  width: 1.1em;
  height: 1.1em;
  flex: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.chip__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rift-blue);
  box-shadow: 0 0 10px var(--rift-blue);
}

.chip--warm .chip__dot {
  background: var(--prime-sun);
  box-shadow: 0 0 10px var(--prime-sun);
}

/* A label the site uses wherever something shown is not final. */
.tag-wip {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.25rem 0.6rem;
  border: 1px solid color-mix(in srgb, var(--state-noticing) 45%, transparent);
  border-radius: var(--radius-s);
  background: color-mix(in srgb, var(--state-noticing) 12%, transparent);
  color: var(--state-noticing);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ===========================================================================
   The tear: the site's one signature device
   =========================================================================== */

.tear-scene {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--occupied-void);
}

.tear-scene__layer {
  position: absolute;
  inset: 0;
}

.tear-scene__layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, 50% 42%);
}

/* The fracture's own light. The blur is done in CSS, in pixels, because an SVG
   filter inside a stretched viewBox blurs by a share of the box and smears. */
.tear-scene__edge svg,
.compare__edge svg {
  filter: drop-shadow(0 0 7px color-mix(in srgb, var(--rift-blue) 85%, transparent))
    drop-shadow(0 0 22px color-mix(in srgb, var(--rift-blue) 45%, transparent));
}

/* The revealed reality is clipped by a polygon that navigation.js and
   comparison.js regenerate from one shared fracture shape. Before any script
   runs, this static shape is already a complete, art-directed composition. */
.tear-scene__layer--revealed {
  clip-path: var(--tear-clip, polygon(0 0, 58% 0, 55% 18%, 61% 34%, 54% 52%, 60% 72%, 53% 88%, 57% 100%, 0 100%));
}

.tear-scene__edge {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.tear-scene__edge svg {
  width: 100%;
  height: 100%;
}

.tear-scene__canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transition: opacity 700ms var(--ease-out);
}

.tear-scene.is-shader-ready .tear-scene__canvas {
  opacity: 1;
}

/* When the shader takes over it draws both realities itself. */
.tear-scene.is-shader-ready .tear-scene__layer,
.tear-scene.is-shader-ready .tear-scene__edge {
  opacity: 0;
}

/* ===========================================================================
   Hero
   =========================================================================== */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  isolation: isolate;
  overflow: hidden;
}

.hero__scene {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgb(3 6 9 / 0.72) 0%, rgb(3 6 9 / 0.1) 26%, rgb(3 6 9 / 0.12) 52%, rgb(3 6 9 / 0.88) 100%),
    linear-gradient(95deg, rgb(3 6 9 / 0.78) 0%, rgb(3 6 9 / 0.34) 34%, rgb(3 6 9 / 0) 62%);
}

.hero__inner {
  width: min(100% - var(--gutter) * 2, var(--page-max));
  margin-inline: auto;
  padding-block: clamp(3rem, 2rem + 8vh, 7rem) clamp(3.5rem, 2rem + 6vh, 6rem);
  display: grid;
  gap: var(--space-m);
  justify-items: start;
  max-width: 100%;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 200;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: var(--step-6);
  line-height: 0.95;
  margin: 0;
  text-shadow: 0 2px 40px rgb(0 0 0 / 0.55);
}

.hero__title span {
  display: block;
}

.hero__title .hero__title-accent {
  color: var(--rift-white);
}

.hero__pitch {
  font-size: var(--step-2);
  font-weight: 300;
  color: var(--ink);
  max-width: 24ch;
  margin: 0;
  text-shadow: 0 1px 24px rgb(0 0 0 / 0.6);
}

.hero__support {
  color: var(--ink-soft);
  max-width: 46ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  margin-top: var(--space-2xs);
}

.hero__status {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs) var(--space-s);
  align-items: center;
  margin-top: var(--space-2xs);
}

/* The lens the visitor drags to open the other reality. */
.hero__lens {
  position: absolute;
  z-index: 3;
  left: var(--lens-x, 58%);
  top: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--rift-white) 55%, transparent);
  background: color-mix(in srgb, var(--occupied-void) 45%, transparent);
  backdrop-filter: blur(3px);
  color: var(--rift-white);
  cursor: ew-resize;
  touch-action: none;
  box-shadow: var(--glow-rift);
  transition: box-shadow var(--speed-ui) var(--ease-out);
}

.hero__lens:hover,
.hero__lens:focus-visible {
  box-shadow: 0 0 40px -2px var(--rift-blue);
}

.hero__lens::before,
.hero__lens::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 1px;
  height: 42vh;
  background: linear-gradient(var(--direction, 180deg), var(--rift-blue), transparent);
  opacity: 0.45;
}

.hero__lens::before {
  bottom: 100%;
  --direction: 0deg;
}

.hero__lens::after {
  top: 100%;
}

.hero__lens-icon {
  width: 22px;
  height: 22px;
}

.hero__reality-labels {
  position: absolute;
  z-index: 3;
  inset: calc(var(--header-height) + 1rem) 0 auto 0;
  display: flex;
  justify-content: space-between;
  padding-inline: var(--gutter);
  pointer-events: none;
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: var(--space-s);
  transform: translateX(-50%);
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: var(--space-3xs);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
}

.hero__scroll::after {
  content: '';
  width: 1px;
  height: 2.5rem;
  background: linear-gradient(180deg, var(--occupied-cyan), transparent);
  animation: scroll-hint 2.6s var(--ease-in-out) infinite;
}

@keyframes scroll-hint {
  0%,
  100% {
    transform: scaleY(0.4);
    transform-origin: top;
    opacity: 0.4;
  }
  50% {
    transform: scaleY(1);
    transform-origin: top;
    opacity: 1;
  }
}

@media (max-width: 767px) {
  .hero__lens,
  .hero__reality-labels {
    display: none;
  }
  .hero__title {
    font-size: var(--step-5);
  }
}

/* ===========================================================================
   Story beats
   =========================================================================== */

.beats {
  display: grid;
  gap: var(--space-l);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  counter-reset: beat;
}

.beat {
  position: relative;
  display: grid;
  gap: var(--space-s);
  align-content: start;
}

.beat__frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-m);
  aspect-ratio: 16 / 10;
  background: var(--surface-2);
}

.beat__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out), filter 700ms var(--ease-out);
  filter: saturate(0.85);
}

.beat:hover .beat__frame img,
.beat:focus-within .beat__frame img {
  transform: scale(1.04);
  filter: saturate(1);
}

.beat__frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgb(4 7 10 / 0.8));
}

.beat__index {
  counter-increment: beat;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.2em;
  color: var(--occupied-cyan);
}

.beat__index::before {
  content: '0' counter(beat) ' / ';
}

.beat__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--step-2);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.beat__body {
  color: var(--ink-soft);
  font-size: var(--step--1);
}

/* ===========================================================================
   Reality comparison
   =========================================================================== */

.compare {
  position: relative;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-l);
  overflow: hidden;
  background: var(--occupied-void);
  aspect-ratio: 16 / 9;
  touch-action: pan-y;
}

.compare__layer {
  position: absolute;
  inset: 0;
}

.compare__layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare__layer--top {
  clip-path: var(--tear-clip, polygon(0 0, 50% 0, 50% 100%, 0 100%));
}

.compare__edge {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.compare__edge svg {
  width: 100%;
  height: 100%;
}

.compare__label {
  position: absolute;
  bottom: var(--space-s);
  z-index: 3;
  pointer-events: none;
}

.compare__label--prime {
  left: var(--space-s);
}

.compare__label--occupied {
  right: var(--space-s);
}

.compare__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--tear-position, 50%);
  width: 56px;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  z-index: 4;
  cursor: ew-resize;
  touch-action: none;
  background: none;
}

.compare__grip {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--rift-white) 60%, transparent);
  background: color-mix(in srgb, var(--occupied-void) 55%, transparent);
  backdrop-filter: blur(4px);
  color: var(--rift-white);
  box-shadow: var(--glow-rift);
}

/* The keyboard-operable control. It is the real input; the pointer handle only
   writes to it, so the module works with a keyboard and with no JavaScript.
   It sits outside `.compare`, which clips its own overflow. */
.compare__control {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  margin-top: var(--space-s);
}

.compare__control .label {
  flex: none;
}

.compare__range {
  flex: 1 1 auto;
  width: 100%;
  accent-color: var(--rift-blue);
  min-height: 44px;
}

.compare__hotspot {
  position: absolute;
  z-index: 5;
  width: 32px;
  height: 32px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--rift-white) 50%, transparent);
  background: color-mix(in srgb, var(--occupied-void) 40%, transparent);
  color: var(--rift-white);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: var(--step--2);
}

.compare__hotspot::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--rift-blue) 45%, transparent);
  animation: hotspot-pulse 3.2s var(--ease-in-out) infinite;
}

@keyframes hotspot-pulse {
  0%,
  100% {
    transform: scale(0.85);
    opacity: 0.25;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.8;
  }
}

.compare__note {
  position: absolute;
  z-index: 6;
  max-width: 22ch;
  padding: var(--space-2xs) var(--space-xs);
  transform: translate(-50%, calc(-100% - 1.5rem));
  background: rgb(5 9 12 / 0.92);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-m);
  font-size: var(--step--1);
  color: var(--ink-soft);
}

.compare__note[hidden] {
  display: none;
}

.compare-wrap {
  position: relative;
}

@media (max-width: 767px) {
  .compare {
    aspect-ratio: 4 / 5;
  }
  .compare__handle,
  .compare__hotspot {
    display: none;
  }
}

/* ===========================================================================
   Feature chapters
   =========================================================================== */

.chapters {
  display: grid;
  gap: clamp(3rem, 2rem + 5vw, 6rem);
}

.chapter {
  display: grid;
  gap: clamp(1.5rem, 1rem + 3vw, 3.5rem);
  align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .chapter {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }
  .chapter--flip .chapter__media {
    order: 2;
  }
  .chapter--flip .chapter__copy {
    order: 1;
  }
}

.chapter__media {
  position: relative;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-l);
  overflow: hidden;
  background: var(--surface-1);
  box-shadow: var(--shadow-deep);
}

.chapter__media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.chapter__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.chapter__copy {
  display: grid;
  gap: var(--space-s);
  align-content: start;
}

.chapter__title {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: var(--step-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chapter__list {
  display: grid;
  gap: var(--space-2xs);
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--step--1);
}

.chapter__list li {
  display: flex;
  gap: var(--space-2xs);
  align-items: flex-start;
}

.chapter__list svg {
  width: 1.1em;
  height: 1.1em;
  margin-top: 0.35em;
  flex: none;
  color: var(--occupied-cyan);
}

/* The sweep that reads a still gameplay frame as a cone being swung. */
.sweep {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 38%,
    color-mix(in srgb, var(--rift-white) 16%, transparent) 50%,
    transparent 62%
  );
  transform: translateX(-100%);
  opacity: 0;
}

.is-revealed .sweep {
  animation: sweep 2.8s var(--ease-in-out) 400ms;
}

@keyframes sweep {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* ===========================================================================
   Synchronized plan scrubber
   =========================================================================== */

.plan {
  display: grid;
  gap: var(--space-m);
}

.plan__stage {
  position: relative;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-l);
  overflow: hidden;
  background: var(--surface-1);
  box-shadow: var(--shadow-deep);
}

.plan__stage img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.plan__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.plan__overlay svg {
  width: 100%;
  height: 100%;
}

.plan__route {
  fill: none;
  stroke-width: 0.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: var(--length, 120);
  stroke-dashoffset: calc(var(--length, 120) * (1 - var(--draw, 0)));
  filter: drop-shadow(0 0 1.4px currentColor);
}

.plan__marker {
  opacity: var(--marker, 0);
  transition: opacity 240ms var(--ease-out);
}

.plan__tick {
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, var(--rift-blue), var(--rift-white));
  transform: scaleX(var(--progress, 0));
  transform-origin: left;
}

.plan__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-s);
}

.plan__steps {
  display: flex;
  gap: var(--space-2xs);
  flex-wrap: wrap;
}

.plan__step {
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-m);
  font-family: var(--font-display);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition:
    border-color var(--speed-ui) var(--ease-out),
    color var(--speed-ui) var(--ease-out),
    background var(--speed-ui) var(--ease-out);
}

.plan__step[aria-pressed='true'] {
  border-color: var(--rift-blue);
  color: var(--ink);
  background: color-mix(in srgb, var(--rift-blue) 14%, transparent);
}

.plan__scrub {
  flex: 1 1 16rem;
  accent-color: var(--rift-blue);
  min-height: 44px;
}

.plan__legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.plan__legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

.plan__swatch {
  width: 14px;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
}

.plan__caption {
  font-size: var(--step--1);
  color: var(--ink-muted);
  max-width: 68ch;
}

/* ===========================================================================
   Squad dossiers
   =========================================================================== */

.dossiers {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.dossier {
  position: relative;
  display: grid;
  gap: var(--space-s);
  padding: var(--space-s);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 90%, transparent), var(--surface-1));
  border: 1px solid var(--hairline);
  border-radius: var(--radius-m);
  overflow: hidden;
  transition:
    border-color var(--speed-ui-slow) var(--ease-out),
    transform var(--speed-ui-slow) var(--ease-out);
}

.dossier:hover,
.dossier:focus-within {
  border-color: color-mix(in srgb, var(--rift-blue) 55%, transparent);
  transform: translateY(-4px);
}

.dossier__portrait {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-s);
  background: var(--surface-3);
}

.dossier__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.5) contrast(1.05) brightness(0.85);
  transition: filter 600ms var(--ease-out), transform 900ms var(--ease-out);
}

.dossier:hover .dossier__portrait img,
.dossier:focus-within .dossier__portrait img {
  filter: none;
  transform: scale(1.03);
}

/* "Observed" until you look closer: a scanning grid over the portrait that
   retreats on hover or focus. */
.dossier__portrait::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      180deg,
      color-mix(in srgb, var(--occupied-void) 40%, transparent) 0 1px,
      transparent 1px 4px
    );
  opacity: 0.8;
  transition: opacity 600ms var(--ease-out);
}

.dossier:hover .dossier__portrait::after,
.dossier:focus-within .dossier__portrait::after {
  opacity: 0;
}

.dossier__name {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--step-2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dossier__role {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--occupied-cyan);
}

.dossier__body {
  font-size: var(--step--1);
  color: var(--ink-soft);
}

.dossier__abilities {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3xs);
  list-style: none;
  margin: 0;
  padding: 0;
}

.dossier__abilities li {
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.dossier__known {
  font-size: var(--step--1);
  color: var(--ink-muted);
  border-top: 1px solid var(--hairline);
  padding-top: var(--space-2xs);
}

/* ===========================================================================
   Opposition scanner
   =========================================================================== */

.threats {
  display: grid;
  gap: var(--space-2xs);
  counter-reset: threat;
}

.threat {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-s);
  align-items: baseline;
  padding: var(--space-s) var(--space-m);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-m);
  background: color-mix(in srgb, var(--surface-1) 80%, transparent);
  overflow: hidden;
  transition: border-color var(--speed-ui-slow) var(--ease-out);
}

.threat:hover,
.threat:focus-within {
  border-color: color-mix(in srgb, var(--rift-blue) 50%, transparent);
}

.threat::before {
  counter-increment: threat;
  content: counter(threat, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--occupied-cyan);
  letter-spacing: 0.1em;
}

/* The scanning light that passes down the list once it is in view. */
.threat::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 40%,
    color-mix(in srgb, var(--rift-blue) 22%, transparent) 50%,
    transparent 60%
  );
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.is-revealed .threat::after {
  animation: threat-scan 2.4s var(--ease-in-out) forwards;
  animation-delay: calc(var(--threat-index, 0) * 180ms);
}

@keyframes threat-scan {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  35% {
    opacity: 1;
  }
  100% {
    transform: translateY(100%);
    opacity: 0;
  }
}

.threat__title {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.threat__body {
  grid-column: 2;
  color: var(--ink-soft);
  font-size: var(--step--1);
  margin-top: var(--space-3xs);
}

/* ===========================================================================
   Location atlas
   =========================================================================== */

.atlas {
  display: grid;
  gap: var(--space-m);
}

@media (min-width: 900px) {
  .atlas {
    grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
    align-items: start;
  }
}

.atlas__list {
  display: grid;
  gap: var(--space-3xs);
  list-style: none;
  margin: 0;
  padding: 0;
}

.atlas__button {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: var(--space-s);
  padding: var(--space-xs) var(--space-s);
  text-align: left;
  border: 1px solid transparent;
  border-left: 2px solid var(--hairline);
  border-radius: 0 var(--radius-m) var(--radius-m) 0;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: var(--step--1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition:
    border-color var(--speed-ui) var(--ease-out),
    background var(--speed-ui) var(--ease-out),
    color var(--speed-ui) var(--ease-out);
}

.atlas__button:hover {
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
  color: var(--ink);
}

.atlas__button[aria-selected='true'] {
  border-left-color: var(--rift-blue);
  background: color-mix(in srgb, var(--rift-blue) 10%, transparent);
  color: var(--ink);
}

.atlas__panel {
  display: grid;
  gap: var(--space-s);
}

.atlas__frame {
  position: relative;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-l);
  overflow: hidden;
  background: var(--surface-2);
  aspect-ratio: 16 / 9;
}

.atlas__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.atlas__frame .tag-wip {
  position: absolute;
  top: var(--space-xs);
  left: var(--space-xs);
}

.atlas__problems {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  list-style: none;
  margin: 0;
  padding: 0;
}

.atlas__problems li {
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-size: var(--step--2);
  color: var(--ink-muted);
}

/* ===========================================================================
   Video facade
   =========================================================================== */

.video {
  position: relative;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-l);
  overflow: hidden;
  background: var(--occupied-void);
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow-deep);
}

.video img,
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.video__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: var(--space-s);
  width: 100%;
  color: var(--ink);
  background: linear-gradient(180deg, rgb(3 6 9 / 0.15), rgb(3 6 9 / 0.65));
  transition: background var(--speed-ui-slow) var(--ease-out);
}

.video__play:hover,
.video__play:focus-visible {
  background: linear-gradient(180deg, rgb(3 6 9 / 0.05), rgb(3 6 9 / 0.5));
}

.video__disc {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--rift-white) 65%, transparent);
  background: color-mix(in srgb, var(--occupied-void) 45%, transparent);
  backdrop-filter: blur(4px);
  box-shadow: var(--glow-rift);
  transition: transform var(--speed-ui-slow) var(--ease-out);
}

.video__play:hover .video__disc {
  transform: scale(1.06);
}

.video__meta {
  position: absolute;
  left: var(--space-m);
  right: var(--space-m);
  bottom: var(--space-m);
  display: grid;
  gap: var(--space-3xs);
  text-align: left;
}

.video__title {
  font-family: var(--font-display);
  font-size: var(--step-1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 300;
}

/* ===========================================================================
   Media grid, filters and dialog
   =========================================================================== */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  margin-bottom: var(--space-l);
}

.filter {
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition:
    border-color var(--speed-ui) var(--ease-out),
    background var(--speed-ui) var(--ease-out),
    color var(--speed-ui) var(--ease-out);
}

.filter:hover {
  color: var(--ink);
  border-color: var(--hairline-strong);
}

.filter[aria-pressed='true'] {
  border-color: var(--rift-blue);
  background: color-mix(in srgb, var(--rift-blue) 14%, transparent);
  color: var(--ink);
}

.gallery {
  display: grid;
  gap: var(--space-s);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.gallery__item {
  display: flex;
}

.gallery__item[hidden] {
  display: none;
}

/* A card fills its row, so a caption that wraps onto a second line does not
   drag its neighbours' images out of alignment. */
.gallery__button {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: left;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--surface-2);
  transition:
    border-color var(--speed-ui) var(--ease-out),
    transform var(--speed-ui-slow) var(--ease-out);
}

.gallery__button:hover,
.gallery__button:focus-visible {
  border-color: color-mix(in srgb, var(--rift-blue) 55%, transparent);
  transform: translateY(-3px);
}

.gallery__button img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: saturate(0.72) brightness(0.92);
  transition: filter 500ms var(--ease-out);
}

.gallery__button:hover img,
.gallery__button:focus-visible img {
  filter: none;
}

.gallery__caption {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: var(--space-s);
  align-items: baseline;
  padding: var(--space-2xs) var(--space-xs);
  font-size: var(--step--1);
  color: var(--ink-soft);
  background: var(--surface-1);
}

.gallery__kind {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--occupied-cyan);
  white-space: nowrap;
}

.lightbox {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  background: rgb(3 5 7 / 0.96);
  display: none;
}

.lightbox[open] {
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.lightbox::backdrop {
  background: rgb(2 3 5 / 0.8);
}

.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  padding: var(--space-s) var(--gutter);
  border-bottom: 1px solid var(--hairline);
}

.lightbox__figure {
  display: grid;
  place-items: center;
  padding: var(--space-s) var(--gutter);
  min-height: 0;
}

.lightbox__figure img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  border-radius: var(--radius-m);
}

.lightbox__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  padding: var(--space-s) var(--gutter);
  border-top: 1px solid var(--hairline);
  color: var(--ink-soft);
  font-size: var(--step--1);
}

.lightbox__nav {
  display: flex;
  gap: var(--space-2xs);
}

.icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-m);
  color: var(--ink);
  transition: border-color var(--speed-ui) var(--ease-out);
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--rift-blue);
}

/* ===========================================================================
   Wallpapers and downloads
   =========================================================================== */

.wallpapers {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.wallpaper {
  display: grid;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--surface-1);
}

.wallpaper img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.wallpaper__body {
  display: grid;
  gap: var(--space-2xs);
  padding: var(--space-s);
}

.wallpaper__title {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wallpaper__meta {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

/* ===========================================================================
   Development status
   =========================================================================== */

.status-panel {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.status-card {
  display: grid;
  gap: var(--space-2xs);
  align-content: start;
  padding: var(--space-m);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-m);
  background: color-mix(in srgb, var(--surface-1) 85%, transparent);
}

.status-card--now {
  border-color: color-mix(in srgb, var(--rift-blue) 45%, transparent);
  background: color-mix(in srgb, var(--rift-blue) 8%, transparent);
}

.status-card__when {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--occupied-cyan);
}

.status-card ul {
  display: grid;
  gap: var(--space-3xs);
  margin: 0;
  padding-left: 1.1em;
  color: var(--ink-soft);
  font-size: var(--step--1);
}

.facts {
  display: grid;
  gap: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-m);
  overflow: hidden;
}

.facts > div {
  display: grid;
  grid-template-columns: minmax(8rem, 14rem) 1fr;
  gap: var(--space-s);
  padding: var(--space-xs) var(--space-m);
  border-bottom: 1px solid var(--hairline);
  font-size: var(--step--1);
}

.facts > div:last-child {
  border-bottom: 0;
}

.facts dt {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.facts dd {
  margin: 0;
  color: var(--ink-soft);
}

@media (max-width: 599px) {
  .facts > div {
    grid-template-columns: 1fr;
    gap: var(--space-3xs);
  }
}

/* ===========================================================================
   Call to action and footer
   =========================================================================== */

.cta {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: linear-gradient(180deg, var(--surface-1), var(--surface-0));
}

.cta__inner {
  display: grid;
  gap: var(--space-m);
  justify-items: center;
  text-align: center;
  padding-block: clamp(3.5rem, 2.5rem + 6vw, 7rem);
}

.cta__title {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: var(--step-5);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cta__invite {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--ink-muted);
  word-break: break-all;
}

.site-footer {
  padding-block: var(--space-xl) var(--space-l);
  color: var(--ink-muted);
  font-size: var(--step--1);
}

.site-footer__grid {
  display: grid;
  gap: var(--space-l);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

.site-footer h2 {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: var(--space-2xs);
}

.site-footer ul {
  display: grid;
  gap: var(--space-3xs);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer a {
  text-decoration: none;
  color: var(--ink-muted);
  transition: color var(--speed-ui) var(--ease-out);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--ink);
}

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-l);
  padding-top: var(--space-s);
  border-top: 1px solid var(--hairline);
}

.creator {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
}

.creator svg {
  width: 26px;
  height: 34px;
  flex: none;
  color: var(--ink-soft);
}

.disclaimer {
  margin-top: var(--space-m);
  font-size: var(--step--2);
  color: var(--ink-muted);
  max-width: 78ch;
}

/* ===========================================================================
   Page-level odds and ends
   =========================================================================== */

.page-head {
  padding-top: calc(var(--header-height) + var(--space-xl));
  padding-bottom: var(--space-l);
}

.breadcrumb {
  display: flex;
  gap: var(--space-2xs);
  list-style: none;
  margin: 0 0 var(--space-s);
  padding: 0;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.breadcrumb a {
  text-decoration: none;
  color: var(--occupied-cyan);
}

.note {
  padding: var(--space-m);
  border: 1px solid var(--hairline);
  border-left: 2px solid var(--rift-blue);
  border-radius: 0 var(--radius-m) var(--radius-m) 0;
  background: color-mix(in srgb, var(--surface-1) 80%, transparent);
  color: var(--ink-soft);
  font-size: var(--step--1);
}

.columns {
  display: grid;
  gap: var(--space-l);
}

@media (min-width: 900px) {
  .columns--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .columns--sidebar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 20rem);
  }
}

/* ===========================================================================
   Alpha footage: the montage, self-hosted, nothing loaded until play
   =========================================================================== */

.footage__player {
  margin: 0;
  display: grid;
  gap: var(--space-s);
}

.footage__video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: var(--occupied-void);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-deep), 0 0 120px -60px color-mix(in srgb, var(--rift-blue) 70%, transparent);
}

.footage__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2xs) var(--space-m);
  font-size: var(--step--1);
  color: var(--ink-muted);
}

.footage__alpha {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: 0.3rem 0.8rem;
  border: 1px solid color-mix(in srgb, var(--prime-sun) 45%, transparent);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--prime-cream);
}

.footage__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--prime-sun);
  box-shadow: 0 0 10px var(--prime-sun);
}

.footage__download {
  margin-left: auto;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ===========================================================================
   Missions: twelve cards, each a still that becomes ten seconds of play
   =========================================================================== */

.missions {
  display: grid;
  gap: var(--space-l) var(--space-m);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.mission {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-l);
  overflow: hidden;
  background: linear-gradient(180deg, var(--surface-2), var(--surface-1));
  transition:
    border-color var(--speed-ui) var(--ease-out),
    transform var(--speed-ui-slow) var(--ease-out),
    box-shadow var(--speed-ui-slow) var(--ease-out);
}

.mission:hover,
.mission:focus-within {
  border-color: color-mix(in srgb, var(--rift-blue) 55%, transparent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.mission__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--occupied-void);
}

.mission__media img,
.mission__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mission__video {
  opacity: 0;
  transition: opacity 500ms var(--ease-out);
}

.mission.is-playing .mission__video {
  opacity: 1;
}

/* The mission number, set large over the corner of the picture, the way the
   montage's lower-thirds set it. */
.mission__number {
  position: absolute;
  left: var(--space-s);
  bottom: 0.1rem;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 2rem + 2vw, 3.6rem);
  font-weight: 200;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--rift-white);
  text-shadow: 0 2px 18px rgb(0 0 0 / 0.75);
  pointer-events: none;
}

.mission__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, transparent 55%, rgb(3 6 9 / 0.7));
  pointer-events: none;
}

.mission__number {
  z-index: 1;
}

.mission__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  padding: var(--space-m);
  flex: 1;
}

.mission__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mission__objective {
  margin: 0;
  color: var(--prime-cream);
  font-size: var(--step-0);
}

.mission__briefing {
  margin: 0;
  color: var(--ink-muted);
  font-size: var(--step--1);
  line-height: 1.6;
}

.mission__open {
  align-self: flex-start;
  margin-top: auto;
  min-height: 44px;
  padding: 0.6rem 1.1rem;
}

.mission__open::before {
  content: '';
  width: 0.9em;
  height: 0.9em;
  border: 1px solid currentColor;
  border-radius: 2px;
  box-shadow: 3px -3px 0 -1px var(--surface-1), 3px -3px 0 0 currentColor;
}

@media (prefers-reduced-motion: reduce) {
  .mission,
  .mission__video {
    transition: none;
  }
  .mission:hover,
  .mission:focus-within {
    transform: none;
  }
}
