/* ============================
   GRAPHBUS LANDING — STYLES
   ============================ */

:root {
  --bg: #09090b;
  --bg2: #111113;
  --bg3: #18181b;
  --border: rgba(255,255,255,0.08);
  --text: #fafafa;
  --muted: #a1a1aa;
  --accent: #7c3aed;
  --accent2: #06b6d4;
  --accent3: #10b981;
  --build: #f59e0b;
  --runtime: #06b6d4;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --radius: 12px;
  --shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 4px 24px rgba(0,0,0,0.4);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ============================
   LAYOUT
   ============================ */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================
   NAV
   ============================ */

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(9,9,11,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.3px;
}

.logo-icon {
  font-size: 22px;
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 6px 12px;
  color: var(--muted);
  font-size: 14px;
  transition: color 0.15s;
}

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

/* ============================
   BUTTONS
   ============================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
}

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

.btn-primary:hover {
  background: #6d28d9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124,58,237,0.4);
}

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

.btn-outline {
  border-color: var(--border);
  color: var(--text);
  background: transparent;
}
.btn-outline:hover {
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.04);
}

.btn-lg {
  padding: 12px 24px;
  font-size: 15px;
  border-radius: 10px;
}

/* ============================
   HERO
   ============================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

#graph-canvas {
  width: 100%;
  height: 100%;
  opacity: 0.35;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  text-align: center;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #a78bfa;
  margin-bottom: 24px;
}

h1 {
  font-size: clamp(48px, 8vw, 88px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -3px;
  margin-bottom: 24px;
}

.gradient-text {
  background: linear-gradient(135deg, #7c3aed, #06b6d4 60%, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.65;
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

/* ============================
   HERO CODE BLOCK
   ============================ */

.hero-code {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
  box-shadow: var(--shadow);
  max-width: 680px;
  margin: 0 auto;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.code-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-left: 4px;
}

.hero-code pre {
  padding: 20px 24px;
  overflow-x: auto;
}

.hero-code code {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.8;
}

/* Syntax highlighting */
.kw  { color: #a78bfa; }
.cls { color: #34d399; }
.fn  { color: #60a5fa; }
.str { color: #fbbf24; }
.dec { color: #f472b6; }
.cm  { color: #6b7280; }

/* ============================
   SECTION LABELS & HEADINGS
   ============================ */

.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 12px;
}

h2 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 16px;
}

.section-sub {
  font-size: 18px;
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 64px;
  line-height: 1.65;
}

/* ============================
   TWO MODES
   ============================ */

.modes {
  padding: 120px 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.modes-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 32px;
  align-items: center;
  margin-top: 64px;
}

.mode-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.mode-card:hover { transform: translateY(-4px); }

.mode-card.build { border-top: 3px solid var(--build); }
.mode-card.runtime { border-top: 3px solid var(--runtime); }

.mode-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.mode-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.mode-card.build .mode-tag { color: var(--build); }
.mode-card.runtime .mode-tag { color: var(--runtime); }

.mode-card h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.mode-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 20px;
}

.mode-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mode-list li {
  font-size: 14px;
  color: var(--muted);
  display: flex;
  gap: 8px;
}

.mode-list li span {
  color: var(--accent3);
  font-weight: 700;
  flex-shrink: 0;
}

.mode-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.mode-arrow {
  font-size: 28px;
  color: var(--accent);
}

.mode-divider-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--bg3);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* ============================
   STEPS
   ============================ */

.steps {
  padding: 120px 0;
}

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

.step {
  border-top: 2px solid var(--border);
  padding-top: 24px;
}

.step-num {
  font-size: 48px;
  font-weight: 900;
  color: rgba(124,58,237,0.2);
  line-height: 1;
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}

.step h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.step p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

.step code {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--bg3);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: #a78bfa;
}

/* ============================
   FEATURES
   ============================ */

.features {
  padding: 120px 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 64px;
}

.feature-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.2s;
}

.feature-card:hover {
  border-color: rgba(124,58,237,0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124,58,237,0.12);
}

.feature-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

/* ============================
   PROTOCOL DIAGRAM
   ============================ */

.protocol {
  padding: 120px 0;
}

.protocol-diagram {
  margin-top: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.p-bus {
  width: 100%;
  max-width: 700px;
  background: linear-gradient(135deg, rgba(124,58,237,0.1), rgba(6,182,212,0.1));
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: var(--radius);
  padding: 20px 24px;
}

.p-bus-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  text-align: center;
}

.p-bus-line {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.p-packet {
  padding: 6px 14px;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  color: #a78bfa;
  animation: float 3s ease-in-out infinite;
}

.p-packet:nth-child(2) { animation-delay: 0.5s; }
.p-packet:nth-child(3) { animation-delay: 1s; }
.p-packet:nth-child(4) { animation-delay: 1.5s; }

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

.p-agents {
  display: flex;
  gap: 24px;
  justify-content: center;
}

.p-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  min-width: 100px;
}

.p-arbiter {
  background: rgba(245,158,11,0.08);
  border-color: rgba(245,158,11,0.3);
}

.p-node-icon { font-size: 28px; }

.p-node-label {
  font-size: 13px;
  font-weight: 700;
  font-family: var(--mono);
}

.p-node-sub {
  font-size: 11px;
  color: var(--muted);
}

/* ============================
   GET STARTED
   ============================ */

.get-started {
  padding: 120px 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
}

.quickstart-steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 640px;
  margin: 64px 0;
}

