:root {
  color-scheme: dark;
  --bg: #080b10;
  --card: rgba(12, 18, 29, 0.78);
  --card-strong: rgba(15, 24, 38, 0.94);
  --line: rgba(170, 194, 221, 0.2);
  --text: #eef7ff;
  --muted: #9fb0c5;
  --green: #48ff99;
  --cyan: #60d8ff;
  --yellow: #ffc75a;
  --red: #ff5577;
  --violet: #b695ff;
  --editor-chaos: 1;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 16%, rgba(72, 255, 153, 0.2), transparent 28rem),
    radial-gradient(circle at 90% 6%, rgba(96, 216, 255, 0.18), transparent 30rem),
    radial-gradient(circle at 48% 98%, rgba(182, 149, 255, 0.16), transparent 30rem),
    linear-gradient(135deg, #05070b 0%, #0b111b 52%, #07090e 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 7px);
  mix-blend-mode: soft-light;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.ambient span {
  position: absolute;
  width: 34vmax;
  height: 34vmax;
  border: 1px solid rgba(96, 216, 255, 0.16);
  border-radius: 42% 58% 64% 36%;
  filter: blur(2px);
  opacity: 0.34;
  animation: blob-dance calc(18s / var(--editor-chaos)) ease-in-out infinite;
}

#rainCanvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.18;
  transition: opacity 0.8s ease;
}

.ambient span:nth-child(1) { left: -8vmax; top: 18vh; color: var(--green); box-shadow: 0 0 90px currentColor; }
.ambient span:nth-child(2) { right: -10vmax; top: 8vh; color: var(--cyan); box-shadow: 0 0 90px currentColor; animation-duration: 24s; animation-delay: -8s; }
.ambient span:nth-child(3) { left: 34vw; bottom: -18vmax; color: var(--violet); box-shadow: 0 0 90px currentColor; animation-duration: 28s; animation-delay: -12s; }
.ambient span:nth-child(4) { left: 62vw; top: 52vh; width: 18vmax; height: 18vmax; color: var(--yellow); box-shadow: 0 0 70px currentColor; animation-duration: 12s; animation-delay: -3s; }
.ambient span:nth-child(5) { left: 18vw; top: -11vmax; width: 22vmax; height: 22vmax; color: var(--red); box-shadow: 0 0 70px currentColor; animation-duration: 16s; animation-delay: -6s; }

a { color: inherit; text-decoration: none; }

.site-header,
main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header,
main { position: relative; z-index: 2; }

.site-header {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 11, 18, 0.72);
  padding: 10px 12px;
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  animation: header-breathe calc(4s / var(--editor-chaos)) ease-in-out infinite;
}

.brand,
nav,
.hero-actions,
.terminal-bar,
.terminal-screen p,
.signals li {
  display: flex;
  align-items: center;
}

.brand { gap: 10px; font-weight: 850; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  color: #071018;
  font-weight: 950;
}

nav { gap: 4px; }

nav a {
  border-radius: 999px;
  padding: 10px 13px;
  color: var(--muted);
  font-weight: 750;
}

nav a:hover,
nav a:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

main { padding: 26px 0 64px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 390px);
  grid-template-rows: minmax(420px, 1fr) auto;
  gap: 20px;
  min-height: calc(100vh - 130px);
}

.hero-stage {
  position: relative;
  grid-column: 1 / -1;
  min-height: clamp(430px, 58vw, 760px);
  border: 1px solid rgba(96, 216, 255, 0.24);
  border-radius: 42px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(72, 255, 153, 0.12), transparent 22rem),
    radial-gradient(circle at 70% 28%, rgba(96, 216, 255, 0.17), transparent 22rem),
    linear-gradient(145deg, rgba(8, 15, 25, 0.78), rgba(3, 6, 10, 0.82));
  box-shadow: 0 38px 130px rgba(0, 0, 0, 0.48), inset 0 0 90px rgba(96, 216, 255, 0.06);
  isolation: isolate;
}

.hero-stage::before,
.hero-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.hero-stage::before {
  background:
    linear-gradient(115deg, transparent 0 48%, rgba(96, 216, 255, 0.12) 49%, transparent 52% 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 12px);
  mix-blend-mode: screen;
  animation: stage-scan calc(7s / var(--editor-chaos)) linear infinite;
}

.hero-stage::after {
  background: radial-gradient(circle at 50% 55%, transparent 0 36%, rgba(3, 6, 10, 0.72) 100%);
}

#cageScene {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
}

.model-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  perspective: 1100px;
}

