/* ============================================================
   Case study pages (body.cs-page)
   Builds on style.css + home-why.css. Scoped to .cs-page.
   ============================================================ */

.cs-page { --cs-sky: #7dd3fc; }

/* Responsive line breaks: -d = desktop only, -m = mobile only */
.cs-page .cs-br-m { display: none; }
@media (max-width: 640px) {
  .cs-page .cs-br-d { display: none; }
  .cs-page .cs-br-m { display: inline; }
}

/* Balanced headings, no one-word last lines */
.cs-page h1,
.cs-page h2,
.cs-page h3,
.cs-page .cs-oneliner,
.cs-page .cs-stat-lbl,
.cs-page .cs-client,
.cs-page .cta-section p { text-wrap: balance; }
.cs-page p,
.cs-page li,
.cs-page blockquote { text-wrap: pretty; }

.cs-page .section-label { font-size: 0.8125rem; letter-spacing: 0.12em; }

/* --- Hero ------------------------------------------------- */
.cs-page .cs-hero { min-height: auto; }
.cs-page .cs-hero .hero-inner { padding: 9rem 0 7.5rem; }
.cs-hero-inner { max-width: 46rem; margin: 0 auto; text-align: center; }
.cs-eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 1.15rem;
}
.cs-title {
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
  font-weight: 700;
  color: white;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}
.cs-title em { font-style: normal; color: var(--cs-sky); white-space: nowrap; }
.cs-oneliner {
  color: rgba(255,255,255,0.82);
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.2rem);
  line-height: 1.6;
  max-width: 36rem;
  margin: 0 auto 2rem;
}
.cs-page .cs-ctas { margin-bottom: 0; }

/* --- Stat tiles (overlap the hero) ------------------------- */
.cs-stats-wrap { position: relative; z-index: 2; margin-top: -4.5rem; padding-bottom: 3.5rem; background: transparent; }
.cs-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  max-width: 64rem;
  margin: 0 auto;
}
.cs-stat {
  background: white;
  border: 1px solid var(--g200);
  border-top: 4px solid var(--secondary);
  border-radius: 0.9rem;
  padding: 1.75rem 1.5rem 1.6rem;
  text-align: center;
  box-shadow: 0 14px 40px rgba(15, 31, 61, 0.12);
}
.cs-stat-num {
  font-size: clamp(2.6rem, 4.6vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--primary);
  margin-bottom: 0.6rem;
}
.cs-stat-lbl {
  font-size: 1rem;
  font-weight: 500;
  color: var(--g600);
  line-height: 1.4;
}
.cs-client {
  max-width: 44rem;
  margin: 1.75rem auto 0;
  text-align: center;
  font-size: 0.95rem;
  color: var(--g500);
  line-height: 1.6;
}

/* --- Sections --------------------------------------------- */
.cs-page .cs-section .section-head { margin-bottom: 2.5rem; }
.cs-page .section-head h2 { max-width: 40rem; }

/* --- Before / After --------------------------------------- */
.cs-ba {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 1.25rem;
  align-items: stretch;
  max-width: 64rem;
  margin: 0 auto;
}
.cs-ba-card {
  background: white;
  border: 1px solid var(--g200);
  border-radius: 0.9rem;
  padding: 1.6rem 1.6rem 1.4rem;
}
.cs-ba-after {
  border-color: rgba(14, 165, 233, 0.45);
  box-shadow: 0 8px 32px rgba(14, 165, 233, 0.1);
}
.cs-ba-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
}
.cs-ba-before .cs-ba-tag { background: var(--g100); color: var(--g600); }
.cs-ba-after .cs-ba-tag { background: rgba(14, 165, 233, 0.12); color: #0369a1; }
.cs-ba-list { list-style: none; display: flex; flex-direction: column; gap: 0.8rem; }
.cs-ba-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--g700);
}
.cs-ba-list .cs-ico { width: 1.15rem; height: 1.15rem; flex-shrink: 0; margin-top: 0.2rem; }
.cs-ba-before .cs-ico { color: #dc6b6b; }
.cs-ba-after .cs-ico { color: var(--secondary); }
.cs-ba-arrow {
  align-self: center;
  width: 2.75rem; height: 2.75rem;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex; align-items: center; justify-content: center;
}
.cs-ba-arrow svg { width: 1.25rem; height: 1.25rem; }

/* --- Riley chips ------------------------------------------ */
.cs-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  max-width: 60rem;
  margin: 0 auto;
}
.cs-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.1rem 0.7rem 0.8rem;
  border: 1px solid var(--g200);
  border-radius: 9999px;
  background: var(--g50);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.3;
}
.cs-chip em { font-style: normal; font-weight: 500; color: var(--g500); }
.cs-chip .cs-ico {
  width: 2rem; height: 2rem;
  padding: 0.42rem;
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.12);
  color: #0284c7;
  flex-shrink: 0;
}

