.case-studies-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(60px, 6.5vw, 88px) clamp(24px, 5vw, 80px);
  border-block: 1px solid rgba(255, 255, 255, 0.14);
  background-color: #0b0d12;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  color: #f5f2ed;
}

.case-studies-section.reveal-section {
  opacity: 1;
  transform: none;
}

.case-studies-section::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  left: clamp(24px, 5vw, 80px);
  width: min(360px, 36vw);
  height: 3px;
  background: var(--amber);
}

.case-studies-shell {
  width: min(1480px, 100%);
  margin: 0 auto;
}

.case-studies-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.case-studies-intro .eyebrow {
  margin: 0;
  color: #f5f2ed;
}

.case-carousel {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(9, 11, 16, 0.94);
  touch-action: pan-y;
  position: relative;
}

.case-carousel-viewport {
  overflow: hidden;
}

.case-study-list {
  display: flex;
  width: 100%;
  transition: transform 720ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.case-carousel.is-auto-peeking .case-study-list {
  transition-duration: 900ms;
}

.case-study-row {
  display: grid;
  flex: 0 0 100%;
  grid-template-columns: minmax(0, 51fr) minmax(0, 49fr);
  min-width: 0;
  min-height: clamp(500px, 43vw, 570px);
}

.case-study-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: clamp(30px, 3.2vw, 46px);
  border-right: 1px solid rgba(255, 255, 255, 0.17);
}

.case-study-kicker {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 16px;
  align-items: end;
  margin: 0 0 clamp(24px, 2.8vw, 38px);
  font-family: var(--mono-font);
  text-transform: uppercase;
}

.case-study-kicker b {
  grid-row: 1 / 3;
  color: var(--amber);
  font-family: var(--display-font);
  font-size: clamp(3.4rem, 5vw, 5.8rem);
  line-height: 0.8;
}

.case-study-kicker span {
  color: #f5f2ed;
  font-size: clamp(0.86rem, 1.2vw, 1.08rem);
  font-weight: 800;
}

.case-study-kicker em {
  color: rgba(245, 242, 237, 0.56);
  font-size: 0.72rem;
  font-style: normal;
}

.case-study-copy h3 {
  max-width: 680px;
  margin: 0;
  color: #f5f2ed;
  font-size: clamp(1.9rem, 2.8vw, 3.45rem);
  line-height: 0.99;
  letter-spacing: 0;
}

.case-gap {
  margin-top: clamp(22px, 2.5vw, 32px);
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.case-gap > span,
.case-system > span,
.case-result > span,
.case-advisory > span,
.case-buyer-insight > span {
  display: block;
  margin-bottom: 10px;
  color: var(--amber);
  font-family: var(--mono-font);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.case-buyer-insight {
  margin-top: 30px;
  border-left: 3px solid var(--amber);
  padding: 4px 0 4px 18px;
}

.case-buyer-insight p {
  max-width: 680px;
  margin: 0;
  color: rgba(245, 242, 237, 0.76);
  font-size: 0.92rem;
  line-height: 1.55;
}

.case-gap p {
  max-width: 700px;
  margin: 0;
  color: rgba(245, 242, 237, 0.7);
  font-size: clamp(0.92rem, 1.05vw, 1.02rem);
  line-height: 1.55;
}

.case-slide-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-top: auto;
  padding-top: 22px;
}

.case-slide-foot p {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 14px;
  align-items: end;
  margin: 0;
}

.case-slide-foot strong {
  grid-row: 1 / 3;
  color: var(--amber);
  font-size: clamp(3.1rem, 4.4vw, 5.2rem);
  line-height: 0.78;
}

.case-slide-foot span,
.case-slide-foot em {
  color: rgba(245, 242, 237, 0.72);
  font-family: var(--mono-font);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
}

.case-open {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: transparent;
  padding: 0 18px;
  color: #f5f2ed;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 220ms ease, color 220ms ease, background-color 220ms ease;
}

.case-open i {
  display: inline-block;
  margin-left: 10px;
  font-style: normal;
  transition: transform 220ms ease;
}

.case-open:hover,
.case-open:focus-visible {
  border-color: var(--amber);
  background: var(--amber);
  color: #0b0d12;
}

.case-open:hover i,
.case-open:focus-visible i {
  transform: translateX(4px);
}

.case-proof {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 0;
  background: #050609;
  padding: 0;
  color: #f5f2ed;
  text-align: left;
  cursor: pointer;
}

.case-proof::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  pointer-events: none;
  transition: border-color 260ms ease;
}

