/* ═══════════════════════════════════════════════════════════════
   NUDGEBEE AI-FINOPS PAGE
   Page-scoped styles. Tokens only, no new colours or type scales.
   Prefix: af-
   ═══════════════════════════════════════════════════════════════ */

/* ═══ HERO ══════════════════════════════════════════════════════ */
.af-hero { padding: 104px var(--gutter) var(--sp-2xl); background: var(--white); text-align: center; }
.af-hero-inner { max-width: 820px; margin: 0 auto; }
.af-hero-eyebrow { margin-left: auto; margin-right: auto; margin-bottom: 16px; }
.af-hero-h {
  font-family: var(--fh); font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 800; color: var(--ink); letter-spacing: -.035em; line-height: 1.08;
  margin-bottom: var(--sp-md);
}
.af-hero-h .af-hl {
  color: var(--ink); background: var(--yellow);
  padding: 0 12px 2px; border-radius: 8px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.af-hero-lead { font-size: 1.05rem; color: var(--ink-light); line-height: 1.7; max-width: 680px; margin: 0 auto; }
.af-hero-ctas { display: flex; flex-wrap: wrap; gap: var(--sp-md); justify-content: center; margin-top: var(--sp-xl); }
.af-hero-ctas .btn-outline { padding: 13px 24px; }
.af-hero-trust { margin-top: var(--sp-lg); font-size: .85rem; color: var(--muted); line-height: 1.7; }

/* ═══ DIRECT-ANSWER BAND ════════════════════════════════════════ */
.af-answer-band { padding: 0 var(--gutter) var(--sp-4xl); background: var(--white); }
.af-answer-inner {
  max-width: 820px; margin: 0 auto;
  background: var(--purple-pale); border: 1px solid var(--border-mid);
  border-left: 4px solid var(--purple); border-radius: var(--r-lg); padding: var(--sp-xl);
}
.af-answer-h { font-family: var(--fh); font-size: 1.05rem; font-weight: 700; color: var(--navy); margin-bottom: var(--sp-sm); }
.af-answer { font-size: 1.05rem; color: var(--text); line-height: 1.75; }

/* ═══ STAT BAND (dark, low overhead / BYOM) ════════════════════ */
.af-statband { background: var(--navy-deep); padding: var(--sp-3xl) var(--gutter); }
.af-statband-inner { max-width: var(--max-w); margin: 0 auto; text-align: center; }
.af-statband-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--fh); font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em; color: var(--yellow); margin-bottom: var(--sp-2xl);
}
.af-statband-eyebrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.af-statband-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.af-stat-cell { display: flex; flex-direction: column; align-items: center; padding: 6px var(--sp-lg); border-left: 1px solid rgba(255,255,255,.14); }
.af-stat-cell:first-child { border-left: none; }
.af-stat-n { font-family: var(--fh); font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; color: var(--yellow); letter-spacing: -.02em; line-height: 1.05; }
.af-stat-l { margin-top: var(--sp-md); font-size: .92rem; color: rgba(255,255,255,.82); line-height: 1.55; max-width: 280px; }
.af-stat-logos { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 7px; min-height: 34px; }
.af-stat-logos img { width: 34px; height: 34px; padding: 6px; background: #fff; border-radius: 8px; object-fit: contain; box-shadow: 0 2px 8px rgba(0,0,0,.18); }

/* ═══ SECTION SHELL ═════════════════════════════════════════════ */
.af-section { padding: var(--sp-4xl) var(--gutter); background: var(--white); }
.af-section--tinted { background: var(--off); }
.af-section-inner { max-width: var(--max-w); margin: 0 auto; }
.af-section-inner--narrow { max-width: 760px; }
.af-section-header { margin-bottom: var(--sp-2xl); }
.af-section-h { font-family: var(--fh); font-size: clamp(1.6rem, 2.8vw, 2.2rem); font-weight: 800; color: var(--ink); letter-spacing: -.03em; line-height: 1.15; }
.af-section-sub { margin-top: var(--sp-md); font-size: 1rem; color: var(--ink-light); line-height: 1.7; max-width: 700px; }

.af-lead { font-size: 1.05rem; color: var(--text); line-height: 1.75; margin-bottom: var(--sp-md); }
.af-p { font-size: .98rem; color: var(--ink-light); line-height: 1.75; margin-bottom: var(--sp-md); }
.af-note { font-size: .88rem; color: var(--muted); line-height: 1.7; margin-top: var(--sp-md); }
.af-note a, .af-check a, .af-table a { color: var(--purple); text-decoration: underline; text-underline-offset: 3px; }
.af-note a:hover, .af-check a:hover, .af-table a:hover { color: var(--navy); }
.af-section code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em;
  background: var(--purple-pale); color: var(--navy); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 1px 6px;
}

