:root {
  /* typography weights tiny strings */
  --deep-console: #101827;
  --compressed-slate: #1D2A3D;
  --mist-surface: #DCE7F2;
  --protocol-cyan: #61D7E8;
  --periwinkle-violet: #7D8CFF;
  --soft-aquamarine: #8CF0D2;
  --ink-shadow: #07101D;
  --light: rgba(220, 231, 242, 0.22);
  --shadow: rgba(7, 16, 29, 0.65);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--mist-surface);
  background:
    radial-gradient(circle at 18% 12%, rgba(97, 215, 232, 0.12), transparent 28vw),
    radial-gradient(circle at 82% 78%, rgba(125, 140, 255, 0.13), transparent 32vw),
    linear-gradient(145deg, var(--deep-console), var(--ink-shadow));
  font-family: "IBM Plex Sans", sans-serif;
}

.ambient-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image:
    linear-gradient(rgba(97, 215, 232, .16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(97, 215, 232, .16) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(circle at center, black, transparent 74%);
}

.hud-frame {
  position: fixed;
  inset: 18px;
  z-index: 20;
  pointer-events: none;
  border: 1px solid rgba(220, 231, 242, .12);
  border-radius: 28px;
  box-shadow: inset 14px 14px 32px rgba(7, 16, 29, .5), inset -10px -10px 26px rgba(220, 231, 242, .06);
}

.corner {
  position: absolute;
  width: 74px;
  height: 74px;
  border-color: var(--protocol-cyan);
  opacity: .72;
}
.corner-tl { left: 18px; top: 18px; border-left: 2px solid; border-top: 2px solid; border-radius: 18px 0 0 0; }
.corner-tr { right: 18px; top: 18px; border-right: 2px solid; border-top: 2px solid; border-radius: 0 18px 0 0; }
.corner-bl { left: 18px; bottom: 18px; border-left: 2px solid; border-bottom: 2px solid; border-radius: 0 0 0 18px; }
.corner-br { right: 18px; bottom: 18px; border-right: 2px solid; border-bottom: 2px solid; border-radius: 0 0 18px 0; }

.hud-topline {
  position: absolute;
  top: 24px;
  left: 116px;
  right: 116px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-family: "Space Mono", monospace;
  font-size: 11px;
  letter-spacing: .22em;
  color: rgba(220, 231, 242, .75);
}

.tick-rail {
  position: absolute;
  top: 18%;
  bottom: 18%;
  width: 1px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}
.tick-left { left: 42px; }
.tick-right { right: 42px; }
.tick-rail span {
  width: 18px;
  height: 1px;
  background: rgba(140, 240, 210, .48);
  box-shadow: 0 0 12px rgba(97, 215, 232, .32);
}
.tick-right span { transform: translateX(-17px); }

.route-ledger {
  position: fixed;
  z-index: 25;
  left: 48px;
  top: 50%;
  transform: translateY(-50%);
  width: 170px;
  padding: 18px 14px;
  border-radius: 24px;
  background: rgba(29, 42, 61, .58);
  backdrop-filter: blur(18px);
  box-shadow: 12px 12px 28px var(--shadow), -10px -10px 24px rgba(220, 231, 242, .08), inset 1px 1px 0 var(--light);
}

.ledger-title, .eyebrow, .stage-label, .seal, .checksum, .chip, .ledger-readout {
  font-family: "Space Mono", monospace;
  text-transform: uppercase;
}

.ledger-title {
  font-size: 10px;
  letter-spacing: .25em;
  color: var(--soft-aquamarine);
  margin-bottom: 18px;
}

.ledger-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
  padding: 10px 8px;
  border-radius: 15px;
  color: rgba(220, 231, 242, .56);
  text-decoration: none;
  font-family: "Roboto Mono", monospace;
  font-size: 11px;
  transition: transform .25s ease, box-shadow .25s ease, color .25s ease, background .25s ease;
}
.ledger-item:hover, .ledger-item.active {
  transform: scale(1.045);
  color: var(--mist-surface);
  background: rgba(16, 24, 39, .58);
  box-shadow: inset 7px 7px 16px rgba(7, 16, 29, .72), inset -5px -5px 14px rgba(220, 231, 242, .06);
}
.ledger-item b { color: var(--protocol-cyan); }

.ledger-readout {
  margin-top: 18px;
  font-size: 9px;
  line-height: 1.55;
  color: rgba(140, 240, 210, .72);
}

