/* ═══════════════════════════════════════════════════════════
   ImpactGuard Landing Page Styles
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-tertiary: #16161f;
  --bg-card: #13131b;
  --border-primary: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --text-primary: #f0f0f5;
  --text-secondary: #b0b0c0;
  --text-muted: #6b6b80;
  --accent: #6C63FF;
  --accent-hover: #5A52E0;
  --accent-glow: rgba(108,99,255,0.15);
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 12px;
  --radius-sm: 8px;
}

/* Light Theme */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-tertiary: #e2e8f0;
  --bg-card: #ffffff;
  --border-primary: rgba(0,0,0,0.08);
  --border-hover: rgba(0,0,0,0.15);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-glow: rgba(79,70,229,0.15);
  --success: #059669;
  --danger: #dc2626;
  --warning: #d97706;
}

[data-theme="light"] .nav {
  background: rgba(255,255,255,0.8);
  border-bottom-color: rgba(0,0,0,0.08);
}

[data-theme="light"] .hero {
  background: radial-gradient(ellipse at top, var(--bg-secondary) 0%, var(--bg-primary) 50%);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.625rem 1.25rem; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.875rem; font-weight: 600;
  text-decoration: none; cursor: pointer; border: none;
  transition: all 0.2s; white-space: nowrap;
}
.btn-primary { 
  background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%); 
  color: #fff; 
  position: relative; 
  overflow: hidden; 
  box-shadow: 0 4px 12px var(--accent-glow);
}
.btn-primary::after {
  content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}
.btn-primary:hover::after { left: 100%; }
.btn-primary:hover { 
  transform: translateY(-2px) scale(1.02); 
  box-shadow: 0 8px 24px var(--accent-glow); 
}
.btn-outline { background: transparent; color: var(--text-primary); border: 1px solid var(--border-hover); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text-primary); }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1rem; border-radius: var(--radius); }

/* ── Navigation ──────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,10,15,0.65); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-primary);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 4rem;
}
.nav-brand {
  display: flex; align-items: center; gap: 0.625rem;
  text-decoration: none; color: var(--text-primary);
  font-weight: 700; font-size: 1.125rem;
}
.nav-logo {
  width: 2rem; height: 2rem; background: var(--accent);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 800; color: #fff;
}
.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  color: var(--text-secondary); text-decoration: none; font-size: 0.875rem;
  font-weight: 500; transition: color 0.15s;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-actions { display: flex; gap: 0.75rem; align-items: center; }
.nav-toggle { display: none; background: none; border: none; color: var(--text-primary); cursor: pointer; }

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  position: relative; padding: 10rem 0 6rem; text-align: center;
  overflow: hidden;
}
.hero-glow {
  position: absolute; top: -300px; left: 50%; transform: translateX(-50%);
  width: 1000px; height: 800px;
  background: radial-gradient(circle at center, var(--accent-glow) 0%, transparent 60%);
  pointer-events: none;
  filter: blur(100px);
  animation: glowPulse 10s infinite alternate;
}

@keyframes glowPulse {
  0% { opacity: 0.3; transform: translateX(-50%) scale(1); }
  100% { opacity: 0.6; transform: translateX(-50%) scale(1.2); }
}
.hero-inner { position: relative; }
.hero-badge {
  display: inline-block; padding: 0.375rem 1rem; border-radius: 999px;
  background: var(--accent-glow); color: var(--accent); font-size: 0.8125rem;
  font-weight: 600; margin-bottom: 1.5rem; border: 1px solid rgba(108,99,255,0.2);
}
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 900;
  line-height: 1.1; margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}
.gradient-text {
  background: linear-gradient(135deg, var(--accent), #a78bfa, #60a5fa);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  max-width: 640px; margin: 0 auto 2rem; font-size: 1.125rem;
  color: var(--text-secondary); line-height: 1.7;
}
.hero-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem;
  margin-top: 5rem; max-width: 700px; margin-left: auto; margin-right: auto;
}
.hero-stat { text-align: center; }
.hero-stat-value { font-size: 1.75rem; font-weight: 800; color: var(--accent); }
.hero-stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 0.25rem; }

/* ── Sections ─────────────────────────────────────────── */
.section { padding: 6rem 0; }
.section-dark { background: var(--bg-secondary); }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-badge {
  display: inline-block; padding: 0.25rem 0.75rem; border-radius: 999px;
  background: var(--accent-glow); color: var(--accent); font-size: 0.75rem;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 1rem; border: 1px solid rgba(108,99,255,0.15);
}
.section-title { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; margin-bottom: 0.75rem; letter-spacing: -0.01em; }
.section-subtitle { max-width: 600px; margin: 0 auto; color: var(--text-secondary); font-size: 1rem; }

/* ── Features ─────────────────────────────────────────── */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.feature-card {
  background: rgba(19, 19, 27, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-primary);
  border-radius: 20px;
  padding: 2.5rem;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.5s;
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: rgba(108, 99, 255, 0.4);
  background: rgba(19, 19, 27, 0.6);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px var(--accent-glow);
}

.feature-card:hover::before { opacity: 1; }
.feature-card:hover { 
  border-color: var(--accent); 
  transform: translateY(-4px) scale(1.01); 
  box-shadow: 0 12px 32px var(--accent-glow);
}
.feature-icon { font-size: 2rem; margin-bottom: 1rem; }
.feature-card h3 { font-size: 1.0625rem; font-weight: 700; margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-secondary); font-size: 0.875rem; line-height: 1.7; }

