/* ============================================================
   Friends & Robots — Pricing page
   ============================================================
   Layered on top of the shared design system: tokens.css (colors,
   type, spacing) and index.css (nav, footer, buttons, .wrap,
   .reveal, .eyebrow, .section-pad). This file only adds the
   pricing-specific components — hero, plan cards, spend/detail
   cards, the enterprise strip, and the "managed in-app" modal.
   ============================================================ */

/* ---------- page hero ---------- */
.price-hero {
  position: relative;
  padding-top: 156px;
  padding-bottom: 8px;
  overflow: hidden;
}
.price-hero::before {
  content: "";
  position: absolute;
  width: 720px; height: 720px;
  top: -260px; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(249,115,22,0.16), transparent 66%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
.price-hero .wrap { position: relative; z-index: 1; text-align: center; }
.price-hero .eyebrow { justify-content: center; }
.price-hero h1 {
  font-weight: 700;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
}
.price-hero .lede {
  font-size: clamp(17px, 1.9vw, 21px);
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 620px;
  margin: 0 auto 28px;
}
.rate-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border: 1px solid var(--border-1);
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-full);
  font-size: 14px;
  color: var(--fg-2);
}
.rate-chip .eq {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--t);
  background: var(--t-soft);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* ============================================================
   PLANS
   ============================================================ */
.plans { padding-top: 56px; padding-bottom: clamp(48px, 7vw, 88px); }

/* pay-as-you-go banner */
.payg {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  border: 1px solid var(--border-1);
  border-radius: 18px;
  background: var(--bg-2);
  padding: 26px 30px;
  margin-bottom: 40px;
}
.payg-main { display: flex; flex-direction: column; gap: 4px; min-width: 220px; }
.payg-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  color: var(--fg-1);
  letter-spacing: -0.01em;
}
.payg-sub { font-size: 14.5px; color: var(--fg-3); }
.payg-credits {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-left: auto;
}
.payg-credits .n {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 38px;
  line-height: 1;
  color: var(--fg-1);
  letter-spacing: -0.02em;
}
.payg-credits .u { font-size: 14.5px; color: var(--fg-3); }
.payg .btn-download { padding: 13px 22px; font-size: 15px; border-radius: 12px; }

/* subscribe header row */
.plans-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.plans-head h2 {
  font-weight: 700;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.plans-head p { font-size: 15px; color: var(--fg-3); margin-top: 8px; }

/* monthly / yearly toggle */
.billing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border-1);
  background: var(--bg-2);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.billing-toggle button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-3);
  padding: 9px 16px;
  border-radius: var(--radius-full);
  transition: color var(--dur-fast) var(--ease-standard),
              background var(--dur-fast) var(--ease-standard);
}
.billing-toggle button:hover { color: var(--fg-2); }
/* Selected tab uses the page's dark background so it reads as a recessed,
   selected segment against the lighter toggle track. */
.billing-toggle button.active {
  background: var(--bg-1);
  color: var(--fg-1);
  box-shadow: var(--shadow-sm);
}
.billing-toggle .save {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--o);
  background: var(--o-soft);
  padding: 3px 7px;
  border-radius: var(--radius-full);
}
/* plan card grid */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: stretch;
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-1);
  border-radius: 18px;
  background: var(--bg-2);
  padding: 26px 26px 28px;
  transition: border-color var(--dur-base) var(--ease-standard);
}
.plan:hover { border-color: var(--border-active); }
.plan.featured {
  border-color: var(--o);
  background: linear-gradient(180deg, rgba(249,115,22,0.06), rgba(249,115,22,0) 42%), var(--bg-2);
  box-shadow: var(--shadow-glow-orange), 0 30px 80px rgba(0,0,0,0.35);
}

.plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.plan-name {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.plan.featured .plan-name { color: var(--o); }
.bonus {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--t);
  background: var(--t-soft);
  border: 1px solid rgba(111,188,217,0.22);
  padding: 4px 9px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.plan-credits { display: flex; align-items: baseline; gap: 8px; margin-bottom: 18px; }
.plan-credits .n {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 40px;
  line-height: 1;
  color: var(--fg-1);
  letter-spacing: -0.02em;
}
.plan-credits .u { font-size: 14px; color: var(--fg-3); }

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding-top: 18px;
  border-top: 1px solid var(--border-3);
}
.plan-price .amt {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
  color: var(--fg-1);
  letter-spacing: -0.02em;
}
.plan-price .per { font-size: 14px; color: var(--fg-3); }
.plan-billed {
  font-size: 13px;
  color: var(--fg-3);
  margin-top: 7px;
  min-height: 18px;
}
.plan-billed .save-inline { color: var(--o); font-weight: 600; }

