/*
 * feature-page.css — the feature landing pages (/features/<slug>/), one shared
 * template (mockup feature-*.html, build of 2026-11-17).
 * Version: 1.0.0
 *
 * Page layer on top of cw-design-system.css. Tokens only. Everything generic
 * (hero, jump bar, chips, steps, cards, split, app window, banner, FAQ list)
 * is the cw- component; this file adds the blocks the cw- layer does not
 * carry: the switcher's "All features" chip, breadcrumb, problem/fix cards,
 * the "Good to know" note, previous/next, and the drawn consumer-portal phone.
 * Markup: inc/page-features.php. Behaviour: assets/js/feature-page.js.
 */

/* Full-width bands, as on the PayByText pages (paybytext.css): Astra boxes the
   page content at 1240px, which boxes the switcher bar and the hero too. The
   content keeps its width through each band's .cw-container. */
#content .ast-container:has(.cwf-switch){ max-width:none; padding-left:0; padding-right:0; }

/* ── Feature switcher (a .cw-jump bar) ─────────────────────────────────── */
/* nine features and "All features" need more than the 1180px container */
.cwf-switch .cw-container{ max-width:none; }
.cwf-switch .cw-chips a.cwf-all{ background: var(--color-bg-alt-2); color: var(--color-secondary); font-weight: var(--weight-semibold); }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.cwf-crumbs{ font-size: var(--fs-14); color: var(--color-muted); margin:0 0 var(--space-4); max-width:none; }
.cwf-crumbs a{ color: var(--color-teal-700); text-decoration:none; font-weight: var(--weight-semibold); }
.cwf-crumbs a:hover{ text-decoration:underline; }
.cwf-crumbs span{ margin:0 var(--space-2); }
.cwf-hero-visual{ display:grid; justify-items:center; }
.cwf-hero-visual > *{ width:100%; }
.cwf-hero-visual > .cwf-phone{ width:360px; }

/* ── Problem / fix cards ───────────────────────────────────────────────── */
.cwf-pains{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap: var(--space-5); }
.cwf-pain{ display:flex; flex-direction:column; border-radius: var(--radius-lg); overflow:hidden; }
.cwf-pain-problem, .cwf-pain-fix{ padding: var(--space-5) var(--space-6); border:1px solid; }
/* Problem: the design system's .alert-danger recipe (collect-design-system/css/components.css);
   there is no red tint token. */
