.case-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: clamp(360px, 34vw, 540px);
  background: #171717;
  color: #fff8f2;
}

.case-hero-image, .case-hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
}

.case-hero-image { object-fit: cover; object-position: center 69%; filter: grayscale(100%); }
.case-hero::after {
  content: "";
  background: linear-gradient(90deg, #11111114, #11111124 38%, #111111a6 56%, #111111e6);
}

.case-hero-inner { display: grid; grid-template-columns: 1fr 1fr; padding-block: 48px; }
.case-hero-copy { grid-column: 2; padding-left: clamp(16px, 2.8vw, 48px); }
.case-hero-copy .eyebrow { color: var(--wine-light); }
.case-hero-copy h1 { font-size: clamp(1.9rem, 3.6vw, 3.9rem); letter-spacing: -.035em; }
.case-hero-description { max-width: 24em; margin-top: .95rem; color: #f0e2dd; text-wrap: balance; animation-delay: .15s; }
.case-hero-link { gap: .85rem; margin-top: 1.5rem; animation-delay: .21s; }

.case-gallery { padding-block: clamp(24px, 4vw, 56px) clamp(60px, 8vw, 114px); }
.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.35vw, 34px);
}
.case-tile { display: block; overflow: hidden; aspect-ratio: 3 / 2; background: #ded5cd; cursor: zoom-in; }
.case-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .34s ease; }
.case-tile .case-floor-focus { object-position: center 68%; }
.case-tile:is(:hover, :focus-visible) img { transform: scale(1.035); }

.case-viewer {
  width: min(100% - 34px, 1360px);
  max-width: none;
  max-height: calc(100% - 34px);
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff8f2;
}
.case-viewer::backdrop { background: #161010f2; }
.case-viewer-toolbar { display: flex; justify-content: end; margin-bottom: .55rem; }
.case-viewer-stage { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: clamp(8px, 1.7vw, 22px); align-items: center; }
.case-viewer-image { width: 100%; height: min(74dvh, 880px); object-fit: contain; touch-action: pan-y pinch-zoom; user-select: none; }
.case-viewer-button { display: grid; place-items: center; width: 44px; height: 44px; background: #352829; border: 1px solid #816d69; color: inherit; font: 1.6rem/1 var(--sans); }
.case-viewer-button:hover { border-color: var(--white); background: var(--white); color: var(--ink); }

@media (max-width: 760px) {
  .case-hero { align-items: end; min-height: clamp(420px, 72vw, 500px); }
  .case-hero-image { height: 75%; object-position: 32% 70%; }
  .case-hero::after { background: linear-gradient(180deg, #17171714, #17171724 32%, #171717db 59%, #171717 75%); }
  .case-hero-inner { display: block; padding-block: 32px; }
  .case-hero-copy { padding-left: 0; }
  .case-hero-copy .eyebrow { margin-bottom: .65rem; }
  .case-hero-description { margin-top: .65rem; }
  .case-hero-link { margin-top: 1rem; }
}

@media (max-width: 590px) {
  .case-grid { grid-template-columns: 1fr; gap: 15px; }
  .case-viewer { width: calc(100% - 24px); }
  .case-viewer-stage { grid-template-columns: 1fr 1fr; gap: .65rem; }
  .case-viewer-image { grid-column: 1 / -1; grid-row: 1; height: min(65dvh, 85vw); }
  .case-previous { justify-self: end; }
}