.iso-room {
  position: relative;
  width: min(64vw, 620px);
  aspect-ratio: 1.22;
  transform-style: preserve-3d;
  transform: rotateX(62deg) rotateZ(-38deg);
  animation: room-drift calc(9s / var(--editor-chaos)) ease-in-out infinite;
}

.iso-room::before {
  content: "";
  position: absolute;
  inset: 16% 4% 6%;
  border: 1px solid rgba(72, 255, 153, 0.28);
  background:
    linear-gradient(rgba(72, 255, 153, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(72, 255, 153, 0.11) 1px, transparent 1px),
    rgba(5, 12, 20, 0.62);
  background-size: 34px 34px;
  box-shadow: 0 0 60px rgba(72, 255, 153, 0.16);
  transform: translateZ(-18px);
}

.rack,
.desk,
.antenna,
.orbit {
  position: absolute;
  transform-style: preserve-3d;
}

.rack {
  width: 92px;
  height: 188px;
  border: 1px solid rgba(96, 216, 255, 0.3);
  border-radius: 12px;
  background: linear-gradient(135deg, #172238, #050910);
  box-shadow: inset 0 0 28px rgba(96, 216, 255, 0.16), 0 0 42px rgba(72, 255, 153, 0.14);
  transform: translateZ(78px) rotateX(-90deg);
}

.rack-a { left: 18%; top: 30%; }
.rack-b { right: 18%; top: 24%; height: 220px; }

.rack i {
  display: block;
  height: 18px;
  margin: 9px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(72, 255, 153, 0.22), rgba(96, 216, 255, 0.46), rgba(255, 199, 90, 0.24));
  box-shadow: 0 0 18px rgba(96, 216, 255, 0.32);
  animation: rack-pulse calc(1.8s / var(--editor-chaos)) ease-in-out infinite;
}

.rack i:nth-child(2n) { animation-delay: -0.5s; }
.rack i:nth-child(3n) { animation-delay: -1s; }

.desk {
  left: 42%;
  top: 58%;
  width: 170px;
  height: 86px;
  border-radius: 16px;
  background: linear-gradient(135deg, #172033, #0a111d);
  box-shadow: 0 0 46px rgba(182, 149, 255, 0.22);
  transform: translateZ(46px) rotateX(-90deg);
}

.desk span {
  position: absolute;
  top: -34px;
  width: 42px;
  height: 28px;
  border: 1px solid rgba(72, 255, 153, 0.38);
  border-radius: 5px;
  background: rgba(96, 216, 255, 0.22);
  box-shadow: 0 0 18px rgba(96, 216, 255, 0.46);
  animation: monitor-flicker calc(2.4s / var(--editor-chaos)) ease-in-out infinite;
}

.desk span:nth-child(1) { left: 20px; }
.desk span:nth-child(2) { left: 64px; animation-delay: -0.8s; }
.desk span:nth-child(3) { left: 108px; animation-delay: -1.4s; }

.antenna {
  left: 16%;
  top: 70%;
  width: 80px;
  height: 80px;
  border: 4px solid rgba(96, 216, 255, 0.48);
  border-radius: 50%;
  box-shadow: 0 0 38px rgba(96, 216, 255, 0.38);
  transform: translateZ(92px) rotateX(-90deg);
  animation: antenna-ping calc(2.2s / var(--editor-chaos)) ease-out infinite;
}

.orbit {
  left: 50%;
  top: 50%;
  border: 1px solid rgba(72, 255, 153, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%) translateZ(140px) rotateX(-90deg);
  animation: orbit-spin calc(5s / var(--editor-chaos)) linear infinite;
}

.orbit-a { width: 300px; height: 300px; }
.orbit-b { width: 420px; height: 420px; animation-duration: 8s; animation-direction: reverse; }

.stage-labels {
  position: absolute;
  inset: auto 22px 22px 22px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stage-labels span {
  border: 1px solid rgba(72, 255, 153, 0.28);
  border-radius: 999px;
  background: rgba(4, 9, 15, 0.58);
  padding: 10px 12px;
  color: #dffff0;
  font: 850 0.74rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
  animation: label-float calc(3.4s / var(--editor-chaos)) ease-in-out infinite;
}

.stage-labels span:nth-child(2) { animation-delay: -0.7s; }
.stage-labels span:nth-child(3) { animation-delay: -1.4s; }
.stage-labels span:nth-child(4) { animation-delay: -2.1s; color: #fff4cd; border-color: rgba(255, 199, 90, 0.4); }
.stage-labels span:nth-child(5) { animation-delay: -2.7s; color: #ffe1e8; border-color: rgba(255, 85, 119, 0.42); }

.hud-stack {
  position: absolute;
  right: 22px;
  top: 22px;
  z-index: 3;
  display: grid;
  gap: 10px;
  width: min(220px, calc(100% - 44px));
}

.hud-stack div {
  border: 1px solid rgba(96, 216, 255, 0.28);
  border-radius: 16px;
  background: rgba(4, 9, 15, 0.6);
  padding: 10px;
  backdrop-filter: blur(14px);
  animation: hud-pop calc(2.6s / var(--editor-chaos)) ease-in-out infinite;
}

.hud-stack div:nth-child(2) { animation-delay: -0.8s; }
.hud-stack div:nth-child(3) { animation-delay: -1.5s; }

.hud-stack b {
  display: block;
  margin-bottom: 8px;
  color: var(--cyan);
  font: 900 0.68rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.16em;
}

.hud-stack i {
  display: block;
  width: 100%;
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.hud-stack i::before {
  content: "";
  display: block;
  width: var(--v);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--cyan), var(--yellow));
  box-shadow: 0 0 18px rgba(72, 255, 153, 0.52);
  animation: meter-surge calc(1.4s / var(--editor-chaos)) ease-in-out infinite;
}

.warning-cloud span {
  position: absolute;
  z-index: 3;
  border: 1px solid rgba(255, 85, 119, 0.35);
  border-radius: 8px;
  background: rgba(20, 4, 10, 0.48);
  padding: 8px 10px;
  color: #ffdce5;
  font: 950 0.66rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.14em;
  transform: rotate(-5deg);
  animation: warning-jitter calc(1.8s / var(--editor-chaos)) steps(2, end) infinite;
}

.warning-cloud span:nth-child(1) { left: 7%; top: 20%; }
.warning-cloud span:nth-child(2) { right: 18%; top: 49%; animation-delay: -0.6s; transform: rotate(6deg); }
.warning-cloud span:nth-child(3) { left: 18%; bottom: 18%; animation-delay: -1.2s; transform: rotate(3deg); }

.hero-copy,
.terminal,
.showcase,
.mission,
.cards article,
.signals,
.contact {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, var(--card), rgba(6, 10, 18, 0.68));
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(20px);
}

.hero-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: 38px;
  padding: clamp(30px, 6vw, 70px);
}

.hero-copy,
.terminal {
  min-height: 430px;
}

.hero-copy::before {
  content: "C3COCK";
  position: absolute;
  top: -0.2em;
  right: -0.12em;
  color: rgba(255, 255, 255, 0.038);
  font-size: clamp(5rem, 17vw, 15rem);
  font-weight: 950;
  letter-spacing: -0.13em;
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font: 850 0.78rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
p { margin-top: 0; }

h1 {
  max-width: 860px;
  margin-bottom: 22px;
  font-size: clamp(4rem, 10vw, 9.4rem);
  line-height: 0.8;
  letter-spacing: -0.1em;
}

h1::before,
h1::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}

h1 { position: relative; }

h1::before {
  color: var(--cyan);
  transform: translate(3px, -2px);
  clip-path: inset(0 0 56% 0);
  animation: glitch-a calc(4.3s / var(--editor-chaos)) steps(1, end) infinite;
}

h1::after {
  color: var(--red);
  transform: translate(-3px, 2px);
  clip-path: inset(48% 0 0 0);
  animation: glitch-b calc(5.1s / var(--editor-chaos)) steps(1, end) infinite;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.65rem, 4vw, 3.35rem);
  line-height: 0.95;
  letter-spacing: -0.065em;
}

.lead,
.mission p,
.cards p,
.contact p {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.lead {
  max-width: 690px;
  margin-bottom: 30px;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.hero-actions { flex-wrap: wrap; gap: 12px; }

.hero-actions a {
  border: 1px solid rgba(72, 255, 153, 0.46);
  border-radius: 999px;
  background: rgba(72, 255, 153, 0.12);
  padding: 14px 18px;
  color: #e8fff3;
  font-weight: 900;
}

.hero-actions .ghost {
  border-color: rgba(170, 194, 221, 0.28);
  background: rgba(255, 255, 255, 0.06);
}

.terminal {
  display: flex;
  flex-direction: column;
  border-radius: 38px;
  background: linear-gradient(180deg, var(--card-strong), rgba(5, 9, 14, 0.96));
  padding: 18px;
  animation: card-tilt calc(7s / var(--editor-chaos)) ease-in-out infinite;
}

.terminal-bar {
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 4px 4px 16px;
  color: var(--muted);
  font: 850 0.75rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.12em;
}

.terminal-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--red);
}

.terminal-bar span:nth-child(2) { background: var(--yellow); }
.terminal-bar span:nth-child(3) { background: var(--green); }
.terminal-bar strong { margin-left: auto; }

.terminal-screen {
  display: grid;
  gap: 10px;
  margin: 22px 0;
}

.terminal-screen p {
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  border: 1px solid rgba(170, 194, 221, 0.15);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  padding: 14px;
  position: relative;
  overflow: hidden;
}

.terminal-screen p::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(96, 216, 255, 0.16), transparent);
  transform: translateX(-120%);
  animation: row-sweep calc(2.8s / var(--editor-chaos)) ease-in-out infinite;
}

