@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;700;900&family=Inter:wght@400;600&family=JetBrains+Mono:wght@400;700&display=swap");

:root {
  --bg-pure: #000000;
  --bg-subtle: #0a0a0a;
  --brand: #ff4000; /* Signal Orange */
  --text-primary: #ffffff;
  --text-secondary: #888888;
  --border: #1a1a1a;
  --border-hover: #333333;
}

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

body {
  background-color: var(--bg-pure);
  color: var(--text-primary);
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Outfit", sans-serif;
  letter-spacing: -0.01em;
  font-weight: 700;
}

a {
  transition: color 0.2s ease;
}

/* Nav */
nav {
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.8);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  min-width: 0;
}

.prompt-mark {
  color: #ff4000;
  font-family: "JetBrains Mono", monospace;
  margin: 0;
  font-weight: 700;
  line-height: 1;
  align-self: center;
  flex-shrink: 0;
  white-space: pre;
}

.terminal-mark {
  font-size: 0.16rem;
  line-height: 0.62;
}

.mascot-logo {
  margin: 0;
  color: #ff4000;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.34rem;
  font-weight: 700;
  line-height: 0.72;
  letter-spacing: -0.02em;
  white-space: pre;
  flex-shrink: 0;
}

.brand-wordmark {
  color: #ff4000;
  line-height: 1;
}

@media (max-width: 640px) {
  .brand-lockup {
    gap: 0.625rem;
  }

  .terminal-mark {
    font-size: 0.14rem;
  }

  .mascot-logo {
    font-size: 0.28rem;
  }

  .brand-wordmark {
    font-size: 1rem;
  }
}

/* Containers */
.container-max {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Buttons */
.btn {
  padding: 0.6rem 1.2rem;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--brand);
  color: white;
  border: none;
}

.btn-primary:hover {
  filter: brightness(1.2);
  transform: translateY(-1px);
}

.btn-ghost {
  background-color: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-ghost:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

/* Documentation Layout */
.docs-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 4rem;
}

@media (max-width: 1024px) {
  .docs-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

main {
  min-width: 0;
  max-width: 100%;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 6rem;
  height: calc(100vh - 8rem);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.sidebar-title {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-weight: 800;
}

.sidebar-link {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.4rem 0;
  transition: all 0.2s;
}

.sidebar-link:hover {
  color: var(--text-primary);
  transform: translateX(4px);
}

.sidebar-link.active {
  color: var(--brand);
  font-weight: 700;
}

/* Code Blocks */
.code-block {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2.5rem 1.5rem 1.5rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8125rem;
  margin: 1.5rem 0;
  overflow: hidden;
  position: relative;
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.5);
}

.code-block.hero-block {
  box-shadow:
    0 40px 100px -20px rgba(0, 0, 0, 0.9),
    0 0 40px -15px rgba(255, 64, 0, 0.15);
  max-width: 800px;
  margin: 4rem auto 0;
}

code {
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}

pre code {
  white-space: pre;
  word-break: normal;
}

.inline-command {
  display: inline-block;
  white-space: nowrap;
  word-break: normal;
}

.install-command-shell {
  position: relative;
}

.install-command-scroll {
  overflow-x: auto;
  padding: 1.5rem 4.75rem 1.5rem 1.5rem;
  -webkit-overflow-scrolling: touch;
}

.command-line {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  width: max-content;
  min-width: 100%;
  white-space: nowrap;
}

.command-prompt {
  flex-shrink: 0;
}

.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 9999px;
  background: rgba(13, 13, 13, 0.96);
  z-index: 2;
  cursor: pointer;
}

.copy-button:hover {
  background: #151515;
}

.code-block::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1.75rem;
  background: #0d0d0d;
  border-bottom: 1px solid var(--border);
}

.term-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1.75rem;
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  justify-content: space-between;
  z-index: 10;
}

.term-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.dot-red {
  background: #ff5f56;
}
.dot-yellow {
  background: #ffbd2e;
}
.dot-green {
  background: #27c93f;
}

