/* ============================================================
   Design Tokens
   ============================================================ */
:root {
  /* Section palettes */
  --color-science: #10b981;
  --color-science-dark: #059669;
  --color-science-light: #ecfdf5;
  --color-science-bg: #f0fdf4;

  --color-develop: #7c3aed;
  --color-develop-dark: #6d28d9;
  --color-develop-light: #f5f3ff;
  --color-develop-bg: #faf5ff;

  /* Accents used by animation only (agent/skill/tool wire colors) */
  --color-accent-sky: #0284c7;
  --color-accent-pink: #ec4899;
  --color-accent-amber: #f59e0b;
  --color-accent-violet: #8b5cf6;

  /* Neutrals */
  --color-white: #ffffff;
  --color-bg: #f8fafc;
  --color-bg-alt: #f1f5f9;
  --color-border: #e2e8f0;
  --color-border-light: #f1f5f9;
  --color-text: #1e293b;
  --color-text-heading: #0f172a;
  --color-text-muted: #64748b;
  --color-text-subtle: #94a3b8;
  --color-code-bg: #1e293b;
  --color-code-text: #e2e8f0;

  /* Spacing */
  --section-pad: 80px;
  --section-pad-mobile: 48px;
  --content-max: 1200px;
  --nav-height: 64px;

  /* Radius */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 8px 30px rgba(15, 23, 42, 0.12);

  /* Transitions */
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue", Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; }
code, pre { font-family: "JetBrains Mono", "Fira Code", "Consolas", "Monaco", monospace; }

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-pad) 0;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-text-heading);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.section-header p {
  font-size: 17px;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================================
   Utility classes (extracted from repeated inline styles)
   ============================================================ */
.u-block-center { max-width: 760px; margin: 0 auto 48px; }
.u-block-narrow { max-width: 820px; margin: 0 auto; }
.u-mt-56 { margin-top: 56px; }
.u-mt-64 { margin-top: 64px; }
.u-mt-8 { margin-top: 8px; }
.u-mt-12 { margin-top: 12px; }
.u-mt-24 { margin-top: 24px; }

.u-lead { font-size: 17px; line-height: 1.8; color: var(--color-text); text-align: center; }
.u-lead-muted { font-size: 15px; line-height: 1.8; color: var(--color-text-muted); text-align: center; margin-top: 16px; }

.u-h3-center {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}
.u-h3-center-mb { margin-bottom: 24px; }
.u-h3-center-mb32 { margin-bottom: 32px; }

.u-subtext-center {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.u-inline-narrow-note {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.u-card-grid-narrow { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.u-expandable-pad { padding-top: 12px; }
.u-code-sm { margin-top: 12px; font-size: 11px; }

/* Concept card is a button; strip default look */
.concept-card {
  appearance: none;
  background: white;
  border: 1px solid var(--color-border);
  color: inherit;
  text-align: left;
  width: 100%;
  font: inherit;
}

/* ============================================================
   Skip Link (Accessibility)
   ============================================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--color-science);
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 8px; }

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  height: var(--nav-height);
  display: flex;
  align-items: center;
}

.nav-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-heading);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-science), var(--color-accent-sky));
  display: inline-block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: all var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text-heading);
  background: var(--color-border-light);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 16px; right: 16px;
  height: 3px;
  border-radius: 2px;
  background: var(--color-science);
  transition: background var(--transition);
}

.nav-links a[href="#develop"].active::after { background: var(--color-develop); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--color-text);
  padding: 4px;
  line-height: 1;
}

/* Mobile nav overlay */
.nav-mobile-overlay {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(8px);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.nav-mobile-overlay.open { display: flex; }

.nav-mobile-overlay a {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text-heading);
  padding: 14px 32px;
  border-radius: var(--radius);
  transition: all var(--transition);
}
.nav-mobile-overlay a:hover { background: var(--color-border-light); }

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 60px 24px;
}

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

.hero-bg canvas {
  width: 100%;
  height: 100%;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: var(--color-science-light);
  color: var(--color-science-dark);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  color: var(--color-text-heading);
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--color-science), var(--color-develop), var(--color-accent-sky));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 48px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
}

.hero-cta-cards-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 520px;
}