/* ═══ PROBLEM CARDS ═════════════════════════════════════════════ */
.af-prob-grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-lg); }
.af-probcard { background: var(--off); border: 1px solid var(--border); border-top: 3px solid var(--yellow); border-radius: var(--r-lg); padding: var(--sp-xl); }
.af-probcard-ico { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--white); border: 1px solid var(--border); color: var(--navy); display: flex; align-items: center; justify-content: center; margin-bottom: var(--sp-md); }
.af-probcard-ico svg { width: 22px; height: 22px; }
.af-probcard-eyebrow { display: block; font-family: var(--fh); font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 6px; }
.af-probcard-h { font-family: var(--fh); font-size: 1.1rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; margin-bottom: var(--sp-sm); }
.af-probcard-p { font-size: .93rem; color: var(--ink-light); line-height: 1.72; }

/* ═══ STAT TILES (rule counts, proof) ═══════════════════════════ */
.af-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-lg); margin-bottom: var(--sp-2xl); }
.af-stat { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-xl); }
.af-stat-num { font-family: var(--fh); font-size: 2.2rem; font-weight: 800; color: var(--navy); letter-spacing: -.03em; line-height: 1; margin-bottom: var(--sp-sm); }
.af-stat-p { font-size: .9rem; color: var(--ink-light); line-height: 1.6; }

/* ═══ TWO-PANEL ROW ═════════════════════════════════════════════ */
.af-two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-lg); }
.af-panel { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-xl); }
.af-panel-h { font-family: var(--fh); font-size: 1.1rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; margin-bottom: var(--sp-md); }

/* ═══ CHIPS ═════════════════════════════════════════════════════ */
.af-chips { list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-sm); margin-bottom: var(--sp-md); }
.af-chip { font-size: .85rem; font-weight: 600; color: var(--mid); background: var(--off); border: 1px solid var(--border-mid); border-radius: var(--r-pill); padding: 7px 15px; }

/* ═══ SEVERITY ROWS ═════════════════════════════════════════════ */
.af-sev { list-style: none; display: grid; gap: var(--sp-sm); margin-bottom: var(--sp-md); }
.af-sev-row { display: flex; align-items: center; gap: var(--sp-md); }
.af-sev-tag { font-family: var(--fh); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 4px 12px; border-radius: var(--r-pill); flex-shrink: 0; }
.af-sev-tag--high { background: var(--yellow); color: var(--navy); }
.af-sev-tag--med { background: var(--purple-pale); color: var(--navy); border: 1px solid var(--border-mid); }
.af-sev-val { font-size: .95rem; color: var(--ink-light); }

/* ═══ CARDS (algorithms, apply paths) ═══════════════════════════ */
.af-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-lg); }
.af-cards--3 { grid-template-columns: repeat(3, 1fr); }
.af-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-xl); }
.af-card-ico { width: 40px; height: 40px; border-radius: var(--r-md); background: var(--purple-pale); color: var(--purple); display: flex; align-items: center; justify-content: center; margin-bottom: var(--sp-md); }
.af-card-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; }
.af-card-h { font-family: var(--fh); font-size: 1.05rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; margin-bottom: var(--sp-sm); }
.af-card-p { font-size: .92rem; color: var(--ink-light); line-height: 1.72; }