.term-title {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #444;
  font-weight: 800;
}

/* Tables */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin: 2rem 0;
  background: var(--bg-subtle);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px;
}

th {
  text-align: left;
  background: #0d0d0d;
  padding: 1rem;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

td {
  padding: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
}

/* Feature Cards */
.feature-card {
  border: 1px solid var(--border);
  padding: 2.5rem;
  border-radius: 8px;
  transition: border-color 0.3s;
}

.feature-card:hover {
  border-color: var(--brand);
}

/* Premium Architecture Visualizer */
.arch-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 2rem;
  background: #050505;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.arch-node {
  width: 100%;
  max-width: 400px;
  padding: 1.5rem;
  border: 1px solid var(--border);
  background: var(--bg-pure);
  position: relative;
  z-index: 1;
}

.node-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.tech-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a8a8a;
}

.stream-connector {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -1px 0;
}

.stream-connector::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -1px;
  bottom: -1px;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(
    180deg,
    rgba(255, 64, 0, 0.1) 0%,
    rgba(255, 64, 0, 0.95) 50%,
    rgba(255, 64, 0, 0.1) 100%
  );
  background-size: 100% 220%;
  animation: ndjson-stream-flow 2.8s linear infinite;
  box-shadow: 0 0 24px rgba(255, 64, 0, 0.35);
}

.stream-pulse {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  border: 1px solid rgba(255, 64, 0, 0.55);
  background: radial-gradient(
    circle,
    rgba(255, 64, 0, 0.85) 0%,
    rgba(255, 64, 0, 0.18) 50%,
    rgba(255, 64, 0, 0) 100%
  );
  box-shadow: 0 0 24px rgba(255, 64, 0, 0.4);
  animation: ndjson-stream-pulse 1.8s ease-in-out infinite;
}

.stream-label {
  position: relative;
  z-index: 1;
  padding: 0.45rem 0.8rem;
  border: 1px solid rgba(255, 64, 0, 0.18);
  background: rgba(5, 5, 5, 0.94);
  border-radius: 999px;
  color: #ff8d68;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 0 12px 30px -18px rgba(255, 64, 0, 0.7);
}

@keyframes ndjson-stream-flow {
  0% {
    background-position: 0 0%;
  }
  100% {
    background-position: 0 220%;
  }
}

@keyframes ndjson-stream-pulse {
  0%,
  100% {
    opacity: 0.65;
    transform: translate(-50%, -50%) scale(0.9);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.12);
  }
}

/* Mobile Nav Drawer */
#mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  padding: 6rem 2rem 2rem;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

#mobile-drawer.open {
  transform: translateX(0);
}

/* Responsive Overrides */
@media (max-width: 768px) {
  .section-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
  }
  .subsection-title {
    font-size: 1.75rem;
  }

  p {
    padding: 0 0.5rem;
  }

  pre,
  code,
  .code-block,
  .table-wrapper {
    max-width: 100%;
    overflow-x: auto;
  }

  .container-max {
    padding: 0 1rem;
    overflow-x: hidden;
  }

  .mb-24 {
    margin-bottom: 4rem;
  }
  .py-32 {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }

  .code-block {
    padding: 2.5rem 1rem 1rem;
    margin: 1rem 0;
  }
  .table-wrapper {
    margin: 1.5rem 0;
  }
}

.text-brand {
  color: var(--brand);
}
.text-muted {
  color: var(--text-secondary);
}

/* ── SVG Flow Diagram Containers ─── */

.diagram-wrap {
  background: linear-gradient(135deg, #0a0a0a 0%, #0d0d0d 60%, #120a04 100%);
  border: 1px solid #1a1a1a;
  border-radius: 14px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.diagram-wrap::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    #ff4000 30%,
    #ff6a00 50%,
    #ff4000 70%,
    transparent
  );
}

.diagram-eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #ff4000;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.diagram-subtitle {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.diagram-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.arch-svg {
  width: 100%;
  height: auto;
  min-width: 600px;
  display: block;
}