.plan .btn { margin-top: 22px; width: 100%; padding: 13px 18px; font-size: 15px; border-radius: 12px; }

/* ============================================================
   SPEND / DETAILS SECTIONS
   ============================================================ */
.section-head { max-width: 820px; margin-bottom: 40px; }
.section-head h2 {
  font-weight: 700;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}
.section-head p { font-size: clamp(16px, 1.7vw, 19px); color: var(--fg-2); line-height: 1.55; }

.spend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.detail-card {
  border: 1px solid var(--border-1);
  border-radius: 16px;
  background: var(--bg-2);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: border-color var(--dur-base) var(--ease-standard);
}
.detail-card:hover { border-color: var(--border-active); }
.detail-card .d-ic {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--o-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--o);
  margin-bottom: 18px;
}
.detail-card.teal .d-ic { background: var(--t-soft); color: var(--t); }
.detail-card h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 9px; }
.detail-card p { font-size: 15px; color: var(--fg-3); line-height: 1.58; }
.detail-card p + p { margin-top: 12px; }
.detail-card .tag-line {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--fg-2);
  background: var(--bg-3);
  border: 1px solid var(--border-1);
  border-radius: 8px;
  padding: 9px 12px;
}
.detail-card .tag-line b { color: var(--t); font-weight: 600; }

/* details: 3-up */
.details { border-top: 1px solid var(--border-1); }
.details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.spend { border-top: 1px solid var(--border-1); }

/* ============================================================
   ENTERPRISE ROW — sits directly below the plan cards
   ============================================================ */
.enterprise-card {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 18px;
  border: 1px solid var(--border-1);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--bg-2), #0f1319);
  padding: 30px 34px;
}
.enterprise-card .e-copy { flex: 1; min-width: 260px; }
.enterprise-card h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.enterprise-card p { font-size: 15px; color: var(--fg-3); }
.enterprise-card .btn { flex-shrink: 0; padding: 13px 22px; font-size: 15px; border-radius: 12px; }

/* ============================================================
   PLAN MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8,11,15,0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-standard);
}
.modal-overlay[hidden] { display: none; }
.modal-overlay.in { opacity: 1; }
.modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  text-align: center;
  border: 1px solid var(--border-1);
  border-radius: 20px;
  background: linear-gradient(180deg, var(--bg-2), #0f1319);
  padding: 36px 34px 32px;
  box-shadow: 0 40px 120px rgba(0,0,0,0.6);
  transform: translateY(10px) scale(0.98);
  transition: transform var(--dur-base) var(--ease-out);
}
.modal-overlay.in .modal { transform: none; }
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border: 0;
  background: transparent;
  color: var(--fg-3);
  border-radius: 8px;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-standard), background var(--dur-fast) var(--ease-standard);
}
.modal-close:hover { color: var(--fg-1); background: rgba(255,255,255,0.06); }
.modal-ic {
  width: 56px; height: 56px;
  margin: 0 auto 20px;
  border-radius: 15px;
  background: var(--o-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--o);
}
.modal h3 {
  font-weight: 700;
  font-size: 23px;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.modal p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg-3);
  margin-bottom: 26px;
}
.modal .btn-download {
  width: 100%;
  padding: 14px 22px;
  font-size: 15.5px;
  border-radius: 12px;
}
.modal-meta {
  display: block;
  margin-top: 14px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .plan-grid { grid-template-columns: 1fr; }
  .plan.featured { order: -1; }
  .spend-grid { grid-template-columns: 1fr; }
  .details-grid { grid-template-columns: 1fr; }
  .payg-credits { margin-left: 0; }
}
@media (max-width: 640px) {
  .price-hero { padding-top: 120px; }
  .payg { padding: 22px; }
  .plans-head { align-items: flex-start; }
}
