/* Human//Error teaser. The page is the trailer's last title card: same ink, same type, same grain.
   The trailer is the only thing that moves; the light around it is sampled from its frames. */
*,
*::before,
*::after {
  box-sizing: border-box;
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

@font-face {
  font-family: "Anton";
  src: url("/fonts/anton-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/plexmono-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/plexmono-600-latin.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrumentserif-italic-latin.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

/* Palette taken from the trailer (empire-trailer/src/lib/theme.ts); ink is sampled from its encoded frames. */
:root {
  --ink: #040509;
  --bone: #ece6d6;
  --dim: #8a96a2;
  --line: rgba(236, 230, 214, 0.22);
  --cyan: #3ff2ff;
  --amber: #ffb341;
  --red: #ff6a52;
  --display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --glow-cyan: 0 0 18px rgba(63, 242, 255, 0.85), 0 0 45px rgba(63, 242, 255, 0.4);
  --gutter: clamp(1rem, 4vw, 3.75rem);
  color-scheme: dark;
}

html {
  background: var(--ink);
  color: var(--bone);
  font: 400 1rem/1.6 var(--mono);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

/* Film grain and scan lines from the trailer's Grain layer, held still. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.12) 0 1px, transparent 1px 3px),
    url("/media/grain.png");
  opacity: 0.22;
  mix-blend-mode: overlay;
}

main {
  flex: 1;
}

/* ---- The threshold: the trailer's cold open, held still, with the courier as the Enter button ---- */
.gate {
  display: none;
}

.gated body {
  overflow: hidden;
}

.gated .hud,
.gated main,
.gated .foot {
  visibility: hidden;
}

.gated .gate {
  position: fixed;
  z-index: 8;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  padding: 0 var(--gutter);
  background: radial-gradient(ellipse at center, #0a0c11 0%, var(--ink) 70%);
}

/* The route line crosses the whole screen through the courier. */
.enter {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3.75rem;
  margin-top: 3rem;
  padding: 0 2.5rem 0.75rem;
  color: var(--bone);
  background: none;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
}

.enter::before {
  content: "";
  position: absolute;
  top: 0.9375rem;
  left: calc(50% - 50vw + 3vw);
  width: 94vw;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 179, 65, 0.45) 12%, rgba(255, 179, 65, 0.45) 88%, transparent);
  pointer-events: none;
}

/* A messenger: white core, amber ring, soft halo, as in every era of the trailer. */
.courier {
  position: relative;
  display: block;
  flex: none;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px var(--ink), 0 0 0 5.5px rgba(255, 179, 65, 0.85), 0 0 30px 10px rgba(255, 179, 65, 0.22);
}

.enter .courier {
  width: 1rem;
  height: 1rem;
  margin-top: 0.4375rem;
  box-shadow: 0 0 0 7px var(--ink), 0 0 0 9px rgba(255, 179, 65, 0.85), 0 0 60px 18px rgba(255, 179, 65, 0.18);
}

/* The transmission ring from the cold open, caught at rest. */
.enter .courier::after {
  content: "";
  position: absolute;
  inset: -2.75rem;
  border: 1px solid rgba(255, 179, 65, 0.3);
  border-radius: 50%;
}

.enter-word {
  padding-left: 0.3em;
  font: 400 clamp(2.25rem, 5vw, 3rem)/1 var(--display);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.enter:hover .enter-word {
  color: #fff;
  text-shadow: 0 0 14px rgba(255, 179, 65, 0.7), 0 0 36px rgba(255, 179, 65, 0.35);
}

.enter:focus-visible {
  outline: 0;
}

.enter:focus-visible .enter-word {
  color: #fff;
  text-decoration: underline 2px var(--amber);
  text-underline-offset: 0.3em;
}

.gate-mark {
  margin: 0;
  font-size: 0.6875rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-align: center;
  color: var(--dim);
}

/* ---- HUD: the trailer's top chrome, which also holds the player buttons ---- */
.hud {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
  padding: 0.5rem var(--gutter);
  padding-top: max(0.5rem, env(safe-area-inset-top));
}

.hud-mark {
  margin: 0;
  font-size: 0.6875rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
}

.player {
  display: flex;
  gap: 0.25rem;
}

.hud-button {
  white-space: nowrap;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  font: 400 0.6875rem/1 var(--mono);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
  background: none;
  border: 0;
  cursor: pointer;
}

.hud-button:hover {
  color: var(--bone);
}

/* ---- The stage: the trailer with no frame; its edges dissolve into the ink ---- */
.stage {
  position: relative;
  display: grid;
  justify-items: center;
  overflow-x: clip;
}

.screen {
  position: relative;
  width: min(100%, max(28rem, calc((100svh - 21rem) * 16 / 9)));
  aspect-ratio: 16 / 9;
}

.screen video {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--ink);
}

/* Once the page drives the player (no native controls), feather all four edges. */
.screen video:not([controls]) {
  cursor: pointer;
  -webkit-mask-image:
    linear-gradient(90deg, transparent, #000 11%, #000 89%, transparent),
    linear-gradient(180deg, transparent, #000 9%, #000 82%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent, #000 11%, #000 89%, transparent),
    linear-gradient(180deg, transparent, #000 9%, #000 82%, transparent);
  mask-composite: intersect;
}

/* Light spilled by the trailer. app.js paints this 8x5 canvas from the playing frames;
   the static cyan is the poster's light for visitors without JavaScript. */
.ambient {
  position: absolute;
  z-index: 0;
  left: -22%;
  top: -34%;
  width: 144%;
  height: 168%;
  background: radial-gradient(closest-side, rgba(63, 242, 255, 0.3), transparent);
  filter: blur(64px) saturate(1.4);
  opacity: 0.62;
  -webkit-mask-image: radial-gradient(closest-side, #000 35%, transparent);
  mask-image: radial-gradient(closest-side, #000 35%, transparent);
  pointer-events: none;
}

.ambient.lit {
  background: none;
}

/* Shown while the trailer has no sound yet: reduced motion, blocked autoplay, or a reload that
   skipped the gate. It restarts the trailer from 0:00 with sound, because the music is cut to it. */
.start {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 5%;
  width: 16rem;
  margin-left: -8rem;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.875rem;
  font: 400 0.6875rem/1 var(--mono);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--bone);
  background: rgba(4, 5, 9, 0.72);
  border: 1px solid rgba(255, 179, 65, 0.45);
  border-radius: 2px;
  cursor: pointer;
}

.start:hover {
  border-color: var(--amber);
}

.start .courier {
  width: 0.5rem;
  height: 0.5rem;
}

/* ---- Cinema view: pressing play gives the trailer the whole window (app.js sets html.cinema) ---- */
.cinema body {
  overflow: hidden;
}

.cinema .stage {
  position: fixed;
  z-index: 6;
  inset: 0;
  margin: 0;
  place-items: center;
  align-content: center;
  background: var(--ink);
}

/* The largest 16:9 box that fits the window, edges crisp (no feather) so nothing is lost. */
.cinema .screen {
  width: min(100vw, 100vh * 16 / 9);
  width: min(100vw, 100dvh * 16 / 9);
}

/* The 9:16 cut (phones held upright): tall in the cinema view on both versions, and tall inline on A. */
.portrait-film.cinema .screen {
  aspect-ratio: 9 / 16;
  width: min(100vw, 100vh * 9 / 16);
  width: min(100vw, 100dvh * 9 / 16);
}

.portrait-film:not(.cinema) body:not(.b) .screen {
  aspect-ratio: 9 / 16;
  width: min(100%, 72svh * 9 / 16);
}

.cinema .screen video:not([controls]) {
  object-fit: contain;
  -webkit-mask-image: none;
  mask-image: none;
}

.cinema .start {
  display: none;
}

/* The HUD floats over the letterbox so Pause, Sound and Close stay in reach. */
.cinema .hud {
  position: fixed;
  z-index: 8; /* above the end card, so Replay and Close stay usable */
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(4, 5, 9, 0.75), transparent);
}

.cinema .hud-button {
  color: var(--bone);
}

/* When the trailer ends, its last frame dims and the end card (title + signup) takes the screen. */
.cinema.ended .screen video {
  filter: brightness(0.3) saturate(0.8);
}

.cinema.ended .endcard {
  position: fixed;
  z-index: 7;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
  padding: 5rem 0 max(2rem, env(safe-area-inset-bottom));
  background: radial-gradient(ellipse at center, rgba(4, 5, 9, 0.55) 0%, rgba(4, 5, 9, 0.85) 70%);
}

.cinema.ended .endcard .title {
  margin-top: 0;
}

/* Tall steps (the three questions) start at the top and scroll instead of overflowing the centre. */
.cinema.ended .endcard:has(.path:not([hidden])) {
  justify-content: flex-start;
}

/* ---- Title card, continued from the last frames of the trailer ---- */
.title {
  position: relative;
  z-index: 2;
  margin-top: -0.5rem;
  padding: 0 var(--gutter);
  text-align: center;
}

h1 {
  margin: 0;
  font: 400 clamp(3.25rem, 7.5vw, 6.5rem)/0.9 var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bone);
  text-shadow: var(--glow-cyan);
}

.tagline {
  margin: 0.9rem 0 0;
  font-size: clamp(0.6875rem, 1.2vw, 0.875rem);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(63, 242, 255, 0.5);
}

/* ---- Steps: sign up, then choose a path ---- */
.step {
  scroll-margin-top: 1.5rem;
  width: min(100% - 2 * var(--gutter), 34rem);
  margin: clamp(1.25rem, 3.5vh, 2.25rem) auto 0;
  text-align: center;
}

.step h2 {
  margin: 0;
  font: 400 clamp(2rem, 5vw, 3rem)/1 var(--display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--bone);
}

h1:focus,
h2:focus {
  outline: none;
}

.whisper {
  margin: 0.5rem 0 0;
  font: italic 400 clamp(1.375rem, 3vw, 1.75rem)/1.3 var(--serif);
  color: var(--bone);
}

.dispatch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

input[type="email"],
#code-input {
  flex: 1 1 15rem;
  min-width: 0;
  min-height: 3.75rem;
  padding: 0 1.125rem;
  font: 400 1rem/1 var(--mono);
  letter-spacing: 0.02em;
  color: var(--bone);
  background: rgba(4, 5, 9, 0.6);
  border: 1px solid rgba(236, 230, 214, 0.45);
  border-radius: 2px;
}

input[type="email"]::placeholder,
#code-input::placeholder {
  color: var(--dim);
  opacity: 1;
}

input[aria-invalid="true"] {
  border-color: var(--red);
}

button {
  font: inherit;
  color: inherit;
}

.cta {
  flex: 1 0 9.5rem;
  min-height: 3.75rem;
  padding: 0 1.75rem;
  font: 400 1.5rem/1 var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--cyan);
  border: 0;
  border-radius: 2px;
  box-shadow: 0 0 22px rgba(63, 242, 255, 0.45), 0 0 60px rgba(63, 242, 255, 0.2);
  cursor: pointer;
}

.cta:hover {
  background: #a8f8ff;
}

button:disabled {
  opacity: 0.6;
  cursor: progress;
}

:focus-visible {
  outline: 2px solid var(--bone);
  outline-offset: 3px;
}

.error {
  margin: 0.75rem 0 0;
  color: var(--red);
}

.error:empty {
  display: none;
}

.fine {
  margin: 0.875rem 0 0;
  font-size: 0.75rem;
  color: var(--dim);
}

/* Honeypot: off-screen for people, still in the DOM for bots. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---- Choose your path ---- */
.path {
  width: min(100% - 2 * var(--gutter), 46rem);
}

.path form {
  margin-top: 2rem;
  text-align: left;
}

fieldset {
  margin: 0 0 2rem;
  padding: 0;
  border: 0;
}

legend {
  padding: 0;
  margin-bottom: 0.875rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--bone);
}

.count {
  margin-right: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--amber);
}

