/* Case studies share the palette, header and media controls with the portfolio. */
.case-page { --case-accent: #ff5000; }
.case-main {
  max-width: 1400px;
  margin-inline: auto;
  padding: 60px var(--page-gutter) 0;
}
.case-back { font-size: 15px; }
.case-intro { padding-block: 32px 40px; }
.case-eyebrow {
  margin: 0 0 10px;
  font-size: clamp(20px, 2vw, 30px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -.02em;
  overflow: hidden;
}
.case-intro .case-title {
  margin: 0;
  max-width: 22ch;
  color: var(--case-accent);
  font-size: clamp(38px, 5.5vw, 84px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
  overflow: hidden;
  padding-bottom: .12em;
  animation: none;
}
.case-eyebrow > span, .case-title > span { display: block; }
.case-visual {
  position: relative;
  min-width: 0;
  height: clamp(260px, 52vw, 860px);
  border-radius: 16px;
  background: #8881;
  overflow: hidden;
}
.case-cover { height: auto; aspect-ratio: 1.875; }
.case-visual .image-trigger {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}
.case-visual > .image-trigger, .case-visual > .video-tile { position: absolute; inset: 0; }
.case-visual img { width: 100%; height: 100%; display: block; }
.case-visual img, .case-visual video { transition: opacity .55s ease; }
.case-visual.media-pending img, .case-visual.media-pending video { opacity: 0; }
.case-overview {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  margin-top: 56px;
}
.case-overview[data-columns="1"] { grid-template-columns: 1fr; }
.case-overview[data-columns="2"] { grid-template-columns: 2fr 1fr; }
.case-overview h2 {
  color: var(--case-accent);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 22px;
}
.case-summary { max-width: 72ch; font-size: 17px; line-height: 1.6; }
.case-summary p { margin: 0; }
.case-summary p + p { margin-top: 1em; }
.case-overview ul { margin: 0; padding: 0; list-style: none; font-size: 16px; line-height: 1.8; }
.case-facts {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 32px 72px;
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid #8884;
}
.case-facts dt { font-size: 13px; opacity: .65; margin-bottom: 8px; }
.case-facts dd { margin: 0; font-size: 17px; }
.case-section { padding-top: clamp(56px, 7vw, 104px); }
 .case-section-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  align-items: start;
  gap: clamp(28px, 4vw, 72px);
  max-width: none;
  margin-bottom: clamp(36px, 5vw, 72px);
}
.case-section-copy > :only-child { grid-column: 1 / -1; }
.case-section-copy h2 {
  margin: 0;
  color: var(--case-accent);
  font-size: clamp(26px, 2.4vw, 40px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}
.case-section-text {
  max-width: 68ch;
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.6;
  letter-spacing: normal;
  word-spacing: normal;
  text-align: left;
}
.case-section-text p { margin: 0; }
.case-section-text p + p { margin-top: 1em; }
.case-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px);
}
.case-visual + .case-gallery { margin-top: clamp(12px, 2vw, 24px); }
.case-gallery .case-visual { height: auto; aspect-ratio: 1; }
.case-gallery[data-layout="bento"][data-count="3"] .case-visual:first-child {
  grid-row: span 2;
  aspect-ratio: auto;
}
.case-gallery[data-layout="stack"], .case-gallery[data-count="1"] { grid-template-columns: 1fr; }
.case-gallery[data-layout="stack"] .case-visual,
.case-gallery[data-count="1"] .case-visual { aspect-ratio: 1.6; }
.case-gallery[data-layout="columns"] > :last-child:nth-child(odd),
.case-gallery[data-layout="bento"]:not([data-count="3"]) > :last-child:nth-child(odd) {
  grid-column: 1 / -1;
  aspect-ratio: 1.6;
}
.case-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 28px;
  margin-top: 100px;
  padding-block: 32px 64px;
  border-top: 1px solid #8884;
}
.case-visual .video-toggle {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: #0002;
  color: white;
  cursor: pointer;
}
@keyframes case-title-enter {
  from { opacity: 0; transform: translateY(105%) rotate(1deg); }
  to { opacity: 1; transform: translateY(0) rotate(0); }
}
@media (prefers-reduced-motion: no-preference) {
  .case-eyebrow > span { animation: case-title-enter .9s cubic-bezier(.18,.75,.22,1) both; }
  .case-title > span { animation: case-title-enter 1.1s .13s cubic-bezier(.18,.75,.22,1) both; }
  .case-page [data-reveal] {
    transition: opacity .85s ease, transform 1.05s cubic-bezier(.18,.7,.2,1);
  }
  .case-page [data-reveal].waiting { opacity: 0; transform: translateY(48px) scale(.985); }
}
@media (max-width: 700px) {
  .case-main { padding-top: 30px; }
  .case-section-copy { grid-template-columns: 1fr; gap: 16px; }
  .case-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 32px; }
  .case-overview .case-summary { grid-column: 1 / -1; }
  .case-facts { gap: 24px; }
  .case-cover { aspect-ratio: 1.3; }
  .case-footer { margin-top: 56px; }
}
@media (max-width: 480px) {
  .case-gallery[data-layout="columns"] { grid-template-columns: 1fr; }
  .case-gallery[data-layout="columns"] .case-visual { aspect-ratio: 1.25; }
}
@media (prefers-reduced-motion: reduce) {
  .case-page [data-reveal].waiting { opacity: 1; transform: none; }
  .case-visual img, .case-visual video { transition: none; }
}
/* Intrinsic media height: full content width, without a fixed crop or letterbox. */
.case-page .case-visual.case-natural {
  width: 100%; height: auto; aspect-ratio: auto;
  margin-inline: auto; align-self: start;
}
.case-page .case-natural > .image-trigger,
.case-page .case-natural > .video-tile {
  position: relative; inset: auto; height: auto; min-height: 0;
}
.case-page .case-natural img,
.case-page .case-natural video {
  display: block; width: 100%; height: auto; max-width: 100%;
  margin-inline: auto;
}