.terminal-screen p:nth-child(2)::after { animation-delay: -0.7s; }
.terminal-screen p:nth-child(3)::after { animation-delay: -1.4s; }
.terminal-screen p:nth-child(4)::after { animation-delay: -2.1s; }

.ticker {
  overflow: hidden;
  border: 1px solid rgba(72, 255, 153, 0.18);
  border-radius: 999px;
  background: rgba(72, 255, 153, 0.06);
  margin-bottom: 18px;
  padding: 9px 0;
  color: #dffff0;
  font: 850 0.72rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ticker span {
  display: inline-block;
  min-width: 200%;
  animation: ticker calc(10s / var(--editor-chaos)) linear infinite;
}

.terminal-screen b {
  color: var(--muted);
  font: 850 0.78rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.terminal-screen span { font-weight: 900; }
.pulse { color: var(--green); text-shadow: 0 0 18px rgba(72, 255, 153, 0.7); }

.terminal-feed {
  max-height: 148px;
  overflow-y: auto;
  scrollbar-width: thin;
  border: 1px solid rgba(72, 255, 153, 0.14);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.32);
  margin-bottom: 14px;
  padding: 8px;
}

.terminal-feed p {
  margin: 0;
  padding: 4px 6px;
  font: 700 0.62rem/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
  animation: feed-in 0.3s ease-out both;
}

.terminal-feed p:nth-child(odd) { color: #c7e6ff; }
.terminal-feed p:nth-child(even) { color: #9cc9e0; }

.radar {
  position: relative;
  flex: 1;
  min-height: 330px;
  border: 1px solid rgba(72, 255, 153, 0.24);
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle, transparent 0 21%, rgba(72, 255, 153, 0.08) 22% 23%, transparent 24% 44%, rgba(72, 255, 153, 0.08) 45% 46%, transparent 47%),
    linear-gradient(transparent calc(50% - 1px), rgba(72, 255, 153, 0.18) 50%, transparent calc(50% + 1px)),
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(72, 255, 153, 0.18) 50%, transparent calc(50% + 1px));
}

.showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: 22px;
  align-items: end;
  margin-top: 20px;
  border-radius: 34px;
  padding: clamp(26px, 5vw, 52px);
  background:
    linear-gradient(135deg, rgba(72, 255, 153, 0.1), transparent 38%),
    linear-gradient(145deg, var(--card), rgba(6, 10, 18, 0.68));
}

