/* Case study page — built on the blog post shell (css/blog.css), with the
   blocks this format needs on top: a proof bar, two diagrams, data figures,
   a results panel, a video testimonial and a closing CTA.

   Colours come from the site tokens, not from the brief's #11214F / #F78025:
   this page sits inside the same site as everything else, and obsidian/orange
   is what the rest of it is built on. */

/* ---- Breadcrumbs ----
   The page opens on the title, with no lead image, so the trail sits on the
   off-white band above it in obsidian rather than over a photo in white. */
.case-crumbs {
  position: static;
  padding: 24px 80px 0;
  background: var(--off-white);
  color: var(--muted);
}

.case-crumbs a { color: var(--muted); }
.case-crumbs b { color: var(--obsidian); }

/* ---- Proof bar, directly under the article header ---- */
.case-proof {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--obsidian);
  box-shadow: inset 0 -2px 0 var(--obsidian);
}

.case-proof__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 48px 24px;
  box-shadow: inset -1px 0 0 var(--muted);
}

.case-proof__cell:last-child { box-shadow: none; }

.case-proof__cell b {
  font-size: 56px;
  font-weight: 500;
  line-height: 1.05;
  color: var(--orange);
  transform: translateY(var(--figma-baseline-shift));
}

.case-proof__cell span {
  font-family: var(--font-inter);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--white);
  text-align: center;
  transform: translateY(var(--figma-baseline-shift-inter));
}

/* ---- Callout ---- */
.case-callout {
  padding: 24px 0 24px 24px;
  border-left: 4px solid var(--orange);
  background: var(--off-white);
}

.case-callout p { margin: 0; }
.case-callout p + p { margin-top: 12px; }

/* ---- Diagram 1: the six layers, top to bottom ---- */
.case-arch { display: flex; flex-direction: column; position: relative; }

.case-arch__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.case-arch__row--one > * { grid-column: 1 / -1; }
.case-arch__row--mid > * { grid-column: 2; }

.case-arch__box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 24px;
  background: var(--obsidian);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--off-white);
  transform: translateY(var(--figma-baseline-shift));
}

.case-arch__box em {
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  font-family: var(--font-inter);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-on-dark);
}

/* A straight drop between two single boxes. */
.case-arch__link { position: relative; height: 32px; }
.case-arch__link::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  background: var(--orange);
}

/* The fan: one line down to a rail, then three drops onto the row below.
   16.67% / 50% / 83.33% are the centres of a three-column grid. */
.case-arch__fan { position: relative; height: 44px; }
.case-arch__fan i { position: absolute; background: var(--orange); }
.case-arch__fan i:nth-child(1) { top: 0; left: 50%; width: 2px; height: 22px; }
.case-arch__fan i:nth-child(2) { top: 22px; left: 16.67%; right: 16.67%; height: 2px; }
.case-arch__fan i:nth-child(3) { top: 22px; left: 16.67%; width: 2px; height: 22px; }
.case-arch__fan i:nth-child(4) { top: 22px; left: 50%; width: 2px; height: 22px; }
.case-arch__fan i:nth-child(5) { top: 22px; left: 83.33%; width: 2px; height: 22px; }

/* Mirror of the fan, three drops converging back to one. */
.case-arch__fan--up i:nth-child(1) { top: 22px; height: 22px; }
.case-arch__fan--up i:nth-child(3),
.case-arch__fan--up i:nth-child(4),
.case-arch__fan--up i:nth-child(5) { top: 0; height: 22px; }

.bp-body p.case-arch__note {
  margin: 24px 0 0;
  padding-left: 24px;
  border-left: 2px solid var(--orange);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--muted);
  max-width: 620px;
  transform: translateY(var(--figma-baseline-shift));
}

/* ---- Diagram 2: the enrichment cascade, with the volume funnel beside it ---- */
.case-steps { display: grid; grid-template-columns: 1fr 360px; gap: 48px; align-items: start; }

.case-steps ol { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; }

/* blog.css numbers every ol item with a generated ::before. Here the number is
   real markup, and the extra pseudo-element would land as a third grid item
   and push the text into a 48px column. */
.case-steps li::before { content: none; display: none; }

.case-steps li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  padding: 16px 0;
  box-shadow: inset 0 -1px 0 var(--muted);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--obsidian);
  transform: translateY(var(--figma-baseline-shift));
}

.case-steps li:last-child { box-shadow: none; }
.case-steps li b { font-weight: 700; color: var(--orange); }

.case-funnel { display: flex; flex-direction: column; background: var(--obsidian); }

.case-funnel__stat { padding: 24px; text-align: center; }

.case-funnel__stat b {
  display: block;
  font-size: 40px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--orange);
  transform: translateY(var(--figma-baseline-shift));
}

