/* ALONE : NO SIGNAL — public site
   Palette drawn from the game's own blue-hour fog and sodium-lamp light. */

:root {
  --void: #06080a;
  --panel: #0b1014;
  --panel-2: #0e141a;
  --line: #19222a;
  --line-warm: #2a2119;
  --mist: #7fa3ad;
  --bone: #e2e7e8;
  --body: #97a4aa;
  --dim: #66757d;
  --amber: #e0a05a;
  --amber-hot: #f0b978;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;

  --shell: 1120px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* The browser hides [hidden] with a rule so weak that any `display` we set
   below would override it — which would leave the closed lightbox sitting
   invisibly over the page, swallowing every click. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--bone);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.72;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
::selection { background: var(--amber); color: var(--void); }

a { color: inherit; }
a:focus-visible,
button:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }

.shell { max-width: var(--shell); margin: 0 auto; padding: 0 28px; }

/* Fine film grain over everything, so flat blacks never band. */
.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  opacity: 0.5;
  background-image: repeating-linear-gradient(0deg, rgba(0,0,0,0.16) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}

/* ---------------------------------------------------------------- top bar */

.topbar {
  position: fixed; inset: 0 0 auto; z-index: 40;
  transition: transform 0.45s var(--ease), background 0.35s, border-color 0.35s;
  border-bottom: 1px solid transparent;
}
.topbar.is-stuck {
  background: rgba(6, 8, 10, 0.82);
  backdrop-filter: blur(14px) saturate(120%);
  border-bottom-color: var(--line);
}
.topbar.is-hidden { transform: translateY(-100%); }

.topbar-inner {
  max-width: var(--shell); margin: 0 auto;
  padding: 14px 28px;
  display: flex; align-items: center; gap: 28px;
}
.brand { flex: none; line-height: 0; }
.brand img { height: 28px; width: auto; filter: invert(0.93); }

.topnav { display: flex; gap: 26px; margin-left: auto; }
.topnav a {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--dim); text-decoration: none;
  position: relative; padding: 4px 0; transition: color 0.25s;
}
.topnav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--amber); transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.topnav a:hover { color: var(--bone); }
.topnav a:hover::after,
.topnav a.is-active::after { transform: scaleX(1); }
.topnav a.is-active { color: var(--bone); }

.topbar-cta {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; text-decoration: none;
  color: var(--amber); border: 1px solid var(--line-warm);
  padding: 9px 18px; transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.topbar-cta:hover { background: var(--amber); color: var(--void); border-color: var(--amber); }

.menu-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.menu-toggle span { display: block; width: 22px; height: 1px; background: var(--bone); }
.menu-toggle span + span { margin-top: 6px; }

/* Five bars that never quite reach full strength — the title, as a graphic. */
.signal-strip {
  display: flex; gap: 3px; align-items: flex-end;
  height: 12px; padding: 0 28px 0;
  max-width: var(--shell); margin: 0 auto;
  opacity: 0; transition: opacity 0.5s;
}
.topbar.is-stuck .signal-strip { opacity: 0.6; }
.signal-strip span {
  width: 3px; background: var(--mist); opacity: 0.35;
  animation: signal 3.4s steps(1) infinite;
}
.signal-strip span:nth-child(1) { height: 3px;  animation-delay: 0s; }
.signal-strip span:nth-child(2) { height: 5px;  animation-delay: 0.4s; }
.signal-strip span:nth-child(3) { height: 7px;  animation-delay: 0.8s; }
.signal-strip span:nth-child(4) { height: 9px;  animation-delay: 1.2s; }
.signal-strip span:nth-child(5) { height: 11px; animation-delay: 1.6s; }
@keyframes signal {
  0%, 70% { opacity: 0.12; }
  75%, 85% { opacity: 0.55; }
  90%, 100% { opacity: 0.12; }
}

/* ------------------------------------------------------------------- hero */

.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 140px 24px 110px;
  isolation: isolate; overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-image {
  position: absolute; inset: -6%;
  background-position: center; background-size: cover; background-repeat: no-repeat;
  transform: scale(1.06);
  animation: drift 32s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes drift {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to   { transform: scale(1.14) translate3d(-1.5%, -1.5%, 0); }
}
.hero-fog {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 40% at 50% 62%, rgba(127, 163, 173, 0.16), transparent 70%),
    radial-gradient(40% 30% at 22% 40%, rgba(127, 163, 173, 0.10), transparent 70%);
  animation: fog 22s ease-in-out infinite alternate;
}
@keyframes fog {
  from { opacity: 0.5; transform: translateX(-2%); }
  to   { opacity: 0.95; transform: translateX(2%); }
}
.hero-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(6, 8, 10, 0.82) 0%,
    rgba(6, 8, 10, 0.30) 42%,
    rgba(6, 8, 10, 0.72) 78%,
    var(--void) 100%);
}