.hero-cta-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 2px solid var(--color-border);
  transition: all var(--transition);
  cursor: pointer;
}

.hero-cta-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.hero-cta-card.science:hover { border-color: var(--color-science); }
.hero-cta-card.develop:hover { border-color: var(--color-develop); }

.hero-cta-card .card-icon { font-size: 36px; margin-bottom: 12px; }
.hero-cta-card .card-title { font-size: 16px; font-weight: 700; color: var(--color-text-heading); margin-bottom: 4px; }
.hero-cta-card .card-desc { font-size: 13px; color: var(--color-text-muted); line-height: 1.5; }

/* Mini agent animation in hero */
.hero-mini-demo {
  margin-top: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.hero-mini-node {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: white;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  border: 3px solid var(--color-border);
  position: relative;
  transition: all 0.6s ease;
}

.hero-mini-node.active {
  border-color: var(--color-science);
  box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.1);
  transform: scale(1.1);
}

.hero-mini-arrow {
  font-size: 24px;
  color: var(--color-text-subtle);
  transition: color 0.6s;
}
.hero-mini-arrow.active { color: var(--color-science); }

/* ============================================================
   Shared Components: Cards, Buttons, Code Blocks
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: white;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: all var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card .card-icon { font-size: 32px; margin-bottom: 16px; }
.card h3 { font-size: 18px; font-weight: 700; color: var(--color-text-heading); margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--color-text-muted); line-height: 1.6; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-science);
  color: white;
}
.btn-primary:hover { background: var(--color-science-dark); }

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-border);
  color: var(--color-text);
}
.btn-outline:hover { border-color: var(--color-text-subtle); background: var(--color-border-light); }

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
}
.btn-ghost:hover { background: var(--color-border-light); color: var(--color-text); }

.btn-sm { padding: 6px 14px; font-size: 13px; }

.code-block {
  background: var(--color-code-bg);
  color: var(--color-code-text);
  border-radius: var(--radius);
  padding: 20px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  position: relative;
}

.code-block .keyword { color: #c084fc; }
.code-block .string { color: #6ee7b7; }
.code-block .comment { color: #94a3b8; font-style: italic; }
.code-block .function { color: #60a5fa; }
.code-block .number { color: #fbbf24; }
.code-block .type { color: #f9a8d4; }

/* ============================================================
   Science Section
   ============================================================ */
.section-science {
  background: linear-gradient(180deg, var(--color-white) 0%, var(--color-science-bg) 100%);
}

/* 3-step (Think → Use Tools → Answer) */
.steps-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin: 40px 0;
}

.step-circle {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: white;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--color-science);
  font-size: 28px;
  transition: all var(--transition);
  position: relative;
}

.step-circle .step-label {
  font-size: 11px;
  color: var(--color-science-dark);
  font-weight: 600;
  margin-top: 2px;
}

.step-arrow {
  font-size: 28px;
  color: var(--color-science);
}

/* Interactive Demo Container */
.demo-container {
  position: relative;
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  overflow: hidden;
  margin: 40px 0;
}

.demo-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--color-science-bg);
  border-bottom: 1px solid var(--color-border);
}

.demo-scenario-tabs {
  display: flex;
  gap: 8px;
}

.demo-scenario-tab {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  background: white;
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all var(--transition);
}
.demo-scenario-tab:hover { border-color: var(--color-text-subtle); }
.demo-scenario-tab.active {
  background: var(--color-science);
  color: white;
  border-color: var(--color-science);
}

.demo-speed-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.demo-speed-btn {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: white;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.demo-speed-btn:hover { border-color: var(--color-text-subtle); }
.demo-speed-btn.active {
  background: var(--color-science);
  color: white;
  border-color: var(--color-science);
}

.demo-main {
  display: flex;
  min-height: 500px;
}

.demo-diagram-area {
  flex: 1;
  position: relative;
  min-width: 0;
  background: var(--color-bg);
  overflow: hidden;
}

.demo-diagram-area svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.demo-diagram-area canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }

.demo-node {
  position: absolute;
  background: white;
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--color-border);
  transition: all 0.4s ease;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 120px;
}

