/* ==========================================================================
   pricing.css — pricing hero, billing toggle, tier cards, savings calculator
   ========================================================================== */

.pricing-hero {
  text-align: center;
  padding-block: clamp(3.5rem, 7vw, 5.5rem) var(--space-8);
  background:
    radial-gradient(50% 60% at 50% 0%, rgba(91,52,240,0.10), transparent 70%),
    linear-gradient(180deg, #ffffff 0%, var(--color-bg-alt) 100%);
}
.pricing-hero h1 { font-size: var(--fs-hero); margin-top: var(--space-3); }
.pricing-hero .lead { margin-top: var(--space-4); }

/* ---- Billing term selector ------------------------------------------------
   Five terms, so a two-state pill switch no longer fits. A segmented control
   scrolls horizontally on small screens rather than wrapping into a ragged
   two-line block or forcing the page to scroll sideways.
   -------------------------------------------------------------------------- */
.billing-terms {
  display: inline-flex;
  gap: 4px;
  margin-top: var(--space-6);
  padding: 5px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.billing-terms::-webkit-scrollbar { display: none; }

.billing-term {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;                       /* never squash the labels */
  padding: 0.55rem 1.05rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text-muted);
  font: inherit;
  font-weight: var(--fw-medium);
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.billing-term:hover { color: var(--color-primary); background: var(--color-bg-alt); }
.billing-term.is-active {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.billing-term.is-active:hover { background: var(--color-primary); color: #fff; }

/* The discount chip. Green on the inactive state, translucent white once the
   term is selected — on the deep indigo it needs to stay legible. */
.billing-term__off {
  font-size: 0.76rem;
  font-weight: var(--fw-semibold);
  color: #28994a;
  background: #e6f0e8;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}
.billing-term.is-active .billing-term__off {
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
}

.billing-note {
  /* base.css sets `p { max-width: 65ch }`, which caps the paragraph's BOX. The
     hero's text-align:center then centres the text INSIDE that box — but the box
     itself was still flush left, so the line looked a few dozen pixels off-centre.
     margin-inline:auto centres the box; text-align:center centres the text in it.
     Both are needed, and it is the missing first one that caused the bug. */
  max-width: 62ch;
  margin: var(--space-3) auto 0;
  text-align: center;
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}

/* The struck-through original price. Sits before the headline figure. */
.tier__was {
  font-size: 1.15rem;
  font-weight: var(--fw-semibold);
  color: var(--color-text-muted);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  align-self: center;
}
.tier__was[hidden] { display: none; }   /* [hidden] loses to the flex display above */

/* ---- Billing toggle (OLD two-state switch) --------------------------------
   Superseded by .billing-terms above. Kept because the markup may still exist
   in a cached page; harmless if unused.
   -------------------------------------------------------------------------- */
.billing-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}
.billing-toggle__label { font-weight: var(--fw-medium); color: var(--color-text-muted); cursor: pointer; }
.billing-toggle__label.is-active { color: var(--color-primary); }
.billing-switch {
  position: relative; width: 52px; height: 30px; border-radius: var(--radius-pill);
  border: none; background: var(--color-primary); cursor: pointer; padding: 0;
}
.billing-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px;
  border-radius: 50%; background: #fff; transition: transform var(--dur-base) var(--ease-out);
}
.billing-switch[aria-checked="true"]::after { transform: translateX(22px); }
.billing-badge {
  font-size: var(--fs-small); font-weight: var(--fw-semibold); color: #28994a;
  background: #e6f0e8; padding: 2px 10px; border-radius: var(--radius-pill);
}

/* ---- Tier grid ------------------------------------------------------------ */
/* align-items: stretch so all three cards share the same height */
/* Four tiers since GoFree got a column, and they stay on ONE ROW as far down as
   the type allows — a plan comparison that wraps is not a comparison, because
   the tier you are weighing against is off the bottom of the screen.

   Holding one row costs tighter padding and a smaller price, applied only in
   the band where it is needed. Below 1000px it goes two-up rather than
   four-up-and-illegible, and below 860px one column. */
.tiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); align-items: stretch; margin-top: var(--space-8); }
@media (max-width: 1240px) {
  .tiers { gap: var(--space-3); }
  .tier { padding: var(--space-5) var(--space-4); }
  .tier__amount { font-size: 2.4rem; }
  .tier__features li { font-size: 0.86rem; }
}
@media (max-width: 1000px) { .tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); } }
.tier {
  position: relative;
  display: flex; flex-direction: column;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.tier:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.tier--popular {
  border-color: var(--color-accent);
  box-shadow: 0 20px 50px rgba(91,52,240,0.20);
}
.tier--popular::before {
  content: "Most popular";
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff; font-size: var(--fs-small); font-weight: var(--fw-semibold);
  padding: 4px 16px; border-radius: var(--radius-pill); white-space: nowrap;
}
.tier__name { font-size: var(--fs-h3); color: var(--color-primary); }
.tier__desc { color: var(--color-text-muted); font-size: var(--fs-small); margin-top: var(--space-2); min-height: 2.6em; }
.tier__price { margin-top: var(--space-4); display: flex; align-items: baseline; gap: 6px; }
.tier__amount { font-size: 2.75rem; font-weight: var(--fw-bold); color: var(--color-primary); line-height: 1; }
.tier__period { color: var(--color-text-muted); font-size: var(--fs-small); }
.tier__billed { font-size: var(--fs-small); color: var(--color-text-muted); margin-top: var(--space-2); min-height: 1.4em; }
.tier__cta { margin-top: var(--space-5); width: 100%; }
.tier__users {
  margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--color-border);
  font-weight: var(--fw-semibold); color: var(--color-primary);
}
.tier__features { margin-top: var(--space-4); display: grid; gap: var(--space-3); }
.tier__features li { display: flex; gap: var(--space-3); align-items: flex-start; font-size: 0.92rem; color: var(--color-text); }
.tier__features li strong { color: var(--color-primary); font-weight: var(--fw-bold); }
.tier__features svg { flex: none; width: 18px; height: 18px; color: var(--color-accent); margin-top: 3px; }