.diagnostics {
  position: fixed;
  z-index: 24;
  right: 50px;
  top: 38%;
  display: grid;
  gap: 13px;
}
.chip {
  padding: 12px 15px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: .12em;
  color: rgba(220, 231, 242, .78);
  background: rgba(29, 42, 61, .64);
  box-shadow: 9px 9px 22px var(--shadow), -7px -7px 18px rgba(220, 231, 242, .07);
  transition: transform .25s ease, box-shadow .25s ease;
}
.chip:hover { transform: scale(1.045); box-shadow: inset 8px 8px 18px rgba(7, 16, 29, .56), inset -7px -7px 18px rgba(220, 231, 242, .07); }
.chip span {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--soft-aquamarine);
  box-shadow: 0 0 14px var(--soft-aquamarine);
}

.mission-pane {
  min-height: 100vh;
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 390px) minmax(390px, 720px);
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 6vw, 90px);
  padding: 92px 230px 80px 250px;
}

.pane-copy { position: relative; z-index: 2; }
.eyebrow {
  margin: 0 0 18px;
  color: var(--protocol-cyan);
  letter-spacing: .28em;
  font-size: 12px;
}

h1, h2 {
  position: relative;
  margin: 0;
  color: var(--mist-surface);
  font-family: "Space Mono", monospace;
  font-weight: 700;
  letter-spacing: -.08em;
  line-height: .85;
  text-shadow: 0 0 28px rgba(97, 215, 232, .17);
}
h1 { font-size: clamp(64px, 10vw, 142px); }
h2 { font-size: clamp(54px, 8vw, 110px); }
h1::before, h2::before, h1::after, h2::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
.glitching h1::before, .glitching h2::before { opacity: .72; color: var(--protocol-cyan); transform: translate(5px, -2px); clip-path: inset(13% 0 58% 0); }
.glitching h1::after, .glitching h2::after { opacity: .58; color: var(--periwinkle-violet); transform: translate(-6px, 3px); clip-path: inset(55% 0 18% 0); }

.pane-copy p:not(.eyebrow) {
  max-width: 420px;
  color: rgba(220, 231, 242, .72);
  font-size: 18px;
  line-height: 1.7;
}

.compression-stage {
  position: relative;
  min-height: 62vh;
  border-radius: 44px;
  background: linear-gradient(145deg, rgba(29, 42, 61, .96), rgba(16, 24, 39, .92));
  box-shadow: 26px 30px 62px rgba(7, 16, 29, .72), -18px -18px 46px rgba(220, 231, 242, .08), inset 1px 1px 0 var(--light);
  overflow: hidden;
}
.compression-stage::before {
  content: "";
  position: absolute;
  inset: 30px;
  border: 1px solid rgba(97, 215, 232, .14);
  border-radius: 34px;
  box-shadow: inset 16px 16px 34px rgba(7, 16, 29, .48), inset -12px -12px 26px rgba(220, 231, 242, .05);
}

.stage-label {
  position: absolute;
  z-index: 4;
  top: 28px;
  left: 34px;
  font-size: 11px;
  letter-spacing: .22em;
  color: rgba(140, 240, 210, .72);
}

.well {
  position: absolute;
  inset: 24% 18%;
  border-radius: 42% 58% 50% 48% / 54% 42% 58% 46%;
  background: rgba(7, 16, 29, .34);
  box-shadow: inset 24px 24px 48px rgba(7, 16, 29, .78), inset -18px -18px 44px rgba(220, 231, 242, .07);
}
.well.deep { inset: 20% 15%; border-radius: 38% 62% 41% 59% / 61% 41% 59% 39%; }
.well.glow { box-shadow: inset 24px 24px 48px rgba(7, 16, 29, .72), inset -18px -18px 44px rgba(220, 231, 242, .07), 0 0 50px rgba(140, 240, 210, .12); }

.blob {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: min(32vw, 330px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 52% 48% 62% 38% / 40% 58% 42% 60%;
  background: radial-gradient(circle at 28% 24%, rgba(220, 231, 242, .42), transparent 21%), linear-gradient(135deg, rgba(140, 240, 210, .76), rgba(97, 215, 232, .42) 52%, rgba(125, 140, 255, .54));
  filter: drop-shadow(18px 22px 30px rgba(7, 16, 29, .55));
  animation: breathe 7s ease-in-out infinite;
}
.blob::before, .blob::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: inherit;
  border: 1px solid rgba(220, 231, 242, .24);
}
.blob::after { inset: 24%; border-color: rgba(7, 16, 29, .25); }
.blob span {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent 0 42%, rgba(125, 140, 255, .28) 43% 47%, transparent 48% 100%);
  mix-blend-mode: screen;
  animation: shear 5.5s steps(1) infinite;
}
.blob-b { width: min(34vw, 390px); border-radius: 38% 62% 46% 54% / 55% 39% 61% 45%; }
.blob-c { width: min(28vw, 300px); }
.blob-d { width: min(30vw, 340px); border-radius: 50%; }