.case-funnel__stat span {
  display: block;
  margin-top: 6px;
  font-family: var(--font-inter);
  font-size: 12px;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--white);
  transform: translateY(var(--figma-baseline-shift-inter));
}

/* The taper itself: a trapezoid narrowing from the top stat to the bottom one,
   drawn with a clip-path so it needs no asset. */
.case-funnel__taper {
  height: 96px;
  background: linear-gradient(to bottom, var(--sky-blue), var(--orange));
  clip-path: polygon(0 0, 100% 0, 74% 100%, 26% 100%);
}

.bp-body p.case-funnel__note {
  margin: 0;
  padding: 16px 24px 24px;
  font-family: var(--font-inter);
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted-on-dark);
  text-align: center;
  transform: translateY(var(--figma-baseline-shift-inter));
}

/* ---- Data figures, in place of tool screenshots ---- */
.case-figure { display: flex; flex-direction: column; gap: 12px; }

.case-panel { background: var(--white); box-shadow: inset 0 0 0 2px var(--obsidian); }

.case-panel__head {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 20px 24px;
  box-shadow: inset 0 -2px 0 var(--obsidian);
  font-family: var(--font-inter);
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

.case-panel__head b { font-size: 20px; font-weight: 700; color: var(--obsidian); }

.case-panel__body { display: flex; flex-wrap: wrap; gap: 12px; padding: 24px; }

.case-chip {
  padding: 8px 16px;
  border-radius: 100px;
  box-shadow: inset 0 0 0 1px var(--obsidian);
  font-family: var(--font-inter);
  font-size: 13px;
  line-height: 1.4;
  color: var(--obsidian);
  white-space: nowrap;
}

.case-panel__rows { display: flex; flex-direction: column; }

.case-panel__row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 16px 24px;
  box-shadow: inset 0 -1px 0 var(--muted);
  font-size: 18px;
  line-height: 1.5;
  color: var(--obsidian);
  transform: translateY(var(--figma-baseline-shift));
}

.case-panel__row:last-child { box-shadow: none; }

.case-panel__row b {
  font-family: var(--font-inter);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--orange);
}

.case-figure figcaption {
  font-family: var(--font-inter);
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  transform: translateY(var(--figma-baseline-shift-inter));
}

/* ---- Results ---- */
.case-results { display: grid; grid-template-columns: repeat(3, 1fr); box-shadow: inset 0 0 0 2px var(--obsidian); }

.case-results div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 32px;
  box-shadow: inset -2px 0 0 var(--obsidian);
}

.case-results div:last-child { box-shadow: none; }

.case-results b {
  font-size: 45px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--orange);
  transform: translateY(var(--figma-baseline-shift));
}

.case-results span {
  font-size: 18px;
  line-height: 1.5;
  color: var(--obsidian);
  transform: translateY(var(--figma-baseline-shift));
}

/* ---- Video testimonial ---- */
.case-video { display: grid; grid-template-columns: 1fr 360px; gap: 0; box-shadow: inset 0 0 0 2px var(--obsidian); }

.case-video__still { position: relative; display: block; }
.case-video__still img { width: 100%; height: 100%; object-fit: cover; display: block; }

.case-video__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 100px;
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--obsidian);
}

.case-video__play img { width: 24px; height: 24px; }

.case-video__who {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 32px;
  background: var(--sky-blue);
  box-shadow: inset 2px 0 0 var(--obsidian);
}

.case-video__who img { width: 56px; height: 56px; border-radius: 100px; object-fit: cover; }

.case-video__who b {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--obsidian);
  transform: translateY(var(--figma-baseline-shift));
}

.case-video__who span {
  font-family: var(--font-inter);
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
  transform: translateY(var(--figma-baseline-shift-inter));
}

/* ---- Closing CTA ---- */
.case-cta {
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 80px;
  background: var(--lime);
  box-shadow: inset 0 -2px 0 var(--obsidian);
}

.case-cta img { flex: 0 0 160px; width: 160px; height: 160px; border-radius: 1000px; object-fit: cover; box-shadow: inset 0 0 0 2px var(--obsidian); }

.case-cta__copy { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }

.case-cta__copy h2 {
  margin: 0;
  font-size: 45px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--obsidian);
  transform: translateY(var(--figma-baseline-shift));
}

.case-cta__copy p {
  max-width: 720px;
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--muted);
  transform: translateY(var(--figma-baseline-shift));
}

.case-cta .btn { margin-top: 8px; padding: 14px 28px; font-family: var(--font-inter); }
.case-cta .btn > span { transform: translateY(var(--figma-baseline-shift-inter)); }