.hint {
  font-weight: 400;
  color: var(--dim);
}

.options {
  display: grid;
  gap: 0.5rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
}

label.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-height: 3.25rem;
  padding: 0.625rem 1rem;
  font-size: 0.9375rem;
  line-height: 1.35;
  color: var(--bone);
  background: rgba(4, 5, 9, 0.55);
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
}

/* The native control stays in place for keyboard and screen readers; the marker draws it. */
label.choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

/* Radio: a relay diamond, as on the trailer's map. Checkbox: a square station. */
label.choice span::before {
  content: "";
  display: inline-block;
  flex: none;
  width: 0.75rem;
  height: 0.75rem;
  margin-right: 0.875rem;
  vertical-align: -0.05em;
  border: 1px solid var(--dim);
}

label.choice input[type="radio"] + span::before {
  width: 0.875rem;
  height: 0.875rem;
  border: 0;
  background: var(--dim);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%, 50% 0, 50% 18%, 18% 50%, 50% 82%, 82% 50%, 50% 18%);
}

label.choice:hover {
  border-color: rgba(236, 230, 214, 0.5);
}

label.choice:has(input:checked) {
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(63, 242, 255, 0.25), inset 0 0 12px rgba(63, 242, 255, 0.08);
}

label.choice input:checked + span::before {
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

label.choice input[type="radio"]:checked + span::before {
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

label.choice:has(input:focus-visible) {
  outline: 2px solid var(--bone);
  outline-offset: 3px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.actions .cta {
  flex: 0 1 auto;
}

.quiet {
  min-height: 2.75rem;
  padding: 0 0.5rem;
  font: 400 0.75rem/1 var(--mono);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
  background: none;
  border: 0;
  cursor: pointer;
}

.quiet:hover {
  color: var(--bone);
}

/* ---- The no-JavaScript confirmation page ---- */
.received {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 0 var(--gutter) 12vh;
  text-align: center;
}

.received .courier {
  margin-bottom: 1.5rem;
}

.received h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
}

.received .whisper,
.received p {
  margin: 0;
}

.received a {
  display: inline-block;
  min-height: 2.75rem;
  line-height: 2.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

/* ---- Footer ---- */
.foot {
  padding: 4rem var(--gutter) max(1.5rem, env(safe-area-inset-bottom));
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  color: var(--dim);
}

.foot p {
  margin: 0;
}

details {
  margin-top: 0.75rem;
}

summary {
  display: inline-block;
  min-height: 2.75rem;
  line-height: 2.75rem;
  cursor: pointer;
}

details p {
  max-width: 36rem;
  margin: 0.5rem auto 0;
  font-size: 0.8125rem;
  line-height: 1.7;
  letter-spacing: 0;
  text-transform: none;
}

a {
  color: var(--cyan);
}


/* ---- The code step, Turnstile and the agent line ---- */
#code-input {
  font-size: 1.5rem;
  letter-spacing: 0.4em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

#code-input::placeholder {
  letter-spacing: 0.4em;
}

.sent-to {
  display: block;
  margin-top: 0.25rem;
  font: 400 0.9375rem/1.4 var(--mono);
  font-style: normal;
  color: var(--cyan);
  overflow-wrap: anywhere;
}

#code-form {
  margin-top: 1.5rem;
}

.status:empty {
  display: none;
}

.code-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 1.5rem;
  margin: 0.5rem 0 0;
}

