:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --border: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --brand: #4f46e5;
  --brand-hover: #4338ca;
  --brand-light: #eef2ff;
  --accent: #06b6d4;
  --success: #16a34a;
  --success-light: #f0fdf4;
  --warning: #d97706;
  --danger: #dc2626;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.12);
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;
  --container: 1160px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0f1a;
    --surface: #121826;
    --surface-alt: #171f30;
    --border: #232c3f;
    --text-primary: #f1f5f9;
    --text-secondary: #b6c0d1;
    --text-muted: #8a93a6;
    --brand: #818cf8;
    --brand-hover: #a5b4fc;
    --brand-light: #1c2140;
    --accent: #22d3ee;
    --success: #4ade80;
    --success-light: #12291c;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.55);
  }
}
:root[data-theme="dark"] {
  --bg: #0b0f1a;
  --surface: #121826;
  --surface-alt: #171f30;
  --border: #232c3f;
  --text-primary: #f1f5f9;
  --text-secondary: #b6c0d1;
  --text-muted: #8a93a6;
  --brand: #818cf8;
  --brand-hover: #a5b4fc;
  --brand-light: #1c2140;
  --accent: #22d3ee;
  --success: #4ade80;
  --success-light: #12291c;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--space-5); }
@media (max-width: 640px) { .container { padding: 0 var(--space-4); } }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--space-4); top: -48px;
  background: var(--brand); color: #fff; padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm); z-index: 1000; transition: top 150ms ease;
}
.skip-link:focus { top: var(--space-4); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: var(--space-5); }
.brand {
  display: flex; align-items: center; gap: var(--space-2); font-weight: 700; font-size: 17px;
  text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 15px;
  flex-shrink: 0;
}
.main-nav { display: flex; align-items: center; gap: var(--space-6); }
.main-nav a {
  text-decoration: none; color: var(--text-secondary); font-size: 14px; font-weight: 500;
  padding: var(--space-2) 0; transition: color 150ms ease;
}
.main-nav a:hover, .main-nav a:focus-visible { color: var(--text-primary); }
.header-actions { display: flex; align-items: center; gap: var(--space-3); }
.nav-toggle {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer;
}
#mobile-nav.mobile-nav {
  display: none; flex-direction: column; gap: 4px; padding: var(--space-2) var(--space-4) var(--space-5);
  background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md);
  height: auto; align-items: stretch;
}
#mobile-nav.mobile-nav:not([hidden]) { display: flex; }
#mobile-nav.mobile-nav a { padding: 10px 4px; border-radius: 8px; text-decoration: none; }
#mobile-nav.mobile-nav a:hover, #mobile-nav.mobile-nav a:focus-visible { background: var(--surface-alt); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: inherit; font-weight: 600; font-size: 14px; line-height: 1;
  padding: 12px 20px; border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; min-height: 44px;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--brand-hover); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--surface); color: var(--text-primary); border-color: var(--border); }
.btn-secondary:hover, .btn-secondary:focus-visible { border-color: var(--brand); color: var(--brand); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover, .btn-ghost:focus-visible { color: var(--text-primary); }
.btn-lg { padding: 15px 28px; font-size: 15.5px; }
.btn-block { width: 100%; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px;
}

/* Hero */
.hero { position: relative; padding: var(--space-9) 0 var(--space-8); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 560px;
  background: radial-gradient(60% 60% at 30% 20%, color-mix(in srgb, var(--brand) 20%, transparent), transparent 70%),
              radial-gradient(50% 50% at 80% 10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%);
  z-index: -1; pointer-events: none;
}
.hero-inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--space-8); align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  background: var(--brand-light); color: var(--brand); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
  font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px; margin-bottom: var(--space-5);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); flex-shrink: 0; }
.hero h1 {
  font-size: clamp(32px, 4.6vw, 52px); line-height: 1.12; letter-spacing: -0.02em;
  margin: 0 0 var(--space-5); font-weight: 800;
}
.hero h1 .accent { color: var(--brand); }
.hero-sub { font-size: 18px; color: var(--text-secondary); max-width: 54ch; margin: 0 0 var(--space-6); }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-6); }
.hero-meta { display: flex; flex-wrap: wrap; gap: var(--space-5); font-size: 13.5px; color: var(--text-muted); }
.hero-meta span { display: flex; align-items: center; gap: 6px; }
.hero-meta svg { flex-shrink: 0; color: var(--success); }