.case-proof:hover::after,
.case-proof:focus-visible::after {
  border-color: var(--amber);
}

.case-proof-media,
.case-proof-media img {
  display: block;
  width: 100%;
  height: 100%;
}

.case-proof-media img {
  object-fit: cover;
  object-position: center;
  filter: saturate(0.84) contrast(1.04);
  transform: scale(1.005);
  transition: filter 500ms ease, transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.case-proof:hover img,
.case-proof:focus-visible img {
  filter: saturate(1) contrast(1.02);
  transform: scale(1.025);
}

.case-proof-label {
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(7, 8, 12, 0.91);
  padding: 16px 22px;
  font-family: var(--mono-font);
  text-transform: uppercase;
}

.case-proof-label b {
  color: var(--amber);
  font-size: 0.7rem;
}

.case-proof-label i {
  color: #f5f2ed;
  font-size: 0.68rem;
  font-style: normal;
}

.case-carousel-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  min-height: 64px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding: 12px 18px;
}

.case-carousel-arrows {
  display: flex;
  gap: 8px;
}

.case-carousel-arrows button,
.case-gallery-close,
.case-gallery-arrow {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: var(--amber);
  color: #0b0d12;
  font-size: 1.35rem;
  font-weight: 900;
  cursor: pointer;
  transition: border-color 200ms ease, background-color 200ms ease, color 200ms ease;
}

.case-carousel-arrows button {
  display: flex;
  width: auto;
  min-width: 112px;
  height: 46px;
  gap: 10px;
  align-items: center;
  justify-content: center;
  border-color: var(--amber);
  font-family: var(--mono-font);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.case-carousel-arrows button b {
  font-family: var(--body-font);
  font-size: 1rem;
  line-height: 1;
}

.case-gallery-close,
.case-gallery-arrow {
  background: transparent;
  color: #f5f2ed;
}

.case-carousel-arrows button:hover,
.case-carousel-arrows button:focus-visible,
.case-gallery-close:hover,
.case-gallery-close:focus-visible,
.case-gallery-arrow:hover,
.case-gallery-arrow:focus-visible {
  border-color: #f5f2ed;
  background: #f5f2ed;
  color: #0b0d12;
}

.case-carousel-dots {
  display: flex;
  grid-column: 2;
  justify-content: center;
  gap: 9px;
}

.case-carousel-dots button {
  width: 52px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: rgba(245, 242, 237, 0.48);
  font-family: var(--mono-font);
  font-size: 0.68rem;
  cursor: pointer;
  transition: width 260ms ease, border-color 220ms ease, color 220ms ease, background-color 220ms ease;
}

.case-carousel-dots button[aria-current="true"] {
  width: 76px;
  border-color: var(--amber);
  background: rgba(255, 90, 0, 0.12);
  color: var(--amber);
}

.case-carousel-controls > p {
  grid-column: 3;
  justify-self: end;
  margin: 0;
  color: rgba(245, 242, 237, 0.48);
  font-family: var(--mono-font);
  font-size: 0.72rem;
}

.case-carousel-controls > p span:first-child {
  color: var(--amber);
}

.case-open:focus-visible,
.case-proof:focus-visible,
.case-carousel button:focus-visible,
.case-gallery button:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

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

.case-gallery {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  border: 0;
  background: rgba(5, 6, 9, 0.96);
  padding: clamp(14px, 2.5vw, 34px);
  color: #f5f2ed;
}

.case-gallery::backdrop {
  background: rgba(5, 6, 9, 0.92);
}

.case-gallery-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1580px, 100%);
  height: 100%;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #0b0d12;
}

