/* Case-study switcher — replaces the old text "Back" link at the top of
   each case study with a bento (2x2 grid) icon. Clicking it opens a
   full-page takeover (not a floating dialog) listing the other case
   studies, using the exact same gallery markup/classes as the homepage
   (.port-gallery/.port-block/.port-item/.image-con/.hover-info/
   .portcat-small/.portfolio-infotitle) so the thumbnails match 1:1.
   The site header stays visible above the takeover (raised z-index)
   so the logo and nav are still reachable while it's open. The close
   button lives inside the markup of the grid's second thumbnail (see
   the case-study HTML files) so it's always within the content
   container, never pinned to the bare viewport edge.
   Loaded after Webflow's generated CSS, before responsive-fixes so
   that file can still patch it for narrow screens. */
.case-switcher-trigger {
  background: none;
  border: none;
  margin-bottom: 80px;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  transition: opacity .2s;
}

.case-switcher-trigger:hover {
  opacity: .7;
}

.case-switcher-trigger img {
  width: 32px;
  height: 32px;
  display: block;
}

.header {
  z-index: 10001;
}

.case-switcher {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: var(--_main-style---bacground);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .3s ease, visibility 0s linear .3s;
}

.case-switcher.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .3s ease;
}

/* The close button sits inside the grid itself — overlaid on the
   top-right corner of the second thumbnail — rather than floating over
   the empty space beside the title, so it stays inside the content
   container at every viewport width instead of pinning to the raw
   viewport edge. */
.image-con {
  position: relative;
}

.case-switcher-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(18, 18, 18, .6);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color .2s;
}

.case-switcher-close:hover {
  background-color: rgba(18, 18, 18, .85);
}

.case-switcher-close img {
  width: 20px;
  height: 20px;
  display: block;
}

.case-switcher-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 160px 20px 120px;
}

.case-switcher-title {
  color: var(--_main-style---white);
  z-index: 1;
  font-family: Parkinsans, sans-serif;
  font-size: 48px;
  font-weight: 500;
  line-height: 120%;
  margin-bottom: 40px;
  position: relative;
}

body.case-switcher-open {
  overflow: hidden;
}