/* Hero visual: pipeline card mock */
.hero-visual { position: relative; }
.pipeline-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: var(--space-5); position: relative;
}
.pipeline-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
.pipeline-card-head .title { font-weight: 700; font-size: 14px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; background: var(--success-light); color: var(--success);
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.pipeline-steps { display: flex; flex-direction: column; gap: var(--space-2); }
.pipeline-step {
  display: flex; align-items: center; gap: var(--space-3); padding: 10px 12px;
  border-radius: var(--radius-sm); background: var(--surface-alt); border: 1px solid transparent;
}
.pipeline-step.done { border-color: color-mix(in srgb, var(--success) 30%, transparent); }
.pipeline-step.active { border-color: color-mix(in srgb, var(--brand) 35%, transparent); background: var(--brand-light); }
.step-icon {
  width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; background: var(--surface); color: var(--text-muted); border: 1px solid var(--border);
}
.pipeline-step.done .step-icon { color: var(--success); border-color: color-mix(in srgb, var(--success) 40%, transparent); }
.pipeline-step.active .step-icon { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.step-label { font-size: 13.5px; font-weight: 600; flex: 1; }
.step-sub { font-size: 12px; color: var(--text-muted); }
.floating-badge {
  position: absolute; bottom: -18px; left: -18px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md); padding: var(--space-3) var(--space-4);
  display: flex; align-items: center; gap: var(--space-3);
}
.floating-badge .num { font-size: 20px; font-weight: 800; color: var(--brand); }
.floating-badge .label { font-size: 11.5px; color: var(--text-muted); line-height: 1.3; }

/* Logo strip */
.logo-strip { padding: var(--space-6) 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.logo-strip p { text-align: center; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin: 0 0 var(--space-5); font-weight: 600; }
.logo-row { display: flex; justify-content: center; align-items: center; gap: var(--space-7); flex-wrap: wrap; opacity: 0.7; }
.logo-row .logo-chip { font-weight: 700; font-size: 15px; color: var(--text-secondary); letter-spacing: -0.01em; }

/* Section shared */
.section { padding: var(--space-9) 0; }
.section-head { max-width: 620px; margin: 0 auto var(--space-7); text-align: center; }
.section-eyebrow { color: var(--brand); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--space-3); }
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 var(--space-3); font-weight: 800; }
.section-head p { color: var(--text-secondary); font-size: 16.5px; margin: 0; }

/* Feature grid */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.feature-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: var(--space-5); transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--brand) 25%, var(--border)); }
.feature-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
  background: var(--brand-light); color: var(--brand); margin-bottom: var(--space-4);
}
.feature-card h3 { font-size: 17px; margin: 0 0 var(--space-2); font-weight: 700; }
.feature-card p { font-size: 14.5px; color: var(--text-secondary); margin: 0; line-height: 1.6; }