/* Call flow graphic */
.cs-flow {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  max-width: 60rem;
  margin: 3rem auto 0;
  position: relative;
}
.cs-flow::before {
  content: "";
  position: absolute;
  top: 1.6rem;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: linear-gradient(90deg, var(--secondary), var(--g200));
}
.cs-flow li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  text-align: center;
  position: relative;
  min-width: 0;
}
.cs-flow-ico {
  width: 3.2rem; height: 3.2rem;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 6px white;
}
.cs-flow-ico .cs-ico { width: 1.35rem; height: 1.35rem; }
.cs-flow-txt {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--g700);
  line-height: 1.35;
  max-width: 12rem;
  text-wrap: balance;
}

.cs-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin: 2.5rem auto 0;
  font-size: 0.95rem;
  color: var(--g600);
  text-align: center;
}
.cs-trust .cs-ico { width: 1.15rem; height: 1.15rem; color: var(--secondary); flex-shrink: 0; }

/* --- Quote ------------------------------------------------ */
.cs-quote { padding: 5rem 0; }
.cs-quote .founder-quote-inner { max-width: 46rem; }
.cs-quote-title {
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
  color: white;
  margin: 0 0 1.75rem;
}
.cs-quote blockquote {
  font-size: clamp(1.08rem, 2vw, 1.3rem);
  font-weight: 400;
  color: rgba(255,255,255,0.9);
  line-height: 1.65;
}

/* --- What's next ------------------------------------------ */
.cs-next { padding: 3rem 0 0; background: white; }
.cs-next-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  max-width: 52rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--secondary);
  border-radius: 0 0.75rem 0.75rem 0;
  background: rgba(14, 165, 233, 0.06);
}
.cs-next-tag {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0369a1;
}
.cs-next-card p { margin: 0; font-size: 1.02rem; line-height: 1.6; color: var(--g700); }
.cs-next-card strong { color: var(--primary); }

/* --- Why it worked ---------------------------------------- */
.cs-page .cs-drp { border-top: 0; margin-top: 3rem; }
.cs-page .cs-drp .gc-head { margin-bottom: 2.5rem; }
.cs-page .gc-ring { font-size: 0.9375rem; }
.cs-page .gc-step p { font-size: 1rem; line-height: 1.6; }
.cs-trades {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  max-width: 52rem;
  margin: 2.5rem auto 0;
  padding: 1.35rem 1.5rem;
  background: white;
  border: 1px solid var(--g200);
  border-radius: 0.85rem;
}
.cs-trades-ico {
  width: 2.75rem; height: 2.75rem;
  border-radius: 0.6rem;
  background: rgba(14, 165, 233, 0.12);
  color: #0284c7;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cs-trades-ico .cs-ico { width: 1.4rem; height: 1.4rem; }
.cs-trades strong { display: block; color: var(--primary); font-size: 1.05rem; margin-bottom: 0.3rem; }
.cs-trades p { margin: 0; color: var(--g600); font-size: 1rem; line-height: 1.6; }

/* --- Final CTA -------------------------------------------- */
.cs-page .cta-why h2 { max-width: 36rem; }

/* Footer readability (matches homepage pass) */
.cs-page .footer-brand-tag { font-size: 0.75rem; letter-spacing: 0.1em; }
.cs-page .footer-brand-sub { font-size: 0.875rem; }
.cs-page .footer-col h4 { font-size: 0.75rem; letter-spacing: 0.1em; line-height: 1.4; }
.cs-page .footer-bottom { font-size: 0.8125rem; }
.cs-page .footer-disclaimer { font-size: 0.8125rem; line-height: 1.6; max-width: 70ch; }

/* --- Responsive ------------------------------------------- */
@media (max-width: 900px) {
  .cs-ba { grid-template-columns: 1fr; }
  .cs-ba-arrow { transform: rotate(90deg); justify-self: center; }
  .cs-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.75rem; }
  .cs-flow::before { display: none; }
}

@media (max-width: 768px) {
  .cs-page .cs-hero .hero-inner { padding: 3.5rem 0 6.5rem; }
  .cs-stats { grid-template-columns: 1fr; gap: 0.75rem; max-width: 26rem; }
  .cs-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
    padding: 1.1rem 1.25rem;
    border-top-width: 1px;
    border-left: 4px solid var(--secondary);
  }
  .cs-stat-num { font-size: 2.35rem; margin: 0; min-width: 6.6rem; }
  .cs-stat-lbl { font-size: 0.98rem; }
  .cs-stats-wrap { padding-bottom: 2.5rem; }
  .cs-client { font-size: 0.9rem; margin-top: 1.25rem; }
  .cs-page .section { padding: 3.25rem 0; }
  .cs-page .cs-section .section-head { margin-bottom: 1.75rem; }
  .cs-ba-card { padding: 1.3rem 1.25rem 1.15rem; }
  .cs-chips { gap: 0.55rem; }
  .cs-chip { font-size: 0.92rem; padding: 0.55rem 0.9rem 0.55rem 0.6rem; }
  .cs-chip .cs-ico { width: 1.8rem; height: 1.8rem; padding: 0.38rem; }
  .cs-flow { margin-top: 2.25rem; }
  .cs-quote { padding: 3.5rem 0; }
  .cs-next { padding-top: 2.25rem; }
  .cs-next-card { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .cs-page .cs-drp { margin-top: 2.25rem; padding: 3.25rem 0; }
  .cs-page .gc-steps { gap: 0.85rem; }
  .cs-page .gc-step { padding: 1.25rem 1.25rem 1.2rem; }
  .cs-page .gc-ring { width: 2.1rem; height: 2.1rem; margin-bottom: 0.6rem; }
  .cs-trades { padding: 1.15rem 1.2rem; margin-top: 1.75rem; }
  .cs-page .cta-why { padding: 3.5rem 0; }
}

