/* ──────────────────────────────────────────────
   ChurnShield — Design System
   ────────────────────────────────────────────── */

:root {
  --bg: #0a0e1a;
  --bg-card: #111827;
  --bg-elevated: #1a2235;
  --bg-cta: #0f1729;
  --border: #1e293b;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-glow: rgba(59, 130, 246, 0.25);
  --accent: #06d6a0;
  --accent-dim: rgba(6, 214, 160, 0.12);
  --danger: #ef4444;
  --danger-dim: rgba(239, 68, 68, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.125rem;
}

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

.nav-cta {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--primary-hover); }

/* ── Hero ── */
.hero {
  padding: 10rem 0 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  pointer-events: none;
}

.badge {
  display: inline-block;
  background: var(--accent-dim);
  color: var(--accent);
  padding: 0.375rem 1rem;
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: italic;
  color: var(--text-muted);
}

.gradient-text {
  background: linear-gradient(135deg, #3b82f6 0%, #06d6a0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.trust-line {
  font-size: 0.8125rem;
  color: var(--text-dim);
  letter-spacing: 0.01em;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  padding: 0.625rem 1.5rem;
}

.btn-lg { padding: 0.875rem 2rem; font-size: 1rem; border-radius: var(--radius); }
.btn-full { width: 100%; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 24px var(--primary-glow);
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--text-dim); color: var(--text); }

/* ── Sections ── */
.section { padding: 5rem 0; }
.section-dark { background: var(--bg-card); }

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.section h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.section-sub {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 3rem;
  line-height: 1.65;
}

.section:not(.section-dark):not(.section-cta) { text-align: center; }
.section-dark { text-align: center; }

/* ── Stats Row ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #3b82f6, #06d6a0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.stat-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Comparison ── */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 3rem;
  text-align: left;
}

.compare-card {
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  position: relative;
}

.compare-old {
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.compare-new {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(6, 214, 160, 0.08) 100%);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.compare-badge {
  position: absolute;
  top: -12px;
  left: 2rem;
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.875rem;
  border-radius: 100px;
  letter-spacing: 0.05em;
}

.compare-header {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.compare-card ul { list-style: none; }
.compare-card li {
  padding: 0.5rem 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.compare-card li .x { color: var(--danger); margin-right: 0.5rem; font-weight: 700; }
.compare-card li .check { color: var(--accent); margin-right: 0.5rem; font-weight: 700; }

/* ── Steps ── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
  text-align: left;
}

.step-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.step-num {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #3b82f6, #06d6a0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
}

.step-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.step-card p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ── Features ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
  text-align: left;
}

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

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

.feature-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ── FAQ ── */
.faq-list {
  margin-top: 2.5rem;
  text-align: left;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}
.faq-item:last-child { border-bottom: none; }

.faq-item h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.faq-item p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* ── Demo Form / CTA ── */
.section-cta {
  background: var(--bg-cta);
  text-align: center;
  padding: 5rem 0 6rem;
}

.demo-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  margin-top: 2rem;
  text-align: left;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.375rem;
}

.optional {
  color: var(--text-dim);
  font-weight: 400;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9375rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-dim);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-group select option { background: var(--bg-card); }

.form-note {
  font-size: 0.8125rem;
  color: var(--text-dim);
  text-align: center;
  margin-top: 0.75rem;
}

/* Form success state */
.form-success {
  text-align: center;
  padding: 2rem 0;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.form-success h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.form-success p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* Error state */
.form-error {
  background: var(--danger-dim);
  color: var(--danger);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  display: none;
}

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

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-brand p {
  color: var(--text-dim);
  font-size: 0.8125rem;
  margin-left: 0.5rem;
}

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

/* ── Loading spinner on submit ── */
.btn-loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  margin-left: 0.5rem;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero { padding: 8rem 0 4rem; }

  .compare-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }

  .footer-inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .footer-brand { flex-direction: column; }
  .footer-brand p { margin-left: 0; }

  .demo-form { padding: 1.5rem; }

  .stats-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.75rem; }
  .hero-sub { font-size: 1rem; }
  .section h2 { font-size: 1.5rem; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .btn-lg { width: 100%; }
}
