/* ==========================================================================
   MetricInk — Pricing Page
   Extends the "Signal Room" design system from style.css.
   ========================================================================== */

.pricing-hero { padding-bottom: 64px; }

/* ---------- Billing toggle ---------- */
.billing-toggle {
  margin-top: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}
.billing-switch {
  position: relative;
  display: flex;
  align-items: center;
  width: 220px;
  height: 46px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 4px;
}
.billing-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: var(--lime);
  border-radius: 999px;
  transition: transform 0.35s var(--ease);
}
.billing-switch[aria-checked="true"] .billing-thumb { transform: translateX(100%); }
.billing-label {
  position: relative;
  z-index: 1;
  flex: 1;
  text-align: center;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
  transition: color 0.3s var(--ease);
}
.billing-switch[aria-checked="false"] .billing-label[data-period="monthly"],
.billing-switch[aria-checked="true"] .billing-label[data-period="annual"] {
  color: #0a0c05;
}
.billing-save {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--lime);
}

/* ---------- Pricing cards ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: stretch;
}
.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, var(--surface), var(--bg-1));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 38px 32px;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.price-card:hover { border-color: var(--border-strong); transform: translateY(-4px); }
.price-card.is-featured {
  border-color: var(--violet);
  box-shadow: 0 30px 70px -30px rgba(138, 92, 255, 0.35);
}
.price-badge {
  position: absolute;
  top: -13px;
  left: 32px;
  background: var(--violet);
  color: #fff;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
}
.price-name {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 26px;
  text-transform: uppercase;
}
.price-desc {
  margin-top: 10px;
  color: var(--ink-dim);
  font-size: 14px;
  min-height: 42px;
}
.price-amount-row {
  margin-top: 26px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.price-amount {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 42px;
  display: none;
}
.price-period {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--ink-faint);
  display: none;
}
body.is-annual .price-amount[data-period="annual"],
body.is-annual .price-period[data-period="annual"] { display: inline; }
body:not(.is-annual) .price-amount[data-period="monthly"],
body:not(.is-annual) .price-period[data-period="monthly"] { display: inline; }

.price-annual-note {
  margin-top: 6px;
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--ink-faint);
  min-height: 16px;
  opacity: 0;
  visibility: hidden;
}
body.is-annual .price-annual-note { opacity: 1; visibility: visible; }

.price-card .btn { margin-top: 24px; }

.price-features {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  flex: 1;
}
.price-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-dim);
}
.price-features li i {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border-radius: 50%;
  background: rgba(212, 255, 63, 0.12);
  position: relative;
}
.price-features li i::after {
  content: '';
  position: absolute;
  left: 4.5px;
  top: 3px;
  width: 4px;
  height: 8px;
  border-right: 1.5px solid var(--lime);
  border-bottom: 1.5px solid var(--lime);
  transform: rotate(45deg);
}

/* ---------- Compare table ---------- */
.compare-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}
.compare-table th, .compare-table td {
  padding: 18px 22px;
  text-align: left;
  font-size: 14.5px;
  border-bottom: 1px solid var(--border);
}
.compare-table thead th {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: var(--bg-1);
}
.compare-table thead th:first-child { border-top-left-radius: 14px; }
.compare-table thead th:last-child { border-top-right-radius: 14px; }
.compare-table tbody td:first-child { color: var(--ink); }
.compare-table tbody td { color: var(--ink-dim); }
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table td.yes { color: var(--lime); font-weight: 700; }
.compare-table td.no { color: var(--ink-faint); }

/* ---------- FAQ ---------- */
.pricing-faq {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.faq-item { background: var(--bg); }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: none;
  border: none;
  color: var(--ink);
  text-align: left;
  padding: 24px 26px;
  font-family: var(--f-body);
  font-size: 15.5px;
  font-weight: 600;
}
.faq-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  position: relative;
}
.faq-icon::before, .faq-icon::after {
  content: '';
  position: absolute;
  background: var(--ink-faint);
  transition: transform 0.3s var(--ease);
}
.faq-icon::before { top: 50%; left: 0; width: 100%; height: 1.5px; transform: translateY(-50%); }
.faq-icon::after { left: 50%; top: 0; height: 100%; width: 1.5px; transform: translateX(-50%); }
.faq-item.is-open .faq-icon::after { transform: translateX(-50%) rotate(90deg); opacity: 0; }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease);
}
.faq-item.is-open .faq-answer { max-height: 200px; }
.faq-answer p {
  padding: 0 26px 24px;
  color: var(--ink-dim);
  font-size: 14.5px;
  line-height: 1.6;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .pricing-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .billing-switch { width: 190px; }
}
