:root {
  /* Commissioner / IBM Plex Mono / Mono** telemetry palette lock */
  --void-midnight: #050816;
  --submarine-blue: #071B3A;
  --signal-cobalt: #1E5BFF;
  --lumen-cyan: #7DE7FF;
  --bruised-violet: #2A164D;
  --infrared-rose: #FF4D88;
  --bone-subtitle: #D8E4FF;
  --commissioner: "Commissioner", Inter, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: "Noto Serif KR", Georgia, serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--void-midnight);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--bone-subtitle);
  font-family: var(--commissioner);
  overflow-x: hidden;
  background:
    radial-gradient(circle at 78% 12%, rgba(30, 91, 255, 0.18), transparent 25vw),
    radial-gradient(circle at 14% 72%, rgba(42, 22, 77, 0.44), transparent 34vw),
    linear-gradient(145deg, var(--void-midnight) 0%, var(--submarine-blue) 48%, var(--void-midnight) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, transparent 38%, rgba(5, 8, 22, 0.72) 100%);
  z-index: 6;
}

#particle-field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  mix-blend-mode: screen;
}

.grain, .scanlines, .projector-haze {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.grain {
  z-index: 7;
  opacity: 0.18;
  background-image:
    radial-gradient(circle at 22% 33%, rgba(216, 228, 255, 0.35) 0 1px, transparent 1px),
    radial-gradient(circle at 78% 51%, rgba(125, 231, 255, 0.22) 0 1px, transparent 1px),
    radial-gradient(circle at 49% 79%, rgba(255, 77, 136, 0.20) 0 1px, transparent 1px);
  background-size: 19px 23px, 31px 29px, 37px 41px;
  animation: grainShift 0.6s steps(2) infinite;
}

.scanlines {
  z-index: 5;
  opacity: 0.22;
  background: repeating-linear-gradient(to bottom, transparent 0 7px, rgba(216, 228, 255, 0.035) 8px, transparent 9px);
}

.projector-haze {
  z-index: 2;
  opacity: 0.6;
  background:
    conic-gradient(from 240deg at 15% 85%, rgba(125, 231, 255, 0.11), transparent 14%, rgba(30, 91, 255, 0.08), transparent 35%),
    radial-gradient(ellipse at 82% 18%, rgba(125, 231, 255, 0.09), transparent 42%);
  filter: blur(22px);
}

.film-strip { position: relative; z-index: 3; }

.scene {
  min-height: 100vh;
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(8, 1fr);
  padding: clamp(22px, 4vw, 58px);
  overflow: hidden;
  isolation: isolate;
}

.scene::after {
  content: "";
  position: absolute;
  inset: 9vh 8vw;
  border: 1px solid rgba(125, 231, 255, 0.055);
  opacity: 0.85;
  pointer-events: none;
}

.signal-nav {
  position: fixed;
  right: clamp(18px, 3vw, 42px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 9;
  display: grid;
  gap: 13px;
  font: 300 10px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.signal-nav a {
  color: rgba(216, 228, 255, 0.42);
  text-decoration: none;
  transition: color 0.45s ease, text-shadow 0.45s ease, transform 0.45s ease;
}

.signal-nav a.active, .signal-nav a:hover {
  color: var(--lumen-cyan);
  text-shadow: 0 0 18px rgba(125, 231, 255, 0.72);
  transform: translateX(-6px);
}

.scene-mark, .coordinate, .edge-label, .mono-readout, .final-telemetry, .transcript-rail {
  font-family: var(--mono);
  color: rgba(125, 231, 255, 0.68);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: clamp(9px, 0.85vw, 12px);
}

.title-lockup {
  grid-column: 2 / 8;
  grid-row: 6 / 8;
  align-self: end;
}

h1, h2, p { margin: 0; }

h1 {
  font-size: clamp(58px, 12vw, 178px);
  line-height: 0.86;
  font-weight: 800;
  letter-spacing: -0.06em;
  color: rgba(216, 228, 255, 0.86);
  text-shadow: 0 0 38px rgba(30, 91, 255, 0.35), 0 0 3px rgba(125, 231, 255, 0.2);
}

h2 {
  font-size: clamp(32px, 6vw, 96px);
  line-height: 0.94;
  font-weight: 300;
  letter-spacing: -0.04em;
  color: rgba(216, 228, 255, 0.9);
  text-shadow: 0 0 30px rgba(30, 91, 255, 0.22);
}

.thin-copy p:not(.scene-mark), .final-copy p, .projection-panel p:not(.scene-mark):not(.serif-line) {
  margin-top: 22px;
  max-width: 520px;
  color: rgba(216, 228, 255, 0.63);
  font-size: clamp(16px, 1.55vw, 22px);
  line-height: 1.55;
  font-weight: 300;
}

.upper-right {
  grid-column: 8 / 12;
  grid-row: 2;
  justify-self: end;
}

.pulse-caret {
  position: absolute;
  top: 19vh;
  right: 18vw;
  width: 16px;
  height: 28px;
  border: 1px solid rgba(255, 77, 136, 0.85);
  box-shadow: 0 0 28px rgba(255, 77, 136, 0.62);
  animation: caretBlink 3.7s infinite;
}

.pulse-caret span {
  position: absolute;
  width: 5px;
  height: 5px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--infrared-rose);
  box-shadow: 0 0 18px var(--infrared-rose);
}

.pulse-caret span::before, .pulse-caret span::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--infrared-rose);
}
.pulse-caret span::before { left: -3px; }
.pulse-caret span::after { top: -3px; }

