/*
 * pricing.css — the rate cards, the metering explainer and the FAQ on /{locale}/pricing, and
 * nothing else.
 *
 * The page renders on the site's CONTENT TEMPLATE: content.css supplies the body, the .blog-main
 * padding, the 1232px .blog-container and the .blog-header / .blog-heading / .blog-intro opening,
 * exactly as /blog, /docs and /privacy-policy get them. This file is loaded after both stylesheets
 * and adds only the surfaces the template has no equivalent for. Everything here is token-driven
 * (--panel, --border, --border-hover, --text, --muted, --green), so it follows the reader's theme
 * with no light-theme override block. No JavaScript — the page stays byte-identical /
 * CDN-cacheable.
 *
 * The page prices the prepaid-credit model: three per-minute rate cards (the price shown is the
 * per-minute rate), a metering explainer, and the questions people actually ask.
 */

/* ===== Opening block =====
   The page takes .blog-header / .blog-heading / .blog-intro from the content template and only
   CENTRES them. The blog index opens left because a listing is scanned from its left edge; this
   page opens on a two-line claim standing over three symmetric rate cards, where a left-aligned
   claim over a centred grid reads as two pages stacked.

   The intro is WIDER than the template's 42rem reading measure: centred under a two-line headline
   and above a three-column grid, the narrower column left a visibly pinched block of text between
   two full-width elements. 52rem keeps it shorter than the grid it introduces while letting each
   sentence breathe. */
.pricing-header {
  text-align: center;
  margin-bottom: clamp(2rem, 5vw, 3.25rem);
}
.pricing-header .blog-intro {
  margin-inline: auto;
  max-width: 52rem;
}

/* ===== Rate cards =====
   Each card is a subgrid sharing the outer grid's rows, so the five bands —
   name, tagline, price, CTA, features — line up across all cards no matter how
   many lines a tagline/feature wraps to in any locale (no JS, no brittle
   per-band min-heights). The five in-flow children map 1:1 to the five rows;
   the absolutely-positioned badge is out of flow and takes no row. */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 18px;
  row-gap: 18px;
}
.plan-card {
  position: relative;
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 5;
  row-gap: 0;
  /* The same surface as .blog-card and .blog-featured: mixing --panel toward white is what lifts a
     card off the page in the dark theme and holds it on the light one, from one declaration. */
  background: color-mix(in srgb, var(--panel) 92%, white 8%);
  /* Square corners on purpose — no border-radius. The featured card's `0 0 0 1px` ring and the
     badge overlapping the top edge both follow the sharp corner; don't reintroduce a radius here
     without checking those two. */
  border: 1px solid var(--border);
  padding: 26px 22px;
}
.plan-card--featured {
  border-color: var(--green-hover);
  box-shadow: 0 0 0 1px var(--green-hover);
}
.plan-badge {
  position: absolute;
  top: -11px;
  left: 22px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 4px 10px;
  border-radius: 999px;
}
.plan-name {
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}
.plan-tagline {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 6px 0 0;
}
.plan-price {
  margin: 18px 0 20px;
  align-self: end;
}
.plan-amount {
  color: var(--text);
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.plan-per {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  margin-left: 6px;
}
.plan-cta {
  display: block;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 84%, white 16%);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.plan-cta:hover { border-color: var(--border-hover); background: color-mix(in srgb, var(--panel) 76%, white 24%); }
.plan-cta--primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.plan-cta--primary:hover { background: var(--green-hover); border-color: var(--green-hover); }
.plan-features {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}
.plan-check {
  flex: none;
  margin-top: 1px;
  color: var(--green-hover);
}

/* ===== Shared section heading (metering explainer) ===== */
.pricing-section-heading {
  color: var(--text);
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 700;
  text-align: center;
  margin: 0 0 24px;
}

/* ===== How the meter runs =====
   Four plain bands rather than cards, so they read as explanation and never compete with the rate
   grid above them. Two-up on desktop, one column on narrow screens. */
.pricing-meter {
  margin: clamp(3rem, 7vw, 5rem) 0 0;
}
.meter-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 40px;
  row-gap: 28px;
}
.meter-item h3 {
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.meter-item p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

/* ===== FAQ ===== */
.pricing-faq {
  max-width: 760px;
  margin: clamp(3rem, 7vw, 5rem) auto 0;
}
.pricing-faq-heading {
  color: var(--text);
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 700;
  text-align: center;
  margin: 0 0 24px;
}
.pricing-faq-item {
  border-bottom: 1px solid var(--border);
  padding: 6px 0;
}
.pricing-faq-item summary {
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  padding: 14px 28px 14px 0;
  position: relative;
}
.pricing-faq-item summary::-webkit-details-marker { display: none; }
.pricing-faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}
.pricing-faq-item[open] summary::after { content: "\2212"; }
.pricing-faq-item p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 14px;
  max-width: 660px;
}
.pricing-faq-item summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

/* ===== Responsive =====
   Three rate cards go straight from 3-up to 1-up: a 2-up row would leave one card orphaned on its
   own line, which reads as a layout bug rather than a choice. */
@media (max-width: 940px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .meter-grid { grid-template-columns: 1fr; }
}