/* ═══ FINOPS SCORE BANDS ════════════════════════════════════════ */
.af-bands { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp-sm); }
.af-band { border-radius: var(--r-md); padding: var(--sp-md) var(--sp-lg); border: 1px solid var(--border); }
.af-band-name { display: block; font-family: var(--fh); font-weight: 800; font-size: 1rem; letter-spacing: -.02em; }
.af-band-range { display: block; font-size: .78rem; margin-top: 4px; }
.af-band--act { background: var(--navy); border-color: var(--navy); }
.af-band--act .af-band-name { color: #fff; }
.af-band--act .af-band-range { color: rgba(255,255,255,.72); }
.af-band--crit { background: var(--yellow); border-color: var(--yellow); }
.af-band--crit .af-band-name { color: var(--navy); }
.af-band--crit .af-band-range { color: rgba(27,45,74,.72); }
.af-band--high { background: rgba(250,200,53,.35); }
.af-band--med { background: var(--purple-pale); }
.af-band--low { background: var(--white); }
.af-band--high .af-band-name, .af-band--med .af-band-name, .af-band--low .af-band-name { color: var(--ink); }
.af-band--high .af-band-range, .af-band--med .af-band-range, .af-band--low .af-band-range { color: var(--muted); }

/* ═══ CHECK LISTS ═══════════════════════════════════════════════ */
.af-check-list { list-style: none; display: grid; gap: var(--sp-md); }
.af-check { position: relative; padding-left: 30px; font-size: .98rem; color: var(--ink-light); line-height: 1.75; }
.af-check::before { content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 12px; border-radius: 3px; background: var(--yellow); }

/* ═══ FEATURE GRID ══════════════════════════════════════════════ */
.af-feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-lg); }
.af-feature { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-md); align-items: start; background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-lg); }
.af-feature-ico { width: 38px; height: 38px; border-radius: var(--r-md); background: var(--purple-pale); color: var(--purple); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.af-feature-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.af-feature-h { font-family: var(--fh); font-size: .98rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; margin-bottom: 4px; }
.af-feature-p { font-size: .9rem; color: var(--ink-light); line-height: 1.65; }

/* ═══ SPLIT: MEDIA + TEXT (60/40), alternating ═════════════════ */
.af-split { display: grid; grid-template-columns: 2fr 3fr; gap: var(--sp-3xl); align-items: center; }
.af-split--reverse { grid-template-columns: 3fr 2fr; }
.af-split--reverse .af-split-media { order: 1; }
.af-split--reverse .af-split-text  { order: 2; }
.af-split-media { margin: 0; min-width: 0; }
.af-split-text  { min-width: 0; }
.af-split-text .af-section-h { margin-bottom: var(--sp-sm); }
.af-split-text .af-section-sub { margin-top: 0; margin-bottom: var(--sp-lg); }
.af-split-text .af-bands { grid-template-columns: 1fr; margin-bottom: var(--sp-lg); }
.af-split-text .af-check-list { margin-bottom: var(--sp-lg); }
.af-split-text .af-lead { margin-bottom: var(--sp-md); }

/* Stepper (algorithms, apply paths) inside a split text column */
.af-stepper { list-style: none; display: grid; gap: var(--sp-lg); }
.af-stepper > li { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-md); align-items: start; }
.af-step-num { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--r-sm); background: var(--navy); color: var(--yellow); font-family: var(--fh); font-size: .9rem; font-weight: 800; flex-shrink: 0; }
.af-step-h { font-family: var(--fh); font-size: 1.05rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; margin-bottom: 4px; }
.af-step-p { font-size: .92rem; color: var(--ink-light); line-height: 1.7; }

/* ═══ FIGURE ════════════════════════════════════════════════════ */
.af-figure { margin: var(--sp-2xl) auto 0; max-width: 960px; }
.af-figure-img {
  width: 100%; height: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 8px 40px rgba(27, 45, 74, .10);
}
.af-figure-ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-sm); text-align: center; min-height: 220px; padding: var(--sp-xl); background: var(--off); border: 2px dashed var(--border-mid); border-radius: var(--r-lg); }
.af-section--tinted .af-figure-ph { background: var(--white); }
.af-figure-ph-label { font-family: var(--fh); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.af-figure-ph-note { font-size: .92rem; color: var(--muted); line-height: 1.7; max-width: 460px; }
.af-figure-cap { margin-top: var(--sp-sm); font-size: .82rem; color: var(--muted); line-height: 1.6; text-align: center; }

/* ═══ COMPARISON TABLE ══════════════════════════════════════════ */
.af-table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); }
.af-table-wrap:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.af-table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 620px; }
.af-table th, .af-table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--border); vertical-align: top; }
.af-table thead th { font-family: var(--fh); font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--navy); background: var(--off); white-space: nowrap; }
.af-table tbody th { font-weight: 600; color: var(--ink); width: 40%; }
.af-table td { color: var(--ink-light); }
.af-table tbody td:last-child { color: var(--ink); font-weight: 600; }
.af-table tbody tr:last-child th, .af-table tbody tr:last-child td { border-bottom: none; }

/* ═══ RELATED ASSISTANTS ════════════════════════════════════════ */
.af-related-h { font-family: var(--fh); font-size: 1.15rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; margin-bottom: var(--sp-md); }
.af-related-list { list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-md); }
.af-related-list a { font-size: .95rem; font-weight: 600; color: var(--purple); text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: 24px; padding: 4px 2px; }
.af-related-list a:hover { color: var(--navy); }