.pulse-ring {
  position: absolute;
  top: 20vh;
  right: 18vw;
  width: 14px;
  height: 14px;
  border: 1px solid var(--infrared-rose);
  border-radius: 50%;
  animation: vulnerablePulse 8.5s cubic-bezier(.2, .1, .1, 1) infinite;
}

.delayed-line {
  grid-column: 7 / 11;
  grid-row: 6;
  align-self: center;
  min-height: 2em;
  color: rgba(216, 228, 255, 0.68);
  font: 300 clamp(17px, 1.5vw, 24px)/1.6 var(--commissioner);
}

.edge-label.left {
  position: absolute;
  left: 32px;
  top: 43%;
  writing-mode: vertical-rl;
}

.listening-glyph {
  grid-column: 3 / 5;
  grid-row: 3 / 6;
  place-self: center;
  width: clamp(110px, 16vw, 220px);
  aspect-ratio: 1;
  border: 1px solid rgba(125, 231, 255, 0.28);
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 45px rgba(30, 91, 255, 0.12), 0 0 48px rgba(30, 91, 255, 0.18);
}

.listening-glyph span {
  position: absolute;
  width: 40%;
  aspect-ratio: 1;
  border: 1px solid rgba(125, 231, 255, 0.2);
  border-radius: 50%;
  animation: listenRing 4.5s ease-in-out infinite;
}
.listening-glyph span:nth-child(2) { width: 62%; animation-delay: -1.3s; }
.listening-glyph span:nth-child(3) { width: 82%; animation-delay: -2.7s; }

.copy-right { grid-column: 7 / 11; grid-row: 4 / 6; }
.copy-left { grid-column: 2 / 6; grid-row: 5 / 7; align-self: center; }

.waveform {
  grid-column: 6 / 12;
  grid-row: 7;
  display: flex;
  align-items: center;
  gap: 13px;
  opacity: 0.78;
}
.waveform i {
  display: block;
  width: 1px;
  height: 28px;
  background: var(--lumen-cyan);
  box-shadow: 0 0 14px rgba(125, 231, 255, 0.72);
  transform-origin: center;
  animation: waveBreath 2.8s ease-in-out infinite;
}
.waveform i:nth-child(2n) { animation-delay: -0.4s; height: 55px; }
.waveform i:nth-child(3n) { animation-delay: -1s; height: 17px; background: var(--signal-cobalt); }

.transcript-rail {
  grid-column: 2 / 4;
  grid-row: 2 / 8;
  align-self: stretch;
  border-left: 1px solid rgba(125, 231, 255, 0.18);
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: rgba(216, 228, 255, 0.43);
}

.projection-panel {
  grid-column: 5 / 11;
  grid-row: 3 / 7;
  align-self: center;
  min-height: 42vh;
  padding: clamp(28px, 4vw, 58px);
  background: linear-gradient(135deg, rgba(7, 27, 58, 0.34), rgba(42, 22, 77, 0.16));
  border: 1px solid rgba(125, 231, 255, 0.1);
  box-shadow: inset 0 0 80px rgba(5, 8, 22, 0.6), 0 0 90px rgba(30, 91, 255, 0.06);
}

.serif-line {
  margin-top: 36px;
  font-family: var(--serif);
  color: rgba(216, 228, 255, 0.76);
  font-size: clamp(19px, 2vw, 31px);
}

.fragment-line { display: block; margin-top: 42px; }

.orbit-map {
  grid-column: 4 / 12;
  grid-row: 2 / 7;
  position: relative;
  border: 1px solid rgba(125, 231, 255, 0.08);
  border-radius: 50%;
  transform: rotate(-12deg);
  background: radial-gradient(circle, rgba(30, 91, 255, 0.08), transparent 48%);
}

