:root {
  --bg-0: #020617;
  --bg-1: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --line: rgba(34, 211, 238, 0.25);
  --brand-a: #0ea5e9;
  --brand-b: #14b8a6;
  --accent: #f59e0b;
  --text-strong: #e2e8f0;
  --text-soft: #a6b0c4;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: "Space Grotesk", "IBM Plex Mono", sans-serif;
  background: radial-gradient(circle at 20% 10%, rgba(14, 165, 233, 0.2), transparent 34%),
    radial-gradient(circle at 80% 18%, rgba(20, 184, 166, 0.2), transparent 38%),
    linear-gradient(135deg, var(--bg-0), var(--bg-1));
  position: relative;
}

code,
pre,
.mono {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: linear-gradient(rgba(14, 165, 233, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, 0.07) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 20%, black, transparent 85%);
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.055;
  background-image: radial-gradient(#fff 0.5px, transparent 0.5px);
  background-size: 2px 2px;
}

.nav-link {
  color: var(--text-soft);
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: #67e8f9;
}

.lang-btn {
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(8, 47, 73, 0.35);
  color: #bae6fd;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.lang-btn.active,
.lang-btn:hover {
  background: linear-gradient(120deg, rgba(14, 165, 233, 0.5), rgba(20, 184, 166, 0.5));
  color: white;
  transform: translateY(-1px);
}

.btn-primary,
.btn-secondary {
  border-radius: 999px;
  padding: 0.75rem 1.2rem;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: linear-gradient(120deg, var(--brand-a), var(--brand-b));
  color: #f8fafc;
  box-shadow: 0 10px 28px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(14, 165, 233, 0.35);
}

.btn-secondary {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.6);
  color: #d1fae5;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  background: rgba(15, 23, 42, 0.84);
}

.hero-frame {
  min-height: 390px;
  border-radius: 1.25rem;
  position: relative;
  isolation: isolate;
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(44px);
}

.orb-a {
  width: 170px;
  height: 170px;
  background: rgba(14, 165, 233, 0.42);
  top: -20px;
  left: -20px;
  animation: float 7.2s ease-in-out infinite;
}

.orb-b {
  width: 190px;
  height: 190px;
  background: rgba(20, 184, 166, 0.36);
  right: -30px;
  top: 50px;
  animation: float 8.4s ease-in-out infinite reverse;
}

.orb-c {
  width: 135px;
  height: 135px;
  background: rgba(245, 158, 11, 0.28);
  left: 50%;
  bottom: -20px;
  transform: translateX(-50%);
  animation: pulse 6.4s ease-in-out infinite;
}

.flow-step {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  border: 1px solid rgba(56, 189, 248, 0.2);
  background: rgba(2, 6, 23, 0.55);
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
}

.flow-step span {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(20, 184, 166, 0.25);
  border: 1px solid rgba(20, 184, 166, 0.55);
  color: #ccfbf1;
}

.flow-step p {
  margin: 0;
  color: #cbd5e1;
}

.flow-step code {
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 0.4rem;
  padding: 0.1rem 0.35rem;
  color: #bae6fd;
}

.terminal-box {
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 0.9rem;
  background: rgba(2, 6, 23, 0.7);
  padding: 0.8rem;
}

.terminal-title {
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a5f3fc;
}

.terminal-screen {
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 0.65rem;
  background: rgba(2, 6, 23, 0.9);
  padding: 0.7rem 0.8rem;
  min-height: 9.5rem;
}

.terminal-history {
  margin: 0;
  min-height: 6.8rem;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
  font-size: 0.82rem;
}

.terminal-current-line {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.45rem;
  color: #d1fae5;
  font-size: 0.82rem;
}

.terminal-prompt {
  color: #34d399;
  font-weight: 700;
}

.terminal-cursor {
  width: 0.52rem;
  height: 1rem;
  background: #67e8f9;
  border-radius: 0.08rem;
  display: inline-block;
  animation: blink 0.95s steps(1, end) infinite;
}

.metric-card {
  border: 1px solid rgba(34, 211, 238, 0.22);
  background: rgba(15, 23, 42, 0.58);
  border-radius: 0.85rem;
  padding: 0.75rem;
}

.metric-value {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #f0fdfa;
}

.metric-label {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  color: var(--text-soft);
}

.section-shell {
  padding-top: 4.5rem;
}

.section-title h2 {
  margin: 0.5rem 0 0;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1.15;
}

.section-title p {
  color: var(--text-soft);
  max-width: 60ch;
  margin-top: 0.8rem;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  color: #67e8f9;
}

.feature-card,
.module-card {
  border-radius: 1rem;
  border: 1px solid rgba(34, 211, 238, 0.2);
  background: var(--panel);
  padding: 1.15rem;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.2);
}