/* ═══ USE-CASE TILE (case study) ════════════════════════════════ */
.af-usecase {
  display: grid; grid-template-columns: 1fr 1fr; align-items: stretch;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-xl); overflow: hidden;
  transition: transform .22s var(--ease-out-expo), box-shadow .22s, border-color var(--dur-fast);
}
.af-usecase:hover { transform: translateY(-3px); box-shadow: 0 18px 48px rgba(27,45,74,.14); border-color: var(--border-mid); }
.af-usecase-media { position: relative; min-height: 280px; }
.af-usecase-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.af-usecase-body { padding: var(--sp-2xl); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.af-usecase-tag { font-family: var(--fh); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--purple); margin-bottom: var(--sp-md); }
.af-usecase-h { font-family: var(--fh); font-size: clamp(1.3rem, 2.2vw, 1.7rem); font-weight: 800; color: var(--ink); letter-spacing: -.02em; line-height: 1.22; margin-bottom: var(--sp-md); }
.af-usecase-p { font-size: .98rem; color: var(--ink-light); line-height: 1.7; margin-bottom: var(--sp-lg); }
.af-usecase-link { display: inline-flex; align-items: center; gap: 8px; font-family: var(--fh); font-weight: 800; font-size: .95rem; color: var(--navy); }
.af-usecase-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .22s var(--ease-out-expo); }
.af-usecase:hover .af-usecase-link { color: var(--purple); }
.af-usecase:hover .af-usecase-link svg { transform: translateX(4px); }
@media (max-width: 720px) {
  .af-usecase { grid-template-columns: 1fr; }
  .af-usecase-media { min-height: 200px; height: 200px; }
  .af-usecase-body { padding: var(--sp-lg); }
}

/* ═══ FAQ ═══════════════════════════════════════════════════════ */
.af-faq .faq-a.open { max-height: 520px; }

/* ═══ CTA HONEYCOMB ═════════════════════════════════════════════ */
.af-cta-hc { position: absolute; inset: 0; z-index: 0; opacity: 0.07; pointer-events: none; overflow: hidden; border-radius: inherit; }
#cta .cta-free-note a { text-decoration: underline; text-underline-offset: 3px; display: inline-block; min-height: 24px; padding: 4px 2px; }

/* ═══ FOCUS VISIBILITY ══════════════════════════════════════════ */
.af-section a:focus-visible, .af-hero a:focus-visible, .af-answer-band a:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; border-radius: var(--r-sm); }

/* ═══ RESPONSIVE ════════════════════════════════════════════════ */
@media (max-width: 980px) {
  .af-prob-grid { grid-template-columns: 1fr; gap: var(--sp-lg); }
  .af-stats { grid-template-columns: repeat(2, 1fr); }
  .af-split, .af-split--reverse { grid-template-columns: 1fr; gap: var(--sp-xl); }
  .af-split--reverse .af-split-media { order: 2; }
  .af-split--reverse .af-split-text  { order: 1; }
  .af-split-media { max-width: 640px; margin: 0 auto; width: 100%; }
  .af-cards, .af-cards--3 { grid-template-columns: repeat(2, 1fr); }
  .af-two { grid-template-columns: 1fr; }
  .af-bands { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .af-hero { padding: 92px var(--gutter-sm) var(--sp-xl); }
  .af-statband { padding: var(--sp-2xl) var(--gutter-sm); }
  .af-statband-grid { grid-template-columns: 1fr; }
  .af-stat-cell { border-left: none; border-top: 1px solid rgba(255,255,255,.14); padding: var(--sp-lg) 0; }
  .af-stat-cell:first-child { border-top: none; }
  .af-answer-band { padding: 0 var(--gutter-sm) var(--sp-3xl); }
  .af-answer-inner { padding: var(--sp-lg); }
  .af-section { padding: var(--sp-3xl) var(--gutter-sm); }
  .af-section-header { margin-bottom: var(--sp-xl); }
  .af-stats, .af-cards, .af-cards--3, .af-feature-grid, .af-bands { grid-template-columns: 1fr; }
  .af-card, .af-panel, .af-probcard { padding: var(--sp-lg); }
  .af-hero-ctas { gap: var(--sp-sm); }
  .af-faq .faq-a.open { max-height: 720px; }
}