.case-gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  padding: 18px 22px;
}

.case-gallery-head span,
.case-gallery-foot > span {
  color: var(--amber);
  font-family: var(--mono-font);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.case-gallery-head h2 {
  margin: 4px 0 0;
  color: #f5f2ed;
  font-size: clamp(1.25rem, 2vw, 2rem);
}

.case-gallery-body {
  display: grid;
  grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
  min-height: 0;
}

.case-gallery-copy {
  min-width: 0;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  padding: clamp(28px, 3.4vw, 54px);
  scrollbar-color: var(--amber) #17191f;
}

.case-gallery-copy h3 {
  margin: 0 0 34px;
  color: #f5f2ed;
  font-size: clamp(2.35rem, 4vw, 5.1rem);
  line-height: 0.96;
}

.case-result {
  padding: 22px 0 26px;
  border-block: 1px solid rgba(255, 255, 255, 0.19);
}

.case-result > div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 18px;
  align-items: end;
}

.case-result strong {
  grid-row: 1 / 3;
  color: var(--amber);
  font-size: clamp(4.8rem, 8vw, 9rem);
  line-height: 0.78;
}

.case-result p,
.case-result em {
  margin: 0;
  color: #f5f2ed;
  font-family: var(--mono-font);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.case-gallery-copy .case-gap {
  margin-top: 32px;
}

.case-system {
  margin-top: 34px;
}

.case-system ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.case-system li {
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 11px;
  align-items: start;
  padding: 13px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(245, 242, 237, 0.76);
  font-size: 0.88rem;
  line-height: 1.4;
}

.case-system li i {
  width: 6px;
  height: 6px;
  margin-top: 6px;
  background: var(--amber);
}

.case-advisory {
  margin: 32px 0 0;
  border-left: 3px solid var(--amber);
  background: rgba(255, 90, 0, 0.08);
  padding: 20px;
  color: rgba(245, 242, 237, 0.78);
  font-size: 0.92rem;
  line-height: 1.55;
}

.case-intake-logic {
  margin-top: 30px;
  border-block: 1px solid rgba(255, 255, 255, 0.2);
}

.case-intake-logic summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  color: #f5f2ed;
  font-family: var(--mono-font);
  font-size: 0.7rem;
  font-weight: 800;
  list-style: none;
  text-transform: uppercase;
}

.case-intake-logic summary::-webkit-details-marker {
  display: none;
}

.case-intake-logic summary b {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--amber);
  color: var(--amber);
  font-size: 1rem;
  transition: transform 200ms ease, background-color 200ms ease, color 200ms ease;
}

.case-intake-logic[open] summary b {
  background: var(--amber);
  color: #0b0d12;
  transform: rotate(45deg);
}

.case-intake-logic > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  padding: 6px 0 24px;
}

