:root {
  --bg: #0a0e1a;
  --bg-elevated: #111827;
  --bg-card: #1a2035;
  --border: #2a3448;
  --border-light: #374151;
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99,102,241,0.3);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gold: #c9a96e;
  --gold-dim: rgba(201,169,110,0.15);
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #c9a96e 100%);
  --gradient-hero: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(99,102,241,0.12) 0%, transparent 60%),
                    radial-gradient(ellipse 60% 40% at 80% 50%, rgba(139,92,246,0.08) 0%, transparent 50%);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

html { scroll-behavior: smooth; }

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

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

/* ===== Header ===== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,14,26,0.85);
  backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 32px; height: 32px;
  background: var(--gradient-primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}

.logo-icon svg { width: 18px; height: 18px; }

.logo-text { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; color: var(--text); }

.nav { display: flex; align-items: center; gap: 0px; white-space: nowrap; }

.nav a {
  padding: 6px 10px; border-radius: 6px;
  color: var(--text-secondary); text-decoration: none;
  font-size: 0.85rem; font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav a:hover { color: var(--text); background: rgba(255,255,255,0.04); }


/* ===== Hero ===== */
.hero {
  padding: 140px 0 80px;
  background: var(--gradient-hero);
  position: relative; overflow: hidden;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 100px;
  background: var(--gold-dim); border: 1px solid rgba(201,169,110,0.2);
  font-size: 0.85rem; color: var(--gold); margin-bottom: 28px;
}

.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 8px var(--gold);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800; line-height: 1.1; letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero h1 .gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem; color: var(--text-secondary);
  max-width: 560px; margin-bottom: 36px;
}

.hero-cta {
  display: flex; gap: 12px; flex-wrap: wrap;
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 8px;
  font-weight: 600; font-size: 0.95rem;
  text-decoration: none; transition: all 0.2s; cursor: pointer; border: none;
}

.btn-primary {
  background: var(--gradient-primary); color: white;
  box-shadow: 0 4px 20px rgba(99,102,241,0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(99,102,241,0.4);
}

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

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

/* Three Pillars */
.pillars {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-top: 60px;
}

.pillar {
  padding: 24px; border-radius: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  transition: all 0.3s;
}

.pillar:hover { border-color: var(--border-light); transform: translateY(-2px); }

.pillar-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}

.pillar:nth-child(1) .pillar-icon { background: rgba(99,102,241,0.12); color: var(--accent); }
.pillar:nth-child(2) .pillar-icon { background: rgba(139,92,246,0.12); color: #a78bfa; }
.pillar:nth-child(3) .pillar-icon { background: var(--gold-dim); color: var(--gold); }

.pillar h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.pillar p { font-size: 0.9rem; color: var(--text-secondary); }

/* ===== Section Common ===== */
.section { padding: 80px 0; }

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

.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 700; margin-bottom: 12px;
}

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

/* ===== Comparison ===== */
.comparison {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px;
  align-items: start;
}

.comparison-card {
  padding: 28px; border-radius: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
}

.comparison-card.fo { border-color: rgba(99,102,241,0.3); }

.comparison-card h3 {
  font-size: 1rem; font-weight: 600; margin-bottom: 20px;
  display: flex; align-items: center; gap: 8px;
}

.comparison-list { list-style: none; }
.comparison-list li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0; font-size: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.comparison-list li:last-child { border-bottom: none; }

.comparison-list .check { color: var(--success); flex-shrink: 0; margin-top: 2px; }
.comparison-list .cross { color: var(--danger); flex-shrink: 0; margin-top: 2px; }
.comparison-card.fo .check { color: var(--accent-light); }

.comparison-divider {
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--text-muted); font-size: 0.85rem;
}

/* ===== AI Agent Section ===== */
.ai-agent-section { background: rgba(99,102,241,0.03); }

.code-block {
  background: #0d1117; border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; margin-top: 24px;
}

.code-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
}

.code-header span { font-size: 0.8rem; color: var(--text-muted); font-family: var(--font-mono); }

.code-header .lang-tag {
  padding: 2px 8px; border-radius: 4px;
  background: rgba(99,102,241,0.15); color: var(--accent-light);
  font-size: 0.75rem; font-weight: 600;
}

pre {
  padding: 20px; overflow-x: auto;
  font-family: var(--font-mono); font-size: 0.85rem; line-height: 1.7;
}

code { font-family: var(--font-mono); }