.feature-card h3,
.module-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.feature-card p,
.module-card p {
  margin: 0.5rem 0 0;
  color: var(--text-soft);
  line-height: 1.48;
}

.module-card code {
  margin-top: 0.8rem;
  display: inline-block;
  font-size: 0.74rem;
  color: #ccfbf1;
  background: rgba(20, 184, 166, 0.1);
  border: 1px solid rgba(20, 184, 166, 0.3);
  border-radius: 0.5rem;
  padding: 0.25rem 0.5rem;
}

#example-tabs button {
  border: 1px solid rgba(125, 211, 252, 0.24);
  background: rgba(2, 6, 23, 0.58);
  color: #a5f3fc;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.78rem;
  transition: all 0.2s ease;
}

#example-tabs button.active,
#example-tabs button:hover {
  background: linear-gradient(120deg, rgba(14, 165, 233, 0.45), rgba(20, 184, 166, 0.45));
  color: #ffffff;
}

.doc-sidebar {
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 1rem;
  background: rgba(2, 6, 23, 0.64);
  padding: 0.9rem;
}

.doc-item {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 0.65rem;
  padding: 0.5rem 0.6rem;
  color: #cbd5e1;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.doc-item:hover {
  border-color: rgba(34, 211, 238, 0.3);
  background: rgba(30, 41, 59, 0.55);
}

.doc-item.active {
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(8, 47, 73, 0.58);
  color: #e0f2fe;
}

.doc-content {
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 1rem;
  background: rgba(2, 6, 23, 0.64);
  overflow: hidden;
}

.doc-content-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid rgba(34, 211, 238, 0.2);
}

.doc-content-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.source-link {
  font-size: 0.8rem;
  color: #67e8f9;
}

.prose-shell {
  padding: 1rem 1.15rem 1.25rem;
  color: #dbeafe;
  max-height: 65vh;
  overflow: auto;
  line-height: 1.56;
}

.prose-shell h1,
.prose-shell h2,
.prose-shell h3 {
  line-height: 1.2;
  margin: 1rem 0 0.55rem;
}

.prose-shell p {
  margin: 0.65rem 0;
  color: #bfdbfe;
}

.prose-shell ul,
.prose-shell ol {
  margin: 0.6rem 0;
  padding-left: 1.15rem;
}

.prose-shell li {
  margin: 0.3rem 0;
}

.prose-shell pre {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(125, 211, 252, 0.2);
  border-radius: 0.75rem;
  padding: 0.85rem;
  overflow-x: auto;
}

.prose-shell code {
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.28);
  border-radius: 0.3rem;
  padding: 0.05rem 0.28rem;
  color: #bae6fd;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.reveal.delay-1 {
  transition-delay: 0.12s;
}

.reveal.delay-2 {
  transition-delay: 0.2s;
}

.reveal.delay-3 {
  transition-delay: 0.28s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(-14px) translateX(7px);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
  }
  50% {
    transform: translateX(-50%) scale(1.1);
  }
}

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@media (max-width: 1024px) {
  .prose-shell {
    max-height: none;
  }
}
