/* Design tokens - matched from app src/index.css */
:root {
  --color-primary: #2E4057;
  --color-primary-hover: #243448;
  --color-primary-light: rgba(46, 64, 87, 0.1);
  --bg-primary: #fafafa;
  --bg-card: #ffffff;
  --bg-hover: #f5f5f7;
  --bg-input: #f5f5f7;
  --border-color: #e8e8e8;
  --border-hover: #d2d2d7;
  --text-primary: #1d1d1f;
  --text-secondary: #86868b;
  --text-muted: #aeaeb2;
  --color-success: #34c759;
  --color-warning: #f5a623;
  --color-danger: #ff3b30;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.12);
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;
  --transition-slow: 0.3s ease;
  --nav-height: 64px;
  --max-width: 1200px;
}

.dark-mode {
  --bg-primary: #0d0d0d;
  --bg-card: #1a1a1a;
  --bg-hover: #252525;
  --bg-input: #252525;
  --border-color: #2d2d2d;
  --border-hover: #3d3d3d;
  --text-primary: #f5f5f7;
  --text-secondary: #98989d;
  --text-muted: #636366;
  --color-primary: #4A6B8A;
  --color-primary-hover: #5A7D9E;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.4);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition-normal), color var(--transition-normal);
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---- Nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 250, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-normal), border-color var(--transition-normal);
}

.dark-mode .nav {
  background: rgba(13, 13, 13, 0.8);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  width: 40px;
  height: 40px;
}

.logo-icon-sm {
  width: 22px;
  height: 22px;
}

.logo-accent {
  color: var(--color-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a:not(.btn) {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.nav-links a:not(.btn):hover {
  color: var(--text-primary);
}

/* Theme toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.theme-toggle:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

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

/* Mobile toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
}

.btn-white {
  background: #fff;
  color: var(--color-primary);
  font-weight: 600;
}

.btn-white:hover {
  box-shadow: var(--shadow-lg);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 13px;
}

.btn-full {
  width: 100%;
}

/* ---- Hero ---- */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 120px 24px 100px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 600;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 20px;
}

.hero-note {
  font-size: 13px;
  color: var(--text-muted);
}

.hero-trust {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 12px;
}

.hero-trust svg {
  color: var(--color-primary);
  flex-shrink: 0;
}

/* ---- Shared section headings ---- */
.section-sub {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 48px;
}

/* ---- Features Section ---- */
.features-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px 100px;
  text-align: center;
}

.features-section h2 {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: left;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

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

.feature-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  color: var(--color-primary);
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---- How It Works ---- */
.how-it-works {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px 100px;
  text-align: center;
}

.how-it-works h2 {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.step {
  flex: 1;
  padding: 24px;
  text-align: center;
}

.step-number {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border-radius: 50%;
  margin: 0 auto 16px;
}

.step h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.step p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-connector {
  width: 48px;
  height: 2px;
  background: var(--border-color);
  flex-shrink: 0;
  margin-top: 43px;
}

/* ---- FAQ ---- */
.faq {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 24px 100px;
  text-align: center;
}

.faq h2 {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.faq-list {
  text-align: left;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 20px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  font-size: 20px;
  font-weight: 300;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item[open] .faq-question::after {
  content: "\2212";
}

.faq-answer {
  padding: 0 0 20px;
}

.faq-answer p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---- Legal Pages ---- */
.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 24px 100px;
}

.legal-page h1 {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.legal-updated {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.legal-page h2 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 8px;
}

.legal-page p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.legal-page ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 12px;
}

.legal-page li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 4px;
}

.legal-page a {
  color: var(--color-primary);
  text-decoration: underline;
}

/* ---- Pricing ---- */
.pricing {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px 100px;
  text-align: center;
}

.pricing h2 {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.pricing-sub {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

/* Billing toggle */
.billing-toggle {
  display: inline-flex;
  position: relative;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 48px;
}

.toggle-option {
  position: relative;
  z-index: 1;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 20px;
  cursor: pointer;
  border-radius: 6px;
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.toggle-option.active {
  color: var(--text-primary);
}

.toggle-indicator {
  position: absolute;
  top: 4px;
  height: calc(100% - 8px);
  background: var(--bg-card);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  transition: left var(--transition-normal), width var(--transition-normal);
}

.save-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-success);
  background: rgba(52, 199, 89, 0.1);
  padding: 2px 8px;
  border-radius: 20px;
}

/* Pricing grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: left;
}

.pricing-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 24px 24px;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

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

.pricing-card.popular {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 20px;
  white-space: nowrap;
}

.card-header {
  margin-bottom: 24px;
}

.card-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.price {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.price-amount {
  font-size: 42px;
  font-weight: 600;
  letter-spacing: -1px;
  transition: opacity var(--transition-fast);
}

.price-period {
  font-size: 15px;
  color: var(--text-secondary);
}

.price-yearly-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  min-height: 20px;
}

/* Features */
.features {
  list-style: none;
  flex: 1;
  margin-bottom: 24px;
}

.features li {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.features li:last-child {
  border-bottom: none;
}

.features li::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background: var(--color-primary-light);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%233D6B5E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.dark-mode .features li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%234F8572' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
}

/* Coming Soon badge */
.coming-soon {
  display: inline-block;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-hover);
  color: var(--text-secondary);
  margin-left: 4px;
  font-weight: 500;
}

/* Enterprise custom price */
.enterprise-custom-price {
  font-size: 28px;
  font-weight: 600;
}

/* Contact modal */
.contact-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.contact-modal {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}

.contact-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.contact-modal-header h2 {
  font-size: 1.35rem;
  margin: 0;
}

.contact-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-secondary);
  font-size: 24px;
  line-height: 1;
}

.contact-modal-close:hover {
  color: var(--text-primary);
}

.contact-modal-description {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 1.5rem;
}

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

.contact-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.contact-form-group input,
.contact-form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  background: var(--bg-input);
  color: var(--text-primary);
  box-sizing: border-box;
  font-family: inherit;
}