.hero-body { position: relative; z-index: 1; width: 100%; }

.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.42em;
  text-transform: uppercase; color: var(--mist); margin-bottom: 30px;
}
.hero-logo {
  width: min(560px, 84vw); height: auto; margin: 0 auto;
  filter: invert(0.95) drop-shadow(0 6px 40px rgba(0, 0, 0, 0.9));
}
.hero-tagline {
  margin: 34px auto 0; max-width: 40ch;
  font-size: clamp(18px, 2.4vw, 22px); font-style: italic;
  color: #b9c3c6; text-wrap: balance;
}
.hero-actions {
  margin-top: 42px; display: flex; gap: 14px;
  justify-content: center; flex-wrap: wrap;
}
.hero-status { margin-top: 24px; }
.status {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--mist);
}
.status i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--amber);
  box-shadow: 0 0 0 0 rgba(224, 160, 90, 0.6);
  animation: beacon 2.4s ease-out infinite;
}
@keyframes beacon {
  0%   { box-shadow: 0 0 0 0 rgba(224, 160, 90, 0.55); }
  70%  { box-shadow: 0 0 0 11px rgba(224, 160, 90, 0); }
  100% { box-shadow: 0 0 0 0 rgba(224, 160, 90, 0); }
}

.scroll-cue {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-decoration: none; z-index: 1;
}
.scroll-line {
  width: 1px; height: 44px; background: linear-gradient(var(--dim), transparent);
  position: relative; overflow: hidden;
}
.scroll-line::after {
  content: ""; position: absolute; inset: 0; background: var(--amber);
  animation: trickle 2.6s var(--ease) infinite;
}
@keyframes trickle {
  0%   { transform: translateY(-100%); }
  60%  { transform: translateY(100%); }
  100% { transform: translateY(100%); }
}
.scroll-word {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--dim);
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em;
  text-transform: uppercase; text-decoration: none;
  padding: 15px 28px; cursor: pointer;
  color: var(--bone); background: rgba(6, 8, 10, 0.55);
  border: 1px solid #33414a;
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease);
}
.btn:hover { border-color: var(--mist); transform: translateY(-2px); }
.btn b { font-weight: 400; font-size: 13px; }

.btn-primary {
  background: var(--amber); color: var(--void); border-color: var(--amber);
  position: relative; overflow: hidden;
}
.btn-primary:hover { background: var(--amber-hot); border-color: var(--amber-hot); }
.btn-primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 42%;
  left: -60%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  transition: left 0.65s var(--ease);
}
.btn-primary:hover::after { left: 120%; }

/* -------------------------------------------------------------- sections */

.band { padding: 118px 0; border-top: 1px solid var(--line); }

.label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--amber);
  margin-bottom: 16px; position: relative; padding-left: 34px;
}
.label::before {
  content: ""; position: absolute; left: 0; top: 0.72em;
  width: 24px; height: 1px; background: var(--amber);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.6s var(--ease) 0.15s;
}
.label.in::before { transform: scaleX(1); }

h2 {
  font-size: clamp(30px, 4.4vw, 48px); font-weight: 400;
  line-height: 1.14; letter-spacing: -0.01em;
  margin-bottom: 22px; text-wrap: balance;
}
h3 { font-weight: 400; }

.lede { color: var(--body); max-width: 56ch; font-size: 18px; }
.prose { color: var(--body); max-width: 60ch; }
.prose p + p { margin-top: 1.1em; }
.prose a { color: var(--mist); }