/* How it works */
.steps-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); counter-reset: step; }
.step-card { position: relative; padding: var(--space-5) var(--space-4) var(--space-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.step-num {
  width: 32px; height: 32px; border-radius: 9px; background: var(--brand); color: #fff; font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-4);
}
.step-card h3 { font-size: 15.5px; margin: 0 0 var(--space-2); font-weight: 700; }
.step-card p { font-size: 13.5px; color: var(--text-secondary); margin: 0; line-height: 1.6; }
.step-connector { display: none; }
@media (min-width: 900px) {
  .steps-row { position: relative; }
}

/* Dashboard preview */
.dashboard-preview {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.dp-topbar { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); background: var(--surface-alt); }
.dp-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.dp-body { display: grid; grid-template-columns: 220px 1fr; min-height: 360px; }
.dp-sidebar { border-right: 1px solid var(--border); padding: var(--space-4); display: none; }
.dp-sidebar-item { padding: 9px 10px; border-radius: 8px; font-size: 13px; color: var(--text-muted); margin-bottom: 2px; font-weight: 600; }
.dp-sidebar-item.active { background: var(--brand-light); color: var(--brand); }
.dp-main { padding: var(--space-5); }
.dp-stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); margin-bottom: var(--space-5); }
.dp-stat { background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--space-3); }
.dp-stat .n { font-size: 20px; font-weight: 800; }
.dp-stat .l { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.dp-chart-placeholder {
  height: 140px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--brand-light), transparent);
  display: flex; align-items: flex-end; gap: 6px; padding: var(--space-3);
}
.dp-bar { flex: 1; background: var(--brand); border-radius: 4px 4px 0 0; opacity: 0.85; }
@media (min-width: 860px) { .dp-sidebar { display: block; } }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); align-items: stretch; }
.price-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-5); display: flex; flex-direction: column;
}
.price-card.featured { border-color: var(--brand); box-shadow: var(--shadow-lg); position: relative; }
.price-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 700; padding: 4px 12px; border-radius: 999px;
}
.price-card h3 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin: 0 0 var(--space-3); font-weight: 700; }
.price-amount { display: flex; align-items: baseline; gap: 4px; margin-bottom: var(--space-2); }
.price-amount .num { font-size: 38px; font-weight: 800; letter-spacing: -0.02em; }
.price-amount .period { font-size: 14px; color: var(--text-muted); }
.price-card > p.desc { font-size: 13.5px; color: var(--text-secondary); margin: 0 0 var(--space-5); }
.price-list { list-style: none; margin: 0 0 var(--space-6); padding: 0; display: flex; flex-direction: column; gap: var(--space-3); flex: 1; }
.price-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--text-secondary); }
.price-list svg { flex-shrink: 0; color: var(--success); margin-top: 2px; }

/* Testimonial */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.testimonial-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-5); }
.testimonial-card .stars { color: #f59e0b; font-size: 14px; margin-bottom: var(--space-3); letter-spacing: 2px; }
.testimonial-card blockquote { margin: 0 0 var(--space-4); font-size: 14.5px; color: var(--text-primary); line-height: 1.65; }
.testimonial-author { display: flex; align-items: center; gap: var(--space-3); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--accent)); flex-shrink: 0; }
.testimonial-author .name { font-size: 13.5px; font-weight: 700; }
.testimonial-author .role { font-size: 12px; color: var(--text-muted); }

/* FAQ */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--space-3); }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.faq-item summary {
  cursor: pointer; list-style: none; padding: var(--space-4) var(--space-5); font-weight: 600; font-size: 15px;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chev { transition: transform 200ms ease; flex-shrink: 0; color: var(--text-muted); }
.faq-item[open] summary .chev { transform: rotate(180deg); }
.faq-item .faq-body { padding: 0 var(--space-5) var(--space-5); color: var(--text-secondary); font-size: 14.5px; line-height: 1.65; }

/* Final CTA */
.cta-band {
  background: linear-gradient(135deg, var(--brand), #7c3aed); border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6); text-align: center; color: #fff; position: relative; overflow: hidden;
}
.cta-band h2 { font-size: clamp(24px, 3.4vw, 34px); margin: 0 0 var(--space-3); font-weight: 800; letter-spacing: -0.015em; }
.cta-band p { font-size: 16px; opacity: 0.92; margin: 0 0 var(--space-6); }
.cta-band .btn-primary { background: #fff; color: var(--brand); }
.cta-band .btn-primary:hover { background: #f1f5f9; }
.cta-band .btn-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.cta-band .btn-secondary:hover { border-color: #fff; }
.cta-actions { display: flex; justify-content: center; gap: var(--space-3); flex-wrap: wrap; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: var(--space-7) 0 var(--space-6); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--space-6); margin-bottom: var(--space-7); }
.footer-brand p { color: var(--text-muted); font-size: 13.5px; max-width: 32ch; margin: var(--space-3) 0 0; }
.footer-col h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin: 0 0 var(--space-4); font-weight: 700; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.footer-col a { text-decoration: none; color: var(--text-secondary); font-size: 13.5px; }
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: var(--space-5); border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-muted); flex-wrap: wrap; gap: var(--space-3); }
.theme-toggle {
  width: 40px; height: 40px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface);
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-secondary);
}
.theme-toggle:hover { color: var(--brand); border-color: var(--brand); }

/* Responsive */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { max-width: 480px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-row { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .header-actions .btn-secondary { display: none; }
}
@media (max-width: 480px) {
  .header-actions .btn-primary { display: none; }
  .site-header .container { gap: var(--space-2); }
}
@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
  .steps-row { grid-template-columns: 1fr; }
  .dp-stat-row { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