.contact-form-group input:focus,
.contact-form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(61, 107, 94, 0.15);
}

.contact-form-group textarea {
  resize: vertical;
}

.contact-submit-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: var(--color-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: opacity 0.2s;
}

.contact-submit-btn:hover:not(:disabled) {
  opacity: 0.9;
}

.contact-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.contact-form-error {
  color: #e53e3e;
  font-size: 13px;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 8px 12px;
  background: rgba(229, 62, 62, 0.08);
  border-radius: 6px;
}

/* ---- Success Modal ---- */
.success-modal {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 2.5rem 2rem 2rem;
  width: 100%;
  max-width: 340px;
  text-align: center;
  animation: successFadeIn 0.3s ease-out;
}

.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  animation: scaleIn 0.4s ease-out;
}

.success-icon svg {
  color: #fff;
  stroke: #fff;
}

.success-modal h2 {
  font-size: 1.35rem;
  margin: 0 0 0.5rem;
}

.success-modal p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0 0 1.5rem;
}

.success-modal .contact-submit-btn {
  max-width: 200px;
  margin: 0 auto;
  display: block;
}

@keyframes scaleIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  60% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes successFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- CTA Banner ---- */
.cta-banner {
  background: var(--color-primary);
  padding: 80px 24px;
  text-align: center;
}

.cta-banner h2 {
  color: #fff;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  margin-bottom: 32px;
}

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 24px;
  transition: border-color var(--transition-normal);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
  }

  .nav-links.open {
    display: flex;
  }

  .mobile-toggle {
    display: flex;
  }

  .hero {
    padding: 80px 24px 60px;
  }

  .hero h1 {
    letter-spacing: -1px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .features-section {
    padding: 60px 24px 80px;
  }

  .features-section h2,
  .how-it-works h2,
  .faq h2 {
    font-size: 28px;
  }

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

  .how-it-works {
    padding: 60px 24px 80px;
  }

  .steps {
    flex-direction: column;
    gap: 0;
  }

  .step-connector {
    width: 2px;
    height: 32px;
    margin: 0 auto;
  }

  .faq {
    padding: 60px 24px 80px;
  }

  .pricing {
    padding: 60px 24px 80px;
  }

  .pricing h2 {
    font-size: 28px;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

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