/* ─── Pricing section ────────────────────────────────────────────────────── */

.ps-pricing {
  padding: var(--sp-80) 0;
  background: var(--bg-page);
}

.ps-pricing__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Heading */
.ps-pricing__h2 {
  font-family: var(--fd);
  font-size: clamp(var(--fs-22), 2.8vw, 36px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text);
  text-align: center;
  margin-bottom: var(--sp-12);
}

/* Billing toggle */
.ps-pricing__toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-12);
  margin-bottom: var(--sp-48);
}

.ps-pricing__toggle {
  position: relative;
  width: 120px;
  height: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 3px;
}

.ps-pricing__toggle-pill {
  position: absolute;
  left: 3px;
  width: 58px;
  height: 26px;
  background: var(--text);
  border-radius: var(--r-full);
  transition: left var(--dur-base) var(--ease);
}

.ps-pricing__toggle[data-billing="annual"] .ps-pricing__toggle-pill {
  left: calc(100% - 61px);
}

.ps-pricing__toggle-label {
  position: relative;
  z-index: 1;
  flex: 1;
  text-align: center;
  font-family: var(--fb);
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--muted);
  transition: color var(--dur-fast) var(--ease);
  user-select: none;
}

.ps-pricing__toggle[data-billing="monthly"] .ps-pricing__toggle-label:first-of-type,
.ps-pricing__toggle[data-billing="annual"] .ps-pricing__toggle-label:last-of-type {
  color: var(--bg);
}

[data-theme="light"] .ps-pricing__toggle[data-billing="monthly"] .ps-pricing__toggle-label:first-of-type,
[data-theme="light"] .ps-pricing__toggle[data-billing="annual"] .ps-pricing__toggle-label:last-of-type {
  color: #fff;
}

.ps-pricing__save-badge {
  font-family: var(--fb);
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--blue);
  background: var(--blue-bg);
  border: 1px solid rgba(44, 125, 224, 0.2);
  border-radius: var(--r-full);
  padding: 3px var(--sp-10);
}

/* Cards grid — all equal height */
.ps-pricing__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-16);
  align-items: start; /* banners sit above cards, not pushing cards down */
}

/* Banner row — sits above card in its grid column via position */
.ps-pricing__col {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ps-pricing__banner {
  height: 28px;
  border-radius: var(--r-8) var(--r-8) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--fb);
  font-size: var(--fs-12);
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0;
  pointer-events: none;
}

.ps-pricing__banner--popular {
  background: #2A3650;
  color: #EAF0FC;
  opacity: 1;
}

[data-theme="light"] .ps-pricing__banner--popular {
  background: var(--blue);
  color: #fff;
}

.ps-pricing__banner--addon {
  background: transparent;
  opacity: 1;
}

.ps-pricing__addon-pill {
  font-family: var(--fb);
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 3px var(--sp-12);
}

/* Card */
.ps-pricing__card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 0 0 var(--r-12) var(--r-12);
  padding: var(--sp-24);
  display: flex;
  flex-direction: column;
  gap: var(--sp-16);
  transition: box-shadow var(--dur-base) var(--ease);
}

/* Cards with no banner still get top radius */
.ps-pricing__col:not(.has-banner) .ps-pricing__card {
  border-radius: var(--r-12);
}

.ps-pricing__card--elite {
  border-color: var(--border);
  border-top: none;
  box-shadow: var(--sh-md);
}

.ps-pricing__card--authority {
  border-style: dashed;
  border-color: var(--border);
}

/* Tier badge */
.ps-pricing__tier-badge {
  display: inline-flex;
  align-self: flex-start;
  font-family: var(--fb);
  font-size: var(--fs-12);
  font-weight: 700;
  padding: 3px var(--sp-10);
  border-radius: var(--r-full);
}

.tier-starter .ps-pricing__tier-badge { color: var(--tier-starter); background: rgba(148,163,184,.10); }
.tier-pro     .ps-pricing__tier-badge { color: var(--tier-pro);     background: var(--mint-bg); }
.tier-elite   .ps-pricing__tier-badge { color: var(--tier-elite);   background: var(--blue-bg); }
.tier-auth    .ps-pricing__tier-badge { color: var(--tier-auth);    background: var(--amber-bg); }

/* Price */
.ps-pricing__price {
  display: flex;
  align-items: baseline;
  gap: var(--sp-4);
}

.ps-pricing__amount {
  font-family: var(--fd);
  font-size: var(--fs-32);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 1;
}

.ps-pricing__period {
  font-family: var(--fb);
  font-size: var(--fs-13);
  color: var(--muted);
}

.ps-pricing__price-annual {
  display: none;
}

.billing-annual .ps-pricing__price-monthly { display: none; }
.billing-annual .ps-pricing__price-annual  { display: flex; }

/* Cumulative label */
.ps-pricing__includes {
  font-family: var(--fb);
  font-size: var(--fs-12);
  color: var(--label);
  line-height: 1.4;
}

/* Feature list */
.ps-pricing__features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
  flex: 1;
}

.ps-pricing__feature {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-8);
  font-family: var(--fb);
  font-size: var(--fs-13);
  color: var(--muted);
  line-height: 1.45;
}

.ps-pricing__feature-check {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--mint);
}

.ps-pricing__feature-check svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* CTAs */
.ps-pricing__cta {
  display: block;
  text-align: center;
  font-family: var(--fb);
  font-size: var(--fs-14);
  font-weight: 600;
  padding: 12px var(--sp-20);
  border-radius: var(--r-8);
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
  cursor: pointer;
  border: none;
  width: 100%;
}

/* Ghost CTAs (Starter, Pro, Authority) */
.ps-pricing__cta--ghost {
  color: var(--muted);
  background: transparent;
  border: 1.5px solid var(--border);
}

.ps-pricing__cta--ghost:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--border-subtle);
}

/* Solid CTA (Elite only) */
.ps-pricing__cta--solid {
  color: #fff;
  background: var(--blue);
}

[data-theme="dark"] .ps-pricing__cta--solid {
  background: #EAF0FC;
  color: #070D1A;
}

.ps-pricing__cta--solid:hover {
  background: var(--blue-2);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(44,125,224,.25);
}

/* See full pricing link */
.ps-pricing__full-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-6);
  margin-top: var(--sp-32);
  font-family: var(--fb);
  font-size: var(--fs-14);
  font-weight: 500;
  color: var(--blue);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease), gap var(--dur-fast) var(--ease);
}

.ps-pricing__full-link:hover {
  color: var(--blue-2);
  gap: var(--sp-10);
}

.ps-pricing__full-link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

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

@media (max-width: 767px) {
  .ps-pricing__grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: var(--sp-16);
    padding-bottom: var(--sp-8);
  }

  .ps-pricing__col {
    min-width: 82vw;
    scroll-snap-align: start;
  }
}