.showcase p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.beam {
  position: absolute;
  inset: 50% 0 0 50%;
  width: 55%;
  height: 55%;
  background: linear-gradient(42deg, rgba(72, 255, 153, 0.44), transparent 62%);
  transform-origin: 0 0;
  animation: sweep 3.4s linear infinite;
}

.blip {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 22px var(--green);
}

.one { left: 64%; top: 34%; }
.two { left: 29%; top: 61%; animation: blink 1.5s ease-in-out infinite; }
.three { left: 49%; top: 73%; animation: blink 2.2s ease-in-out infinite; }

.mission,
.signals,
.contact {
  margin-top: 20px;
  border-radius: 34px;
  padding: clamp(26px, 5vw, 56px);
}

.mission h2 { max-width: 930px; }
.mission p { max-width: 760px; margin-bottom: 0; }

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 20px;
}

.cards article {
  min-height: 270px;
  border-radius: 28px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  animation: card-rise calc(8s / var(--editor-chaos)) ease-in-out infinite;
}

.cards article:nth-child(2) { animation-delay: -1.4s; }
.cards article:nth-child(3) { animation-delay: -2.8s; }
.cards article:nth-child(4) { animation-delay: -4.2s; }

.cards article::before {
  content: "";
  position: absolute;
  inset: -80px;
  background: conic-gradient(from 0deg, transparent, rgba(96, 216, 255, 0.18), transparent, rgba(72, 255, 153, 0.16), transparent);
  animation: border-spin calc(7s / var(--editor-chaos)) linear infinite;
  opacity: 0.75;
}

.cards article > * { position: relative; z-index: 1; }

