/* ====================================================================
   Case Studies (W3) -- /case-studies index + 6 detail child pages.
   Reuses .pill/.display/.h1/.h2/.lead/.btn/.btn-primary/.arrow,
   .site-cases-grid/.case-card/.case-photo/.case-title, and
   .numbers-grid/.number-cell/.number-value/.number-label unchanged
   (offers/CLAUDE.md invariant: the 5th-cell mobile-centering rule on
   .numbers-grid is untouched). Only the bits with no existing match are
   defined here.
   ==================================================================== */

.study-index,
.study-detail {
  padding-block: clamp(72px, 10vw, 144px);
}
.study-hero-head {
  max-width: 860px;
  margin-inline: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.study-hero-head .h1 { margin: 0; }
.study-intro { white-space: normal; }

.study-list-head {
  margin-top: clamp(64px, 8vw, 112px);
  margin-bottom: 40px;
  text-align: center;
}
.study-list-head .lead { margin-inline: auto; }

/* Index cards: whole card is a link, thumbnail on top of .case-photo/.case-title. */
.study-card { text-decoration: none; color: inherit; display: block; }
.study-card .case-title { margin-bottom: 0; }

/* Case-card thumbnail: shared by the /case-studies index cards (.study-card)
   and the home page site-cases section -- both grids use .site-cases-grid. */
.site-cases-grid .case-photo {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  margin-top: 0;
  margin-bottom: 20px;
}

/* ---- Detail page blocks ---- */
.study-block {
  max-width: 860px;
  margin-inline: auto;
  padding-block: 32px;
  border-top: 1px solid var(--border);
}
.study-block .display.h2 { margin-bottom: 24px; }

.study-shot {
  display: block;
  width: 100%;
  max-width: 860px;
  margin: clamp(32px, 5vw, 56px) auto;
  border-radius: var(--radius-l);
  border: 1px solid var(--border);
  box-shadow: 0 24px 64px -32px rgba(10, 10, 15, 0.18);
}
.study-platform-shot {
  max-width: 240px;
  height: auto;
  border-radius: var(--radius-m);
}

.study-stats-grid { margin-top: 0; }
.study-stat-icon {
  display: block;
  width: 14px;
  height: 28px;
  color: var(--accent-mid);
  margin-bottom: 10px;
}

/* ---- Rich text (Challenge / Approach / Services) ---- */
.study-richtext p { margin: 0 0 16px; color: var(--text-dim); line-height: 1.6; }
.study-richtext p:last-child { margin-bottom: 0; }
.study-richtext h4 {
  font-family: var(--display-font);
  font-size: 1.05em;
  color: var(--text);
  margin: 24px 0 8px;
}
.study-richtext h4:first-child { margin-top: 0; }
.study-richtext strong { color: var(--text); }
.study-richtext ul,
.study-richtext ol {
  margin: 0 0 16px;
  padding-inline-start: 22px;
  color: var(--text-dim);
  line-height: 1.6;
}
.study-richtext li { margin-bottom: 10px; }
.study-richtext li:last-child { margin-bottom: 0; }
.study-richtext img,
.study-richtext figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: var(--radius-m);
  border: 1px solid var(--border);
  margin: 16px 0 0;
}
.study-richtext figure { margin: 0; }

/* ---- Shared final-CTA banner (index: no stars / detail: stars) ---- */
.study-cta {
  padding-block: clamp(56px, 8vw, 104px) clamp(48px, 6vw, 80px);
  background: var(--surface);
}
.study-cta-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}
@media (min-width: 880px) { .study-cta-inner { grid-template-columns: 1.2fr 1fr; } }
.study-cta-copy { text-align: center; }
@media (min-width: 880px) { .study-cta-copy { text-align: start; } }
.study-cta-copy .display.h2 { margin-bottom: 12px; }
.study-cta-copy .lead { margin-bottom: 24px; }
@media (min-width: 880px) { .study-cta-copy .lead { margin-inline: 0; } }
.study-cta-photo {
  width: 100%;
  border-radius: var(--radius-l);
  border: 1px solid var(--border);
  box-shadow: 0 24px 64px -32px rgba(10, 10, 15, 0.18);
}
.study-cta-stars .stars-row {
  color: var(--accent-mid);
  letter-spacing: 4px;
  font-size: 14px;
  margin-bottom: 12px;
}
