/* Case Study Slider — a pinned, scroll-driven horizontal journey through
   the [case_study_slider] shortcode's selected case studies, modeled on
   https://demos.gsap.com/demo/horizontal-scrolling-gallery/ — same
   pin + scrub technique, via GSAP's ScrollTrigger this time (see
   script.js) rather than a hand-rolled position:sticky.

   Structure: .dh-case-slider is what ScrollTrigger pins — it inserts its
   own spacer to reserve the scroll distance, so this stays a normal
   (non-tall) element in the CSS; no JS-set height here. Inside it,
   .dh-case-slider__strip is one long flex row (intro content + every
   panel) that gets translateX'd by the same GSAP timeline that drives the
   stack-reveal. There is no click/expand state — every panel is always
   fully visible and a fixed width; it's purely the scroll-driven
   translateX that determines what's in view.

   The heading (50vw) and each panel (66vw) are both narrower than the
   viewport on purpose: neither ever fills the screen alone, so there's
   always a peek of whatever's next (and, once scrolling, of whatever
   just passed) visible at the edges — including at rest, before any
   scrolling happens. The heading only ever appears once, right at the
   start, then scrolls away for good as the panels take over.

   Colors/fonts reference DH's design tokens (var(--dh-*)) with sensible
   fallbacks, so this picks up the real tokens once it lands in the live
   theme — swap the --dh-case-slider-color-* fallbacks for DH's real
   secondary palette when that's available. */