.cwf-pain-problem{ background:#FCEAE7; border-color:#F5C2BB; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
/* With Collect!: the design system's .alert-success recipe (same file). */
.cwf-pain-fix{ flex:1; background: var(--color-money-50); border-color:#D5E29A; border-top:0; border-radius:0 0 var(--radius-lg) var(--radius-lg); }
.cwf-pain-tag, .cwf-pain-fix b{ display:block; font-family: var(--font-heading); font-size: var(--fs-12); font-weight: var(--weight-bold); letter-spacing:.08em; text-transform:uppercase; margin-bottom: var(--space-2); }
.cwf-pain-tag{ color:#8E261A; }   /* .alert-danger text */
.cwf-pain-fix b{ color:#5E7416; } /* .alert-success text */
.cwf-pain h3{ font-family: var(--font-heading); font-size: var(--fs-18); font-weight: var(--weight-semibold); line-height: var(--leading-snug); color: var(--color-heading); margin:0; }
.cwf-pain-fix p{ margin:0; max-width:none; font-size: var(--fs-16); color: var(--color-heading); }
@media (max-width:900px){ .cwf-pains{ grid-template-columns:1fr; } }

/* ── Detail section ────────────────────────────────────────────────────── */
.cwf-note{ margin:0; max-width:none; padding: var(--space-4) var(--space-5); border-left:4px solid var(--color-primary); background: var(--color-bg-alt); border-radius: var(--radius-md); color: var(--color-heading); font-size: var(--fs-16); }
.cw-bg-soft .cwf-note{ background: var(--color-bg); }
.cwf-note strong{ display:block; margin-bottom:2px; }

/* ── Questions ─────────────────────────────────────────────────────────── */
.cwf-faq-more{ text-align:center; margin: var(--space-6) 0 0; max-width:none; }

/* ── Related features, previous / next ─────────────────────────────────── */
a.cw-card.cwf-related{ display:flex; flex-direction:column; }
.cwf-related .cw-link-arrow{ margin-top:auto; padding-top: var(--space-3); font-size: var(--fs-14); }
.cwf-pager{ display:grid; grid-template-columns:1fr 1fr; gap: var(--space-5); margin-top: var(--space-7); }
.cwf-pager a{ display:flex; flex-direction:column; gap: var(--space-1); padding: var(--space-5) var(--space-6); border-radius: var(--radius-lg); background: var(--color-secondary); text-decoration:none; }
.cwf-pager a:hover{ background: var(--color-blue-700); text-decoration:none; }
.cwf-pager small{ font-family: var(--font-heading); font-size: var(--fs-12); font-weight: var(--weight-semibold); letter-spacing:.1em; text-transform:uppercase; color: var(--color-on-dark); }
.cwf-pager strong{ font-family: var(--font-heading); font-size: var(--fs-18); font-weight: var(--weight-semibold); color:#fff; }
.cwf-pager a.cwf-next{ text-align:right; align-items:flex-end; background: var(--color-teal-700); }
.cwf-pager a.cwf-next:hover{ background: var(--color-secondary); }
.cwf-pager a.cwf-next small{ color:#fff; }
@media (max-width:560px){ .cwf-pager{ grid-template-columns:1fr; } .cwf-pager a.cwf-next{ text-align:left; align-items:flex-start; } }

/* ── Drawn phone: the consumer portal (mock screen, to be swapped for a real
      screenshot before launch) ─────────────────────────────────────────── */
/* .phone-frame — verbatim from collect-design-system/css/components.css */
.cwf-phone{
  width:360px; max-width:100%;
  background: var(--color-bg-dark);
  border-radius:36px;
  padding:10px;
  box-shadow: var(--shadow-lg);
  display:inline-flex; flex-direction:column;
}
.cwf-phone-screen{
  flex:1;
  background: var(--color-bg-alt);
  border-radius:26px;
  overflow:hidden;
  display:flex; flex-direction:column;
  min-height:580px;
}
.cwf-phone-status{
  height:22px;
  background: var(--color-bg-dark);
  color:#C8D1E6;
  font-family: var(--font-mono); font-size:11px;
  display:flex; align-items:center; justify-content:space-between;
  padding:0 14px;
}
/* the portal screen inside the frame */
.cwf-phone-screen{ font-family: var(--font-body); font-size: var(--fs-14); line-height: var(--leading-snug); color: var(--color-heading); }
.cwf-ps-head{ background: var(--color-teal-700); color:#fff; padding: var(--space-4) var(--space-5) var(--space-16); }
.cwf-ps-brand{ display:flex; justify-content:space-between; align-items:center; gap: var(--space-2); margin-bottom: var(--space-4); font-size: var(--fs-12); }
.cwf-ps-brand b{ font-size: var(--fs-14); }
.cwf-ps-brand span{ border:1px solid var(--color-teal-100); border-radius: var(--radius-pill); padding:2px var(--space-2); white-space:nowrap; }
.cwf-ps-hi{ font-family: var(--font-heading); font-size: var(--fs-18); font-weight: var(--weight-semibold); }
.cwf-ps-acct{ font-size: var(--fs-12); color: var(--color-teal-50); }
.cwf-ps-balance{ margin: calc(-1 * var(--space-12)) var(--space-4) 0; background: var(--color-bg); border-radius: var(--radius-lg); padding: var(--space-4); box-shadow: var(--shadow-md); position:relative; }
.cwf-ps-balance small{ color: var(--color-muted); font-size: var(--fs-12); }
.cwf-ps-amt{ font-family: var(--font-heading); font-size: var(--fs-30); font-weight: var(--weight-bold); line-height: var(--leading-tight); }
.cwf-ps-offer{ margin-top: var(--space-2); background: var(--color-money-50); color:#5E7416; border-radius: var(--radius-md); padding: var(--space-1) var(--space-2); font-size: var(--fs-12); font-weight: var(--weight-semibold); } /* .alert-success colours */
.cwf-ps-pay{ margin-top: var(--space-3); border-radius: var(--radius-md); padding: var(--space-3); background: var(--color-teal-700); color:#fff; font-weight: var(--weight-semibold); text-align:center; }
.cwf-ps-wallets{ display:flex; gap: var(--space-2); margin-top: var(--space-2); }
.cwf-ps-wallets span{ flex:1; text-align:center; border-radius: var(--radius-md); padding: var(--space-1) 0; font-size: var(--fs-12); font-weight: var(--weight-semibold); background: var(--color-ink); color:#fff; border:1px solid var(--color-ink); }
.cwf-ps-wallets span + span{ background: var(--color-bg); color: var(--color-ink); border-color: var(--color-border-strong); }
.cwf-ps-actions{ display:grid; grid-template-columns:repeat(3, 1fr); gap: var(--space-2); padding: var(--space-4) var(--space-4) var(--space-1); }
.cwf-ps-actions div{ background: var(--color-bg); border-radius: var(--radius-md); padding: var(--space-3) var(--space-1) var(--space-2); text-align:center; font-size: var(--fs-12); font-weight: var(--weight-medium); line-height: var(--leading-tight); box-shadow: var(--shadow-xs); }
.cwf-ps-actions svg{ width:20px; height:20px; display:block; margin:0 auto var(--space-1); color: var(--color-teal-700); }
.cwf-ps-recent{ margin: var(--space-3) var(--space-4) 0; background: var(--color-bg); border-radius: var(--radius-md); padding: var(--space-1) var(--space-3); box-shadow: var(--shadow-xs); }
.cwf-ps-recent div{ display:flex; justify-content:space-between; padding: var(--space-2) 0; font-size: var(--fs-12); border-bottom:1px solid var(--color-border); }
.cwf-ps-recent div:last-child{ border-bottom:0; }
.cwf-ps-recent em{ font-style:normal; color:#5E7416; font-weight: var(--weight-semibold); }
.cwf-ps-foot{ text-align:center; font-size: var(--fs-12); color: var(--color-muted); padding: var(--space-3) 0 var(--space-4); margin-top:auto; }
