/* ── Reset & Variables ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-0: #060b17;
  --bg-1: #0a0f1e;
  --bg-2: #111827;
  --bg-3: #1e2433;
  --bg-4: #252d3d;
  --cyan: #00d4ff;
  --cyan-dim: rgba(0, 212, 255, 0.15);
  --cyan-glow: rgba(0, 212, 255, 0.35);
  --purple: #7c3aed;
  --purple-dim: rgba(124, 58, 237, 0.15);
  --green: #10b981;
  --yellow: #f59e0b;
  --red: #ef4444;
  --text-0: #f0f4f8;
  --text-1: #c9d4e0;
  --text-2: #8892a4;
  --text-3: #556070;
  --border: rgba(255, 255, 255, 0.07);
  --border-bright: rgba(255, 255, 255, 0.14);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
  --font: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg-1);
  color: var(--text-1);
  font-family: var(--font);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--cyan); text-decoration: none; transition: color var(--transition); }
a:hover { color: #fff; }

img, svg { display: block; }

/* ── Typography ─────────────────────────────────────────────────────────────── */
.label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 800; line-height: 1.1; color: var(--text-0); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 700; color: var(--text-0); line-height: 1.2; }
h3 { font-size: 1.15rem; font-weight: 600; color: var(--text-0); }
p  { color: var(--text-2); }

/* ── Layout ─────────────────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
section { padding: 96px 0; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-header p { margin-top: 14px; font-size: 1.05rem; max-width: 560px; margin-left: auto; margin-right: auto; }

/* ── Scroll Animations ──────────────────────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── NAV ────────────────────────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}
nav.scrolled {
  background: rgba(6, 11, 23, 0.85);
  backdrop-filter: blur(16px);
  border-color: var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-0);
  text-decoration: none;
}
.nav-logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 0.88rem;
  color: var(--text-2);
  font-weight: 500;
}
.nav-links a:hover { color: var(--text-0); }
.nav-cta {
  background: var(--cyan);
  color: #000 !important;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem !important;
  transition: background var(--transition), transform var(--transition);
}
.nav-cta:hover { background: #33ddff; transform: translateY(-1px); }

/* ── HERO ───────────────────────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 120px 0 80px;
}

.hero-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(0,212,255,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 90% 80%, rgba(124,58,237,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 50% 50%, rgba(0,0,0,0) 0%, var(--bg-0) 100%);
  animation: meshShift 12s ease-in-out infinite alternate;
}
@keyframes meshShift {
  0%   { opacity: 1; }
  50%  { opacity: 0.7; }
  100% { opacity: 1; }
}

.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cyan-dim);
  border: 1px solid rgba(0,212,255,0.3);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cyan);
  margin-bottom: 20px;
}
.hero-badge-dot {
  width: 6px; height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

.hero-title span.gradient {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-2);
  margin: 20px 0 36px;
  line-height: 1.7;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cyan);
  color: #000;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn-primary:hover {
  background: #33ddff;
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,212,255,0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text-1);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-bright);
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
}
.btn-secondary:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 44px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.hero-stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-0);
}
.hero-stat-label {
  font-size: 0.78rem;
  color: var(--text-3);
  margin-top: 2px;
}

/* Terminal */
.terminal {
  background: var(--bg-2);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.terminal-bar {
  background: var(--bg-3);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}
.terminal-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.terminal-dot.red    { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green  { background: #28c840; }
.terminal-title {
  margin-left: 8px;
  font-size: 0.75rem;
  color: var(--text-3);
  font-family: var(--mono);
}
.terminal-body {
  padding: 20px 20px 24px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.8;
  min-height: 220px;
}
.term-prompt { color: var(--cyan); }
.term-cmd    { color: var(--text-0); }
.term-out    { color: var(--text-3); }
.term-ok     { color: var(--green); }
.term-cursor {
  display: inline-block;
  width: 8px; height: 14px;
  background: var(--cyan);
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ── MARQUEE ────────────────────────────────────────────────────────────────── */
.marquee-section {
  padding: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-0);
  overflow: hidden;
}
.marquee-track {
  display: flex;
  white-space: nowrap;
  animation: marqueeScroll 40s linear infinite;
  padding: 18px 0;
}
.marquee-track:hover { animation-play-state: paused; }
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 28px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-3);
  border-right: 1px solid var(--border);
  white-space: nowrap;
  transition: color var(--transition);
}
.marquee-item:hover { color: var(--cyan); }
.marquee-item-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--text-3);
  flex-shrink: 0;
}
@keyframes marqueeScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── VALUE PROPS ────────────────────────────────────────────────────────────── */
#features { background: var(--bg-0); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover {
  border-color: var(--cyan-glow);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,212,255,0.08);
}
.feature-icon {
  width: 48px; height: 48px;
  background: var(--cyan-dim);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  font-size: 1.4rem;
}
.feature-card h3 { margin-bottom: 10px; }
.feature-card p  { font-size: 0.9rem; line-height: 1.65; }

/* ── RESOURCE GRID ──────────────────────────────────────────────────────────── */
#resources { background: var(--bg-1); }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 40px;
}
.tab-btn {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.tab-btn:hover  { border-color: var(--cyan); color: var(--text-1); }
.tab-btn.active {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  color: var(--cyan);
  font-weight: 600;
}

.tab-panel { display: none; }
.tab-panel.active { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }

.kind-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  cursor: default;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  position: relative;
}
.kind-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.kind-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.kind-name {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-0);
}
.kind-badge {
  font-size: 0.75rem;
}
.kind-desc {
  font-size: 0.78rem;
  color: var(--text-3);
  line-height: 1.5;
}
.kind-async {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  color: var(--yellow);
  margin-top: 8px;
  background: rgba(245,158,11,0.1);
  padding: 2px 8px;
  border-radius: 4px;
}
.kind-wip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  color: var(--purple);
  margin-top: 8px;
  background: rgba(124,58,237,0.12);
  padding: 2px 8px;
  border-radius: 4px;
}
.kind-card.wip {
  opacity: 0.75;
  border-style: dashed;
}
.kind-card.wip:hover { opacity: 1; }