.demo-node.active {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--color-science);
}

.demo-node .node-icon { font-size: 24px; margin-bottom: 4px; }
.demo-node .node-name { font-size: 13px; font-weight: 600; color: var(--color-text); }
.demo-node .node-status { font-size: 11px; color: var(--color-science); margin-top: 3px; min-height: 15px; font-weight: 500; }

/* Inline layout helpers inside demo nodes */
.demo-node-body { display: flex; flex-direction: column; align-items: center; width: 100%; }
.demo-node-title { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.demo-node-hub-title { display: flex; align-items: center; gap: 6px; justify-content: center; }
.demo-node-sub { font-size: 10px; margin-bottom: 4px; }
.demo-node-sub.violet { color: var(--color-accent-violet); }
.demo-node-sub.pink { color: var(--color-accent-pink); }
.demo-node-hub-icon { font-size: 20px; }

/* Chat UI inside demo */
.demo-chat-node {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 2px solid #93c5fd;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.demo-chat-header {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.demo-chat-messages {
  flex: 1;
  padding: 12px;
  background: #f1f5f9;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.demo-chat-msg {
  max-width: 85%;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.5;
  word-wrap: break-word;
  opacity: 0;
  transform: translateY(6px);
  animation: msgSlideIn 0.3s ease forwards;
}

@keyframes msgSlideIn {
  to { opacity: 1; transform: translateY(0); }
}

.demo-chat-msg.user {
  align-self: flex-end;
  background: #3b82f6;
  color: white;
  border-radius: 12px 12px 3px 12px;
}

.demo-chat-msg.ai {
  align-self: flex-start;
  background: white;
  color: var(--color-text);
  border-radius: 12px 12px 12px 3px;
  border: 1px solid var(--color-border);
}

.demo-chat-input-row {
  display: flex;
  padding: 8px 10px;
  border-top: 1px solid var(--color-border);
  gap: 6px;
  flex-shrink: 0;
}

.demo-chat-input-row input {
  flex: 1;
  border: none;
  outline: none;
  padding: 6px 10px;
  font-size: 12px;
  background: var(--color-bg);
  border-radius: 6px;
  color: var(--color-text-subtle);
}

.demo-chat-input-row .send-btn {
  padding: 6px 12px;
  background: #3b82f6;
  color: white;
  border-radius: 6px;
  font-size: 12px;
  opacity: 0.5;
}

/* Agent thought log */
.demo-thought-log {
  background: #faf5ff;
  border-radius: var(--radius-sm);
  padding: 8px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  flex: 1;
}

.demo-thought {
  padding: 4px 8px;
  background: white;
  border-left: 3px solid #a78bfa;
  border-radius: 4px;
  font-size: 11px;
  color: #4c1d95;
  line-height: 1.4;
  text-align: left;
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.4s;
}
.demo-thought.show { opacity: 1; transform: translateX(0); }
.demo-thought.new {
  background: linear-gradient(90deg, #f5f3ff, white);
  border-left-color: var(--color-develop);
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.12);
}
.demo-thought.idle {
  border-left-color: #cbd5e1;
  color: var(--color-text-subtle);
}

.demo-thought .tag {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 9px;
  margin-right: 4px;
  font-weight: bold;
  color: white;
}
.demo-thought .tag.brain { background: var(--color-accent-pink); }
.demo-thought .tag.tool { background: var(--color-accent-amber); }
.demo-thought .tag.install { background: var(--color-accent-sky); }

/* SkillHub in demo */
.demo-hub-node {
  background: linear-gradient(135deg, #e0f2fe, white);
  border: 2px solid #7dd3fc;
  border-radius: var(--radius);
  padding: 10px;
  width: 100%;
  height: 100%;
}

.demo-hub-node .hub-items {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
}

.demo-hub-item {
  padding: 3px 8px;
  background: white;
  border-radius: 6px;
  font-size: 14px;
  border: 1px solid #bae6fd;
  transition: all 0.3s;
}
.demo-hub-item.highlight {
  background: var(--color-accent-sky);
  transform: scale(1.3);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.5);
}

/* Demo explanation sidebar */
.demo-sidebar {
  width: 280px;
  flex-shrink: 0;
  padding: 20px;
  border-left: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.demo-sidebar h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-heading);
}

