.page-hero[aria-labelledby="case-title"] .page-hero-media::after {
  background: linear-gradient(90deg, rgba(12, 12, 12, 0.88), rgba(12, 12, 12, 0.7));
}

.page-hero[aria-labelledby="case-title"] .eyebrow {
  color: #ffffff;
}

.legacy-case-hero {
  min-height: 460px;
}

.legacy-case-hero h1 {
  font-size: clamp(36px, 4vw, 54px);
  line-height: 1.2;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.legacy-case-hero .legacy-case-kind {
  display: inline-block;
  margin: 0 0 18px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 4px;
  font-size: 13px;
}

.legacy-case-overview {
  padding-top: 56px;
  padding-bottom: 36px;
}

.legacy-case-scope {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: 70px;
}

.legacy-case-scope h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.3;
}

.legacy-case-scope ul {
  margin: 0;
  padding-left: 22px;
  color: #303030;
}

.legacy-case-scope li {
  padding: 10px 0 10px 6px;
  border-bottom: 1px solid var(--line);
}

.legacy-case-scope li::marker {
  color: var(--teal);
}

.legacy-case-history {
  max-width: 900px;
  margin: 28px 0 36px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.legacy-case-figure {
  min-width: 0;
  margin: 0;
}

.legacy-case-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: #e9e9e5;
}

.legacy-case-figure figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.legacy-case-story {
  padding-top: 30px;
  padding-bottom: 40px;
}

.legacy-case-story h2 {
  font-size: clamp(26px, 2.6vw, 36px);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.legacy-case-story .lead-copy {
  min-width: 0;
  overflow-wrap: anywhere;
}

.legacy-case-media {
  padding-top: 30px;
  padding-bottom: 40px;
}

.legacy-case-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 32px 24px;
}

.legacy-case-gallery > :last-child:nth-child(odd) {
  grid-column: 1 / -1;
  width: min(900px, 100%);
  justify-self: center;
}

.legacy-case-links {
  padding-top: 20px;
  padding-bottom: 30px;
}

.legacy-case-links .section-actions {
  margin-top: 0;
  row-gap: 20px;
}

.legacy-case-links a {
  overflow-wrap: anywhere;
}

.legacy-case-related {
  padding-top: 40px;
  padding-bottom: 72px;
}

.legacy-case-consulting {
  margin: 28px 0 0;
}

.case-inquiry-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin: 28px 0 0;
}

.case-inquiry-hero-action {
  margin-top: 28px;
}

.case-inquiry-hero-action .button,
.case-inquiry-actions .button,
.case-inquiry-dock .button {
  min-height: 56px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.case-inquiry-actions .button {
  margin-top: 0;
}

.case-inquiry-secondary {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.5;
  text-underline-offset: 5px;
  overflow-wrap: anywhere;
}

.case-inquiry-secondary:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 4px;
}

.contact-section .case-inquiry-note {
  margin-top: 16px;
  margin-bottom: 0;
  font-size: 16px;
  line-height: 1.7;
}

.case-inquiry-dock {
  display: none;
}

