.case-body {
  background: var(--ivory);
}

.case-main {
  padding-top: 0;
}

.case-hero {
  position: relative;
  overflow: hidden;
  padding: 108px 0 76px;
  color: var(--white);
  background: var(--charcoal);
}

.case-hero::before,
.case-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.case-hero::before {
  content: "";
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.4) 54%, rgba(0, 0, 0, 0.16)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.04));
}

.case-hero::after {
  content: "";
  position: absolute;
  z-index: 2;
  right: -120px;
  bottom: -170px;
  width: 420px;
  height: 420px;
  border: 28px solid rgba(16, 78, 137, 0.76);
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
}

.case-hero-image {
  object-fit: cover;
}

.case-hero-copy {
  position: relative;
  z-index: 3;
  width: min(900px, calc(100% - 72px));
  margin: 0 auto;
}

.case-hero-copy .section-kicker {
  color: var(--white);
  padding-left: 18px;
  border-left: 6px solid var(--brand-blue);
}

.case-hero h1 {
  max-width: 880px;
  margin-bottom: 22px;
}

.case-hero p:last-child {
  max-width: 760px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.case-overview {
  padding: 72px 0 46px;
  background: var(--white);
}

.case-info-panel {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 64px;
  align-items: start;
}

.case-info-panel dl {
  margin: 0;
  padding-left: 28px;
  border-left: 6px solid var(--brand-blue);
}

.case-info-panel div {
  padding: 0 0 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.case-info-panel div:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.case-info-panel dt {
  margin-bottom: 6px;
  color: var(--brand-blue);
  font-weight: 800;
}

.case-info-panel dd {
  margin: 0;
  color: var(--muted-ink);
}

.case-description {
  margin: 0;
  color: var(--muted-ink);
  font-size: 19px;
}

.case-gallery-section {
  padding: 80px 0 104px;
}

.case-gallery-head {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: end;
  margin-bottom: 38px;
}

.case-gallery-head h2 {
  margin-bottom: 0;
}

.case-gallery {
  columns: 2 420px;
  column-gap: 22px;
}

.case-gallery--paired {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  columns: initial;
}

.case-gallery figure {
  display: inline-block;
  width: 100%;
  margin: 0 0 22px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 46px rgba(26, 26, 26, 0.08);
}

.case-gallery--paired figure {
  display: block;
  margin: 0;
}

.case-gallery a {
  display: block;
  cursor: zoom-in;
}

.case-gallery img {
  width: 100%;
  height: auto;
  object-fit: contain;
  transform-origin: center;
  transition: transform 360ms ease, filter 360ms ease;
  user-select: none;
  -webkit-user-drag: none;
}

.case-gallery figure:hover img {
  filter: saturate(1.04) contrast(1.03);
  transform: scale(1.018);
}

.case-pager {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 40px 0 0;
}

.case-pager a {
  min-width: 180px;
}

.case-lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(0, 0, 0, 0.76);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.case-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.case-lightbox-image {
  display: block;
  max-width: min(94vw, 1440px);
  max-height: 90vh;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: default;
  object-fit: contain;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
}

.is-lightbox-open {
  overflow: hidden;
}

@media (max-width: 760px) {
  .case-hero {
    padding: 86px 0 56px;
  }

  .case-hero-copy {
    width: calc(100% - 32px);
  }

  .case-hero p:last-child,
  .case-description {
    font-size: 16px;
  }

  .case-info-panel {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .case-gallery-head {
    display: block;
  }

  .case-gallery-head .text-link {
    margin-top: 16px;
  }

  .case-gallery {
    columns: 1;
  }

  .case-gallery--paired {
    grid-template-columns: 1fr;
  }

  .case-pager {
    flex-direction: column;
  }

  .case-lightbox {
    padding: 14px;
  }
}

html[dir="rtl"] .case-hero-copy,
html[dir="rtl"] .case-info-panel {
  direction: rtl;
}

html[dir="rtl"] .case-hero-copy .section-kicker {
  padding-left: 0;
  padding-right: 18px;
  border-left: 0;
  border-right: 6px solid var(--brand-blue);
}

html[dir="rtl"] .case-info-panel dl {
  padding-left: 0;
  padding-right: 28px;
  border-left: 0;
  border-right: 6px solid var(--brand-blue);
}
