:root {
  --ink: #070a12;
  --ink-2: #0c1020;
  --panel: #12182a;
  --panel-2: #181f35;
  --line: rgba(148, 163, 214, 0.14);
  --text: #eef2ff;
  --muted: #9aa6c6;
  --phosphor: #5eead4;
  --violet: #8b5cf6;
  --signal: #fbbf24;
  --paper: #f4f6fb;
  --danger: #fb7185;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
  --radius: 18px;
  --display: "Syne", system-ui, sans-serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(900px 480px at 80% -10%, rgba(139, 92, 246, 0.18), transparent 55%),
    radial-gradient(700px 400px at 0% 20%, rgba(94, 234, 212, 0.1), transparent 50%),
    linear-gradient(180deg, var(--ink), var(--ink-2) 45%, #090d18);
  line-height: 1.55;
}

body.agent-view {
  --phosphor: #a78bfa;
}

.floor-glow {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 35vh;
  background: linear-gradient(0deg, rgba(94, 234, 212, 0.06), transparent);
  pointer-events: none;
  z-index: 0;
}

.nav,
main,
.foot {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  min-width: 180px;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(94, 234, 212, 0.95), rgba(139, 92, 246, 0.9));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 10px 30px rgba(94, 234, 212, 0.2);
  position: relative;
}

.logo-mark::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 11px;
  height: 2px;
  background: rgba(7, 10, 18, 0.55);
  border-radius: 2px;
  box-shadow: 0 -7px 0 rgba(7, 10, 18, 0.35), 0 -14px 0 rgba(7, 10, 18, 0.25);
}

.logo-text strong {
  display: block;
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.logo-text span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 18px;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.chip[aria-pressed="true"] {
  border-color: rgba(139, 92, 246, 0.55);
  background: rgba(139, 92, 246, 0.15);
  color: #ddd6fe;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 12px;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 14px 22px;
  font-size: 1rem;
}

.btn-solid {
  color: #061018;
  background: linear-gradient(120deg, var(--phosphor), #7dd3fc 70%, #c4b5fd);
  box-shadow: 0 12px 40px rgba(94, 234, 212, 0.18);
}

.btn-line {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
  padding: 48px 0 64px;
}

.kicker {
  margin: 0 0 14px;
  color: var(--phosphor);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 18px;
  font-family: var(--display);
  font-size: clamp(2.6rem, 6vw, 4.05rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 800;
  max-width: 14ch;
}

.grad {
  background: linear-gradient(100deg, var(--phosphor), #93c5fd 45%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 1.12rem;
  max-width: 48ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.hero-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.hero-note code,
code {
  font-family: var(--mono);
  font-size: 0.86em;
}

.hero-stage {
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(24, 31, 53, 0.9), rgba(12, 16, 32, 0.95));
  box-shadow: var(--shadow);
  padding: 28px 22px 18px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.corridor {
  position: relative;
  height: 220px;
  perspective: 900px;
}

.corridor-line {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 58%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--phosphor), var(--violet), transparent);
  box-shadow: 0 0 24px rgba(94, 234, 212, 0.45);
}

.door {
  position: absolute;
  top: 28%;
  width: 56px;
  height: 96px;
  border-radius: 10px 10px 4px 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.35), rgba(18, 24, 42, 0.95));
  display: grid;
  place-items: end center;
  padding-bottom: 10px;
  box-shadow: inset 0 0 0 1px rgba(94, 234, 212, 0.08);
  animation: doorPulse 4.5s ease-in-out infinite;
}

.door span {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #dbeafe;
}

.d1 { left: 14%; animation-delay: 0s; }
.d2 { left: 36%; animation-delay: 0.4s; background: linear-gradient(180deg, rgba(94, 234, 212, 0.3), rgba(18, 24, 42, 0.95)); }
.d3 { left: 58%; animation-delay: 0.8s; }
.d4 { left: 78%; animation-delay: 1.2s; background: linear-gradient(180deg, rgba(251, 191, 36, 0.28), rgba(18, 24, 42, 0.95)); }

.walker {
  position: absolute;
  top: 52%;
  left: 8%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 16px var(--phosphor);
  animation: walk 5.5s linear infinite;
}

@keyframes walk {
  0% { left: 8%; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { left: 88%; opacity: 0; }
}

@keyframes doorPulse {
  0%, 100% { transform: translateY(0); filter: brightness(1); }
  50% { transform: translateY(-3px); filter: brightness(1.12); }
}

.stage-caption {
  margin: 8px 0 0;
  text-align: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--phosphor);
  margin-bottom: 10px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
}

.section-head h2,
.audience h2,
.hallway h2,
.install h2,
.stack-band h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.section-aside {
  margin: 0;
  max-width: 36ch;
  color: var(--muted);
  font-size: 0.95rem;
}

.audience {
  padding: 20px 0 48px;
}

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

.audience-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: rgba(18, 24, 42, 0.7);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.audience-card:hover,
.audience-card.active {
  border-color: rgba(94, 234, 212, 0.45);
  transform: translateY(-2px);
}

.audience-card h3 {
  margin: 0 0 8px;
  font-size: 0.98rem;
}

.audience-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.rooms {
  padding: 12px 0 56px;
}

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

.room {
  grid-column: span 4;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(24, 31, 53, 0.95), rgba(12, 16, 32, 0.98));
  padding: 20px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.room.spine {
  grid-column: span 8;
  background:
    radial-gradient(500px 180px at 100% 0%, rgba(139, 92, 246, 0.18), transparent 55%),
    linear-gradient(165deg, rgba(24, 31, 53, 0.98), rgba(10, 14, 28, 0.98));
  border-color: rgba(139, 92, 246, 0.35);
}

.room.featured {
  grid-column: span 8;
  border-color: rgba(94, 234, 212, 0.3);
}

.room-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.door-id {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.badge {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.badge.downloadable,
.badge.live_local,
.badge.npm,
.badge.pypi {
  color: #042f2e;
  background: var(--phosphor);
  border-color: transparent;
}

.badge.pypi {
  background: #93c5fd;
  color: #0c1a30;
}

.registries {
  padding: 8px 0 48px;
}

.registry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 8px;
}

.reg-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(18, 24, 42, 0.82);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 240px;
}

.reg-card .eco {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--phosphor);
}

