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

:root {
  --indigo:       #4f46e5;
  --indigo-dark:  #4338ca;
  --indigo-light: #eef2ff;
  --blue:         #2563eb;
  --teal:         #0d9488;
  --rose:         #f43f5e;
  --gray-50:      #f9fafb;
  --gray-100:     #f3f4f6;
  --gray-200:     #e5e7eb;
  --gray-400:     #9ca3af;
  --gray-500:     #6b7280;
  --gray-600:     #4b5563;
  --gray-700:     #374151;
  --gray-900:     #111827;
  --white:        #ffffff;
  --radius-lg:    1rem;
  --radius-xl:    1.5rem;
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.08);
  --shadow-indigo: 0 8px 32px rgba(79,70,229,0.25);
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ─── Layout ────────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ─── Nav ───────────────────────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-100);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
}

.nav-logo img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--gray-500);
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--gray-900); }

.btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  background: var(--indigo);
  color: #fff !important;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.15s, transform 0.1s;
}

.btn-nav:hover { background: var(--indigo-dark); transform: translateY(-1px); }

/* ─── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  padding: 6rem 0 5rem;
  text-align: center;
  background: linear-gradient(165deg, #f8f9ff 0%, #ffffff 60%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.9rem;
  background: var(--indigo-light);
  color: var(--indigo);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid #c7d2fe;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--gray-900);
  max-width: 780px;
  margin: 0 auto 1.25rem;
  letter-spacing: -0.02em;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--indigo) 0%, var(--blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--gray-500);
  max-width: 580px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: var(--indigo);
  color: #fff;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: var(--shadow-indigo);
}

.btn-primary:hover {
  background: var(--indigo-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(79,70,229,0.35);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: var(--white);
  color: var(--gray-700);
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  transition: border-color 0.15s, color 0.15s, transform 0.1s;
}

.btn-secondary:hover {
  border-color: var(--indigo);
  color: var(--indigo);
  transform: translateY(-2px);
}

.hero-note {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-top: 0.75rem;
}

/* ─── Social Proof Bar ──────────────────────────────────────────────────────── */
.social-bar {
  padding: 1.5rem 0;
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
  background: var(--gray-50);
}

.social-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.social-stat {
  text-align: center;
}

.social-stat .num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
}

.social-stat .lbl {
  font-size: 0.78rem;
  color: var(--gray-500);
  margin-top: 0.2rem;
}

.stars {
  color: #f59e0b;
  font-size: 1.1rem;
  letter-spacing: 2px;
}

/* ─── Sections ──────────────────────────────────────────────────────────────── */
section { padding: 5rem 0; }

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

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-sub {
  font-size: 1rem;
  color: var(--gray-500);
  max-width: 520px;
  line-height: 1.7;
}

/* ─── How it Works ──────────────────────────────────────────────────────────── */
.how-section { background: var(--gray-50); }

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.step {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 2rem;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.step-num {
  width: 36px;
  height: 36px;
  background: var(--indigo);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.step h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.4rem;
}

.step p {
  font-size: 0.875rem;
  color: var(--gray-500);
  line-height: 1.6;
}

.step-time {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--indigo);
  font-weight: 600;
  background: var(--indigo-light);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
}

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

.feature-card {
  padding: 1.75rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  background: var(--white);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #c7d2fe;
}

.feature-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  display: block;
}

.feature-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.4rem;
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--gray-500);
  line-height: 1.6;
}