.link {
  min-height: 2.75rem;
  padding: 0 0.25rem;
  font: 400 0.75rem/1 var(--mono);
  letter-spacing: 0.08em;
  color: var(--cyan);
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 0.25em;
  cursor: pointer;
}

.link:hover {
  color: #a8f8ff;
}

.link:disabled {
  color: var(--dim);
  text-decoration: none;
  opacity: 1;
  cursor: default;
}

/* Turnstile renders here; with "interaction-only" it stays empty unless Cloudflare asks for a click. */
.turnstile {
  display: flex;
  justify-content: center;
}

.turnstile:not(:empty) {
  margin-top: 0.75rem;
}

.agent-line {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
}

.agent-line a {
  display: inline-block;
  min-height: 2.75rem;
  line-height: 2.75rem;
  color: var(--dim);
  text-underline-offset: 0.25em;
}

.agent-line a:hover {
  color: var(--cyan);
}

.nojs {
  color: var(--amber);
}

/* ---- Version B: the copy first, a smaller film, then the signup. Nothing moves on load. ---- */
.kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.125rem;
  margin: 0;
  font-size: 0.6875rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--amber);
}

.kicker .courier {
  width: 0.5rem;
  height: 0.5rem;
  box-shadow: 0 0 0 3px var(--ink), 0 0 0 4px rgba(255, 179, 65, 0.85), 0 0 18px 6px rgba(255, 179, 65, 0.2);
}