/* about */
.about { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; }
.about-figure { position: relative; border: 1px solid var(--line); overflow: hidden; }
.about-figure img { width: 100%; filter: saturate(0.9) contrast(1.04); }
.frame-tick {
  position: absolute; left: 14px; bottom: 14px;
  width: 26px; height: 26px;
  border-left: 1px solid rgba(224, 160, 90, 0.8);
  border-bottom: 1px solid rgba(224, 160, 90, 0.8);
}

/* features */
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 20px; margin-top: 58px;
}
.feature {
  position: relative; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line);
  padding: 36px 30px 38px;
  transition: border-color 0.35s, transform 0.35s var(--ease), background 0.35s;
}
.feature:hover { border-color: var(--line-warm); transform: translateY(-4px); background: var(--panel-2); }
.feature-code {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--mist);
  margin-bottom: 18px; transition: color 0.35s;
}
.feature:hover .feature-code { color: var(--amber); }
.feature h3 { font-size: 24px; margin-bottom: 12px; }
.feature-body { color: var(--body); font-size: 15.5px; }
.feature-glow {
  position: absolute; inset: auto 0 0 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  transform: scaleX(0); transition: transform 0.5s var(--ease);
}
.feature:hover .feature-glow { transform: scaleX(1); }

/* trailer */
.trailer {
  position: relative; margin-top: 56px;
  border: 1px solid var(--line); overflow: hidden;
  aspect-ratio: 16 / 9; background: #000;
}
.trailer-poster {
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(0.62) saturate(0.88);
  transition: filter 0.5s, transform 0.8s var(--ease);
}
.trailer:hover .trailer-poster { filter: brightness(0.82); transform: scale(1.03); }
.trailer video { width: 100%; height: 100%; display: block; object-fit: cover; background: #000; }

.trailer-play {
  position: absolute; inset: 0; width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  background: none; border: 0; cursor: pointer;
}
.disc {
  position: relative; width: 86px; height: 86px; border-radius: 50%;
  border: 1px solid rgba(226, 231, 232, 0.8);
  background: rgba(6, 8, 10, 0.42);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s, border-color 0.3s, transform 0.3s var(--ease);
}
.disc::after {
  content: ""; width: 0; height: 0; margin-left: 6px;
  border-left: 19px solid var(--bone);
  border-top: 12px solid transparent; border-bottom: 12px solid transparent;
  transition: border-left-color 0.3s;
}
.trailer-play:hover .disc { background: var(--amber); border-color: var(--amber); transform: scale(1.06); }
.trailer-play:hover .disc::after { border-left-color: var(--void); }

/* Radar pings behind the play button — the signal that never arrives. */
.ping {
  position: absolute; top: 50%; left: 50%; width: 86px; height: 86px;
  margin: -43px 0 0 -43px; border-radius: 50%;
  border: 1px solid rgba(224, 160, 90, 0.5);
  animation: ping 3s var(--ease) infinite;
}
.ping-2 { animation-delay: 1.5s; }
@keyframes ping {
  0%   { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(2.6); opacity: 0; }
}
.play-word {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--bone);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9);
}

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 58px; }
.gallery .shot:first-child { grid-column: 1 / -1; }
.shot { border: 1px solid var(--line); background: var(--panel-2); }
.shot-frame { position: relative; overflow: hidden; cursor: zoom-in; }
.shot-frame img {
  width: 100%; filter: saturate(0.9);
  transition: transform 0.9s var(--ease), filter 0.5s;
}
.shot:hover .shot-frame img { transform: scale(1.045); filter: saturate(1.05) brightness(1.08); }
.shot-zoom {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--bone); background: rgba(6, 8, 10, 0.42);
  opacity: 0; transition: opacity 0.35s;
}
.shot:hover .shot-zoom { opacity: 1; }
.shot figcaption {
  display: flex; justify-content: space-between; gap: 14px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--dim); padding: 15px 17px;
}
.shot figcaption b { color: var(--mist); font-weight: 400; }