.orbit-map::before, .orbit-map::after {
  content: "";
  position: absolute;
  inset: 14%;
  border: 1px solid rgba(125, 231, 255, 0.08);
  border-radius: 50%;
}
.orbit-map::after { inset: 31%; border-color: rgba(255, 77, 136, 0.12); }

.node, .traveling-signal {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lumen-cyan);
  box-shadow: 0 0 24px var(--lumen-cyan);
}
.node-a { left: 18%; top: 65%; }
.node-b { left: 72%; top: 22%; }
.node-c { left: 82%; top: 72%; background: var(--signal-cobalt); }
.traveling-signal {
  background: var(--infrared-rose);
  box-shadow: 0 0 28px var(--infrared-rose);
  animation: orbitTravel 7s ease-in-out infinite;
}

.signal-button {
  grid-column: 9 / 11;
  grid-row: 7;
  align-self: center;
  justify-self: start;
  appearance: none;
  border: 1px solid rgba(255, 77, 136, 0.5);
  color: var(--bone-subtitle);
  background: rgba(5, 8, 22, 0.34);
  padding: 14px 22px;
  font: 400 11px/1 var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: 0 0 28px rgba(255, 77, 136, 0.12);
  cursor: pointer;
  transition: transform 0.5s ease, box-shadow 0.5s ease, border-color 0.5s ease;
}
.signal-button:hover, .signal-button.sent {
  transform: translateY(-4px);
  border-color: var(--infrared-rose);
  box-shadow: 0 0 46px rgba(255, 77, 136, 0.36);
}

.blank-panel {
  grid-column: 2 / 12;
  grid-row: 2 / 6;
  border-bottom: 1px solid rgba(125, 231, 255, 0.12);
  background: radial-gradient(ellipse at 65% 50%, rgba(7, 27, 58, 0.34), transparent 48%);
}
.subtitle-bar { grid-column: 3 / 9; grid-row: 6 / 8; align-self: center; }
.mono-readout { margin-top: 26px; color: rgba(255, 77, 136, 0.72); }

.arrival-pulse {
  grid-column: 6 / 8;
  grid-row: 3 / 5;
  place-self: center;
  width: clamp(80px, 13vw, 170px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 77, 136, 0.75) 0 3px, rgba(255, 77, 136, 0.12) 4px 24%, transparent 25%);
  box-shadow: 0 0 100px rgba(255, 77, 136, 0.26), 0 0 180px rgba(30, 91, 255, 0.18);
  animation: arrivePulse 6.2s ease-in-out infinite;
}
.final-copy { grid-column: 3 / 8; grid-row: 5 / 7; }
.final-telemetry { grid-column: 7 / 12; grid-row: 8; justify-self: end; align-self: end; }

@keyframes grainShift {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-1.5%, 1%); }
  100% { transform: translate(1%, -1%); }
}
@keyframes caretBlink {
  0%, 7%, 15%, 100% { opacity: 0.16; }
  9%, 13%, 64% { opacity: 1; }
}
@keyframes vulnerablePulse {
  0% { transform: translate(1px, 6px) scale(0.3); opacity: 0.95; }
  53% { opacity: 0.18; }
  100% { transform: translate(1px, 6px) scale(38); opacity: 0; }
}
@keyframes listenRing {
  0%, 100% { transform: scale(0.72); opacity: 0.18; }
  45% { transform: scale(1.08); opacity: 0.78; }
}
@keyframes waveBreath {
  0%, 100% { transform: scaleY(0.36); opacity: 0.35; }
  48% { transform: scaleY(1.15); opacity: 0.95; }
}
@keyframes orbitTravel {
  0% { left: 18%; top: 65%; opacity: 0.4; }
  33% { left: 72%; top: 22%; opacity: 1; }
  66% { left: 82%; top: 72%; opacity: 0.7; }
  100% { left: 18%; top: 65%; opacity: 0.4; }
}
@keyframes arrivePulse {
  0%, 100% { transform: scale(0.8); opacity: 0.52; }
  46% { transform: scale(1.16); opacity: 1; }
}

@media (max-width: 820px) {
  .signal-nav { display: none; }
  .scene { grid-template-columns: repeat(6, 1fr); padding: 24px; }
  .title-lockup, .copy-right, .copy-left, .projection-panel, .subtitle-bar, .final-copy { grid-column: 1 / -1; }
  .title-lockup { grid-row: 6; }
  .delayed-line { grid-column: 1 / -1; grid-row: 7; }
  .transcript-rail { grid-column: 1 / 3; opacity: 0.55; }
  .projection-panel { grid-row: 3 / 7; }
  .orbit-map { grid-column: 1 / -1; grid-row: 2 / 6; }
  .signal-button { grid-column: 1 / 4; }
  .final-telemetry { grid-column: 1 / -1; justify-self: start; }
}
