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

:root {
  --bg: #0a0a0b;
  --bg-elevated: #111113;
  --bg-card: #16161a;
  --border: #27272a;
  --border-hover: #3f3f46;
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --primary: #22d3ee;
  --primary-dim: #0891b2;
  --secondary: #a78bfa;
  --success: #4ade80;
  --warning: #fbbf24;
  --error: #f87171;
  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: 'Inter', -apple-system, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Noise texture overlay */
.noise {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.03;
  z-index: 1000;
}

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

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 11, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 1rem 0;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  font-size: 1.5rem;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-tagline {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-left: 0.5rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--bg);
}

.btn-primary:hover {
  background: #06b6d4;
}

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

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

.btn-lg {
  padding: 0.8rem 1.8rem;
  font-size: 1rem;
}

/* Hero */
.hero {
  padding: 8rem 0 4rem;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(167, 139, 250, 0.15);
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--secondary);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

/* Architecture Diagram */
.architecture {
  margin-top: 3rem;
}

.arch-diagram {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--primary);
  overflow-x: auto;
  text-align: left;
  max-width: 700px;
  margin: 0 auto;
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-dark {
  background: var(--bg-elevated);
}

.section-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 1rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 3rem;
}

/* Steps Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: border-color 0.2s;
}

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

.step-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.step-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.step-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Demo Container */
.demo-container {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .demo-container {
    grid-template-columns: 1fr;
  }
}

.metrics-panel,
.activity-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.metrics-panel h3,
.activity-panel h3 {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.metric {
  background: var(--bg);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-mono);
}

.metric-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
}

.milestone-metric {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.1), rgba(34, 211, 238, 0.1));
  border: 1px solid rgba(167, 139, 250, 0.2);
}

.milestone-metric .metric-value {
  color: var(--secondary);
}

/* Progress Chart */
.progress-chart {
  margin-top: 1rem;
}

.progress-chart h4 {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.chart-container {
  background: var(--bg);
  border-radius: 8px;
  height: 80px;
  padding: 0.5rem;
  overflow: hidden;
}

.chart-svg {
  width: 100%;
  height: 100%;
}

/* Activity Log */
.activity-log {
  background: var(--bg);
  border-radius: 8px;
  height: 300px;
  overflow-y: auto;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.log-entry {
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--border);
}

.log-entry:last-child {
  border-bottom: none;
}

.log-system { color: var(--text-dim); }
.log-info { color: var(--text-muted); }
.log-perceive { color: #818cf8; }
.log-reason { color: #c084fc; }
.log-success { color: var(--success); }
.log-warning { color: var(--warning); }
.log-error { color: var(--error); }
.log-learn { color: var(--primary); }
.log-milestone { color: var(--secondary); font-weight: 600; }
.log-chain { color: var(--text-dim); font-size: 0.7rem; }

/* Demo Controls */
.demo-controls {
  display: flex;
  gap: 1rem;
}

.demo-controls .btn {
  flex: 1;
}

/* Milestones Section */
.milestones-section {
  margin-top: 2rem;
}

.milestones-section h3 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.milestones-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.milestone-card {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.1), rgba(34, 211, 238, 0.05));
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
}

.milestone-type {
  font-size: 0.75rem;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.milestone-desc {
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.milestone-metrics {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.milestone-tx {
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.milestone-tx a {
  color: var(--primary);
  text-decoration: none;
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: border-color 0.2s;
}

.tool-card:hover {
  border-color: var(--primary-dim);
}

.tool-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.tool-card h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.tool-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.tool-card code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--primary);
  background: rgba(34, 211, 238, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

/* CTA Section */
.section-cta {
  text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-elevated) 100%);
}

.section-cta h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.section-cta p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Footer */
.footer {
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer p {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.footer a {
  color: var(--primary);
  text-decoration: none;
}

.footer-tagline {
  margin-top: 0.5rem;
  font-style: italic;
  font-size: 0.85rem;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* Responsive */
@media (max-width: 768px) {
  .logo-tagline {
    display: none;
  }
  
  .nav {
    gap: 1rem;
  }
  
  .nav a:not(.btn) {
    display: none;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .cta-buttons {
    flex-direction: column;
  }
}