@media (max-width: 900px) {
  .legacy-case-scope {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .case-inquiry-dock:not([hidden]) {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    display: block;
    padding: 12px max(12px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
    border-top: 1px solid #575757;
    background: #181818;
  }

  .case-inquiry-dock .button {
    width: 100%;
  }

  html:not(.case-gallery-document-lock) body.case-inquiry-dock-active:not(.case-gallery-page-lock) {
    padding-bottom: var(--case-inquiry-dock-height, calc(81px + env(safe-area-inset-bottom, 0px)));
  }
}

.case-gallery-document-lock .case-inquiry-dock:not([hidden]),
.case-gallery-page-lock .case-inquiry-dock:not([hidden]) {
  display: none;
}

@media (max-width: 900px) and (max-height: 480px) and (orientation: landscape) {
  .case-inquiry-dock:not([hidden]) {
    display: none;
  }

  html:not(.case-gallery-document-lock) body.case-inquiry-dock-active:not(.case-gallery-page-lock) {
    padding-bottom: 0;
  }
}

@media (max-width: 620px) {
  .legacy-case-hero {
    min-height: 380px;
  }

  .legacy-case-overview {
    padding-top: 40px;
  }

  .legacy-case-story,
  .legacy-case-media {
    padding-top: 24px;
    padding-bottom: 28px;
  }

  .legacy-case-gallery {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .legacy-case-related {
    padding-top: 30px;
    padding-bottom: 48px;
  }

  .case-inquiry-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .case-inquiry-secondary {
    align-self: flex-start;
  }
}

.case-gallery-link {
  position: relative;
  display: block;
  border-radius: 6px;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}

.case-gallery-link:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 4px;
}

.case-gallery-expand {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  color: #ffffff;
  background: rgba(12, 12, 12, 0.88);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  pointer-events: none;
}

.case-gallery-document-lock {
  overflow: hidden;
  scroll-behavior: auto;
}

.case-gallery-page-lock {
  position: fixed;
  top: var(--case-gallery-scroll-offset);
  left: 0;
  width: 100%;
  overflow: hidden;
  padding-right: var(--case-gallery-scrollbar);
}

.case-gallery-viewer {
  --pswp-bg: #101010;
  --pswp-root-z-index: 100000;
  color: #ffffff;
  font-family: inherit;
}

.case-gallery-viewer .pswp__top-bar {
  align-items: center;
  gap: 8px;
  height: calc(64px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) max(12px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px));
  background: #101010;
}

.case-gallery-title {
  margin-right: auto;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.case-gallery-viewer .pswp__button--close,
.case-gallery-viewer .pswp__button--zoom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: auto;
  min-width: 84px;
  height: 48px;
  padding: 0 12px;
  border: 1px solid #646464;
  border-radius: 6px;
  color: #ffffff;
  background: #242424;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  opacity: 1;
}

.case-gallery-viewer .pswp__button--close {
  min-width: 96px;
  border-color: #ffffff;
  color: #101010;
  background: #ffffff;
}

.case-gallery-viewer:not(.pswp--zoom-allowed) .pswp__button--zoom {
  display: none;
}

.case-gallery-viewer .pswp__button--close .pswp__icn {
  fill: #101010;
  color: #101010;
}

.case-gallery-viewer .pswp__button--close .pswp__icn,
.case-gallery-viewer .pswp__button--zoom .pswp__icn {
  position: static;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
}

.case-gallery-viewer .pswp__button--close .pswp__icn-shadow {
  stroke: #101010;
}

.case-gallery-viewer button:focus-visible,
.case-gallery-caption:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.case-gallery-footer {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  gap: 10px;
  padding: 12px max(16px, env(safe-area-inset-right, 0px)) max(14px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: #101010;
}

.case-gallery-caption {
  max-width: 900px;
  max-height: 4.8em;
  margin: 0 auto;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  -webkit-overflow-scrolling: touch;
}

.case-gallery-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(480px, 100%);
  margin: 0 auto;
}

.case-gallery-step {
  flex: 1 1 0;
  min-width: 0;
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid #646464;
  border-radius: 6px;
  color: #ffffff;
  background: #242424;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}

.case-gallery-step:disabled {
  border-color: #3c3c3c;
  color: #858585;
  background: #181818;
  cursor: default;
}

.case-gallery-count {
  flex: 0 0 60px;
  margin: 0;
  color: #ffffff;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
  text-align: center;
}

.case-gallery-hint {
  margin: 0;
  color: #c4c4c4;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

@media (max-height: 480px) and (orientation: landscape) {
  .case-gallery-viewer .pswp__top-bar {
    height: calc(56px + env(safe-area-inset-top, 0px));
  }

  .case-gallery-footer {
    gap: 6px;
    padding-top: 8px;
  }

  .case-gallery-caption {
    max-height: 1.6em;
  }

  .case-gallery-hint {
    display: none;
  }
}