.demo-sidebar .explanation {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.7;
  padding: 12px;
  background: var(--color-science-bg);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-science);
}

.demo-controls-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--color-border);
  background: white;
  flex-wrap: wrap;
}

.progress-bar-wrap {
  flex: 1;
  min-width: 120px;
}

.progress-bar {
  height: 6px;
  background: var(--color-border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-science), var(--color-develop), var(--color-accent-pink));
  transition: width 0.4s;
  width: 0%;
}

.step-counter {
  font-size: 13px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* ============================================================
   Developer Section (Core Concepts)
   ============================================================ */
.section-develop {
  background: linear-gradient(180deg, var(--color-develop-bg) 0%, white 100%);
}

.concept-card {
  cursor: pointer;
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.concept-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.concept-card .card-icon { font-size: 32px; margin-bottom: 16px; }
.concept-card h3 { font-size: 18px; font-weight: 700; color: var(--color-text-heading); margin-bottom: 8px; }
.concept-card p { font-size: 14px; color: var(--color-text-muted); line-height: 1.6; }

.concept-card .expandable {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.concept-card.expanded .expandable {
  max-height: 400px;
}

.concept-card .expand-trigger {
  font-size: 13px;
  color: var(--color-develop);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  background: none;
  border: none;
  padding: 0;
}

.concept-card .expand-trigger:hover { color: var(--color-develop-dark); }

.architecture-diagram {
  background: white;
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  text-align: center;
  margin: 40px 0;
  overflow-x: auto;
}

.architecture-diagram h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--color-text-heading);
}

.architecture-diagram svg {
  max-width: 100%;
  height: auto;
}

/* ============================================================
   Comparison Table (Science section)
   ============================================================ */
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  margin: 40px 0;
}

.comparison-table th {
  background: var(--color-bg);
  padding: 16px 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-heading);
  text-align: left;
}

.comparison-table th:last-child {
  background: var(--color-science-bg);
  color: var(--color-science-dark);
}

.comparison-table td {
  padding: 14px 20px;
  font-size: 14px;
  color: var(--color-text);
  border-top: 1px solid var(--color-border-light);
}

.comparison-table td:last-child {
  background: #fafdfc;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--color-text-heading);
  color: var(--color-text-subtle);
  padding: 48px 0 32px;
  text-align: center;
}

.footer h4 {
  font-size: 16px;
  color: white;
  margin-bottom: 8px;
}

.footer p {
  font-size: 13px;
  line-height: 1.7;
  max-width: 500px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 13px;
  color: var(--color-text-subtle);
  transition: color var(--transition);
}
.footer-links a:hover { color: white; }

.footer-copyright {
  margin-top: 24px;
  font-size: 12px;
  color: #475569;
}

/* ============================================================
   Back to Top
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: white;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  z-index: 50;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all var(--transition);
  border: 1px solid var(--color-border);
  cursor: pointer;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* ============================================================
   Scroll Reveal
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Reduced Motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1023px) {
  .hero h1 { font-size: 36px; }
  .hero-cta-cards { grid-template-columns: 1fr; max-width: 360px; }

  .demo-main { flex-direction: column; }
  .demo-diagram-area { min-height: 400px; }
  .demo-sidebar { width: 100%; border-left: none; border-top: 1px solid var(--color-border); }

  .section { padding: var(--section-pad-mobile) 0; }
  .section-header h2 { font-size: 26px; }
}

@media (max-width: 767px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }

  .hero h1 { font-size: 28px; }
  .hero-subtitle { font-size: 15px; }
  .hero-cta-cards { max-width: 100%; }

  .steps-row { gap: 16px; }
  .step-circle { width: 80px; height: 80px; font-size: 22px; }
  .step-arrow { font-size: 20px; transform: rotate(90deg); }

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

  .comparison-table { font-size: 12px; }
  .comparison-table th, .comparison-table td { padding: 10px 14px; }

  .demo-controls-row { gap: 6px; }
  .demo-controls-row .btn { padding: 8px 14px; font-size: 12px; }
}