.code-keyword { color: #c678dd; }
.code-function { color: #61afef; }
.code-string { color: #98c379; }
.code-comment { color: #5c6370; font-style: italic; }
.code-number { color: #d19a66; }

/* ===== Live Demo ===== */
.demo-box {
  max-width: 700px; margin: 0 auto;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 32px;
}

.demo-input-row {
  display: flex; gap: 12px; margin-bottom: 20px;
}

.demo-input {
  flex: 1; padding: 14px 18px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font-family: var(--font-mono); font-size: 0.9rem;
  outline: none; transition: border-color 0.2s;
}

.demo-input:focus { border-color: var(--accent); }

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

.demo-result {
  display: none;
  padding: 20px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--border);
}

.demo-result.show { display: block; }

.risk-indicator {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 100px;
  font-weight: 600; font-size: 0.9rem;
}

.risk-safe { background: rgba(34,197,94,0.12); color: var(--success); }
.risk-low { background: rgba(245,158,11,0.12); color: var(--warning); }
.risk-high { background: rgba(239,68,68,0.12); color: var(--danger); }

/* ===== Features ===== */
.features-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
}

.feature-card {
  padding: 28px; border-radius: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  transition: all 0.3s;
}

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

.feature-card .num {
  font-size: 2rem; font-weight: 800; color: var(--accent);
  opacity: 0.3; margin-bottom: 8px;
}

.feature-card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.feature-card p { font-size: 0.9rem; color: var(--text-secondary); }

/* ===== Chain Logos ===== */
.chains-grid {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 32px;
  margin-top: 40px;
}

.chain-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  opacity: 0.6; transition: opacity 0.3s;
}

.chain-item:hover { opacity: 1; }

.chain-logo {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}

.chain-name { font-size: 0.8rem; color: var(--text-secondary); }

/* ===== Trust / Stats ===== */
.trust-section { background: rgba(99,102,241,0.03); }

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

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

.stat-num {
  font-size: 2.5rem; font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label { font-size: 0.9rem; color: var(--text-secondary); margin-top: 4px; }

/* ===== CTA ===== */
.cta-box {
  text-align: center; padding: 60px;
  background: var(--gradient-primary);
  border-radius: 20px; position: relative; overflow: hidden;
}

.cta-box::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
}

.cta-box h2 { font-size: 2rem; font-weight: 700; margin-bottom: 12px; position: relative; }
.cta-box p { font-size: 1.05rem; opacity: 0.9; margin-bottom: 28px; position: relative; }
.cta-box .btn { position: relative; background: white; color: var(--accent); }
.cta-box .btn:hover { background: #f8fafc; }

/* ===== Footer ===== */
.footer {
  padding: 48px 0 32px; border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
}

.footer-brand p {
  font-size: 0.9rem; color: var(--text-secondary); margin-top: 12px; max-width: 280px;
}

.footer-col h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 16px; color: var(--text); }
.footer-col a {
  display: block; color: var(--text-muted); text-decoration: none;
  font-size: 0.85rem; padding: 4px 0; transition: color 0.2s;
}
.footer-col a:hover { color: var(--text-secondary); }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 32px; padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem; color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .pillars { grid-template-columns: 1fr; }
  .comparison { grid-template-columns: 1fr; }
  .comparison-divider { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 20px;
    gap: 8px;
    z-index: 99;
    overflow-y: auto;
  }
  .nav.show { display: flex; }
  .nav a { width: 100%; padding: 12px 16px; }
  .nav .lang-dropdown { display: none; margin: 16px 0 0 0; padding: 16px 0 0 0; border-left: none; border-top: 1px solid var(--border); }
  .nav.show .lang-dropdown { display: block; }
  .lang-dropdown-menu { right: auto; left: 0; }
}

@media (max-width: 600px) {
  .hero { padding: 120px 0 60px; }
  .stats-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .demo-input-row { flex-direction: column; }
}

/* ===== Animations ===== */
.fade-in {
  opacity: 0; transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

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

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* ===== Benchmark ===== */
.benchmark-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 800px; margin: 0 auto; }
.benchmark-card { padding: 28px; border-radius: 12px; background: var(--bg-card); border: 1px solid var(--border); }
.benchmark-card.fo { border-color: rgba(99,102,241,0.3); }
.benchmark-label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.05em; }
.benchmark-metric { margin-bottom: 16px; }
.benchmark-bar { height: 8px; border-radius: 4px; background: var(--border); margin-bottom: 8px; }
.benchmark-card.fo .benchmark-bar { background: var(--accent); }
.benchmark-value { font-size: 2rem; font-weight: 700; color: var(--text); }
.benchmark-detail { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 8px; }
.benchmark-cost { font-size: 0.85rem; color: var(--success); font-weight: 600; }
.benchmark-fail { font-size: 0.85rem; color: var(--danger); margin-top: 4px; }