.reg-card h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.reg-card .ver {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--signal);
}

.reg-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  flex: 1;
}

.reg-card pre {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #060912;
  border: 1px solid var(--line);
  overflow-x: auto;
}

.reg-card pre code {
  font-size: 0.78rem;
  color: #b8f0e0;
  white-space: pre;
}

.reg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.registry-commands {
  margin-top: 18px;
}

.registry-commands .code-block {
  margin: 0 0 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #060b12;
  border: 1px solid var(--line);
  overflow-x: auto;
}

.registry-commands .code-block code {
  color: #b8f0e0;
  font-size: 0.88rem;
  white-space: pre;
}

.badge.open_core,
.badge.in_desk {
  color: #2e1065;
  background: #c4b5fd;
  border-color: transparent;
}

.room h3 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.room p {
  margin: 0 0 14px;
  color: var(--muted);
  flex: 1;
}

.room-price {
  margin: 0 0 14px !important;
  color: var(--signal) !important;
  font-size: 0.86rem !important;
  font-family: var(--mono);
}

.room-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hallway {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 16px;
  padding: 12px 0 56px;
}

.hallway-panel,
.agent-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(18, 24, 42, 0.82);
  padding: 28px;
}

.hallway-panel p {
  color: var(--muted);
  max-width: 60ch;
}

.endpoint-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 22px 0;
}

.endpoint-board > div {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(7, 10, 18, 0.55);
}

.ep-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.endpoint-board code {
  font-size: 0.78rem;
  word-break: break-all;
  color: #c7f9ef;
}

.hallway-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agent-card h3 {
  margin: 0 0 12px;
  font-family: var(--display);
}

.agent-card ol {
  margin: 0 0 16px;
  padding-left: 1.2rem;
  color: var(--muted);
}

.prompt-box {
  margin: 0 0 12px;
  padding: 12px;
  border-radius: 12px;
  background: #060912;
  border: 1px solid var(--line);
  color: #d8b4fe;
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.45;
  white-space: pre-wrap;
  max-height: 180px;
  overflow: auto;
}

.install {
  padding: 8px 0 48px;
}

.install-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.install-steps article {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: rgba(18, 24, 42, 0.65);
}

.step-n {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--phosphor), var(--violet));
  color: #061018;
  font-weight: 700;
  margin-bottom: 10px;
}

.install-steps h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.install-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.install-meta {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  word-break: break-all;
}

.stack-band {
  padding: 8px 0 48px;
}

.stack-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.stack-links a {
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.9rem;
}

.stack-links a:hover {
  border-color: rgba(94, 234, 212, 0.4);
}

.foot {
  padding: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.foot-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  opacity: 0.85;
}

body.agent-view .room:not(.spine):not([data-agent-priority="1"]) {
  opacity: 0.45;
}

body.agent-view .hallway-panel {
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.15);
}

@media (max-width: 980px) {
  .nav-links {
    display: none;
  }
  .hero,
  .hallway,
  .audience-grid,
  .install-steps,
  .registry-grid {
    grid-template-columns: 1fr;
  }
  .room,
  .room.spine,
  .room.featured {
    grid-column: span 12;
  }
  .endpoint-board {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .walker,
  .door {
    animation: none;
  }
}
