/* ─── CSS Variables / Theming ─────────────────────────────────────────── */
:root {
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,.25);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.3);
  --transition: .3s cubic-bezier(.4,0,.2,1);
  --accent: #6c63ff;
  --accent-glow: rgba(108,99,255,.15);
  --accent-dark: #5a52e0;
  --green: #22c55e;
  --orange: #f59e0b;
  --red: #ef4444;
  --blue: #3b82f6;
  --cyan: #06b6d4;
  --pink: #ec4899;
}

[data-theme="dark"] {
  --bg: #0b0b1a;
  --bg-card: #12122a;
  --bg-card-hover: #1a1a3e;
  --bg-header: #0f0f25;
  --bg-input: #0e0e22;
  --border: #1e1e4a;
  --text: #e8e8f0;
  --text-muted: #8888aa;
  --text-dim: #55557a;
  --table-stripe: rgba(108,99,255,.04);
  --table-hover: rgba(108,99,255,.08);
  --scrollbar-thumb: #2a2a5a;
  --hero-gradient: linear-gradient(180deg, #0b0b1a 0%, #12122a 100%);
}

[data-theme="light"] {
  --bg: #f0f2f5;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f8ff;
  --bg-header: #ffffff;
  --bg-input: #f5f5fa;
  --border: #e0e0e8;
  --text: #1a1a2e;
  --text-muted: #666680;
  --text-dim: #9999aa;
  --table-stripe: rgba(108,99,255,.03);
  --table-hover: rgba(108,99,255,.06);
  --scrollbar-thumb: #c0c0d0;
  --hero-gradient: linear-gradient(180deg, #f0f2f5 0%, #ffffff 100%);
}

/* ─── Reset & Base ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 4px; }

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--cyan); }

img { max-width: 100%; height: auto; }

/* ─── Header / Navigation ────────────────────────────────────────────── */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  backdrop-filter: blur(16px);
  transition: background var(--transition), border-color var(--transition);
}

.header-left { display: flex; align-items: center; gap: 12px; }

.logo { width: 36px; height: 36px; border-radius: 10px; overflow: hidden; }
.logo img { width: 100%; height: 100%; object-fit: contain; }

.header .brand {
  font-size: 1.2rem; font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav { display: flex; align-items: center; gap: 0; }

.nav a {
  padding: .75rem 1.25rem;
  font-size: .85rem; font-weight: 600;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  transition: all var(--transition);
}
.nav a:hover { color: var(--text); background: var(--accent-glow); }
.nav a.active { color: var(--accent); border-bottom-color: var(--accent); }

.header-right { display: flex; align-items: center; gap: 16px; }

/* Theme toggle */
.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px;
  display: flex; cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.theme-toggle button {
  background: none; border: none; cursor: pointer;
  width: 32px; height: 28px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: background var(--transition);
  color: var(--text-muted);
}
.theme-toggle button.active {
  background: var(--accent); color: #fff;
  box-shadow: 0 2px 8px rgba(108,99,255,.4);
}

/* CTA header */
.cta-header {
  background: var(--accent); color: #fff;
  border: none; padding: 8px 20px;
  border-radius: 8px; font-size: .85rem;
  font-weight: 700; cursor: pointer;
  transition: all .2s ease; font-family: var(--font);
}
.cta-header:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108,99,255,.4);
}

/* Mobile menu */
.mobile-toggle {
  display: none; background: none; border: none;
  color: var(--text); font-size: 1.5rem; cursor: pointer;
}

/* ─── Breadcrumb ─────────────────────────────────────────────────────── */
.breadcrumb {
  padding: .6rem 2rem;
  margin-top: 64px;
  font-size: .8rem;
  color: var(--text-dim);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 .4rem; color: var(--text-dim); }

