/* ─── ModelQuant ─── GenAI VaR/ES Engine ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0a0e1a;
  --bg-card: #111827;
  --bg-dark: #0d1628;
  --bg-accent: #0f1b33;
  --text: #e2e8f0;
  --text-dim: #94a3b8;
  --text-muted: #64748b;
  --accent: #3b82f6;
  --accent-dark: #1d4ed8;
  --accent-glow: rgba(59, 130, 246, 0.15);
  --border: #1e293b;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
}
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: #60a5fa; }

/* ─── Header ─── */
.site-header {
  background: rgba(10, 14, 26, 0.95);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text) !important;
  font-size: 1.1rem;
}
.logo-icon { font-size: 1.5rem; color: var(--accent); }
.logo-tagline { color: var(--text-dim); font-size: 0.8rem; font-weight: 400; }
.site-header nav { display: flex; gap: 8px; align-items: center; }
.site-header nav a {
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: all 0.2s;
}
.site-header nav a:hover, .site-header nav a.active { color: var(--text); background: var(--bg-card); }
.nav-cta {
  background: var(--accent);
  color: #fff !important;
  font-weight: 600;
}
.nav-cta:hover { background: var(--accent-dark) !important; }

/* ─── Hero ─── */
.hero {
  text-align: center;
  padding: 80px 0 60px;
  background: radial-gradient(ellipse at 50% 0%, var(--accent-glow), transparent 70%);
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.15; margin-bottom: 16px; }
.hero .highlight { color: var(--accent); }
.hero-subtitle { font-size: 1.1rem; color: var(--text-dim); max-width: 680px; margin: 0 auto 32px; line-height: 1.7; }
.hero-stats { display: flex; justify-content: center; gap: 48px; margin-bottom: 32px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-value { display: block; font-size: 1.8rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 0.85rem; color: var(--text-muted); }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.authority-badge { font-size: 0.85rem; color: var(--text-muted); max-width: 480px; margin: 0 auto; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius-sm);
  font-size: 0.95rem; font-weight: 600;
  border: none; cursor: pointer;
  transition: all 0.2s; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-secondary { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); transform: translateY(-1px); }

/* ─── Sections ─── */
.section { padding: 60px 0; }
.section h2 { text-align: center; font-size: 1.8rem; font-weight: 700; margin-bottom: 16px; }
.section-desc { text-align: center; color: var(--text-dim); max-width: 640px; margin: 0 auto 40px; font-size: 1rem; line-height: 1.7; }
.section-dark { background: var(--bg-dark); }
.section-accent { background: var(--bg-accent); }
.section-small { padding: 24px 0; }
.section-header-alt { padding-bottom: 0; }

/* ─── Value Props ─── */
.value-prop { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 32px; }
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.card p { color: var(--text-dim); font-size: 0.9rem; line-height: 1.6; }

/* ─── Failure Grid ─── */
.failure-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 32px; }
.failure-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s;
}
.failure-card:hover { border-color: var(--accent); }
.failure-icon { font-size: 1.5rem; margin-bottom: 8px; }
.failure-card h3 { font-size: 1rem; margin-bottom: 6px; }
.failure-card p { color: var(--text-dim); font-size: 0.85rem; line-height: 1.5; }

/* ─── Demo ─── */
.demo-result {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  min-height: 120px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  overflow-x: auto;
}
.demo-placeholder { color: var(--text-muted); text-align: center; padding: 32px; }
.demo-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ─── Form ─── */
.lead-form { max-width: 640px; margin: 0 auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.85rem; font-weight: 500; color: var(--text-dim); }
.form-group input, .form-group textarea {
  padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font-size: 0.9rem; font-family: inherit;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-feedback { margin-bottom: 12px; font-size: 0.9rem; min-height: 1.4em; }
.form-feedback.success { color: var(--success); }
.form-feedback.error { color: var(--danger); }

/* ─── Share ─── */
.share-bar {
  display: flex; align-items: center; gap: 10px;
  justify-content: center; flex-wrap: wrap;
}
.share-label { color: var(--text-muted); font-size: 0.85rem; }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 0.9rem; cursor: pointer;
  transition: all 0.2s; text-decoration: none !important;
}
.share-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.copy-feedback { font-size: 0.8rem; color: var(--success); }

/* ─── Pricing ─── */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; max-width: 1000px; margin: 0 auto; }
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  display: flex; flex-direction: column;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
}
.pricing-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.pricing-card.featured { border-color: var(--accent); box-shadow: 0 0 30px var(--accent-glow); }
.badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: 0.75rem;
  padding: 4px 14px; border-radius: 20px; font-weight: 600;
}
.plan-name { font-size: 1.1rem; margin-bottom: 4px; }
.plan-price { font-size: 2.2rem; font-weight: 800; margin-bottom: 4px; }
.plan-price .currency { font-size: 1rem; vertical-align: super; color: var(--text-dim); }
.plan-price .period { font-size: 0.9rem; color: var(--text-muted); font-weight: 400; }
.plan-desc { color: var(--text-dim); font-size: 0.85rem; margin-bottom: 20px; }
.plan-features { list-style: none; margin-bottom: 24px; flex: 1; }
.plan-features li {
  padding: 6px 0; font-size: 0.88rem; color: var(--text-dim);
  position: relative; padding-left: 20px;
}
.plan-features li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 700; }
.checkout-result { margin-top: 20px; text-align: center; }

/* ─── Steps ─── */
.steps { max-width: 700px; margin: 0 auto; }
.step { display: flex; gap: 20px; margin-bottom: 28px; }
.step-number {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem;
}
.step-content h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step-content p { color: var(--text-dim); font-size: 0.9rem; line-height: 1.6; }

/* ─── API Section ─── */
.api-section { max-width: 700px; margin: 0 auto; }
.api-section h3 { font-size: 1rem; margin-bottom: 8px; margin-top: 20px; }
.api-section pre {
  background: #050914; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px;
  overflow-x: auto; margin-bottom: 12px;
}
.api-section code { font-size: 0.8rem; color: var(--text-dim); line-height: 1.5; }
.api-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }

/* ─── Footer ─── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
  margin-top: 40px;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; margin-bottom: 24px; }
.footer-col h4 { font-size: 0.9rem; margin-bottom: 10px; color: var(--text-dim); }
.footer-col p, .footer-col a { font-size: 0.85rem; color: var(--text-muted); display: block; margin-bottom: 6px; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 16px; text-align: center; }
.footer-bottom p { font-size: 0.8rem; color: var(--text-muted); }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .site-header nav a { padding: 6px 10px; font-size: 0.82rem; }
  .hero { padding: 48px 0 32px; }
  .hero-stats { gap: 24px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .failure-grid { grid-template-columns: 1fr; }
}