.contours {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: min(45vw, 520px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 24px, rgba(97, 215, 232, .18) 25px 26px, transparent 27px 42px);
  animation: rings 10s linear infinite;
}
.contours.tight { background: repeating-radial-gradient(circle, transparent 0 15px, rgba(140, 240, 210, .16) 16px 17px, transparent 18px 31px); }
.contours.pulse { animation: rings 4s linear infinite, proofPulse 2.8s ease-in-out infinite; }

.fragment {
  position: absolute;
  z-index: 5;
  border: 0;
  border-radius: 16px;
  padding: 12px 16px;
  color: var(--mist-surface);
  background: rgba(29, 42, 61, .86);
  font-family: "Roboto Mono", monospace;
  font-size: 12px;
  box-shadow: 10px 12px 24px rgba(7, 16, 29, .62), -8px -8px 18px rgba(220, 231, 242, .08);
  transition: transform .25s ease, box-shadow .25s ease;
}
.fragment:hover { transform: scale(1.045); box-shadow: inset 8px 8px 18px rgba(7, 16, 29, .62), inset -7px -7px 18px rgba(220, 231, 242, .08); }
.f1 { left: 12%; top: 18%; }
.f2 { right: 12%; top: 24%; }
.f3 { left: 17%; bottom: 18%; }
.f4 { right: 16%; bottom: 17%; }
.tucked { opacity: .72; transform: translateY(42px) scale(.92); }

.proof-line {
  position: absolute;
  z-index: 6;
  left: 18%;
  right: 18%;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--protocol-cyan), var(--soft-aquamarine), transparent);
  transform: scaleX(.24);
  opacity: .42;
  box-shadow: 0 0 20px rgba(97, 215, 232, .44);
  transform-origin: center;
}
.proof-line.active { animation: trace 2.8s ease-in-out infinite; }
.proof-line.wide { left: 10%; right: 10%; }

.pressure-bar {
  position: absolute;
  left: 21%;
  right: 21%;
  bottom: 18%;
  height: 13px;
  border-radius: 999px;
  background: rgba(7, 16, 29, .44);
  box-shadow: inset 8px 8px 16px rgba(7, 16, 29, .7), inset -5px -5px 12px rgba(220, 231, 242, .06);
}
.pressure-bar i { display: block; width: 72%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--protocol-cyan), var(--soft-aquamarine)); animation: compressFill 4s ease-in-out infinite; }

.checksum {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 18%;
  transform: translateX(-50%);
  font-size: 13px;
  letter-spacing: .14em;
  color: var(--soft-aquamarine);
}
.seal {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 17%;
  transform: translateX(-50%);
  padding: 14px 20px;
  border-radius: 999px;
  color: var(--ink-shadow);
  background: var(--soft-aquamarine);
  box-shadow: 0 0 30px rgba(140, 240, 210, .28);
  font-size: 12px;
  letter-spacing: .16em;
}

@keyframes breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); border-radius: 52% 48% 62% 38% / 40% 58% 42% 60%; }
  50% { transform: translate(-50%, -50%) scale(1.055); border-radius: 42% 58% 45% 55% / 58% 41% 59% 42%; }
}
@keyframes shear { 0%, 88%, 100% { transform: translateX(0); opacity: .28; } 89% { transform: translateX(13px); opacity: .8; } 91% { transform: translateX(-9px); opacity: .48; } }
@keyframes rings { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes proofPulse { 50% { opacity: .35; filter: drop-shadow(0 0 18px rgba(97, 215, 232, .5)); } }
@keyframes trace { 0%, 100% { transform: scaleX(.2); opacity: .25; } 50% { transform: scaleX(1); opacity: 1; } }
@keyframes compressFill { 0%, 100% { width: 38%; } 50% { width: 92%; } }

@media (max-width: 980px) {
  .route-ledger, .diagnostics { display: none; }
  .mission-pane { grid-template-columns: 1fr; padding: 96px 44px; }
  .compression-stage { min-height: 55vh; }
  .hud-topline { left: 42px; right: 42px; font-size: 9px; }
}