/* ── GETTING STARTED ────────────────────────────────────────────────────────── */
#quickstart { background: var(--bg-0); }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.step-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
}
.step-num {
  width: 32px; height: 32px;
  background: var(--cyan-dim);
  border: 1px solid rgba(0,212,255,0.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cyan);
  flex-shrink: 0;
}
.step-title { font-size: 0.9rem; font-weight: 600; color: var(--text-0); }
.step-body { position: relative; }

.code-block {
  background: var(--bg-0);
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.85;
  padding: 18px 20px 20px;
  overflow-x: auto;
  color: var(--text-2);
}
.code-block .kw   { color: #c792ea; }
.code-block .str  { color: #c3e88d; }
.code-block .num  { color: #f78c6c; }
.code-block .key  { color: var(--cyan); }
.code-block .cmt  { color: var(--text-3); font-style: italic; }
.code-block .cmd  { color: var(--green); }

.copy-btn {
  position: absolute;
  top: 10px; right: 10px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.7rem;
  color: var(--text-3);
  cursor: pointer;
  transition: all var(--transition);
}
.copy-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.copy-btn.copied { border-color: var(--green); color: var(--green); }

/* ── ARCHITECTURE ───────────────────────────────────────────────────────────── */
#architecture { background: var(--bg-1); }

.arch-diagram {
  max-width: 800px;
  margin: 0 auto;
}
.arch-nodes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: center;
}
.arch-node {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 16px;
  text-align: center;
  position: relative;
  transition: border-color var(--transition);
}
.arch-node:hover { border-color: var(--cyan); }
.arch-node-icon { font-size: 2rem; margin-bottom: 10px; }
.arch-node-label { font-size: 0.8rem; font-weight: 600; color: var(--text-0); }
.arch-node-sub   { font-size: 0.7rem; color: var(--text-3); margin-top: 4px; }

.arch-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 1.2rem;
  position: relative;
}
.arch-flow {
  display: flex;
  align-items: center;
  gap: 0;
  justify-content: center;
  margin-top: 40px;
}
.arch-flow-step {
  display: flex;
  align-items: center;
}
.arch-flow-node {
  background: var(--bg-3);
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 0.82rem;
  color: var(--text-1);
  white-space: nowrap;
}
.arch-flow-node.highlight {
  background: var(--cyan-dim);
  border-color: rgba(0,212,255,0.35);
  color: var(--cyan);
}
.arch-connector {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--border-bright), var(--cyan-dim));
  position: relative;
}
.arch-connector::after {
  content: '▶';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.6rem;
  color: var(--text-3);
}

/* ── HOW IT WORKS ───────────────────────────────────────────────────────────── */
#how-it-works { background: var(--bg-0); }

.steps-vertical {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.step-v {
  display: flex;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.step-v:last-child { border-bottom: none; }
.step-v-num {
  width: 40px; height: 40px;
  background: var(--bg-3);
  border: 1px solid var(--border-bright);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--cyan);
  flex-shrink: 0;
  margin-top: 2px;
}
.step-v-content h3 { margin-bottom: 6px; font-size: 1rem; }
.step-v-content p  { font-size: 0.88rem; }

/* ── COMPARISON TABLE ───────────────────────────────────────────────────────── */
#comparison { background: var(--bg-1); }

.compare-table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
thead {
  background: var(--bg-3);
}
thead th {
  padding: 16px 22px;
  text-align: left;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
thead th:first-child { color: var(--text-3); }
thead th.highlight-col { color: var(--cyan); }

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg-3); }

td {
  padding: 15px 22px;
  color: var(--text-2);
}
td:first-child { font-weight: 500; color: var(--text-1); }
td.highlight-col { color: var(--text-0); }

.check  { color: var(--green); font-size: 1rem; }
.cross  { color: var(--text-3); font-size: 1rem; }
.partial { color: var(--yellow); font-size: 0.78rem; font-weight: 600; }

/* ── DOCS LINKS ─────────────────────────────────────────────────────────────── */
#docs { background: var(--bg-0); }

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.doc-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all var(--transition);
  color: var(--text-1);
}
.doc-card:hover {
  border-color: var(--cyan);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,212,255,0.07);
  color: var(--text-0);
}
.doc-icon { font-size: 1.6rem; flex-shrink: 0; }
.doc-name { font-size: 0.85rem; font-weight: 600; }
.doc-count { font-size: 0.72rem; color: var(--text-3); margin-top: 2px; }

/* ── FOOTER ─────────────────────────────────────────────────────────────────── */
footer {
  background: var(--bg-0);
  border-top: 1px solid var(--border);
  padding: 60px 0 32px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-3);
  margin-top: 12px;
  max-width: 260px;
}
.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.85rem; color: var(--text-2); }
.footer-col a:hover { color: var(--text-0); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-3);
}
.footer-license {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 0.72rem;
  color: var(--text-3);
}

/* ── Mobile ─────────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .terminal   { display: none; }
  .steps      { grid-template-columns: 1fr; }
  .arch-nodes { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  nav .nav-links li:not(:last-child) { display: none; }
}
@media (max-width: 600px) {
  h1 { font-size: 2rem; }
  .hero-stats { gap: 20px; }
  .footer-inner { grid-template-columns: 1fr; }
  .arch-flow { flex-wrap: wrap; gap: 12px; }
  .arch-connector { display: none; }
}