@media (max-width: 480px) {
  .cs-title { font-size: 2.05rem; }
  .cs-page .cs-ctas { flex-direction: column; align-items: center; }
  .cs-page .cs-ctas .btn { width: 100%; max-width: 20rem; }
  .cs-page .cta-btns { flex-direction: column; align-items: center; gap: 0.75rem; }
  .cs-page .cta-btns .btn { width: 100%; max-width: 20rem; }
  .cs-trust { align-items: flex-start; text-align: left; max-width: 22rem; }
  .cs-trust .cs-ico { margin-top: 0.15rem; }
}

/* Wrap fixes */
.cs-nowrap { white-space: nowrap; }
.cs-line { display: block; text-wrap: balance; }
.cs-page .cs-trades strong { text-wrap: wrap; }
@media (max-width: 640px) {
  .cs-chip em { display: block; font-size: 0.85rem; }
  .cs-chip { border-radius: 1.4rem; }
}

/* ============================================================
   NEMG rebuild (2026-10-22): 4-up results strip, callback rule,
   time-back cards
   ============================================================ */
.cs-stats.cs-stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 72rem; gap: 1rem; }
.cs-stats-4 .cs-stat { padding: 1.6rem 1.15rem 1.45rem; }
.cs-stats-4 .cs-stat-num { font-size: clamp(2.3rem, 3.6vw, 3rem); white-space: nowrap; }
.cs-stats-4 .cs-stat-lbl { font-size: 0.98rem; }
.cs-to {
  font-size: 0.45em;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--g500);
  margin: 0 0.28em;
  vertical-align: 0.35em;
}

.cs-callback {
  max-width: 52rem;
  margin: 3rem auto 0;
  padding: 1.75rem 1.75rem 1.5rem;
  background: var(--primary);
  border-radius: 0.9rem;
  color: white;
  text-align: center;
}
.cs-callback-title {
  font-size: clamp(1.3rem, 2.6vw, 1.65rem);
  line-height: 1.25;
  color: white;
  margin: 0 0 1.25rem;
}
.cs-callback-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  text-align: left;
}
.cs-callback-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(125, 211, 252, 0.35);
  border-radius: 0.7rem;
  font-weight: 600;
  line-height: 1.4;
  text-wrap: balance;
}
.cs-callback-num {
  flex-shrink: 0;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: var(--secondary);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
}
.cs-callback-note {
  margin: 1.15rem auto 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  line-height: 1.55;
  text-wrap: balance;
}

.cs-lead {
  margin: 0.85rem auto 0;
  max-width: 34rem;
  color: var(--g600);
  font-size: 1.05rem;
  line-height: 1.6;
  text-wrap: balance;
}
.cs-gains {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
  max-width: 64rem;
  margin: 0 auto;
}
.cs-gain {
  background: white;
  border: 1px solid var(--g200);
  border-top: 4px solid var(--secondary);
  border-radius: 0.9rem;
  padding: 1.4rem 1.4rem 1.3rem;
}
.cs-gain h3 { font-size: 1.1rem; color: var(--primary); margin: 0 0 0.45rem; }
.cs-gain p { margin: 0; color: var(--g600); font-size: 1rem; line-height: 1.6; }

@media (max-width: 1100px) {
  .cs-stats.cs-stats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 44rem; }
}
@media (max-width: 900px) {
  .cs-gains { grid-template-columns: 1fr; max-width: 34rem; }
}
@media (max-width: 768px) {
  .cs-stats.cs-stats-4 { grid-template-columns: 1fr; max-width: 26rem; gap: 0.75rem; }
  .cs-stats-4 .cs-stat { padding: 1.1rem 1.25rem; }
  .cs-stats-4 .cs-stat-num { font-size: 2rem; min-width: 8rem; flex-shrink: 0; }
  .cs-stats-4 .cs-stat-lbl { text-align: left; }
  .cs-callback { margin-top: 2.25rem; padding: 1.4rem 1.15rem 1.25rem; }
  .cs-callback-grid { grid-template-columns: 1fr; }
  .cs-gain { padding: 1.2rem 1.2rem 1.1rem; }
}

/* Call list asterisk + footnote (2026-10-22) */
.cs-ast { color: var(--secondary); font-weight: 700; margin-left: 0.1em; }
.cs-footnote {
  max-width: 40rem;
  margin: 1.1rem auto 0;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--g500);
  text-wrap: balance;
}
.cs-footnote .cs-ast { margin: 0 0.15em 0 0; }
.cs-page .cs-footnote { text-wrap: balance; }

/* v6: trades bridge sits under the stat row */
.cs-trades--top { margin: 1.75rem auto 0; background: var(--g50); }