.dh-case-slider {
  --dh-case-slider-panel-h: 100vh;
  --dh-case-slider-content-w: 50vw;
  --dh-case-slider-panel-w: 66vw;
  --dh-case-slider-ink: var(--dh-color-neutral-900, #1b1b1d);
  --dh-case-slider-color-1: var(--dh-color-accent-1, #ce8fdd);
  --dh-case-slider-color-2: var(--dh-color-accent-2, #2176ff);
  --dh-case-slider-color-3: var(--dh-color-accent-3, #f1f1f2);

  position: relative;
  background: var(--dh-surface-page, #fff);
  color: var(--dh-case-slider-ink);
  height: var(--dh-case-slider-panel-h);
  overflow: hidden;

  /* Full-bleed regardless of the Divi row/column padding this shortcode
	   gets dropped into — matches the reference, which runs edge-to-edge
	   with no centered container. Safe to drop this rule if the block is
	   ever placed in an actual Divi Fullwidth Section instead (Divi
	   already renders those edge-to-edge, so this becomes a no-op there). */
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.dh-case-slider__strip {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  height: 100%;
  will-change: transform;
}

.dh-case-slider__content {
  background: #000;
  padding: 100px 2.5rem 2.5rem 2.5rem;
  box-sizing: border-box;
  flex: 0 0 var(--dh-case-slider-content-w);
  width: var(--dh-case-slider-content-w);
  align-items: center;
}

/* .dh-case-slider__heading {
  flex: 0 0 var(--dh-case-slider-heading-w);
  width: var(--dh-case-slider-heading-w);
  display: flex;
  align-items: center;
} */

.dh-case-slider__title {
  margin: 0;
  max-width: 75%;
  text-wrap: balance;
  font-family: "Sentinel SSm A", "Sentinel SSm B", "Domine", serif;
  color: var(--dh-text-inverse, #fff);
  font-size: 65px;
  font-style: normal;
  font-weight: 800;
  line-height: 75px; /* 115.385% */
}

.dh-case-slider__body {
  max-width: 75%;
  text-wrap: balance;
  font-family: "Sentinel SSm A", "Sentinel SSm B", "Domine", serif;
}

.dh-case-slider__content p {
  color: var(--dh-text-inverse, #fff);
  font-family: "Sentinel SSm A", "Sentinel SSm B", "Domine", serif;
  font-size: 30px;
  font-style: normal;
  font-weight: 400;
  line-height: 42px; /* 140% */
}

.dh-case-slider__panel {
  position: relative;
  flex: 0 0 var(--dh-case-slider-panel-w);
  width: var(--dh-case-slider-panel-w);
  display: flex;
  flex-direction: column;
  background: var(--dh-case-slider-color-1);
}

.dh-case-slider__panel:nth-of-type(3n + 2) {
  background: var(--dh-case-slider-color-2);
}
.dh-case-slider__panel:nth-of-type(3n + 3) {
  background: var(--dh-case-slider-color-3);
}
/* .dh-case-slider__panel:nth-of-type(4n + 4) {
  background: var(--dh-case-slider-color-4);
} */

.dh-case-slider__index {
  position: absolute;
  left: 1.5rem;
  top: 1.5rem;
  z-index: 1;
  font-family: "Source Sans Pro", sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--dh-case-slider-ink);
  opacity: 0.6;
}

.dh-case-slider__media {
  flex: 1 1 auto;
  min-height: 0;
}

.dh-case-slider__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dh-case-slider__bar {
  /* Sized to its own content (not a fixed % of the panel) so the Body /
     Measurable-Impact copy below doesn't get clipped — .dh-case-slider__media's
     flex:1 1 auto takes up whatever's left. */
  position: relative;
  flex: 0 0 auto;
  box-sizing: border-box;
  padding: 2rem 8rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dh-case-slider__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
}

.dh-case-slider__pill {
  display: inline-block;
  padding: 0.2rem 0.9rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: "Source Sans Pro", sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
}

/* .dh-case-slider__eyebrow {
  font-family: "Source Sans Pro", sans-serif;
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
} */
.dh-case-slider__eyebrow {
  font-family: "Source Sans Pro";
  font-size: 20px;
  font-style: normal;
  font-weight: 700;
  line-height: 28px; /* 140% */
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
}

.dh-case-slider__panel:nth-of-type(3n + 3) .dh-case-slider__eyebrow {
	color: #ce8fdd;
}

.dh-case-slider__panel-title {
  margin: 0;
  font-weight: 900;
  font-size: 43px;
  line-height: 1.15;
  color:#000;
  font-family: "Sentinel SSm A", "Sentinel SSm B", "Domine", serif;
}

.dh-case-slider__panel-body {
  margin: 0;
  font-size: 22px;
  font-style: normal;
  font-weight: 500;
  line-height: 35px;
	color: #000;
}

.dh-case-slider__impact {
  max-width: 34rem;
  margin-top: 0.5rem;
  padding-left: 1rem;
  border-left: 10px solid #fff;
  color: #000;
}

.dh-case-slider__panel:nth-of-type(3n + 3) .dh-case-slider__impact { 
	  border-left: 10px solid #ce8fdd;
}

.dh-case-slider__impact-title {
  display: block;
  margin-bottom: 0.25rem;
  font-family: "Source Sans Pro", sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #000;
  line-height: 16.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.dh-case-slider__impact-body {
	margin: 0;
	max-width: 34rem;
	font-family: "Sentinel SSm A", "Sentinel SSm B", "Domine", serif;
	font-size: 18px;
	line-height: 24px;
	text-wrap: balance;
}

/* .dh-case-slider__cta {
  position: absolute;
  right: 2rem;
  bottom: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 1.375rem;
  color: var(--dh-case-slider-ink);
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
} */
.dh-case-slider__cta::after {
  content: url("data:image/svg+xml,%3Csvg width='25' height='18' viewBox='0 0 25 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M24.9902 8.61328L16.4209 17.2412H10.8105L17.4902 10.6348H0V6.60645H17.4902L10.8105 0H16.4209L24.9902 8.61328Z' fill='white'/%3E%3C/svg%3E%0A");
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
  transition: transform 0.2s ease;
}

.dh-case-slider__cta {
  color: #f1f1f2;
  text-align: right;
  /* Orchid link */
  font-size: 30px;
  font-style: italic;
  font-weight: 900;
  line-height: 26px;
  margin: 25px 0px;
  cursor: pointer;
}

.dh-case-slider__panel:nth-of-type(3n + 3) .dh-case-slider__cta::after {
	content: url("data:image/svg+xml,%3Csvg width='25' height='18' viewBox='0 0 25 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M24.9902 8.61328L16.4209 17.2412H10.8105L17.4902 10.6348H0V6.60645H17.4902L10.8105 0H16.4209L24.9902 8.61328Z' fill='%23ce8fdd'/%3E%3C/svg%3E%0A");
}

.dh-case-slider__panel:nth-of-type(3n + 3) .dh-case-slider__cta {
	  color: #ce8fdd;
}



.dh-case-slider__cta:hover::after,
.dh-case-slider__cta:focus-visible::after {
  transform: translateX(5px);
}

/* .dh-case-slider__cta:hover,
.dh-case-slider__cta:focus-visible {
  background-color: var(--dh-case-slider-ink);
  color: var(--dh-surface-page, #fff);
} */

.dh-case-slider__empty {
  padding: 2rem;
  background: var(--dh-color-neutral-100, #f0f0f1);
  color: var(--dh-color-neutral-700, #4c5866);
}

.dh-case-slider .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Below this width the pinned scroll-journey is more trouble than it's
   worth on touch devices — fall back to a plain vertical stack instead.
   script.js's gsap.matchMedia() checks the same breakpoint and never
   creates the ScrollTrigger/pin at all below it. 
	@media (max-width: 56.25em)
*/
@media (max-width: 56.25em) {
  .dh-case-slider {
    height: auto;
    overflow: visible;
  }
	
	.dh-case-slider__title {
		font-size:42px;
		line-height: 1.15;
		max-width: 100%;
	}
	
	.dh-case-slider__panel-title {
		font-size:34px;
	}
	
	.dh-case-slider__cta {
		font-size:24px;
	}

  .dh-case-slider__strip {
    flex-direction: column;
    height: auto;
    transform: none !important;
  }

  .dh-case-slider__content,
  .dh-case-slider__panel {
    flex-basis: auto;
    width: 100%;
  }

  .dh-case-slider__content {
    padding: 3rem 1.5rem;
  }

  .dh-case-slider__media {
    aspect-ratio: 16 / 9;
  }

  .dh-case-slider__bar {
    padding: 2rem 2rem;
  }
}