/* ─── Hero Section ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 6rem 2rem 4rem;
  text-align: center;
  background: var(--hero-gradient);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(108,99,255,.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }

.hero-logo {
  width: 96px; height: 96px; margin: 0 auto 1.5rem;
  border-radius: 24px; overflow: hidden;
  box-shadow: 0 8px 32px rgba(108,99,255,.3);
  animation: float 6s ease-in-out infinite;
}
.hero-logo img { width: 100%; height: 100%; object-fit: contain; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero h1 {
  font-size: 3rem; font-weight: 800; line-height: 1.15;
  margin-bottom: .75rem;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .tagline {
  font-size: 1.25rem; color: var(--text-muted);
  margin-bottom: .5rem; font-weight: 500;
}

.hero .slogan {
  font-size: 1rem; color: var(--text-dim);
  font-style: italic; margin-bottom: 2rem;
}

.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 10px;
  font-size: .95rem; font-weight: 700;
  cursor: pointer; transition: all .2s ease;
  border: none; font-family: var(--font);
}

.btn-primary {
  background: var(--accent); color: #fff;
}
.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108,99,255,.4);
  color: #fff;
}

.btn-outline {
  background: transparent; color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-outline:hover {
  background: var(--accent-glow);
  transform: translateY(-2px);
  color: var(--accent);
}

/* ─── Container ──────────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

/* ─── Section Headers ────────────────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-header h2 {
  font-size: 2rem; font-weight: 800;
  margin-bottom: .5rem;
}
.section-header p {
  font-size: 1.05rem; color: var(--text-muted);
  max-width: 600px; margin: 0 auto;
}

/* ─── KPI / Stats Cards ──────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: all var(--transition);
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.stat-card:nth-child(1)::before { background: var(--accent); }
.stat-card:nth-child(2)::before { background: var(--green); }
.stat-card:nth-child(3)::before { background: var(--blue); }
.stat-card:nth-child(4)::before { background: var(--cyan); }

.stat-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.stat-icon { font-size: 2rem; margin-bottom: .5rem; }
.stat-value {
  font-size: 2.2rem; font-weight: 800;
  font-family: var(--font-mono); line-height: 1.1;
}
.stat-card:nth-child(1) .stat-value { color: var(--accent); }
.stat-card:nth-child(2) .stat-value { color: var(--green); }
.stat-card:nth-child(3) .stat-value { color: var(--blue); }
.stat-card:nth-child(4) .stat-value { color: var(--cyan); }

.stat-label {
  font-size: .8rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .05em;
  margin-top: .4rem;
}

/* Counter animation */
.stat-value[data-target] { opacity: 0; transform: translateY(10px); transition: all .6s ease; }
.stat-value.visible { opacity: 1; transform: translateY(0); }

/* ─── Feature Cards ──────────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all var(--transition);
  position: relative;
}
.feature-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.feature-icon {
  width: 48px; height: 48px;
  background: var(--accent-glow);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.feature-card h3 {
  font-size: 1.15rem; font-weight: 700;
  margin-bottom: .5rem;
}
.feature-card p {
  font-size: .9rem; color: var(--text-muted);
  line-height: 1.6;
}

/* ─── Pipeline / How it works ────────────────────────────────────────── */
.pipeline {
  display: flex;
  align-items: flex-start;
  gap: 0;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}
.pipeline-step {
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  max-width: 180px; position: relative;
}
.pipeline-num {
  width: 48px; height: 48px;
  background: var(--accent);
  color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 800;
  margin-bottom: .75rem;
  box-shadow: 0 4px 16px rgba(108,99,255,.3);
}
.pipeline-step h4 {
  font-size: .95rem; font-weight: 700;
  margin-bottom: .3rem;
}
.pipeline-step p {
  font-size: .8rem; color: var(--text-muted);
}
.pipeline-arrow {
  display: flex; align-items: center;
  padding-top: 12px;
  color: var(--text-dim); font-size: 1.5rem;
  margin: 0 .5rem;
}

