/* ==========================================================================
   Project / case study page.
   ========================================================================== */

/* --- Head ----------------------------------------------------------------- */
.case__head { padding-block: clamp(2.5rem, 7vh, 4.5rem) clamp(1.5rem, 4vh, 2.5rem); }

.crumb {
  display: flex; gap: 0.5rem;
  font-size: var(--t-sm);
  color: var(--ink-faint);
}
.crumb__num { font-family: var(--font-mono); }

.case__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-2xl);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-top: clamp(1rem, 3vh, 2rem);
  max-width: 18ch;
  text-wrap: balance;
}

.case__tagline {
  margin-top: 0.9rem;
  font-size: var(--t-lg);
  line-height: 1.35;
  color: var(--ink-soft);
  max-width: var(--measure);
  text-wrap: pretty;
}

.case__byline {
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem;
  align-items: center;
  margin-top: 1.5rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--rule);
}
.case__portrait {
  width: 3rem;
  border-radius: 50%;
  flex: none;
}
.case__name { font-size: var(--t-lg); }

/* --- Hero ----------------------------------------------------------------- */
/* Source renders are square, so the frame is square — nothing is cropped away.
   Width is constrained instead, so a square doesn't swallow the viewport. */
.case__hero { padding-block: clamp(1.5rem, 4vh, 3rem); }
.case__hero-frame { --ratio: 1; max-width: 46rem; }

/* --- Body ----------------------------------------------------------------- */
.case__body {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(1.5rem, 4vh, 3rem) var(--stack);
}
@media (min-width: 64rem) {
  .case__body { grid-template-columns: minmax(0, 1fr) 17rem; align-items: start; }
}

.case__prose { display: grid; gap: clamp(2rem, 5vh, 3.25rem); max-width: var(--measure); }

.case__heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-xl);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: 0.85rem;
}
.case__section p { margin-bottom: 0.9rem; line-height: 1.6; text-wrap: pretty; }
.case__section p:last-child { margin-bottom: 0; }

.case__holding { color: var(--ink-soft); }

/* Specs rail — sticks alongside the prose on wide screens. */
.case__specs { position: sticky; top: 6rem; }
@media (max-width: 63.99rem) {
  .case__specs { position: static; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
}
.case__specs dl { display: grid; gap: 1.1rem; }
.case__specs dd { font-size: var(--t-sm); margin-top: 0.25rem; }

/* --- Contact -------------------------------------------------------------- */
.contact { padding-bottom: var(--stack); }
.contact__links {
  display: flex; flex-wrap: wrap; gap: 0.5rem 2rem;
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-size: var(--t-lg);
}

/* --- Prev / next ---------------------------------------------------------- */
.pager {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--ink);
}
@media (min-width: 48rem) { .pager { grid-template-columns: 1fr 1fr; } }

.pager__side {
  display: grid; gap: 0.3rem;
  padding-block: clamp(1.5rem, 4vw, 2.5rem);
  transition: padding-left 0.35s var(--ease), color 0.35s var(--ease);
}
.pager__side + .pager__side { border-top: 1px solid var(--rule); }
@media (min-width: 48rem) {
  .pager__side + .pager__side { border-top: 0; border-left: 1px solid var(--rule); padding-left: 2rem; }
  .pager__side--next { text-align: right; }
}
.pager__side:hover { color: var(--accent); padding-left: 0.75rem; }
@media (min-width: 48rem) { .pager__side--next:hover { padding-left: 2rem; padding-right: 0.75rem; } }

.pager__title { font-family: var(--font-display); font-size: var(--t-lg); line-height: 1.1; }