.cards span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 58px;
  border: 1px solid rgba(96, 216, 255, 0.38);
  border-radius: 14px;
  color: var(--cyan);
  font-weight: 950;
}

.cards h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
.cards p { margin-bottom: 0; }

.signals {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 460px);
  gap: 24px;
  align-items: center;
}

.signals ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.signals li {
  gap: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
  padding: 15px;
  color: #dce9f8;
  font-weight: 780;
  animation: signal-slide calc(3.8s / var(--editor-chaos)) ease-in-out infinite;
}

.live-banner {
  position: fixed;
  left: 50%;
  top: 86px;
  z-index: 30;
  max-width: min(820px, calc(100% - 28px));
  transform: translateX(-50%);
  border: 1px solid rgba(255, 199, 90, 0.48);
  border-radius: 999px;
  background: rgba(10, 6, 2, 0.78);
  box-shadow: 0 0 38px rgba(255, 199, 90, 0.2), 0 18px 60px rgba(0, 0, 0, 0.38);
  padding: 12px 18px;
  color: #fff6d8;
  font: 950 0.8rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
  backdrop-filter: blur(16px);
  animation: banner-slam calc(1.8s / var(--editor-chaos)) ease-in-out infinite;
}

.chat-editor {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  width: min(430px, calc(100% - 36px));
  color: var(--text);
}

.chat-toggle {
  display: none;
  width: 100%;
  border: 1px solid rgba(72, 255, 153, 0.42);
  border-radius: 18px;
  background: rgba(5, 12, 20, 0.86);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
  font-weight: 900;
  justify-content: space-between;
  backdrop-filter: blur(16px);
}

.chat-toggle b {
  color: var(--green);
  font: 900 0.68rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.12em;
}

.chat-panel {
  border: 1px solid rgba(96, 216, 255, 0.28);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(72, 255, 153, 0.09), transparent 36%),
    rgba(4, 8, 14, 0.82);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48), inset 0 0 44px rgba(96, 216, 255, 0.05);
  overflow: hidden;
  backdrop-filter: blur(20px);
}

.chat-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(170, 194, 221, 0.16);
  padding: 16px;
}

.chat-head h2 {
  margin: 0;
  font-size: 1.55rem;
}

.chat-head .eyebrow { margin-bottom: 6px; }

.chat-head button,
.chat-actions button {
  border: 1px solid rgba(170, 194, 221, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 9px 11px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.chat-log {
  display: grid;
  gap: 8px;
  max-height: 230px;
  overflow: auto;
  padding: 14px 16px;
  scrollbar-width: thin;
}

.chat-message {
  width: fit-content;
  max-width: 92%;
  margin: 0;
  border-radius: 16px;
  padding: 10px 12px;
  color: #dce9f8;
  line-height: 1.45;
}

.chat-message.bot {
  border: 1px solid rgba(72, 255, 153, 0.22);
  background: rgba(72, 255, 153, 0.08);
}

.chat-message.user {
  justify-self: end;
  border: 1px solid rgba(96, 216, 255, 0.24);
  background: rgba(96, 216, 255, 0.09);
}

.chat-form {
  border-top: 1px solid rgba(170, 194, 221, 0.16);
  padding: 14px;
}

.chat-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font: 850 0.72rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.chat-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 76px;
  border: 1px solid rgba(96, 216, 255, 0.25);
  border-radius: 18px;
  outline: none;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  padding: 12px;
  font: inherit;
}

.chat-form textarea:focus {
  border-color: rgba(72, 255, 153, 0.58);
  box-shadow: 0 0 0 3px rgba(72, 255, 153, 0.1);
}

.chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
}

.chat-actions button[type="submit"] {
  border-color: rgba(72, 255, 153, 0.48);
  background: rgba(72, 255, 153, 0.14);
  color: #e8fff3;
}

body[data-chaos="max"] .hero-stage,
body[data-chaos="max"] .chat-panel {
  box-shadow: 0 38px 130px rgba(0, 0, 0, 0.48), 0 0 70px color-mix(in srgb, var(--green) 34%, transparent);
}

body[data-chaos="calm"] .warning-cloud,
body[data-chaos="calm"] .ambient span:nth-child(4),
body[data-chaos="calm"] .ambient span:nth-child(5) {
  display: none;
}

.mouse-glow {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.68s cubic-bezier(0.16, 1, 0.2, 1), transform 0.68s cubic-bezier(0.16, 1, 0.2, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.lead {
  visibility: hidden;
}

.lead.done::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--green);
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: cursor-blink 0.9s step-end infinite;
}

.konami-banner {
  z-index: 50;
  border: none !important;
  animation: konami-pulse 0.4s ease-in-out infinite !important;
}

