/* Case study pages. Loaded after site.css.
   Order on every page: impact first, then the client's own brand, then the story. */

.cs-head { padding-top: 4rem; padding-bottom: 3rem; }
.cs-back { display: inline-block; font-size: 0.9375rem; color: var(--ink-3); margin-bottom: 2.5rem; }
.cs-back::before { content: "\2039  "; }
.cs-back:hover { color: var(--ink); text-decoration: none; }
.cs-head .lead { margin-top: 1.5rem; }

/* Impact: the result before anything else. */
.impact { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 2rem; margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--hairline); }
.impact .figure { font-size: clamp(2.25rem, 4.6vw, 3.5rem); }
.impact .figure.words { font-size: clamp(1.625rem, 3vw, 2.25rem); letter-spacing: -0.025em; line-height: 1.1; }
.impact p.muted { margin-top: 0.75rem; font-size: 0.9375rem; line-height: 1.45; max-width: 18rem; }

/* The client's brand, shown as it is. */
.cs-photo { margin: 0; }
.cs-photo .photo { aspect-ratio: 16 / 9; }
.cs-photo .photo.tall { aspect-ratio: 4 / 5; }
.cs-photo .photo.square { aspect-ratio: 1; }
.cs-photo figcaption { margin-top: 0.75rem; font-size: 0.8125rem; color: var(--ink-3); }
.cs-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

/* The story, in short chapters. */
.chapter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 2.5rem; padding: 3.5rem 0; border-top: 1px solid var(--hairline); }
.chapter:first-child { border-top: 0; }
.chapter h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.375rem; line-height: 1.25; letter-spacing: -0.016em; }
.chapter .prose { max-width: 42rem; font-size: 1.125rem; line-height: 1.6; }
.chapter .prose strong { color: var(--ink); font-weight: 600; }
.chapter .viz { margin-top: 2rem; background: var(--paper); border-radius: var(--radius); padding: 2.5rem 3rem; }
.chapter .viz svg { width: 100%; height: auto; display: block; overflow: visible; }

/* One moment that makes the result real. */
.moment { background: var(--paper); border-radius: var(--radius); padding: 2.25rem 2.5rem; }
.moment-text { font-family: var(--font-display); font-size: clamp(1.25rem, 2.2vw, 1.625rem); line-height: 1.35; letter-spacing: -0.016em; color: var(--ink); text-wrap: pretty; }

/* What to read next. */
.next { border-top: 1px solid var(--hairline); }
.next .cases { margin-top: 2rem; grid-template-columns: 1fr; max-width: 34rem; }

.cs-cta { text-align: center; }
.cs-cta .lead { margin: 1.5rem auto 0; }
.cs-cta .btn { margin-top: 2.25rem; }

@media (max-width: 760px) {
  .cs-head { padding-top: 2.5rem; padding-bottom: 2rem; }
  .cs-back { margin-bottom: 1.5rem; }
  .impact { grid-template-columns: 1fr; gap: 1.5rem; margin-top: 2.5rem; }
  .cs-pair { grid-template-columns: 1fr; gap: 1rem; }
  .chapter { grid-template-columns: 1fr; gap: 1rem; padding: 2.5rem 0; }
  .chapter .viz { padding: 1.25rem; }
  .moment { padding: 1.5rem; }
}