.case-intake-logic section {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.case-intake-logic h4 {
  margin: 0 0 10px;
  color: var(--amber);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.case-intake-logic ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
}

.case-intake-logic li {
  color: rgba(245, 242, 237, 0.68);
  font-size: 0.78rem;
  line-height: 1.42;
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 30px;
}

.case-tags span {
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 7px 9px;
  color: rgba(245, 242, 237, 0.68);
  font-family: var(--mono-font);
  font-size: 0.6rem;
}

.case-conclusion {
  margin: 32px 0 0;
  color: #f5f2ed;
  font-size: clamp(1.25rem, 1.8vw, 1.75rem);
  font-weight: 750;
  line-height: 1.28;
}

.case-highlight {
  margin: 20px 0 0;
  border-top: 1px solid var(--amber);
  padding-top: 16px;
  color: var(--amber);
  font-family: var(--mono-font);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.5;
  text-transform: uppercase;
}

.case-gallery-proof {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  background: #050609;
}

.case-gallery-stage {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  gap: 14px;
  align-items: center;
  min-height: 0;
  padding: 22px;
  touch-action: pan-y;
}

.case-gallery-stage figure {
  display: grid;
  min-width: 0;
  max-height: 100%;
  margin: 0;
}

.case-gallery-stage img {
  display: block;
  width: 100%;
  max-height: calc(100dvh - 220px);
  object-fit: contain;
}

.case-gallery-stage figcaption {
  margin: 12px 0 0;
  color: rgba(245, 242, 237, 0.62);
  font-size: 0.8rem;
  line-height: 1.45;
  text-align: center;
}

.case-gallery-foot {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 12px 20px;
}

.case-gallery-thumbs {
  display: flex;
  justify-content: center;
  gap: 9px;
}

.case-gallery-thumbs button {
  width: 98px;
  height: 58px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #0b0d12;
  padding: 0;
  cursor: pointer;
}

.case-gallery-thumbs button[aria-current="true"] {
  border-color: var(--amber);
}

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

@media (max-width: 1050px) {
  .case-study-row {
    grid-template-columns: minmax(0, 52fr) minmax(0, 48fr);
  }

  .case-slide-foot {
    grid-template-columns: 1fr;
  }

  .case-open {
    width: 100%;
  }

  .case-gallery-body {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .case-gallery-copy {
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .case-gallery-proof {
    min-height: 620px;
  }
}

@media (max-width: 700px) {
  .case-intake-logic > div {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .case-intake-logic summary b {
    transition: none;
  }
}

@media (max-width: 760px) {
  .case-studies-section {
    padding: 52px 20px;
    background-size: 54px 54px;
  }

  .case-study-row {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .case-study-copy {
    min-height: 500px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.17);
    padding: 26px 22px;
  }

  .case-study-kicker {
    margin-bottom: 32px;
  }

  .case-study-copy h3 {
    font-size: clamp(2rem, 9vw, 3rem);
  }

  .case-gap p {
    font-size: 0.96rem;
  }

  .case-slide-foot {
    margin-top: 28px;
  }

  .case-proof {
    min-height: 320px;
  }

  .case-proof-media {
    aspect-ratio: 4 / 3;
  }

  .case-carousel-controls {
    grid-template-columns: auto 1fr;
    gap: 16px;
  }

  .case-carousel-dots {
    grid-column: 2;
    justify-content: flex-end;
  }

  .case-carousel-dots button {
    width: 38px;
  }

  .case-carousel-dots button[aria-current="true"] {
    width: 52px;
  }

  .case-carousel-controls > p {
    display: none;
  }

  .case-carousel-arrows button {
    min-width: 46px;
    width: 46px;
    height: 46px;
  }

  .case-carousel-arrows button span {
    display: none;
  }

  .case-gallery {
    padding: 0;
  }

  .case-gallery-shell {
    border: 0;
  }

  .case-gallery-head {
    position: sticky;
    z-index: 5;
    top: 0;
    background: #0b0d12;
    padding: 14px 16px;
  }

  .case-gallery-copy {
    padding: 32px 20px;
  }

  .case-gallery-copy h3 {
    font-size: clamp(2.35rem, 11vw, 3.75rem);
  }

  .case-result > div,
  .case-system ul {
    grid-template-columns: 1fr;
  }

  .case-result strong {
    grid-row: auto;
  }

  .case-gallery-proof {
    min-height: 520px;
  }

  .case-gallery-stage {
    position: relative;
    display: block;
    padding: 18px 12px;
  }

  .case-gallery-stage figure {
    min-height: 420px;
    align-content: center;
  }

  .case-gallery-stage img {
    max-height: 430px;
  }

  .case-gallery-arrow {
    position: absolute;
    z-index: 3;
    top: 42%;
    background: rgba(11, 13, 18, 0.9);
  }

  .case-gallery-prev { left: 12px; }
  .case-gallery-next { right: 12px; }

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

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

@media (prefers-reduced-motion: reduce) {
  .case-study-list,
  .case-proof-media img,
  .case-open i,
  .case-carousel-dots button {
    transition: none !important;
  }
}
