/* ========== PRICING PAGE ========== */
/* Uses design-system.css tokens - no hardcoded colors or off-system spacing */

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

a, button, [role="button"] { touch-action: manipulation; }
a:focus-visible, button:focus-visible { outline: 2px solid rgba(77,101,255,0.8); outline-offset: 3px; border-radius: 4px; }

body {
  background: var(--color-bg-deep);
  color: var(--color-text-primary);
  font-family: 'Inter', sans-serif;
  line-height: var(--leading-normal);
  overflow-x: hidden;
}

header {
  padding: var(--space-3xl) var(--space-lg);
  border-bottom: 1px solid var(--color-border-subtle);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.logo {
  font-family: 'Manrope', sans-serif;
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.5px;
}

.hero {
  padding: var(--space-5xl) var(--space-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 260px;
  background: radial-gradient(ellipse at center, rgba(17, 39, 210, 0.15) 0%, rgba(17, 39, 210, 0.05) 50%, transparent 70%); /* atmospheric glow — no token available */
  pointer-events: none;
}

.hero h1 {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(var(--text-3xl), 5vw, 56px);
  font-weight: 700;
  margin-bottom: var(--space-lg);
  letter-spacing: -1px;
}

.hero p {
  font-size: var(--text-lg);
  color: var(--color-text-soft);
  margin-bottom: var(--space-3xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.billing-toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-4xl);
}

.billing-label {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.toggle-switch {
  position: relative;
  width: 56px;
  height: 30px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.25s ease;
  flex-shrink: 0;
}

.toggle-switch:hover {
  background: rgba(255, 255, 255, 0.18);
}

.toggle-switch:has(input:checked) {
  background: var(--color-brand);
}

.toggle-switch input {
  display: none;
}

.toggle-switch input:checked ~ .toggle-slider {
  transform: translateX(26px);
  background: #fff;
}

.toggle-switch input:checked + .toggle-slider,
.toggle-switch input:checked {
  /* parent track turns brand-blue when on */
}

.toggle-switch:has(input:checked) {
  background: var(--color-brand);
  border-color: var(--color-brand);
}

.toggle-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s ease;
  pointer-events: none;
}

.yearly-badge {
  display: inline-block;
  background: var(--color-brand);
  color: var(--color-text-primary);
  padding: var(--space-xs) var(--space-md);
  border-radius: 20px;
  font-size: var(--text-xs);
  font-weight: 600;
  margin-left: var(--space-sm);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.toggle-switch input:checked ~ .yearly-badge {
  opacity: 1;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-3xl);
  margin: var(--space-5xl) 0;
}

.pricing-card {
  background: #141414; /* no token — intentional card surface, darker than --color-surface (#111) */
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-lg);
  padding: 40px var(--space-3xl);
  position: relative;
  transition: border-color 0.22s cubic-bezier(0.22,1,0.36,1), background 0.22s cubic-bezier(0.22,1,0.36,1), box-shadow 0.22s cubic-bezier(0.22,1,0.36,1);
  display: flex;
  flex-direction: column;
}

.pricing-card:hover {
  border-color: rgba(17, 39, 210, 0.5);
  background: var(--color-surface-elevated);
  box-shadow: 0 12px 40px rgba(17, 39, 210, 0.12);
}

.pricing-card.featured {
  background: #15182a; /* no token — blue-tinted featured surface, intentional design exception */
  border-color: rgba(17, 39, 210, 0.5);
  box-shadow: 0 0 0 1px rgba(17, 39, 210, 0.2), 0 12px 32px rgba(17, 39, 210, 0.18);
}

.pricing-card.featured:hover {
  background: #15182a;
  box-shadow: 0 0 0 1px rgba(17, 39, 210, 0.3), 0 16px 40px rgba(17, 39, 210, 0.24);
}

.pricing-card.featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-brand-light), var(--color-accent-indigo), var(--color-brand-light));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.pricing-card.featured .plan-name {
  color: var(--color-accent-indigo);
}

.featured-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-brand);
  color: var(--color-text-primary);
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.plan-name {
  font-family: 'Manrope', sans-serif;
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  margin-top: var(--space-sm);
}

.plan-description {
  font-size: var(--text-sm);
  color: var(--color-text-dim);
  margin-bottom: var(--space-2xl);
}

.price-section {
  margin-bottom: var(--space-3xl);
}

.price-monthly,
.price-yearly {
  font-family: 'Manrope', sans-serif;
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1;
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 6px;
  white-space: nowrap;
}

.price-yearly {
  display: none;
}

.price-currency {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-soft);
  letter-spacing: 0;
}

.price-period {
  font-size: 15px;
  color: var(--color-text-dim);
  font-weight: 400;
  letter-spacing: 0;
  margin-left: 2px;
}

.price-amount {
  font-family: 'Manrope', sans-serif;
  font-size: inherit;
  font-weight: 700;
  letter-spacing: -1.5px;
  color: var(--color-text-primary);
}