/* ---- Trust band (replaces the plain guarantee line) ----------------------- */
.pricing-trust { margin-top: var(--space-8); display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.pricing-trust__item {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-4); border-radius: var(--radius-md);
  background: var(--color-surface); border: 1px solid var(--color-border);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.pricing-trust__item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.pricing-trust__icon { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: var(--radius-sm); background: linear-gradient(135deg, var(--color-primary), var(--color-accent)); color: #fff; }
.pricing-trust__icon svg { width: 22px; height: 22px; }
.pricing-trust__item strong { display: block; color: var(--color-primary); font-size: 0.95rem; }
.pricing-trust__item span { color: var(--color-text-muted); font-size: 0.82rem; }
@media (max-width: 800px) { .pricing-trust { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .pricing-trust { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .tiers { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }

/* ---- Savings calculator --------------------------------------------------- */
.calculator {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--space-8); align-items: center;
  padding: clamp(1.5rem, 4vw, 3rem);
}
.calculator__control { margin-top: var(--space-5); }
.calculator__control label { display: flex; justify-content: space-between; font-weight: var(--fw-medium); margin-bottom: var(--space-3); }
.calculator__control output { color: var(--color-accent); font-weight: var(--fw-bold); }
.calculator input[type="range"] {
  width: 100%; height: 6px; border-radius: var(--radius-pill); appearance: none;
  background: var(--color-border); outline: none;
}
.calculator input[type="range"]::-webkit-slider-thumb {
  appearance: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--color-primary); cursor: pointer; box-shadow: var(--shadow-md); border: 3px solid #fff;
}
.calculator input[type="range"]::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%; background: var(--color-primary);
  cursor: pointer; border: 3px solid #fff;
}
.calculator__results { display: grid; gap: var(--space-4); }
.calculator__result {
  padding: var(--space-5); border-radius: var(--radius-md);
  background: var(--color-bg-alt); text-align: center;
}
.calculator__num { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: var(--fw-bold); color: var(--color-primary); line-height: 1; }
.calculator__label { color: var(--color-text-muted); font-size: var(--fs-small); margin-top: var(--space-2); }
.calculator__note { font-size: 0.8rem; color: var(--color-text-muted); margin-top: var(--space-3); }
@media (max-width: 760px) { .calculator { grid-template-columns: 1fr; gap: var(--space-6); } }

/* ---- The "pay less, get more" pitch ---------------------------------------
   Two halves and an arrow. The point of the pricing page in one glance, which a
   sentence of prose could state but never actually show.
   -------------------------------------------------------------------------- */
.billing-pitch {
  display: inline-flex;
  align-items: stretch;
  gap: var(--space-2);
  margin-top: var(--space-5);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  max-width: 100%;
}
.billing-pitch__half {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 var(--space-4);
  text-align: left;
}
.billing-pitch__k {
  font-size: 0.7rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.billing-pitch__v { font-size: 1.05rem; color: var(--color-text); white-space: nowrap; }
.billing-pitch__v strong { color: var(--color-primary); font-size: 1.2rem; }

.billing-pitch__arrow {
  display: grid;
  place-items: center;
  width: 34px;
  flex: none;
  color: var(--color-accent);
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
}
.billing-pitch__arrow svg { width: 18px; height: 18px; }

/* The arrow nudges right, forever — the "and you also get more" motion. It is
   the only thing on the page that moves on its own, so it reads as a hint rather
   than as decoration. */
@keyframes billing-nudge {
  0%, 100% { transform: translateX(-2px); opacity: 0.55; }
  50%      { transform: translateX(2px);  opacity: 1; }
}
.billing-pitch__arrow svg { animation: billing-nudge 1.9s var(--ease-out) infinite; }

/* The two halves fade up in sequence when the block scrolls in, so the eye reads
   "pay less" BEFORE "get more" — the order the argument is meant to land in. */
@keyframes billing-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.billing-pitch__half { animation: billing-rise 620ms var(--ease-out) both; }
.billing-pitch__half:first-of-type { animation-delay: 120ms; }
.billing-pitch__half:last-of-type  { animation-delay: 320ms; }

/* Motion is a preference, not a given. */
@media (prefers-reduced-motion: reduce) {
  .billing-pitch__arrow svg,
  .billing-pitch__half { animation: none; }
}

@media (max-width: 560px) {
  .billing-pitch { flex-direction: column; align-items: stretch; gap: var(--space-3); }
  .billing-pitch__arrow {
    width: auto; height: 26px;
    border: 0; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border);
    transform: rotate(90deg);
  }
  .billing-pitch__half { padding: 0; text-align: center; }
  .billing-pitch__v { white-space: normal; }
}

/* ==========================================================================
   Top-ups
   --------------------------------------------------------------------------
   Rebuilt 2026-08-14. These cards used the generic `.card.tool-card` with a
   `ul.checks` tick list holding a PRICE TABLE, so every rate came out as three
   unaligned fragments on one line — "GoSuper$9.00 / 1,000 leads" — and the
   three tiers did not line up with each other. A rate per plan is tabular, so
   it is a definition list now: plan left, price right, and the drop from
   GoSuper to GoUltra is the thing the eye catches.

   Markup is written by scripts/gen_pricing_quotas.php. Change it there.
   ========================================================================== */
.topup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-6);
}
.topup-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-5);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s ease, transform .25s ease;
}
.topup-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.topup-card h3 { margin: 0 0 var(--space-2); font-size: var(--fs-h4); letter-spacing: -0.01em; }
.topup-card__blurb {
  margin: 0 0 var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--fs-small);
  line-height: 1.55;
}
.topup-card__per {
  margin: 0 0 var(--space-2);
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.topup-card__per strong { color: var(--color-text); text-transform: none; letter-spacing: 0; }

/* The rate table. Right-aligned prices are the whole point: three tiers whose
   figures do not share an edge cannot be compared at a glance. */
.topup-rates { margin: 0 0 var(--space-4); padding: 0; }
.topup-rate {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}
.topup-rate:first-child { border-top: 1px solid var(--color-border); }
.topup-rate dt { margin: 0; font-size: var(--fs-small); color: var(--color-text-muted); }
.topup-rate dd { margin: 0; font-variant-numeric: tabular-nums; }
.topup-rate dd strong { font-size: 1.15rem; font-weight: var(--fw-semibold); letter-spacing: -0.01em; }
/* The best rate is the reason to move up a tier, so it is the one with colour. */
.topup-rate:last-child dd strong { color: var(--color-primary); }

.topup-card__packs {
  margin: auto 0 0;
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}

/* The three rules under the top-up cards. Was `ul.notes`, a class no marketing
   stylesheet defines, so it rendered as default browser bullets. */
.topup-rules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}
.topup-rule h4 {
  margin: 0 0 var(--space-2);
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  /* A short rule at the top of each column, so the eye can skim three headings
     before deciding whether to read three paragraphs. */
  padding-left: var(--space-3);
  border-left: 2px solid var(--color-primary);
}
.topup-rule p {
  margin: 0;
  padding-left: var(--space-3);
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--color-text-muted);
}