@keyframes banner-slam {
  50% { transform: translateX(-50%) scale(1.025); filter: brightness(1.18); }
}

.signals li:nth-child(2) { animation-delay: -1.2s; }
.signals li:nth-child(3) { animation-delay: -2.4s; }

.signals li span {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 18px currentColor;
}

.green { color: var(--green); }
.yellow { color: var(--yellow); }
.red { color: var(--red); }

.contact h2 { max-width: 880px; }
.contact p { max-width: 760px; margin-bottom: 0; }

@keyframes sweep {
  to { transform: rotate(360deg); }
}

@keyframes blink {
  50% { opacity: 0.32; transform: scale(0.72); }
}

@keyframes stage-scan {
  from { background-position: -30vw 0, 0 0; }
  to { background-position: 80vw 0, 0 0; }
}

@keyframes room-drift {
  50% { transform: rotateX(60deg) rotateZ(-33deg) translate3d(0, -10px, 0); }
}

@keyframes rack-pulse {
  50% { opacity: 0.42; filter: hue-rotate(80deg); }
}

@keyframes monitor-flicker {
  45% { opacity: 0.55; transform: translateY(2px); }
  48% { opacity: 1; }
}

@keyframes antenna-ping {
  70%, 100% { box-shadow: 0 0 0 46px rgba(96, 216, 255, 0), 0 0 38px rgba(96, 216, 255, 0.38); }
}

@keyframes orbit-spin {
  to { rotate: 360deg; }
}

@keyframes blob-dance {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); border-radius: 42% 58% 64% 36%; }
  33% { transform: translate3d(7vw, -5vh, 0) rotate(80deg) scale(1.12); border-radius: 66% 34% 44% 56%; }
  66% { transform: translate3d(-5vw, 7vh, 0) rotate(190deg) scale(0.86); border-radius: 35% 65% 58% 42%; }
}

@keyframes header-breathe {
  50% { box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28), 0 0 34px rgba(72, 255, 153, 0.16); }
}

@keyframes label-float {
  50% { transform: translateY(-8px); filter: brightness(1.22); }
}

@keyframes hud-pop {
  50% { transform: translateX(-7px); border-color: rgba(72, 255, 153, 0.44); }
}

@keyframes meter-surge {
  50% { width: min(100%, calc(var(--v) + 12%)); filter: hue-rotate(75deg); }
}

@keyframes warning-jitter {
  20% { translate: 3px -2px; }
  40% { translate: -2px 1px; }
  60% { translate: 1px 3px; }
  80% { translate: -1px -2px; }
}

@keyframes glitch-a {
  0%, 88%, 100% { opacity: 0; }
  89% { opacity: 0.72; transform: translate(8px, -2px); }
  90% { opacity: 0.2; transform: translate(-4px, 1px); }
  91% { opacity: 0.68; transform: translate(3px, -4px); }
}

@keyframes glitch-b {
  0%, 74%, 100% { opacity: 0; }
  75% { opacity: 0.62; transform: translate(-8px, 2px); }
  76% { opacity: 0.22; transform: translate(5px, -1px); }
  77% { opacity: 0.7; transform: translate(-2px, 4px); }
}

@keyframes card-tilt {
  50% { transform: translateY(-6px) rotate(0.35deg); }
}

@keyframes row-sweep {
  60%, 100% { transform: translateX(120%); }
}

@keyframes ticker {
  to { transform: translateX(-50%); }
}

@keyframes card-rise {
  50% { transform: translateY(-10px); }
}

@keyframes border-spin {
  to { transform: rotate(360deg); }
}

@keyframes signal-slide {
  50% { transform: translateX(8px); }
}

@keyframes feed-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cursor-blink {
  50% { opacity: 0; }
}

@keyframes konami-pulse {
  0%, 100% { transform: translateX(-50%) scale(1); filter: hue-rotate(0deg); }
  50% { transform: translateX(-50%) scale(1.06); filter: hue-rotate(180deg); }
}

/* ==================================================
   DAY / NIGHT MODE
   ================================================== */
