/* AllScience — Pricing Page */

.pricing-page {
  padding: 5rem 0 3rem;
}

/* Header */
.pricing-header {
  text-align: center;
  margin-bottom: 3rem;
}

.pricing-header h1 {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pricing-header p {
  color: var(--color-text-muted);
  font-size: 1.125rem;
  max-width: 520px;
  margin: 0 auto 2rem;
}

/* Billing Toggle */
.billing-toggle {
  display: inline-flex;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  padding: 4px;
}

.billing-btn {
  padding: 0.5rem 1.25rem;
  background: none;
  border: none;
  border-radius: 100px;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

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

.billing-btn:hover:not(.active) {
  color: var(--color-text);
}

.save-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.2);
  color: var(--color-accent);
  padding: 0.125rem 0.5rem;
  border-radius: 100px;
  letter-spacing: 0.02em;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.billing-btn.active .save-badge {
  animation: badge-pop 0.4s ease;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

@keyframes badge-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.25); }
  70%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* Price transition */
.plan-amount {
  display: inline-block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.plan-amount.price-updating {
  transform: translateY(-6px);
  opacity: 0;
}

.plan-amount.price-entering {
  transform: translateY(6px);
  opacity: 0;
}

/* Plan Grid */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 4rem;
}

/* Plan Cards */
.plan-card {
  position: relative;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
}

.plan-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.plan-badge {
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 1rem;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.plan-featured {
  border-color: var(--color-primary);
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.12);
}

.plan-max {
  border-color: var(--color-accent);
  box-shadow: 0 0 30px rgba(6, 214, 160, 0.08);
}

.plan-max .plan-amount { color: var(--color-accent); }
.plan-max .plan-badge { background: var(--color-accent); }

.plan-max-plus {
  border-color: #8b5cf6;
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.08);
}

.plan-max-plus .plan-amount { color: #8b5cf6; }
.plan-max-plus .plan-badge { background: #8b5cf6; }

.plan-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.plan-price {
  margin-bottom: 0.75rem;
}

.plan-amount {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-primary);
}

.plan-period {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-weight: 400;
}

.plan-desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.plan-cta {
  display: block;
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Feature List */
.plan-features {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}

.plan-features li {
  padding: 0.4rem 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.4;
}

.plan-features li.included::before {
  content: "\2713";
  color: var(--color-accent);
  font-weight: 700;
  flex-shrink: 0;
}

.plan-features li.excluded {
  opacity: 0.4;
}

.plan-features li.excluded::before {
  content: "\2014";
  flex-shrink: 0;
}

/* Comparison Table */
.comparison-section {
  margin-bottom: 4rem;
}

.comparison-section h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.comparison-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 700px;
}

.comparison-table th,
.comparison-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.comparison-table thead th {
  background: var(--color-bg-secondary);
  font-weight: 600;
  color: var(--color-text);
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
}

.comparison-table thead th span {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--color-text-muted);
  margin-top: 0.125rem;
}

.comparison-table thead th.col-featured {
  background: rgba(59, 130, 246, 0.1);
  border-bottom: 2px solid var(--color-primary);
}

.comparison-table tbody td:first-child {
  font-weight: 500;
  color: var(--color-text);
}

.comparison-table tbody td {
  color: var(--color-text-muted);
}

.comparison-table tbody td.check {
  color: var(--color-accent);
  font-weight: 700;
  font-size: 1rem;
}

.comparison-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* FAQ */
.faq-section {
  margin-bottom: 4rem;
}

.faq-section h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

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

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

.faq-q {
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text);
  padding: 1.25rem 2rem 1.25rem 0;
  margin: 0;
  cursor: pointer;
  position: relative;
  user-select: none;
  transition: color 0.2s ease;
}

.faq-q:hover {
  color: var(--color-primary);
}

.faq-q::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-text-muted);
  transition: transform 0.3s ease, color 0.2s ease;
}

.faq-item.open .faq-q::after {
  content: "\2212";
  transform: translateY(-50%);
  color: var(--color-primary);
}

.faq-a {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.35s ease;
  opacity: 0;
  padding-bottom: 0;
}

.faq-item.open .faq-a {
  max-height: 200px;
  opacity: 1;
  padding-bottom: 1.25rem;
}

/* Bottom CTA */
.pricing-cta {
  text-align: center;
  padding: 3rem 0;
  border-top: 1px solid var(--color-border);
}

.pricing-cta h2 {
  margin-bottom: 0.75rem;
}

.pricing-cta p {
  color: var(--color-text-muted);
  max-width: 460px;
  margin: 0 auto 1.5rem;
}

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

@media (max-width: 768px) {
  .pricing-page {
    padding: 4rem 0 2rem;
  }

  .pricing-header h1 {
    font-size: 2rem;
  }

  .pricing-header p {
    font-size: 1rem;
  }

  .plan-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    max-width: 420px;
    margin: 0 auto 4rem;
  }

  .plan-card {
    padding: 1.5rem 1.25rem;
  }

  .plan-amount {
    font-size: 2rem;
  }

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

  .pricing-cta {
    padding: 2rem 0;
  }

  .pricing-cta .btn {
    display: block;
    width: 100%;
    text-align: center;
    margin-left: 0 !important;
    margin-bottom: 0.5rem;
  }

  .faq-q {
    font-size: 0.9375rem;
  }
}

@media (max-width: 550px) {
  .billing-toggle {
    flex-direction: column;
    border-radius: var(--radius-md);
  }

  .billing-btn {
    border-radius: var(--radius-sm);
  }
}