.qs-step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.qs-num {
  width: 32px;
  height: 32px;
  background: rgba(124,58,237,0.2);
  border: 1px solid rgba(124,58,237,0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #a78bfa;
  flex-shrink: 0;
  margin-top: 4px;
}

.qs-content { flex: 1; }

.qs-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}

.code-block {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.code-header-sm {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}

.code-block pre {
  padding: 12px 16px;
}

.code-block code {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
}

/* ============================
   CTA BOX
   ============================ */

.cta-box {
  background: linear-gradient(135deg, rgba(124,58,237,0.12), rgba(6,182,212,0.08));
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: 16px;
  padding: 56px;
  text-align: center;
  max-width: 700px;
}

.cta-box h3 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.cta-box p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  margin-bottom: 32px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================
   FOOTER
   ============================ */

footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.15s;
}

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

.footer-copy {
  font-size: 13px;
  color: var(--muted);
}

/* ============================
   RESPONSIVE
   ============================ */

@media (max-width: 900px) {
  .modes-grid {
    grid-template-columns: 1fr;
  }
  .mode-divider { flex-direction: row; }
  .mode-arrow { transform: rotate(90deg); }

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

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

  .p-agents {
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  .nav-links a:not(.btn) { display: none; }

  h1 { letter-spacing: -2px; }

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

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

  .cta-box {
    padding: 32px 24px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================
   WAITLIST FORM
   ============================ */

.waitlist-form {
  margin-top: 24px;
}

.waitlist-row {
  display: flex;
  gap: 12px;
  max-width: 520px;
  margin: 0 auto;
}

.waitlist-input {
  flex: 1;
  padding: 14px 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.waitlist-input:focus {
  border-color: var(--accent);
  background: rgba(124,58,237,0.08);
}

.waitlist-input::placeholder { color: var(--muted); }

.waitlist-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.waitlist-disclaimer {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.waitlist-success {
  margin-top: 16px;
  padding: 12px 20px;
  background: rgba(16,185,129,0.12);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: var(--radius);
  color: var(--accent3);
  font-size: 15px;
  text-align: center;
}

.cta-alt {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
}

.cta-alt-text { color: var(--muted); }
.cta-alt-link { color: var(--accent2); transition: opacity 0.15s; }
.cta-alt-link:hover { opacity: 0.8; }

@media (max-width: 600px) {
  .waitlist-row {
    flex-direction: column;
  }
  .waitlist-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ============================
   SOCIAL PROOF / STATS
   ============================ */

.stats {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}

.stats-grid {
  display: flex;
  justify-content: center;
  gap: 64px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-num {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================
   COMPARISON TABLE
   ============================ */

.comparison {
  padding: 96px 0;
  background: var(--bg2);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 40px;
  font-size: 14px;
}

.comparison-table th {
  padding: 14px 20px;
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.comparison-table th.highlight {
  color: var(--accent2);
  background: rgba(6,182,212,0.06);
  border-radius: 8px 8px 0 0;
}

.comparison-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  vertical-align: top;
}

.comparison-table td.feature-name {
  color: var(--text);
  font-weight: 500;
}

.comparison-table td.highlight {
  color: var(--text);
  background: rgba(6,182,212,0.04);
}

.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:hover td { background: rgba(255,255,255,0.02); }
.comparison-table tr:hover td.highlight { background: rgba(6,182,212,0.06); }

.check { color: var(--accent3); font-weight: 700; }
.cross { color: #ef4444; font-weight: 700; }
.partial { color: var(--build); font-weight: 700; }

@media (max-width: 700px) {
  .comparison-table { font-size: 12px; }
  .comparison-table th, .comparison-table td { padding: 10px 12px; }
  .stats-grid { gap: 32px; }
  .stat-num { font-size: 28px; }
}