/* updates timeline */
.timeline { margin-top: 58px; border-left: 1px solid var(--line); }
.post { display: grid; grid-template-columns: 190px 1fr; gap: 28px; padding: 0 0 46px 30px; position: relative; }
.post-meta {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--dim);
  display: flex; align-items: center; gap: 12px;
}
.post-dot {
  position: absolute; left: -4px; top: 9px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--amber); box-shadow: 0 0 12px rgba(224, 160, 90, 0.7);
}
.post-body h3 { font-size: 24px; margin-bottom: 12px; }
.post-image { width: 100%; border: 1px solid var(--line); margin-bottom: 16px; }

/* community panel */
.community {
  margin-top: 20px; display: flex; align-items: center; justify-content: space-between;
  gap: 34px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line);
  padding: 42px 46px; position: relative; overflow: hidden;
}
.community::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 2px;
  background: linear-gradient(180deg, transparent, var(--amber), transparent);
}
.community-eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--mist); margin-bottom: 12px;
}
.community h3 { font-size: 27px; margin-bottom: 10px; }
.community-body { color: var(--body); max-width: 46ch; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 34px 0 46px; }
.foot {
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--dim);
}
.foot-links { display: flex; gap: 22px; }
.foot a { text-decoration: none; transition: color 0.25s; }
.foot a:hover { color: var(--bone); }

/* ------------------------------------------------------- uplink / boot screen
   Runs once per session while the receiver "finds" the signal, then wipes.
   Hidden entirely unless the inline head script opted this visit in, so a
   visitor without JS never sees it and never gets stuck behind it. */

.uplink { display: none; }

.booting .uplink {
  display: flex; position: fixed; inset: 0; z-index: 90;
  align-items: center; justify-content: center;
  background: var(--void);
  font-family: var(--mono);
}
.booting body,
.booting { overflow: hidden; }

/* Faint CRT grid behind the readout. */
.booting .uplink::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(127, 163, 173, 0.05) 0 1px, transparent 1px 4px),
    radial-gradient(60% 50% at 50% 50%, rgba(127, 163, 173, 0.06), transparent 75%);
}
.uplink.is-done { animation: uplink-out 0.55s var(--ease) forwards; }
@keyframes uplink-out {
  0%   { opacity: 1; transform: scale(1); filter: brightness(1); }
  35%  { opacity: 1; transform: scale(1.008); filter: brightness(2.4); }
  100% { opacity: 0; transform: scale(1.03); filter: brightness(1); visibility: hidden; }
}

.uplink-inner { position: relative; width: min(520px, 86vw); }

.uplink-head {
  display: flex; align-items: center; gap: 11px;
  font-size: 12px; letter-spacing: 0.34em; color: var(--amber);
  margin-bottom: 22px;
}
.uplink-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--amber);
  animation: beacon 1.4s ease-out infinite;
}

.uplink-log {
  min-height: 132px; font-size: 12.5px; line-height: 2;
  color: var(--mist); letter-spacing: 0.06em;
}
.uplink-line { white-space: nowrap; overflow: hidden; }
.uplink-line b { color: var(--bone); font-weight: 400; }
.uplink-line.is-fail b { color: var(--amber); }
.uplink-caret { color: var(--amber); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.uplink-meter {
  height: 2px; background: rgba(127, 163, 173, 0.18);
  margin: 26px 0 12px; overflow: hidden;
}
.uplink-bar {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--mist), var(--amber));
  transition: width 0.28s linear;
}
.uplink-foot {
  display: flex; justify-content: space-between;
  font-size: 11px; letter-spacing: 0.24em; color: var(--dim);
}
#uplink-pct { font-variant-numeric: tabular-nums; }

.uplink-skip {
  position: absolute; right: 26px; bottom: 24px;
  background: none; border: 1px solid var(--line);
  color: var(--dim); cursor: pointer;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.24em;
  text-transform: uppercase; padding: 9px 16px;
  transition: color 0.25s, border-color 0.25s;
}
.uplink-skip:hover { color: var(--bone); border-color: var(--mist); }

/* ------------------------------------------- appearance switches (admin)
   These mirror the toggles in the site manager. The theme <style> block sets
   the colour and font variables; these classes turn whole effects on or off. */

:root { --radius: 0px; }

.btn, .feature, .shot, .about-figure, .trailer, .community,
.row, .media-card, .lb-stage { border-radius: var(--radius); }