/* ─── Testimonials ──────────────────────────────────────────────────────────── */
.testimonials-section { background: var(--gray-50); }

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.testimonial {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.testimonial .quote {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.testimonial .quote::before { content: '"'; }
.testimonial .quote::after  { content: '"'; }

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  flex-shrink: 0;
}

.avatar.a1 { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.avatar.a2 { background: linear-gradient(135deg, #0d9488, #0891b2); }
.avatar.a3 { background: linear-gradient(135deg, #f43f5e, #ec4899); }

.author-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gray-900);
}

.author-role {
  font-size: 0.75rem;
  color: var(--gray-400);
}

/* ─── Comparison Table ──────────────────────────────────────────────────────── */
.comparison-section { background: white; }

.comparison-table {
  width: 100%;
  max-width: 640px;
  margin: 3rem auto 0;
  border-collapse: collapse;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.comparison-table th,
.comparison-table td {
  padding: 0.875rem 1.25rem;
  text-align: left;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--gray-100);
}

.comparison-table th {
  background: var(--gray-50);
  font-weight: 700;
  color: var(--gray-700);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.comparison-table th.plan-free { color: var(--gray-600); }
.comparison-table th.plan-ai   { color: var(--indigo); }

.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table td:first-child   { color: var(--gray-600); }

.check { color: #16a34a; font-weight: 700; }
.cross { color: var(--gray-300); }
.badge-free {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: #dcfce7;
  color: #15803d;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
}

/* ─── FAQ ───────────────────────────────────────────────────────────────────── */
.faq-section { background: var(--gray-50); }

.faq-list {
  max-width: 680px;
  margin: 3rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

details {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

summary {
  padding: 1.1rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-800);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--gray-400);
  transition: transform 0.2s;
  flex-shrink: 0;
}

details[open] summary::after { transform: rotate(45deg); }

details p {
  padding: 0 1.25rem 1.1rem;
  font-size: 0.875rem;
  color: var(--gray-500);
  line-height: 1.7;
}

/* ─── Final CTA ─────────────────────────────────────────────────────────────── */
.final-cta {
  padding: 6rem 0;
  text-align: center;
  background: linear-gradient(135deg, var(--indigo) 0%, #2563eb 100%);
  color: #fff;
}

.final-cta h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.final-cta p {
  font-size: 1rem;
  opacity: 0.8;
  margin-bottom: 2.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.final-cta .btn-primary {
  background: var(--white);
  color: var(--indigo);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.final-cta .btn-primary:hover {
  background: var(--indigo-light);
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.final-cta .btn-secondary {
  border-color: rgba(255,255,255,0.4);
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.final-cta .btn-secondary:hover {
  border-color: rgba(255,255,255,0.8);
  color: #fff;
  background: rgba(255,255,255,0.2);
}

/* ─── Footer ────────────────────────────────────────────────────────────────── */
footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--gray-100);
  background: var(--white);
}

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

.footer-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--gray-900);
  font-size: 0.9rem;
}

.footer-logo img { width: 24px; height: 24px; border-radius: 4px; }

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.8rem;
  color: var(--gray-400);
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a:hover { color: var(--gray-700); text-decoration: underline; }

.footer-copy {
  font-size: 0.78rem;
  color: var(--gray-400);
  text-align: center;
  border-top: 1px solid var(--gray-100);
  width: 100%;
  padding-top: 1rem;
}

/* ─── Dark mode ─────────────────────────────────────────────────────────────── */
[data-theme="dark"] {
  --gray-50:  #1e293b;
  --gray-100: #1e293b;
  --gray-200: #334155;
  --gray-400: #64748b;
  --gray-500: #94a3b8;
  --gray-600: #cbd5e1;
  --gray-700: #e2e8f0;
  --gray-900: #f1f5f9;
  --white:    #0f172a;
  --indigo-light: #1e1b4b;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
}

[data-theme="dark"] body {
  background: #0f172a;
  color: #94a3b8;
}

[data-theme="dark"] nav {
  background: rgba(15,23,42,0.95);
  border-bottom-color: #1e293b;
}

[data-theme="dark"] .hero {
  background: linear-gradient(165deg, #0f172a 0%, #0f172a 100%);
}

[data-theme="dark"] .social-bar {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .how-section,
[data-theme="dark"] .testimonials-section,
[data-theme="dark"] .faq-section {
  background: #1e293b;
}

[data-theme="dark"] .step,
[data-theme="dark"] .feature-card,
[data-theme="dark"] .testimonial,
[data-theme="dark"] details {
  background: #0f172a;
  border-color: #334155;
}

[data-theme="dark"] .comparison-section { background: #0f172a; }
[data-theme="dark"] .comparison-table   { border-color: #334155; }
[data-theme="dark"] .comparison-table th { background: #1e293b; }
[data-theme="dark"] .comparison-table th,
[data-theme="dark"] .comparison-table td { border-color: #1e293b; }

[data-theme="dark"] footer { background: #0f172a; border-top-color: #1e293b; }

[data-theme="dark"] .dark-toggle {
  border-color: #334155;
  color: #94a3b8;
}

[data-theme="dark"] .legal-content h2 { color: #f1f5f9; }

/* ─── Dark mode toggle button ────────────────────────────────────────────────── */
.dark-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  color: var(--gray-500);
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.dark-toggle:hover {
  border-color: var(--indigo);
  color: var(--indigo);
  background: var(--indigo-light);
}

.dark-toggle .icon-moon { display: block; }
.dark-toggle .icon-sun  { display: none; }
.dark-toggle.is-dark .icon-moon { display: none; }
.dark-toggle.is-dark .icon-sun  { display: block; }

/* ─── Rotating headline word ────────────────────────────────────────────────── */
#rotating-use-case {
  display: inline-block;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#rotating-use-case.exit {
  opacity: 0;
  transform: translateY(-10px);
}

#rotating-use-case.enter {
  opacity: 0;
  transform: translateY(12px);
}

/* ─── Scroll-fade animations ────────────────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: none;
}

/* staggered delay for grids */
.fade-up:nth-child(2) { transition-delay: 0.08s; }
.fade-up:nth-child(3) { transition-delay: 0.16s; }
.fade-up:nth-child(4) { transition-delay: 0.24s; }
.fade-up:nth-child(5) { transition-delay: 0.32s; }
.fade-up:nth-child(6) { transition-delay: 0.40s; }

/* ─── Legal pages ───────────────────────────────────────────────────────────── */
.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}

.legal-page .back-link {
  display: inline-block;
  font-size: 0.875rem;
  color: var(--gray-400);
  margin-bottom: 2rem;
  transition: color 0.15s;
}

.legal-page .back-link:hover { color: var(--gray-700); }

.legal-page h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.legal-page .updated {
  font-size: 0.875rem;
  color: var(--gray-400);
  margin-bottom: 3rem;
}

.legal-content {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.legal-content section { display: flex; flex-direction: column; gap: 0.75rem; }

.legal-content h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
}

.legal-content p,
.legal-content li {
  font-size: 0.875rem;
  color: var(--gray-500);
  line-height: 1.75;
}

.legal-content ul {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.legal-content a {
  color: var(--indigo);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ─── Mobile ────────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero { padding: 4rem 0 3rem; }
  .social-bar-inner { gap: 1.5rem; }
  .footer-top { flex-direction: column; align-items: center; text-align: center; }
  .footer-logo { justify-content: center; }
}