/* ─── Testimonials ───────────────────────────────────────────────────── */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all var(--transition);
}
.testimonial-card:hover {
  background: var(--bg-card-hover);
  box-shadow: var(--shadow);
}
.testimonial-text {
  font-size: .95rem; color: var(--text-muted);
  line-height: 1.7; font-style: italic;
  margin-bottom: 1.25rem;
  position: relative;
  padding-left: 1.5rem;
}
.testimonial-text::before {
  content: '\201C';
  position: absolute; left: 0; top: -.2rem;
  font-size: 2rem; color: var(--accent); font-style: normal;
}
.testimonial-author {
  display: flex; align-items: center; gap: 12px;
}
.testimonial-avatar {
  width: 40px; height: 40px;
  background: var(--accent-glow);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 700;
  color: var(--accent);
}
.testimonial-name { font-size: .9rem; font-weight: 700; }
.testimonial-role { font-size: .78rem; color: var(--text-dim); }

/* ─── FAQ ────────────────────────────────────────────────────────────── */
.faq-list { max-width: 720px; margin: 0 auto; }

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: .75rem;
  overflow: hidden;
  transition: all var(--transition);
}
.faq-item:hover { border-color: var(--accent); }

.faq-question {
  width: 100%; background: none; border: none;
  padding: 1.25rem 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; color: var(--text);
  font-size: .95rem; font-weight: 600;
  font-family: var(--font);
  text-align: left;
}
.faq-question::after {
  content: '+'; font-size: 1.3rem;
  color: var(--accent); transition: transform var(--transition);
  flex-shrink: 0; margin-left: 1rem;
}
.faq-item.open .faq-question::after {
  content: '\2212';
}
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height .4s ease, padding .4s ease;
}
.faq-item.open .faq-answer {
  max-height: 300px;
}
.faq-answer-inner {
  padding: 0 1.5rem 1.25rem;
  font-size: .9rem; color: var(--text-muted);
  line-height: 1.7;
}

/* ─── CTA Section ────────────────────────────────────────────────────── */
.cta-section {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cta-section h2 {
  font-size: 2rem; font-weight: 800;
  margin-bottom: .75rem;
}
.cta-section p {
  font-size: 1.05rem; color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 500px; margin-left: auto; margin-right: auto;
}

/* ─── Footer ─────────────────────────────────────────────────────────── */
.footer {
  background: var(--bg-header);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem 1.5rem;
}
.footer-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand .logo { margin-bottom: .75rem; }
.footer-brand p {
  font-size: .85rem; color: var(--text-muted);
  line-height: 1.6; max-width: 280px;
}
.footer-col h4 {
  font-size: .85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--text); margin-bottom: .75rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: .4rem; }
.footer-col a {
  font-size: .85rem; color: var(--text-muted);
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  max-width: 1200px; margin: 0 auto;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.footer-copy { font-size: .8rem; color: var(--text-dim); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: .8rem; color: var(--text-dim); }
.footer-links a:hover { color: var(--accent); }

/* ─── Animations ─────────────────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.8); }
}

.fade-in {
  opacity: 0; transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in.visible {
  opacity: 1; transform: translateY(0);
}

/* ─── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .header { padding: 0 1rem; }
  .nav { display: none; }
  .nav.open {
    display: flex; flex-direction: column;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
  }
  .nav.open a { padding: .75rem 2rem; }
  .mobile-toggle { display: block; }
  .cta-header { display: none; }

  .hero { padding: 4rem 1.5rem 3rem; }
  .hero h1 { font-size: 2rem; }
  .hero .tagline { font-size: 1rem; }

  .container { padding: 2.5rem 1.5rem; }

  .features-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }

  .pipeline { flex-direction: column; align-items: center; }
  .pipeline-arrow { transform: rotate(90deg); margin: .5rem 0; }

  .footer-grid { grid-template-columns: 1fr 1fr; }

  .section-header h2 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.6rem; }
  .hero-cta { flex-direction: column; align-items: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
