/* 3Plexis pricing page — builds on ../redesign.css (tokens, nav, logo tile,
   card icons, eyebrow, footer). Nothing here changes the approved homepage. */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

/* Billing period visibility (works without JS: body defaults to monthly) */
[data-billing="monthly"] .is-annual,
[data-billing="annual"] .is-monthly { display: none !important; }

.nav-links a[aria-current="page"] { color: var(--on-dark); }

/* ---------- Header ---------- */
.pricing-hero {
  position: relative; overflow: hidden;
  padding: 72px 0 64px;
  background: linear-gradient(180deg, var(--navy-950) 0%, var(--navy-900) 100%);
  color: var(--on-dark);
  text-align: center;
}
.pricing-glow {
  position: absolute; left: 50%; top: -380px; transform: translateX(-50%);
  width: 820px; height: 820px;
  background: radial-gradient(closest-side, var(--cyan-glow), transparent 70%);
  pointer-events: none;
}
.pricing-hero-inner { position: relative; max-width: 820px; }
.pricing-brand { display: inline-flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 44px; text-decoration: none; }
.logo-tile--pricing { width: 72px; padding: 4px; border-radius: 14px; }
.logo-tile--pricing img { border-radius: 10px; }
.pricing-brand-tagline { font-size: 0.9rem; font-weight: 500; letter-spacing: 0.04em; color: #dbe4ef; }
.pricing-hero h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 650; color: #fff; text-wrap: balance; }
.pricing-lede { margin: 20px auto 0; max-width: 620px; font-size: 1.08rem; line-height: 1.7; color: var(--on-dark-muted); text-wrap: pretty; }

.billing-toggle {
  display: inline-flex; gap: 4px; margin: 36px 0 0; padding: 4px;
  border: 1px solid var(--navy-line); border-radius: 999px;
  background: rgba(255,255,255,0.04);
}
.billing-option { position: relative; cursor: pointer; }
.billing-option input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.billing-option span {
  display: block; min-width: 112px; padding: 10px 22px; border-radius: 999px;
  font-size: 0.95rem; font-weight: 600; color: var(--on-dark-muted);
  transition: background-color .15s, color .15s;
}
.billing-option input:checked + span { background: var(--teal); color: #04121a; }
.billing-option input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 3px; }
.billing-note { margin: 14px 0 0; font-size: 0.9rem; font-weight: 500; color: var(--teal); }

/* ---------- Plans ---------- */
.plans-section { padding: 72px 0 96px; background: var(--bg-light); color: var(--ink); }
.plans { display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 18px; row-gap: 18px; }

/* Each card spans 7 shared rows (flags, icon, name, description, price, body, action)
   so prices, feature lists, and buttons line up across a row of cards. */
.plan {
  position: relative; display: grid; grid-row: span 7; grid-template-rows: subgrid; row-gap: 0; align-content: start;
  padding: 26px 24px 26px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}
.plan-flags { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; min-height: 26px; margin-bottom: 18px; }
.plan-badge, .plan-audit-flag {
  display: inline-flex; align-items: center;
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.3;
  padding: 5px 10px; border-radius: 999px;
}
.plan-badge { color: #04121a; background: var(--teal); }
.plan-audit-flag { color: #0b6e72; background: #e6f8f8; border: 1px solid rgba(20,168,174,0.35); }

.plan .card-icon { width: 40px; height: 40px; }
.plan .card-icon::after { inset: 12px; }
.plan .card-icon--inbox::after { inset: 13px 10px; }
.plan-icons { display: flex; gap: 6px; }
.plan > .card-icon { align-self: start; }
.plan-body { align-self: start; }

.plan-name { margin: 18px 0 0; font-size: 1.25rem; font-weight: 650; letter-spacing: -0.015em; }
.plan-desc { margin: 10px 0 0; font-size: 0.93rem; line-height: 1.6; color: var(--muted); }

.plan-price { margin: 22px 0 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.price-main { margin: 0; display: flex; align-items: baseline; gap: 4px; }
.price-amount { font-size: 2.2rem; font-weight: 650; letter-spacing: -0.03em; line-height: 1; }
.price-period { font-size: 0.95rem; font-weight: 500; color: var(--muted); }
.price-sub { margin: 8px 0 0; font-size: 0.88rem; color: var(--muted); }
[data-billing="annual"] .price-sub { color: #0b6e72; font-weight: 500; }

.plan-includes { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.plan-includes li { position: relative; padding-left: 24px; font-size: 0.92rem; line-height: 1.45; color: var(--ink-2); }
.plan-includes li::before {
  content: ""; position: absolute; left: 2px; top: 0.3em; width: 5px; height: 9px;
  border: solid var(--teal-strong); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.plan-note { margin: 16px 0 0; font-size: 0.82rem; line-height: 1.5; color: var(--muted); }

.plan-action { align-self: end; padding-top: 24px; }
.plan-btn {
  width: 100%; min-height: 48px; padding: 0 12px;
  font: 600 0.92rem/1.2 var(--font); white-space: nowrap;
  border-radius: 10px; cursor: pointer;
  background: transparent; color: var(--ink); border: 1px solid #cbd5e1;
  transition: border-color .15s, background-color .15s;
}
.plan-btn:hover { border-color: var(--ink); }
/* WEB-1: plan buttons are links to /contact/ until checkout is authorized */
a.plan-btn { display: flex; align-items: center; justify-content: center; box-sizing: border-box; text-decoration: none; }
.plan-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.plan-msg { min-height: 1.4em; margin: 10px 0 0; font-size: 0.84rem; line-height: 1.4; color: #0b6e72; }

/* Complete: the quiet anchor of the row */
.plan--complete {
  background: radial-gradient(140% 90% at 50% 0%, var(--navy-800), var(--navy-950));
  border-color: rgba(44,197,201,0.45);
  color: var(--on-dark);
  box-shadow: 0 24px 50px rgba(10,18,34,0.22);
}
.plan--complete .plan-desc,
.plan--complete .price-period,
.plan--complete .price-sub { color: var(--on-dark-muted); }
[data-billing="annual"] .plan--complete .price-sub { color: var(--teal); }
.plan--complete .plan-price { border-color: var(--navy-line); }
.plan--complete .price-amount { color: #fff; }
.plan--complete .plan-includes li { color: var(--on-dark); }
.plan--complete .plan-includes li::before { border-color: var(--teal); }
.plan--complete .card-icon { background: rgba(255,255,255,0.06); }
.plan--complete .plan-audit-flag { color: var(--teal); background: rgba(44,197,201,0.1); border-color: rgba(44,197,201,0.4); }
.plan-save { margin: 16px 0 0; padding: 12px 14px; border-radius: 10px; background: rgba(44,197,201,0.08); border: 1px solid rgba(44,197,201,0.2); }
.plan-save p { margin: 0; font-size: 0.88rem; line-height: 1.45; color: var(--on-dark); }
.plan-save .plan-save-sub { margin-top: 4px; font-size: 0.8rem; color: var(--on-dark-muted); }
.plan-btn--primary { background: var(--teal); border-color: var(--teal); color: #04121a; }
.plan-btn--primary:hover { background: #4fd3d6; border-color: #4fd3d6; }
.plan--complete .plan-msg { color: var(--teal); }

/* Plan chosen by the Operations Audit (?config=) */
.plan.is-audit-pick { border-color: var(--teal-strong); box-shadow: 0 0 0 2px var(--teal-strong), 0 18px 40px rgba(15,23,42,0.08); }
.plan--complete.is-audit-pick { box-shadow: 0 0 0 2px var(--teal), 0 24px 50px rgba(10,18,34,0.22); }

/* ---------- Setup ---------- */
.setup-section { padding: 88px 0; background: #fff; color: var(--ink); }
.setup-inner { max-width: 760px; }
.setup-section h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 650; }
.setup-section p:not(.eyebrow) { margin: 18px 0 0; font-size: 1.06rem; line-height: 1.75; color: #334155; }
.setup-section .setup-annual { margin-top: 12px; font-weight: 500; color: var(--ink-2); }

/* ---------- Compare ---------- */
.compare-section { padding: 88px 0 104px; background: var(--bg-light); color: var(--ink); }
.compare-section h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 650; margin-bottom: 32px; }
.compare {
  width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
}
.compare th, .compare td { padding: 16px 14px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.compare thead th { font-size: 0.86rem; font-weight: 650; color: var(--ink); line-height: 1.3; }
.compare thead th:first-child, .compare tbody th { width: 32%; text-align: left; }
.compare tbody th { font-size: 0.94rem; font-weight: 500; color: var(--ink-2); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare .compare-complete { background: rgba(44,197,201,0.06); }
.compare .yes, .compare .no { display: inline-block; vertical-align: middle; }
.compare .yes { width: 7px; height: 13px; border: solid var(--teal-strong); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); margin-top: -4px; }
.compare .no { width: 12px; height: 2px; background: #cbd5e1; }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .plans { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

/* ---------- Phone ---------- */
@media (max-width: 640px) {
  .plans { grid-template-columns: 1fr; }
  .plan { grid-row: auto; grid-template-rows: none; display: flex; flex-direction: column; }
  .plan-action { margin-top: auto; align-self: stretch; }
  .pricing-hero { padding: 52px 0 48px; }
  .pricing-brand { margin-bottom: 36px; }
  .pricing-lede { font-size: 1rem; }
  .billing-option span { min-width: 104px; padding: 10px 18px; }
  .plans-section { padding: 48px 0 72px; }
  .setup-section, .compare-section { padding: 64px 0; }
  .compare th, .compare td { padding: 12px 4px; }
  .compare thead th { font-size: 0.68rem; font-weight: 600; }
  .compare thead th:first-child, .compare tbody th { width: 36%; padding-left: 12px; }
  .compare tbody th { font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .billing-option span { transition: none; }
}