/* Effects: off */
.no-vhs .vhs::before, .no-vhs .vhs::after,
.no-vhs .hero-track { display: none; }
.no-vhs .shot:hover .shot-frame img,
.no-vhs .trailer:hover .trailer-poster { filter: none; animation: none; }

/* Effects: subtle */
.vhs-lite .vhs::before { opacity: 0.3; }
.vhs-lite .vhs::after { animation-duration: 15s; opacity: 0.45; }
.vhs-lite .shot:hover .shot-frame img,
.vhs-lite .trailer:hover .trailer-poster { animation: none; }

/* Motion off: the page stops drifting but keeps every colour and texture. */
.no-motion .hero-image { animation: none; transform: scale(1.03); }
.no-motion .hero-fog, .no-motion .hero-track { animation: none; }
.no-motion .ping { animation: none; opacity: 0; }
.no-motion .scroll-line::after { animation: none; }
.no-motion .signal-strip span { animation: none; }

/* ------------------------------------------------------------------- VHS
   A worn-tape treatment for anything that is meant to read as recovered
   footage: scanlines, a tracking band rolling up the frame, and on hover the
   colour channels pulling apart the way a stretched tape misaligns them. */

.filter-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.vhs { position: relative; overflow: hidden; }

/* Scanlines, plus a faint red/cyan bleed at the edges of the frame. */
.vhs::before {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.26) 0 1px, transparent 1px 3px),
    linear-gradient(90deg, rgba(255, 40, 90, 0.07), transparent 14%,
                    transparent 86%, rgba(60, 210, 255, 0.07));
  opacity: 0.6; transition: opacity 0.4s;
}

/* The tracking band. Transform-only so it stays on the compositor. */
.vhs::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 15%;
  z-index: 4; pointer-events: none;
  background: linear-gradient(180deg,
    transparent, rgba(226, 231, 232, 0.05) 30%, rgba(226, 231, 232, 0.16) 52%,
    rgba(226, 231, 232, 0.05) 72%, transparent);
  filter: blur(1px);
  transform: translateY(-140%);
  animation: vhs-roll 7.5s linear infinite;
}
@keyframes vhs-roll {
  0%   { transform: translateY(-140%); opacity: 0; }
  7%   { opacity: 1; }
  93%  { opacity: 1; }
  100% { transform: translateY(720%); opacity: 0; }
}

/* Quieter variant for images that are not the focus of the section. */
.vhs-soft::before { opacity: 0.34; }
.vhs-soft::after { animation-duration: 16s; opacity: 0.5; }

.shot:hover .shot-frame::before,
.trailer:hover::before { opacity: 0.85; }
.shot:hover .shot-frame::after,
.trailer:hover::after { animation-duration: 2.6s; }

/* Channel split + a stutter that lands every couple of seconds, not constantly. */
.shot:hover .shot-frame img,
.trailer:hover .trailer-poster {
  filter: url(#vhs-split) saturate(1.06) brightness(1.06);
  animation: vhs-jitter 2.4s steps(1) infinite;
}
@keyframes vhs-jitter {
  0%, 86%, 100% { transform: scale(1.045) translateX(0); }
  88%           { transform: scale(1.045) translateX(-4px); }
  90%           { transform: scale(1.045) translateX(3px); }
  92%           { transform: scale(1.045) translateX(-1px); }
}

/* One slow sweep down the hero every so often, barely there. */
.hero-track {
  position: absolute; left: 0; right: 0; top: 0; height: 22%;
  background: linear-gradient(180deg,
    transparent, rgba(127, 163, 173, 0.05) 45%, rgba(226, 231, 232, 0.07) 55%, transparent);
  filter: blur(2px);
  transform: translateY(-160%);
  animation: hero-track 17s linear infinite;
}
@keyframes hero-track {
  0%   { transform: translateY(-160%); opacity: 0; }
  10%  { opacity: 1; }
  55%  { opacity: 1; }
  70%, 100% { transform: translateY(500%); opacity: 0; }
}

/* ---------------------------------------------------------------- lightbox */

.lightbox {
  position: fixed; inset: 0; z-index: 70;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4, 6, 8, 0.94); backdrop-filter: blur(8px);
  opacity: 0; transition: opacity 0.3s;
}
.lightbox.is-open { opacity: 1; }
/* The stage shrink-wraps the image so the scanlines and tracking band sit on
   the picture itself rather than on the black surround. */