.price-save {
  display: none;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-sm);
  font-weight: 600;
}

.price-yearly ~ .price-save {
  display: inline-block;
}

.features-list {
  list-style: none;
  margin: var(--space-3xl) 0;
  flex-grow: 1;
}

.features-list li {
  padding: var(--space-md) 0;
  padding-left: 28px;
  position: relative;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border-ghost);
}

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

.features-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--color-text-muted);
  font-weight: 700;
  font-size: var(--text-lg);
}

.feature-coming-soon {
  color: var(--color-text-faint);
}

.feature-coming-soon .coming-soon-label {
  font-size: 11px;
  color: var(--color-text-faint);
}

.cta-button {
  display: inline-block;
  width: 100%;
  padding: var(--space-lg) var(--space-2xl);
  margin-top: var(--space-2xl);
  font-family: 'Inter', sans-serif;
  font-size: var(--text-base);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-m);
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
}

.cta-free {
  background: rgba(255,255,255,0.06);
  color: var(--color-text-primary);
  border: 1px solid rgba(255,255,255,0.18);
}

.cta-free:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.32);
  transform: translateY(-2px);
}

.cta-upgrade {
  background: var(--color-brand);
  color: var(--color-text-primary);
}

.cta-upgrade:hover {
  background: var(--color-brand-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(17, 39, 210, 0.3);
}

.cta-upgrade:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.faq-section {
  margin-top: var(--space-6xl);
  padding: var(--space-5xl) var(--space-lg);
  border-top: 1px solid var(--color-border-subtle);
}

.faq-title {
  font-family: 'Manrope', sans-serif;
  font-size: 40px;
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-4xl);
  letter-spacing: -0.5px;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-3xl);
  max-width: 1000px;
  margin: 0 auto;
}

.faq-item {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, var(--color-surface-ghost) 100%);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-3xl);
  cursor: pointer;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: rgba(17, 39, 210, 0.5);
  background: linear-gradient(135deg, var(--color-surface-raised) 0%, var(--color-surface-dim) 100%);
}

.faq-question {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  width: 100%;
  cursor: pointer;
  font-family: 'Manrope', sans-serif;
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  background: rgba(17, 39, 210, 0.2);
  border: 1px solid var(--color-brand);
  border-radius: 50%;
  color: var(--color-brand);
  text-align: center;
  line-height: 24px;
  font-weight: bold;
  transition: all 0.3s ease;
  flex-shrink: 0;
  margin-left: var(--space-lg);
}

.faq-item.active .faq-icon {
  background: var(--color-brand);
  color: var(--color-text-primary);
  transform: rotate(45deg);
}

.faq-answer {
  color: var(--color-text-soft);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.footer {
  margin-top: var(--space-5xl);
  padding: var(--space-4xl) var(--space-lg);
  border-top: 1px solid var(--color-border-subtle);
  text-align: center;
  color: var(--color-text-dim);
  font-size: var(--text-sm);
}

.footer-link {
  color: var(--color-text-dim);
  text-decoration: none;
}

@media (max-width: 768px) {
  .hero {
    padding: 40px var(--space-lg);
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero p {
    font-size: var(--text-base);
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    margin: 40px 0;
  }

  .pricing-card {
    padding: var(--space-3xl) var(--space-2xl);
  }

  /* MOST POPULAR badge sits at top: -12px; on mobile the cards stack so
     the badge collides with the previous card's bottom content. Add extra
     top margin to the featured card to absorb the offset cleanly. */
  .pricing-card.featured { margin-top: 16px; }

  .plan-name {
    font-size: var(--text-xl);
  }

  .price-monthly,
  .price-yearly {
    font-size: 40px;
  }

  .faq-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .faq-title {
    font-size: 28px;
    margin-bottom: var(--space-3xl);
  }

  .billing-toggle-container {
    flex-direction: column;
    gap: var(--space-2xl);
  }
}

.skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; z-index: 9999; background: var(--color-bg); color: var(--color-text-primary); padding: var(--space-sm) var(--space-lg); font-size: var(--text-sm); text-decoration: none; border-radius: var(--radius-xs); }
.skip-link:focus { left: 50%; transform: translateX(-50%); top: var(--space-sm); width: auto; height: auto; overflow: visible; }
.billing-coming-soon { display: none !important; }

/* Enterprise section */
.enterprise-section {
  padding: 32px 0 0;
}
.enterprise-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 28px 32px;
  max-width: 640px;
  margin: 0 auto;
}
.enterprise-icon {
  font-size: 36px;
  flex-shrink: 0;
}
.enterprise-content h2 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
}
.enterprise-content p {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  margin: 0 0 16px;
  line-height: 1.5;
}
.btn-enterprise {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.btn-enterprise:hover {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.05);
}
@media (max-width: 480px) {
  .enterprise-card {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
  }
}