/* ── Modules ──────────────────────────────────────────── */
.modules-grid {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  justify-content: center; max-width: 800px; margin: 0 auto 3rem;
}
.module-tag {
  padding: 0.5rem 1.25rem; border-radius: 999px;
  background: var(--bg-tertiary); border: 1px solid var(--border-primary);
  font-size: 0.875rem; font-weight: 600; font-family: 'JetBrains Mono', monospace;
  transition: border-color 0.15s, background 0.15s;
}
.module-tag:hover { border-color: var(--accent); background: var(--accent-glow); }
.module-tag-accent { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.modules-detail { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.module-detail-card {
  background: var(--bg-tertiary); border: 1px solid var(--border-primary);
  border-radius: var(--radius); padding: 1.5rem;
}
.module-detail-card h4 { font-size: 0.9375rem; font-weight: 700; margin-bottom: 0.5rem; }
.module-detail-card p { color: var(--text-secondary); font-size: 0.8125rem; line-height: 1.7; }

/* ── Pricing ──────────────────────────────────────────── */
.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem; max-width: 1100px; margin: 0 auto;
}
.pricing-loading { text-align: center; color: var(--text-muted); padding: 3rem; grid-column: 1/-1; }
.pricing-card {
  background: var(--bg-card); border: 1px solid var(--border-primary);
  border-radius: var(--radius); padding: 2rem;
  display: flex; flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}
.pricing-card:hover { border-color: var(--border-hover); transform: translateY(-3px); }
.pricing-card.featured {
  border-color: var(--accent); position: relative;
  box-shadow: 0 0 40px var(--accent-glow);
}
.pricing-card.featured::before {
  content: 'Popular'; position: absolute; top: -0.75rem; right: 1.5rem;
  background: var(--accent); color: #fff; font-size: 0.6875rem;
  font-weight: 700; padding: 0.25rem 0.75rem; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.pricing-name { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.25rem; }
.pricing-price {
  font-size: 2.25rem; font-weight: 900; margin: 1rem 0;
  display: flex; align-items: baseline; gap: 0.25rem;
}
.pricing-period { font-size: 0.875rem; font-weight: 400; color: var(--text-muted); }
.pricing-usd { font-size: 0.75rem; color: var(--text-muted); text-decoration: line-through; opacity: 0.7; margin-top: -0.5rem; margin-bottom: 0.5rem; }
.pricing-features { list-style: none; margin: 1.5rem 0; flex: 1; }
.pricing-features li {
  padding: 0.375rem 0; font-size: 0.875rem; color: var(--text-secondary);
  display: flex; align-items: center; gap: 0.5rem;
}
.pricing-features li::before { content: '✓'; color: var(--success); font-weight: 700; font-size: 0.75rem; }
.pricing-features li.disabled { color: var(--text-muted); }
.pricing-features li.disabled::before { content: '✕'; color: var(--text-muted); }
.pricing-card .btn { width: 100%; justify-content: center; }

/* ── FAQ ──────────────────────────────────────────────── */
.faq-list { max-width: 740px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--border-primary);
}
.faq-question {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 0; background: none; border: none; color: var(--text-primary);
  font-family: inherit; font-size: 1rem; font-weight: 600; cursor: pointer;
  text-align: left;
}
.faq-question svg { flex-shrink: 0; transition: transform 0.2s; color: var(--text-muted); }
.faq-item.open .faq-question svg { transform: rotate(180deg); }
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.open .faq-answer { max-height: 300px; padding-bottom: 1.25rem; }
.faq-answer p { color: var(--text-secondary); font-size: 0.9375rem; line-height: 1.7; }

/* ── CTA ──────────────────────────────────────────────── */
.cta-section {
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  border-top: 1px solid var(--border-primary);
}
.cta-inner { text-align: center; max-width: 640px; }
.cta-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin-bottom: 0.75rem; }
.cta-subtitle { color: var(--text-secondary); margin-bottom: 2rem; }

/* ── Footer ──────────────────────────────────────────── */
.footer {
  background: var(--bg-secondary); border-top: 1px solid var(--border-primary);
  padding: 3rem 0 1.5rem;
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 3rem; }
.footer-brand { flex: 1; min-width: 200px; }
.footer-desc { color: var(--text-muted); font-size: 0.8125rem; margin-top: 0.75rem; max-width: 300px; }
.footer-links { display: flex; gap: 4rem; }
.footer-col { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col h4 { font-size: 0.8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 0.25rem; }
.footer-col a { color: var(--text-secondary); text-decoration: none; font-size: 0.875rem; transition: color 0.15s; }
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom {
  margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border-primary);
  width: 100%;
}
.footer-bottom p { color: var(--text-muted); font-size: 0.75rem; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; position: absolute; top: 4rem; left: 0; right: 0; background: var(--bg-secondary); border-bottom: 1px solid var(--border-primary); flex-direction: column; padding: 1rem 1.5rem; gap: 0.75rem; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .nav-actions .btn-ghost { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .modules-detail { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 3rem; }
  .footer-links { gap: 2rem; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
}

@media (max-width: 480px) {
  .hero { padding: 7rem 0 4rem; }
  .section { padding: 4rem 0; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}