@media (max-width: 900px) {
  .diagram-wrap {
    padding: 1rem;
  }

  .arch-svg {
    min-width: 700px;
  }
}
/* ── Premium SVG Filters & Animations ─── */

svg .glow-orange {
  filter: drop-shadow(0 0 4px rgba(255, 64, 0, 0.6))
    drop-shadow(0 0 12px rgba(255, 64, 0, 0.3));
}

svg .glow-blue {
  filter: drop-shadow(0 0 4px rgba(96, 165, 250, 0.6))
    drop-shadow(0 0 12px rgba(96, 165, 250, 0.3));
}

svg .glow-soft {
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.1));
}

@keyframes dash-flow {
  from {
    stroke-dashoffset: 100;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes node-pulse {
  0%,
  100% {
    opacity: 0.8;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

@keyframes data-ping {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

.animate-flow {
  stroke-dasharray: 10;
  animation: dash-flow 3s linear infinite;
}

.animate-pulse-slow {
  animation: node-pulse 4s ease-in-out infinite;
  transform-origin: center;
}

.arch-node-premium {
  fill: #050505;
  stroke: #1a1a1a;
  transition: all 0.3s ease;
}

.arch-node-premium:hover {
  fill: #0a0a0a;
  stroke: var(--brand);
}

.connection-path {
  fill: none;
  stroke: #1a1a1a;
  stroke-width: 1.5;
  transition: stroke 0.3s ease;
}

.connection-path.active {
  stroke: var(--brand);
  opacity: 0.6;
}

/* Glassmorphism Overlays */
.glass-panel {
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ── Constellation Visualization Styles ─── */

.constellation-point {
  fill: #1a1a1a;
  stroke: #333;
  stroke-width: 0.5;
  transition: all 0.5s ease;
}

.active-point {
  fill: var(--brand);
  filter: drop-shadow(0 0 4px var(--brand));
  stroke: var(--brand);
  stroke-width: 1.5;
}

.mapping-line {
  fill: none;
  stroke: #1a1a1a;
  stroke-width: 0.8;
  stroke-dashoffset: 0;
  transition: all 1s cubic-bezier(0.19, 1, 0.22, 1);
}

.mapping-line.active {
  stroke: var(--brand);
  stroke-opacity: 0.4;
}

.constellation-label {
  font-size: 6px;
  font-weight: 700;
  fill: #555;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  pointer-events: none;
}

@keyframes breathe-glow {
  0%,
  100% {
    filter: drop-shadow(0 0 2px var(--brand));
    opacity: 0.8;
  }
  50% {
    filter: drop-shadow(0 0 8px var(--brand));
    opacity: 1;
  }
}

.animate-breathe {
  animation: breathe-glow 6s ease-in-out infinite;
}

/* ── High-Grade Technical Utilities ─── */

.tech-grid-bg {
  fill: url(#tech-grid-pattern);
  opacity: 0.4;
}

.glass-hologram {
  fill: rgba(255, 64, 0, 0.02);
  stroke: rgba(255, 64, 0, 0.15);
  backdrop-filter: blur(2px);
}

.data-packet {
  fill: var(--brand);
  filter: drop-shadow(0 0 4px var(--brand));
}

@keyframes status-blink {
  0%,
  100% {
    opacity: 0.4;
    filter: brightness(1);
  }
  50% {
    opacity: 1;
    filter: brightness(1.5);
  }
}

.status-glimmer {
  animation: status-blink 2s ease-in-out infinite;
}

.tech-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 7px;
  font-weight: 700;
  fill: #444;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.terminal-readout {
  font-family: "JetBrains Mono", monospace;
  font-size: 8px;
  fill: #666;
}

@keyframes scan-move {
  0% {
    transform: translateY(-50px);
    opacity: 0;
  }
  10% {
    opacity: 0.5;
  }
  90% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(50px);
    opacity: 0;
  }
}

.scan-line {
  stroke: var(--brand);
  stroke-width: 1;
  stroke-opacity: 0.2;
  animation: scan-move 4s linear infinite;
}