body[data-time="night"] {
  background:
    radial-gradient(circle at 12% 16%, rgba(80, 120, 220, 0.18), transparent 28rem),
    radial-gradient(circle at 90% 6%, rgba(60, 90, 180, 0.16), transparent 30rem),
    radial-gradient(circle at 48% 98%, rgba(40, 60, 140, 0.18), transparent 30rem),
    linear-gradient(135deg, #03050b 0%, #06091a 52%, #02030a 100%);
}

body[data-time="night"] .hero-stage {
  box-shadow: 0 38px 130px rgba(0, 0, 0, 0.6), inset 0 0 110px rgba(60, 100, 200, 0.18);
}

body[data-time="night"] .hero-copy::before,
body[data-time="night"] .mission h2,
body[data-time="night"] .showcase h2,
body[data-time="night"] .purrs-head h2,
body[data-time="night"] .stats-head h2,
body[data-time="night"] .contact h2 {
  color: rgba(255, 255, 255, 0.045);
}

body[data-time="night"] .purr-stars { color: #ffe56b; }

.time-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(170, 194, 221, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 8px 12px;
  font: 850 0.78rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.time-toggle .time-icon {
  display: inline-block;
  font-size: 1.05rem;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform 0.6s ease, color 0.4s ease;
  color: var(--yellow);
}

body[data-time="night"] .time-toggle {
  border-color: rgba(96, 130, 220, 0.42);
  background: rgba(40, 60, 140, 0.28);
  color: #c8d8ff;
}

body[data-time="night"] .time-toggle .time-icon {
  color: #ffd96b;
  transform: rotate(360deg);
}

/* ==================================================
   PET PICKER
   ================================================== */
.pets {
  border: 1px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(145deg, var(--card), rgba(6, 10, 18, 0.68));
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(20px);
  margin-top: 20px;
  padding: clamp(26px, 5vw, 56px);
}

.pets-head {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}

.pet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.pet-card {
  position: relative;
  display: grid;
  gap: 6px;
  border: 1px solid rgba(170, 194, 221, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.045);
  padding: 18px;
  text-align: left;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.pet-card:hover { transform: translateY(-3px); border-color: rgba(72, 255, 153, 0.4); }

.pet-card.is-active {
  border-color: rgba(72, 255, 153, 0.6);
  background: linear-gradient(135deg, rgba(72, 255, 153, 0.14), rgba(96, 216, 255, 0.08));
  box-shadow: 0 0 0 2px rgba(72, 255, 153, 0.22), 0 18px 60px rgba(72, 255, 153, 0.12);
}

.pet-emoji {
  font-size: 2.1rem;
  line-height: 1;
  display: inline-block;
  filter: drop-shadow(0 0 12px rgba(96, 216, 255, 0.4));
  animation: pet-bob 3.4s ease-in-out infinite;
}

.pet-card.is-active .pet-emoji { animation-duration: 1.4s; }

.pet-card strong {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.pet-card em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.82rem;
}

.pet-meter {
  display: block;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 4px;
}

.pet-meter::before {
  content: "";
  display: block;
  width: var(--v);
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  border-radius: inherit;
}

.pet-card small {
  color: var(--muted);
  font: 700 0.72rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes pet-bob {
  50% { transform: translateY(-4px) rotate(-3deg); }
}

/* ==================================================
   STATS SECTION
   ================================================== */
.stats-section {
  border: 1px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(145deg, var(--card), rgba(6, 10, 18, 0.68));
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(20px);
  margin-top: 20px;
  padding: clamp(26px, 5vw, 56px);
}

.stats-head { margin-bottom: 22px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid rgba(170, 194, 221, 0.15);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.045);
  padding: 18px;
  min-height: 130px;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(72, 255, 153, 0.08), transparent 60%);
  pointer-events: none;
}

.stat-card > * { position: relative; z-index: 1; }

.stat-label {
  margin: 0;
  color: var(--muted);
  font: 850 0.7rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.stat-value {
  margin: 0;
  font-size: 2.2rem;
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 950;
  color: var(--green);
  text-shadow: 0 0 22px rgba(72, 255, 153, 0.25);
  font-variant-numeric: tabular-nums;
}

.stat-delta {
  color: var(--muted);
  font: 700 0.78rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.stat-wide { grid-column: span 2; }

.bars {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
  align-items: end;
  height: 60px;
  margin-top: 4px;
}

.bars span {
  display: block;
  width: 100%;
  height: var(--h);
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--cyan), var(--green));
  box-shadow: 0 0 8px rgba(72, 255, 153, 0.32);
  animation: bar-grow 0.6s ease-out both;
}

.bars span:nth-child(2n) { animation-delay: 0.05s; }
.bars span:nth-child(3n) { animation-delay: 0.1s; }
.bars span:nth-child(4n) { animation-delay: 0.15s; }
.bars span:nth-child(5n) { animation-delay: 0.2s; }

.snack-row {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.snack-row > span {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 0.86rem;
}

.snack-row b {
  display: block;
  height: 8px;
  width: var(--w);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--yellow), var(--green));
  box-shadow: 0 0 12px rgba(255, 199, 90, 0.32);
}

@keyframes bar-grow {
  from { transform: scaleY(0); transform-origin: bottom; }
  to { transform: scaleY(1); transform-origin: bottom; }
}

/* ==================================================
   PURRS / REVIEWS
   ================================================== */
.purrs {
  border: 1px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(145deg, var(--card), rgba(6, 10, 18, 0.68));
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(20px);
  margin-top: 20px;
  padding: clamp(26px, 5vw, 56px);
}

.purrs-head { margin-bottom: 22px; }

.purrs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.purrs article {
  border: 1px solid rgba(170, 194, 221, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.045);
  padding: 22px;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.purrs article:hover {
  transform: translateY(-3px);
  border-color: rgba(72, 255, 153, 0.4);
}

.purr-stars {
  margin: 0 0 12px;
  color: #ffd96b;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
}

.purrs p { margin: 0; color: var(--text); line-height: 1.6; }
.purrs p + p { margin-top: 10px; }
.purr-by { color: var(--muted) !important; font-style: italic; }

/* ==================================================
   CONTACT FORM
   ================================================== */
.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
  max-width: 720px;
}

.contact-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font: 850 0.7rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.contact-form input {
  border: 1px solid rgba(96, 216, 255, 0.22);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.32);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form input:focus {
  border-color: rgba(72, 255, 153, 0.6);
  box-shadow: 0 0 0 3px rgba(72, 255, 153, 0.1);
}

.contact-form label:nth-child(3) { grid-column: span 2; }

.contact-form button {
  grid-column: span 2;
  border: 1px solid rgba(72, 255, 153, 0.46);
  border-radius: 999px;
  background: rgba(72, 255, 153, 0.12);
  padding: 14px 18px;
  color: #e8fff3;
  font-weight: 900;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(72, 255, 153, 0.22);
}

.contact-form output {
  grid-column: span 2;
  color: var(--green);
  font: 850 0.8rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.contact-form output.is-shown {
  opacity: 1;
  transform: translateY(0);
}

/* ==================================================
   FLOATING TREATS
   ================================================== */
.floating-treat {
  position: absolute;
  z-index: 6;
  font-size: 1.6rem;
  pointer-events: none;
  animation: treat-float 1.4s ease-out forwards;
}

@keyframes treat-float {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.6) rotate(0deg); }
  20% { opacity: 1; transform: translate(-50%, -80%) scale(1.1) rotate(-10deg); }
  100% { opacity: 0; transform: translate(-50%, -260%) scale(0.7) rotate(220deg); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 980px) {
  .hero,
  .showcase,
  .signals { grid-template-columns: 1fr; }

  .hero { min-height: 0; }

  .terminal { order: -1; }

  .cards { grid-template-columns: repeat(2, 1fr); }

  .pet-grid { grid-template-columns: repeat(2, 1fr); }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .stat-wide { grid-column: span 2; }

  .purrs-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .site-header { align-items: flex-start; border-radius: 28px; }
  .brand span:last-child { display: none; }
  nav { flex-wrap: wrap; justify-content: flex-end; }
  nav a { padding: 9px 10px; }
  .time-toggle { padding: 7px 10px; }
}

@media (max-width: 560px) {
  .site-header,
  main { width: min(100% - 22px, 1180px); }

  .site-header { top: 8px; margin-top: 8px; }

  main { padding-top: 18px; }

  .hero-copy,
  .terminal,
  .hero-stage,
  .showcase,
  .mission,
  .signals,
  .contact { border-radius: 24px; }

  h1 { font-size: clamp(3.35rem, 18vw, 5.1rem); }

  .cards { grid-template-columns: 1fr; }

  .cards article { min-height: 230px; }

  .cards span { margin-bottom: 38px; }

  .radar { min-height: 260px; }

  .hero-stage { min-height: 390px; }

  .stage-labels { inset: auto 14px 14px; }

  .stage-labels span { font-size: 0.66rem; }

  .hud-stack { display: none; }

  .warning-cloud span:nth-child(2) { display: none; }

  .chat-editor { right: 11px; bottom: 11px; width: calc(100% - 22px); }

  .chat-toggle { display: flex; }

  .chat-editor.is-closed .chat-panel { display: none; }

  .chat-panel { max-height: min(680px, calc(100vh - 90px)); overflow: auto; }

  .live-banner { top: 72px; border-radius: 18px; }

  .pet-grid { grid-template-columns: 1fr 1fr; }

  .stats-grid { grid-template-columns: 1fr 1fr; }

  .stat-wide { grid-column: span 2; }

  .contact-form { grid-template-columns: 1fr; }

  .contact-form label:nth-child(3),
  .contact-form button,
  .contact-form output { grid-column: span 1; }
}