.b .hud {
  min-height: 2rem;
}

.b .player {
  margin-left: auto;
}

html:not(.cinema) .b .player {
  display: none;
}

.intro {
  position: relative;
  z-index: 2;
  width: min(100% - 2 * var(--gutter), 60rem);
  margin: clamp(0.5rem, 3vh, 2rem) auto 0;
  text-align: center;
}

.intro h1 {
  margin-top: 1rem;
  font-size: clamp(2.75rem, 5.2vw, 4.5rem);
  line-height: 0.95;
  text-shadow: 0 0 18px rgba(63, 242, 255, 0.55), 0 0 45px rgba(63, 242, 255, 0.2);
}

.lede {
  margin: 1.375rem auto 0;
  max-width: 40rem;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--bone);
  text-align: left;
  hyphens: manual;
}

.b .stage {
  margin-top: clamp(1.5rem, 4vh, 2.5rem);
}

/* In B the film is an object on the page, not the page: a crisp frame, no feathering. */
.b .screen {
  width: min(100%, 40rem);
}

.b .screen video:not([controls]) {
  -webkit-mask-image: none;
  mask-image: none;
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(4, 5, 9, 0.9), 0 24px 60px rgba(0, 0, 0, 0.55);
}

/* In the cinema view B's film is exactly A's: the whole window, no frame. (These beat the .b rules
   above and the phone overrides below on specificity.) */