.lb-stage {
  display: inline-block; line-height: 0;
  border: 1px solid var(--line);
  transform: scale(0.97); transition: transform 0.35s var(--ease);
}
.lightbox.is-open .lb-stage { transform: scale(1); }
.lb-image { max-width: min(1180px, 92vw); max-height: 82vh; display: block; }

/* Changing frame plays a brief head-switching glitch. */
.lb-stage.is-changing .lb-image { animation: lb-glitch 0.42s steps(1); }
@keyframes lb-glitch {
  0%   { transform: translateX(0);    filter: none; }
  20%  { transform: translateX(-9px); filter: url(#vhs-split) brightness(1.3); }
  40%  { transform: translateX(7px);  filter: url(#vhs-split) brightness(0.8); }
  60%  { transform: translateX(-3px); filter: url(#vhs-split); }
  80%  { transform: translateX(2px);  filter: brightness(1.1); }
  100% { transform: translateX(0);    filter: none; }
}

/* Camcorder on-screen display. */
.lb-osd {
  position: absolute; inset: auto 0 0 0; z-index: 5; pointer-events: none;
  display: flex; align-items: center; gap: 18px;
  padding: 16px 18px; line-height: 1.4;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: rgba(226, 231, 232, 0.86);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.95);
  background: linear-gradient(0deg, rgba(4, 6, 8, 0.55), transparent);
}
.lb-rec { display: inline-flex; align-items: center; gap: 8px; }
.lb-rec i {
  width: 8px; height: 8px; border-radius: 50%; background: var(--amber);
  animation: beacon 2.4s ease-out infinite;
}
.lb-tape { color: var(--mist); }
.lb-time { margin-left: auto; font-variant-numeric: tabular-nums; }
.lb-caption {
  position: absolute; bottom: 26px; left: 0; right: 0; text-align: center;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--dim);
}
.lb-close, .lb-nav {
  position: absolute; background: none; border: 0; cursor: pointer;
  color: var(--bone); font-size: 34px; line-height: 1;
  padding: 14px 18px; opacity: 0.65; transition: opacity 0.25s;
}
.lb-close:hover, .lb-nav:hover { opacity: 1; }
.lb-close { top: 16px; right: 20px; font-size: 30px; }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }

/* --------------------------------------------------------------- reveals */

/* Everything below is scoped to `.js`, which the page adds to <html> before
   first paint. If the script ever fails to load, nothing is hidden and the
   whole page still reads normally. */
.js .reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal[data-delay="1"] { transition-delay: 0.09s; }
.js .reveal[data-delay="2"] { transition-delay: 0.18s; }
.js .reveal[data-delay="3"] { transition-delay: 0.27s; }
.js .reveal[data-delay="4"] { transition-delay: 0.36s; }

/* Hold the hero still until the page-load sequence runs. */
.js body.preload .hero .reveal { opacity: 0; }

/* ------------------------------------------------------------- responsive */

@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; gap: 40px; }
  .post { grid-template-columns: 1fr; gap: 10px; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .band { padding: 84px 0; }
  .topbar-cta { display: none; }
  .menu-toggle { display: block; margin-left: auto; }
  .topnav {
    position: fixed; inset: 62px 0 auto; margin: 0;
    flex-direction: column; gap: 0;
    background: rgba(6, 8, 10, 0.97); border-bottom: 1px solid var(--line);
    padding: 8px 28px 22px;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity 0.3s, transform 0.3s var(--ease);
  }
  .topnav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .topnav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .gallery { grid-template-columns: 1fr; }
  .community { padding: 32px 26px; }
  .hero { padding: 120px 20px 96px; }
}

/* ------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .hero-image { animation: none; transform: scale(1.02); }
  /* Keep the tape texture, drop everything that moves. */
  .vhs::after, .hero-track { display: none; }
  .shot:hover .shot-frame img,
  .trailer:hover .trailer-poster { animation: none; }
  .lb-stage.is-changing .lb-image { animation: none; }
}
