/* Dip Studio dip-site: case-study template.
   Full-bleed case hero, sticky meta rail, cinema stack of wide images with
   editorial breathers, next-project handoff. One pin-free page: curtain
   reveals only (pinning is reserved for the homepage). */

/* ------------------------------------------------------------- case hero */
.case-hero {
  position: relative;
  min-height: 86svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: var(--header-h);
  background: var(--dark);
  color: var(--on-dark);
  overflow: clip;
}
.case-hero__bg { position: absolute; inset: 0; z-index: 0; }
.case-hero__bg picture { display: block; height: 100%; }
.case-hero__bg img, .case-hero__bg video { width: 100%; height: 100%; object-fit: cover; }
.case-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(20,20,18,0.92) 0%, rgba(20,20,18,0.45) 45%, rgba(20,20,18,0.18) 100%);
}
/* light renders (FemTech) need a stronger top scrim or the on-dark header
   washes out; bottom already carries the title fine */
.case-hero--light::after {
  background: linear-gradient(to top, rgba(20,20,18,0.92) 0%, rgba(20,20,18,0.5) 45%, rgba(20,20,18,0.55) 100%);
}
.case-hero .container { position: relative; z-index: 2; padding-bottom: clamp(2.5rem, 6vw, 5rem); display: grid; gap: 1.2rem; }
.case-hero__crumb { font-size: var(--fs-label); letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; color: var(--on-dark-muted); justify-self: start; }
.case-hero__crumb:hover, .case-hero__crumb:focus-visible { color: var(--on-dark); }
.case-hero__client {
  font-size: var(--fs-label); letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.7rem; color: var(--on-dark);
}
.case-hero__client::before { content: ""; width: 2rem; height: 2px; background: var(--accent); }
.case-hero h1 { color: var(--on-dark); max-width: 18ch; }
.case-hero__chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.6rem; }
.chip {
  font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600;
  color: var(--on-dark); border: 1px solid var(--hairline-dark); border-radius: var(--radius-pill);
  padding: 0.5rem 0.95rem; background: rgba(20,20,18,0.45);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}

/* ------------------------------------------------------ intro + meta rail */
.case-intro { padding-block: var(--section-y); }
.case-intro .container { display: grid; gap: clamp(2rem, 5vw, 4rem); }
.case-meta { display: grid; gap: 1.6rem; align-content: start; }
.case-meta__group h2, .case-meta__group h3 { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gray-600); font-weight: 600; font-family: var(--font-body); margin-bottom: 0.6rem; line-height: 1.5; }
.case-meta__group ul { display: grid; gap: 0.35rem; }
.case-meta__group li { font-weight: 500; }
.case-about h2 { margin-bottom: 1.2rem; }
.case-about .sec-label { display: flex; }
/* the about label is the section heading now (D-05); keep the label look */
.case-about h2.sec-label { font-family: var(--font-body); font-size: var(--fs-label); line-height: 1.5; letter-spacing: 0.16em; margin-bottom: 0; }
.case-about .lead { color: var(--ink); max-width: 62ch; }
.case-about .lead + .lead { margin-top: 1.2rem; }
@media (min-width: 920px) {
  .case-intro .container { grid-template-columns: minmax(240px, 0.5fr) minmax(0, 1fr); column-gap: clamp(3rem, 6vw, 6rem); }
  .case-meta { position: sticky; top: calc(var(--header-h) + 2rem); }
  /* center the measure in its cell so prose never hugs one edge with a
     dead rail beside it */
  .case-about { max-width: 68ch; margin-inline: auto; }
}

/* ------------------------------------------------------------ cinema stack */
.case-stack { display: grid; }
.case-stack__item { position: relative; }
.case-stack__item img, .case-stack__item video { width: 100%; height: auto; display: block; }
/* portrait, square and small sources: contained on a quiet band, never
   taller than one screen and never upscaled past their own width (launch
   review 2026-09-04); --plate-bg matches a plate's own ground */
.case-stack__item--contain { display: grid; justify-items: center; background: var(--plate-bg, var(--paper)); padding-block: clamp(1.5rem, 4vw, 3rem); }
.case-stack__item--contain img, .case-stack__item--contain video { width: auto; max-width: min(100%, var(--natural-w, 100%)); max-height: calc(100svh - var(--header-h) - 2rem); height: auto; }
/* Alex's review 2026-09-06: two plates read too small under the one-screen
   ceiling (the SAAL kit callout, the Ximbo exploded view). --big lifts the
   ceiling to 1.5 screens so they fill the column. */
/* min-height: a lazy image inside a zero-padding plate has no box until it
   loads, and a zero-height box never enters the viewport, so it never
   loads (found 2026-09-06). Reserve room; the plate settles once loaded. */
.case-stack__item--big { padding-block: 0; min-height: 60svh; }
/* --tight: same zero padding + reserved height, but the normal one-screen
   ceiling (David 2026-09-06: the SAAL kit read too big at 1.5 screens once
   its own white margins were cropped away). */
.case-stack__item--tight { padding-block: 0; min-height: 50svh; }
.case-stack__item--big img, .case-stack__item--big video { max-height: calc(150svh - var(--header-h)); }
/* two squares or portraits share one screen */
.case-stack__pair { display: grid; grid-template-columns: 1fr; }
@media (min-width: 760px) { .case-stack__pair { grid-template-columns: 1fr 1fr; } }
.case-stack__pair .case-stack__item img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1 / 1; }
/* editorial breather: quiet centered caption between plates */
.case-note { padding-block: clamp(4rem, 9vw, 8rem); background: var(--paper); }
.case-note--soft { background: var(--gray-50); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.case-note .container { display: grid; justify-items: center; }
.case-note p {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.25rem, 1rem + 1.3vw, 1.9rem); line-height: 1.35; letter-spacing: -0.015em;
  max-width: 34ch; text-align: center; text-wrap: balance;
}

/* --------------------------------------------------------- next project */
.case-next { background: var(--dark); color: var(--on-dark); padding-block: clamp(4.5rem, 9vw, 8rem); }
.case-next .container { display: grid; gap: 1.2rem; justify-items: start; }
.case-next__all { margin-top: 0.6rem; }
.case-next__label { font-size: var(--fs-label); letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; color: var(--on-dark-muted); }
.case-next__link { display: grid; gap: 0.4rem; }
.case-next__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--fs-h2); line-height: 1; letter-spacing: -0.03em;
  color: var(--on-dark);
  transition: color 0.35s var(--ease-out);
}
.case-next__link:hover .case-next__title, .case-next__link:focus-visible .case-next__title { color: var(--accent); }

/* ---------------------------------------------------------- coming soon */
.case-hero--soon .case-hero__bg img { filter: blur(14px) saturate(0.8); transform: scale(1.08); }
.case-soon-body { padding-block: var(--section-y); }
.case-soon-body .container { display: grid; gap: 1.4rem; justify-items: start; }
.case-soon-body .lead { max-width: 62ch; }