.cinema .b .stage {
  margin: 0;
}

.cinema .b .screen {
  width: min(100vw, 100vh * 16 / 9);
  width: min(100vw, 100dvh * 16 / 9);
}

.cinema .b .screen video:not([controls]) {
  border: 0;
  box-shadow: none;
}

.b .ambient {
  opacity: 0.4;
}

/* The film waits on its poster with one clear play button along its lower edge, under the title frame. */
.b .start {
  top: auto;
  right: 0;
  bottom: 5.5%;
  left: 0;
  width: max-content;
  height: 3.25rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  gap: 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  background: rgba(4, 5, 9, 0.8);
  border-color: rgba(255, 179, 65, 0.7);
}

.b .start:hover {
  background: rgba(4, 5, 9, 0.92);
}

.b .start .courier {
  width: 0.625rem;
  height: 0.625rem;
}

.b .endcard .title {
  display: none;
}

.b .endcard .step {
  margin-top: clamp(1.25rem, 3.5vh, 2rem);
}

.cinema.ended .b .endcard .title {
  display: block;
}

.wordmark {
  margin: 0;
  font: 400 clamp(3.25rem, 7.5vw, 6.5rem)/0.9 var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bone);
  text-shadow: var(--glow-cyan);
}

/* ---- The agents page ---- */
.doc {
  width: min(100% - 2 * var(--gutter), 44rem);
  margin: clamp(1rem, 5vh, 3.5rem) auto 0;
}

.doc .kicker {
  justify-content: flex-start;
}

.doc h1 {
  margin-top: 1.125rem;
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 0.95;
}

.doc h2 {
  margin: 2.75rem 0 0;
  font: 400 clamp(1.5rem, 3.5vw, 2rem)/1.1 var(--display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.doc .lede {
  max-width: none;
  margin-left: 0;
  font-size: 1rem;
}

.doc p {
  line-height: 1.75;
}

.doc code {
  font: 400 0.875em/1.5 var(--mono);
  color: var(--cyan);
}

.doc pre {
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  background: rgba(236, 230, 214, 0.04);
  border: 1px solid var(--line);
  border-left: 2px solid var(--cyan);
  border-radius: 2px;
}

.doc pre code {
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--bone);
  white-space: pre;
}

.hud-mark a {
  color: inherit;
  text-decoration: none;
}

.received .note {
  max-width: 32rem;
  line-height: 1.7;
}

/* ---- Phone ---- */
@media (max-width: 40rem) {
  .hud-mark,
  .hud-button {
    font-size: 0.625rem;
    letter-spacing: 0.16em;
  }

  .hud-button {
    padding: 0 0.5rem;
  }

  .stage {
    margin-top: 1.5rem;
  }

  .screen video:not([controls]) {
    -webkit-mask-image:
      linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent),
      linear-gradient(180deg, transparent, #000 8%, #000 82%, transparent);
    mask-image:
      linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent),
      linear-gradient(180deg, transparent, #000 8%, #000 82%, transparent);
  }

  .title {
    margin-top: 0.25rem;
  }

  .step {
    margin-top: 2rem;
  }

  .dispatch .cta {
    flex-basis: 100%;
  }

  .b .stage {
    margin-top: 1.25rem;
  }

  .b .screen {
    width: calc(100% - 2 * var(--gutter));
  }

  .b .endcard .step {
    margin-top: 1.25rem;
  }

  .intro h1 {
    margin-top: 0.75rem;
  }

  .lede {
    margin-top: 1rem;
    font-size: 0.9375rem;
    line-height: 1.6;
  }

  .b .start {
    bottom: 3.5%;
    height: 2.75rem;
    padding: 0 1rem;
    font-size: 0.6875rem;
    letter-spacing: 0.16em;
  }
}

[hidden] {
  display: none !important;
}
