/* ═══════════════════════════════════════════════════════════════════════
   /case-studies — story-forward. Numbered build-story rows (need / on Zenrows
   / result + pull-quote), a five-question anatomy, a closer. Editorial hairline
   rows (never card fill), left-anchored, brand near-zero. Distinct from
   /customers (which is a quote wall).
   ═══════════════════════════════════════════════════════════════════════ */
@import "../_ds/fonts.css";
@import "../_ds/theme.css";
@import "../_shared/chrome.css";
@import "../_shared/components.css";
@import "../_shared/audience-switcher.css";

.cx-main { background: var(--background); }
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 620ms cubic-bezier(0.22,1,0.36,1), transform 620ms cubic-bezier(0.22,1,0.36,1); }
[data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } }

/* ── ACT 1 — hero ──────────────────────────────────────────── */
.cx-hero {
  max-width: 1120px; margin-inline: auto;
  padding: clamp(120px, 15vh, 180px) clamp(20px, 5vw, 72px) clamp(48px, 7vh, 88px);
}
.cx-hero-h1 {
  font-family: var(--font-display); font-weight: 500;
  font-size: var(--mkt-hero-xl); line-height: 0.97; letter-spacing: -0.03em;
  color: var(--text-primary); margin: 0;
}
.cx-hero-sub {
  font-family: var(--font-base); font-size: var(--mkt-body);
  line-height: 1.5; color: var(--text-secondary); margin: 24px 0 0; max-width: 56ch;
}
.cx-hero-proof {
  font-family: var(--font-code); font-size: 13px; letter-spacing: 0.02em;
  color: var(--text-tertiary); margin: 16px 0 0;
}
.cx-hero-cta { margin-top: clamp(26px, 4vh, 40px); }
.cx-hero-cta .link-cta { align-self: center; padding-top: 4px; }

/* ── ACT 2 — build stories ─────────────────────────────────── */
.cx-stories {
  max-width: 1120px; margin-inline: auto;
  padding: clamp(56px, 9vh, 110px) clamp(20px, 5vw, 72px);
}
.cx-stories-head { max-width: 640px; margin-bottom: clamp(28px, 4vh, 40px); }
.cx-stories-h2 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(34px, 4.6vw, 72px); line-height: 1.0; letter-spacing: -0.03em;
  color: var(--text-primary); margin: 0;
}
.cx-stories-lead {
  font-family: var(--font-base); font-size: var(--mkt-body);
  line-height: 1.5; color: var(--text-secondary); margin: 16px 0 0; max-width: 56ch;
}
.cx-filter { flex-wrap: wrap; margin-bottom: clamp(8px, 2vh, 16px); }

.cx-story {
  display: grid; grid-template-columns: minmax(200px, 0.85fr) 1.5fr;
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(36px, 5vh, 56px) 0;
  border-top: 1px solid var(--border-subtle);
}
.cx-story.is-hidden { display: none; }
.cx-story-team { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.cx-story-n {
  font-family: var(--font-display); font-weight: 500; font-size: var(--mkt-h3);
  line-height: 0.9; letter-spacing: -0.03em; color: var(--text-quaternary); font-variant-numeric: tabular-nums;
}
.cx-story-who {
  font-family: var(--font-display); font-weight: 500; font-size: clamp(19px, 1.8vw, 24px);
  line-height: 1.15; letter-spacing: -0.02em; color: var(--text-primary);
}
.cx-story-tag {
  font-family: var(--font-code); font-size: 10.5px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-tertiary);
  border: 1px solid var(--border-subtle); border-radius: 999px; padding: 4px 10px;
}
.cx-story-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cx-beat {
  font-family: var(--font-base); font-size: var(--mkt-body);
  line-height: 1.55; color: var(--text-secondary); margin: 0;
}
.cx-beat-k {
  display: inline-block; min-width: 92px; margin-right: 6px;
  font-family: var(--font-code); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-quaternary); vertical-align: baseline;
}
.cx-quote {
  margin: 6px 0 0; font-family: var(--font-display); font-weight: 500;
  font-size: var(--mkt-h4); line-height: 1.25; letter-spacing: -0.02em;
  color: var(--text-primary);
}
.cx-empty { font-family: var(--font-base); font-size: 15px; color: var(--text-tertiary); margin: 24px 0 0; }

/* ── ACT 3 — anatomy ───────────────────────────────────────── */
.cx-anatomy {
  max-width: 1120px; margin-inline: auto;
  padding: clamp(56px, 9vh, 110px) clamp(20px, 5vw, 72px);
}
.cx-anatomy-h2 {
  font-family: var(--font-display); font-weight: 500;
  font-size: var(--mkt-h2); line-height: 1.02; letter-spacing: -0.028em;
  color: var(--text-primary); margin: 0 0 clamp(32px, 5vh, 52px); max-width: 18ch;
}
.cx-anatomy-list { list-style: none; margin: 0; padding: 0; }
.cx-step {
  display: grid; grid-template-columns: 56px minmax(0, 220px) 1fr; align-items: baseline; gap: clamp(16px, 2vw, 40px);
  padding: 22px 0; border-top: 1px solid var(--border-subtle);
}
.cx-step-n { font-family: var(--font-code); font-size: 13px; color: var(--text-quaternary); font-variant-numeric: tabular-nums; }
.cx-step-t { font-family: var(--font-display); font-weight: 500; font-size: clamp(18px, 1.7vw, 23px); letter-spacing: -0.02em; color: var(--text-primary); }
.cx-step-d { font-family: var(--font-base); font-size: 15px; line-height: 1.5; color: var(--text-secondary); }

/* ── ACT 4 — closer ────────────────────────────────────────── */
.cx-closer { padding: clamp(88px, 14vh, 190px) clamp(20px, 5vw, 72px); text-align: center; }
.cx-closer-h2 {
  font-family: var(--font-display); font-weight: 500;
  font-size: var(--mkt-hero); line-height: 0.99; letter-spacing: -0.03em;
  color: var(--text-primary); margin: 0; max-width: 20ch; margin-inline: auto;
}
.cx-closer-lead {
  font-family: var(--font-base); font-size: var(--mkt-body);
  line-height: 1.5; color: var(--text-secondary); margin: 18px auto 0; max-width: 48ch;
}
.cx-closer-cta { margin-top: clamp(28px, 4vh, 44px); }

/* ── wide ──────────────────────────────────────────────────── */
@media (min-width: 1600px) { .cx-hero, .cx-stories, .cx-anatomy { max-width: 1280px; }  }

/* ── responsive ────────────────────────────────────────────── */
@media (max-width: 820px) {
  .cx-story { grid-template-columns: 1fr; gap: 18px; }
  .cx-story-team { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 12px; }
  .cx-story-n { font-size: 28px; }
  .cx-step { grid-template-columns: 40px 1fr; }
  .cx-step-d { grid-column: 2; }
}
@media (max-width: 600px) {
  .cx-hero-cta .link-cta { align-self: flex-start; padding-top: 0; }
  .cx-beat-k { display: block; min-width: 0; margin: 0 0 2px; }
  .cx-filter { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .cx-filter::-webkit-scrollbar { display: none; }
  .cx-filter .seg-control-opt { flex: 0 0 auto; white-space: nowrap; }
}
