/*-------------------------------------------------
  Case Studies Reel Section
--------------------------------------------------*/

.cs-case-section {
  --cs-bg: #0a0909;
  --cs-title: #f6f4ef;
  --cs-text: rgba(236, 232, 223, 0.9);
  --cs-metric: rgba(246, 244, 239, 0.86);
  --cs-metric-chip: rgba(0, 0, 0, 0.34);
  --cs-accent: #d4af37;
  --cs-card-radius: 34px;
  position: relative;
  overflow: hidden;
  background-color: var(--cs-bg);
}

.cs-case-section.ca-surface,
.cs-case-section.ca-surface.ca-surface-dark {
  background: var(--cs-bg) !important;
  background-color: var(--cs-bg) !important;
}

.cs-case-section.ca-surface::before,
.cs-case-section.ca-surface::after {
  content: none;
  display: none;
}

.cs-case-section .container {
  position: relative;
  z-index: 2;
}

.cs-case-heading {
  margin: 0 auto clamp(34px, 4.2vw, 58px);
}

.cs-case-label {
  display: inline-block;
  margin: 0 0 16px;
  color: rgba(212, 175, 55, 0.88);
  font-family: var(--tp-ff-unbounded);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cs-case-title {
  margin: 0;
  color: var(--cs-title);
  font-family: var(--tp-ff-unbounded);
  font-size: clamp(40px, 6vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.cs-case-reel-shell {
  position: relative;
  margin: 0 auto;
  width: min(100%, 1380px);
}

.cs-case-reel {
  width: 100%;
  overflow: visible;
}

.cs-case-reel .swiper-slide {
  height: auto;
  opacity: 0.46;
  transform: scale(0.9);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease;
}

.cs-case-reel .swiper-slide-active {
  opacity: 1;
  transform: scale(1);
}

.cs-case-card {
  position: relative;
  display: block;
  min-height: clamp(500px, 52vw, 700px);
  border-radius: var(--cs-card-radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transform: translateZ(0);
}

.cs-case-card::before,
.cs-case-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.cs-case-card::before {
  background: linear-gradient(
    to top,
    rgba(4, 4, 4, 0.92) 0%,
    rgba(8, 8, 8, 0.76) 24%,
    rgba(0, 0, 0, 0.16) 62%,
    rgba(0, 0, 0, 0) 100%
  );
}

.cs-case-card::after {
  background: linear-gradient(
    to bottom,
    rgba(6, 6, 6, 0.5) 0%,
    rgba(6, 6, 6, 0.2) 16%,
    rgba(6, 6, 6, 0) 34%
  );
}

.cs-case-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.cs-case-video,
.cs-case-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cs-case-video {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.cs-case-card.is-video-ready .cs-case-video {
  opacity: 1;
}

.cs-case-fallback {
  opacity: 1;
  transition: opacity 0.5s ease;
}

.cs-case-card.is-video-ready .cs-case-fallback {
  opacity: 0;
}

.cs-case-metrics {
  position: absolute;
  left: 22px;
  right: 22px;
  top: 20px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cs-case-metrics span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--cs-metric-chip);
  color: var(--cs-metric);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.cs-case-copy {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 26px;
  z-index: 4;
}

.cs-case-copy h4 {
  margin: 0 0 8px;
  color: var(--cs-title);
  font-family: var(--tp-ff-unbounded);
  font-size: clamp(21px, 2.2vw, 32px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.cs-case-copy p {
  margin: 0;
  max-width: 38ch;
  color: var(--cs-text);
  font-size: 15px;
  line-height: 1.55;
}

.cs-case-nav-btn {
  position: absolute;
  top: 50%;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
  background: rgba(3, 3, 3, 0.92);
  color: rgba(246, 244, 239, 0.9);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.4);
  transform: translate(-50%, -50%);
  transition: transform 0.32s ease, background-color 0.32s ease, color 0.32s ease;
}

.cs-case-nav-btn:hover {
  background: rgba(212, 175, 55, 0.94);
  color: #0a0909;
}

.cs-case-nav-btn--prev {
  left: calc(50% - clamp(248px, 22vw, 326px));
}

.cs-case-nav-btn--next {
  left: calc(50% + clamp(248px, 22vw, 326px));
}

.cs-case-nav-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (hover: hover) {
  .cs-case-reel .swiper-slide-active .cs-case-card:hover {
    transform: scale(1.012);
  }
}

@media (max-width: 1199px) {
  .cs-case-card {
    min-height: clamp(480px, 66vw, 620px);
  }

  .cs-case-nav-btn--prev {
    left: clamp(26px, 5.5vw, 62px);
  }

  .cs-case-nav-btn--next {
    left: auto;
    right: clamp(26px, 5.5vw, 62px);
    transform: translate(50%, -50%);
  }
}

@media (max-width: 767px) {
  .cs-case-section {
    padding-top: 88px;
    padding-bottom: 92px;
  }

  .cs-case-heading {
    margin-bottom: 28px;
  }

  .cs-case-label {
    margin-bottom: 12px;
    font-size: 11px;
  }

  .cs-case-title {
    font-size: clamp(34px, 11.5vw, 46px);
  }

  .cs-case-card {
    min-height: clamp(460px, 136vw, 560px);
    border-radius: 28px;
  }

  .cs-case-metrics {
    left: 16px;
    right: 16px;
    top: 16px;
  }

  .cs-case-metrics span {
    font-size: 10px;
    min-height: 25px;
    padding: 0 9px;
  }

  .cs-case-copy {
    left: 16px;
    right: 16px;
    bottom: 18px;
  }

  .cs-case-copy h4 {
    font-size: clamp(20px, 7.5vw, 26px);
    margin-bottom: 7px;
  }

  .cs-case-copy p {
    font-size: 14px;
    line-height: 1.5;
  }

  .cs-case-nav-btn {
    width: 46px;
    height: 46px;
  }

  .cs-case-nav-btn--prev {
    left: 18px;
    transform: translate(0, -50%);
  }

  .cs-case-nav-btn--next {
    right: 18px;
    transform: translate(0, -50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cs-case-reel .swiper-slide,
  .cs-case-video,
  .cs-case-fallback,
  .cs-case-nav-btn {
    transition: none;
  }
}
