/* Case-study views: preserve image proportions and the client's visual identity. */
.case-work {
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
}
.case-intro {
  padding:clamp(12px,2.6cqh,30px) var(--pad);
  background:#191b23;
}
.case-intro>.text-link {
  font-size:.84rem;
  margin-bottom:.6em;
}
.case-heading {
  display:grid;
  grid-template-columns:1.12fr .88fr;
  align-items:end;
  gap:24px;
}
.case-heading .eyebrow {
  margin-bottom:.45em;
}
.case-heading h1 {
  font-size:clamp(2.2rem,min(5.4cqw,10cqh),5.5rem);
  overflow-wrap:anywhere;
}
.case-heading>p {
  font-size:1rem;
  line-height:1.45;
  color:var(--muted);
  max-width:42ch;
}
.case-meta {
  display:flex;
  justify-content:space-between;
  gap:10px;
  color:var(--soft);
  font-size:.76rem;
  font-weight:600;
  letter-spacing:.06em;
  border-top:1px solid var(--line);
  margin-top:.75em;
  padding-top:.65em;
}
.case-showcase {
  min-height:0;
  background:#191b23;
}
.case-media-grid {
  display:grid;
  grid-template-columns:.75fr 1.25fr;
  gap:2px;
  height:100%;
  min-height:0;
}
.case-media-grid figure {
  min-height:0;
  min-width:0;
  display:grid;
  grid-template-rows:minmax(0,1fr) auto;
}
.case-media-grid a {
  display:grid;
  place-items:center;
  min-height:0;
  min-width:0;
  background:#e1e2e3;
  overflow:hidden;
}
.case-media-grid img {
  width:100%;
  height:100%;
  min-height:0;
  object-fit:contain;
}
.case-logo img {
  padding:clamp(14px,3cqw,64px);
}
.case-application a {
  background:#292929;
}
.case-cherry .case-application a {
  background:#534e49;
}
.case-nutri .case-application a,.case-nutri .case-logo a {
  background:#f5f5f3;
}
.case-media-grid figcaption {
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:.7em 1.2em;
  font-size:.8rem;
  color:var(--muted);
  letter-spacing:.06em;
  font-weight:650;
}
.case-context {
  display:grid;
  grid-template-rows:minmax(0,1fr) auto;
  background:radial-gradient(ellipse at 15% 0%,#29213c,transparent 70%),#171820;
}
.case-description {
  display:grid;
  grid-template-columns:1fr 1fr;
  align-content:center;
  gap:clamp(22px,4cqw,64px);
  padding:var(--pad);
}
.case-description .eyebrow {
  margin-bottom:.8em;
}
.case-description h2 {
  font-size:clamp(2.4rem,min(5.6cqw,9cqh),5.5rem);
}
.case-description div:nth-child(2)>p {
  font-size:clamp(1rem,1.5cqw,1.35rem);
  color:var(--muted);
  line-height:1.6;
}
.case-description div:nth-child(2)>.small-note {
  margin-top:1em;
  font-size:.85rem;
  color:var(--soft);
}
.next-case {
  background:#222630;
  border-top:1px solid var(--line);
  padding:clamp(18px,4cqh,48px) var(--pad);
}
.next-case a {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
}
.next-case .eyebrow {
  margin-bottom:.5em;
}
.next-case h2 {
  font-size:clamp(1.9rem,4.4cqw,3.8rem);
}
.next-case a>span {
  font-size:3rem;
  color:var(--cyan);
  line-height:1;
}
.next-case a:hover h2 {
  color:var(--violet);
}
@container stage (aspect-ratio < 1/1) {
  .case-heading,.case-description {
    grid-template-columns:1fr;
    gap:12px;
  }
  .case-media-grid {
    grid-template-columns:1fr;
    grid-template-rows:minmax(85px,.62fr) minmax(120px,1.38fr);
  }
  .case-description {
    align-content:center;
  }
  .case-meta {
    font-size:.72rem;
  }
  .case-heading h1 {
    font-size:clamp(2.1rem,7cqw,4rem);
  }
}
@container stage (max-height:420px) {
  .case-work {
    min-height:420px;
  }
  .case-description {
    min-height:240px;
  }
}
/* Second case-study block has a real visual asset rather than an empty text panel. */
.case-context .case-description {
  padding:0;
  align-content:stretch;
  gap:2px;
  grid-template-columns:1.08fr .92fr;
  min-height:0;
}
.case-context-copy {
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:clamp(14px,3cqh,30px);
  padding:var(--pad);
  min-width:0;
}
.case-context-copy .eyebrow {
  margin:0;
}
.case-context-copy>p:not(.eyebrow) {
  font-size:clamp(1rem,1.45cqw,1.3rem);
  color:var(--muted);
  max-width:42ch;
}
.case-context-copy>.small-note {
  font-size:.85rem;
  color:var(--soft);
}
.context-visual {
  display:grid;
  grid-template-rows:minmax(0,1fr) auto;
  min-height:0;
  min-width:0;
  background:#dedfdf;
}
.context-visual img {
  width:100%;
  height:100%;
  min-height:0;
  object-fit:contain;
  padding:clamp(20px,4cqw,70px);
}
.context-visual figcaption {
  background:#191b23;
  color:var(--muted);
  font-size:.76rem;
  padding:.8em 1.2em;
  letter-spacing:.06em;
}
.case-context .next-case {
  padding-block:clamp(14px,3cqh,34px);
}
@container stage (aspect-ratio < 1/1) {
  .case-context .case-description {
    grid-template-columns:1fr;
    grid-template-rows:minmax(0,1fr) auto;
  }
  .case-context-copy {
    grid-row:2;
    padding:var(--pad);
    gap:9px;
  }
  .context-visual {
    grid-row:1;
  }
  .context-visual img {
    padding:clamp(12px,3cqw,40px);
  }
  .context-visual figcaption {
    display:none;
  }
  .case-context-copy>p:not(.eyebrow) {
    font-size:1rem;
  }
  .case-context-copy>.small-note {
    font-size:.82rem;
  }
}
