/* =============================================================
   HZL Microsite — Section 18: Case Studies
   Editorial Feature Grid + Animated Gradient Bars background
   ─────────────────────────────────────────────────────────────
   Background : gradient bars (ported from 21st.dev wisedev
                component) — subtle green pulses from bottom
   Layout     : Top row  62% video + 38% card   → 480 px
                Bottom row  50% + 50%            → 360 px
   ============================================================= */

/* ── Section shell ──────────────────────────────────────────── */
.cs {
  position: relative;
  background: #020c04;
  padding: 7rem 0 6rem;
  overflow: hidden;
}

/* ════════════════════════════════════════════════════════════
   GRADIENT BARS BACKGROUND  (populated by casestudies.js)
   ════════════════════════════════════════════════════════════ */
.cs__bars {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 0;
  pointer-events: none;
}

@keyframes csPulseBar {
  0%   { transform: scaleY(var(--bar-h)); }
  100% { transform: scaleY(calc(var(--bar-h) * 0.62)); }
}

.cs__bar {
  flex: 1 0 0;
  height: 100%;
  background: linear-gradient(
    to top,
    rgba(127, 185, 66, 0.11) 0%,
    transparent              100%
  );
  transform-origin: bottom;
  transform: scaleY(var(--bar-h, 0.5));
  animation: csPulseBar 2.4s ease-in-out infinite alternate;
  will-change: transform;
}

/* Top + bottom scrim to blend bars with surrounding sections */
.cs__fade {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  pointer-events: none;
}
.cs__fade--top {
  top: 0;
  height: 180px;
  background: linear-gradient(to bottom, #020c04 0%, transparent 100%);
}
.cs__fade--bottom {
  bottom: 0;
  height: 180px;
  background: linear-gradient(to top, #020c04 0%, transparent 100%);
}

/* ── Section content wrapper ────────────────────────────────── */
.cs__inner {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(2rem, 5vw, 5rem);
}

/* ════════════════════════════════════════════════════════════
   SECTION HEADER
   ════════════════════════════════════════════════════════════ */
.cs__header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 3rem;
}

/* Small tag row — same pattern as other sections */
.cs__header-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.cs__section-no {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: #7fb942;
  line-height: 1;
}

.cs__header-rule {
  display: block;
  width: 28px;
  height: 1.5px;
  background: rgba(127, 185, 66, 0.40);
  flex-shrink: 0;
}

.cs__eyebrow {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #7fb942;
  line-height: 1;
}

/* Large section headline */
.cs__heading {
  font-family: var(--font-display);
  font-size: 35px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.04;
  text-transform: uppercase;
  color: rgba(238, 242, 246, 0.94);
  margin: 0;
  white-space: nowrap;
}

/* ════════════════════════════════════════════════════════════
   GRID
   ════════════════════════════════════════════════════════════ */
.cs__grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Top row: video (62%) + card 2 (38%) */
.cs__row--top {
  display: grid;
  grid-template-columns: 62fr 38fr;
  gap: 14px;
  height: 480px;
}

/* Bottom row: card 3 + card 4 (equal) */
.cs__row--bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  height: 360px;
}

/* ════════════════════════════════════════════════════════════
   CARD BASE
   ════════════════════════════════════════════════════════════ */
.cs__card {
  position: relative;
  overflow: hidden;
  border-radius: 5px;
  cursor: pointer;
  transition:
    transform  0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    box-shadow 0.45s ease;
}

.cs__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.60);
}

/* ════════════════════════════════════════════════════════════
   CURSOR WANDER EFFECT — Stories That Shape HZL 2.0 cards
   ════════════════════════════════════════════════════════════ */

/* Perspective wrapper — set on row and scoop inner */
.cs__row--three {
  perspective: 1200px;
  perspective-origin: 50% 50%;
}

/* ── Scoop header: heading left, desc + CTA right ─────────── */
.cs__header--split {
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.cs__header--split .cs__heading {
  flex-shrink: 0;
}

.cs__header-rhs {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
  max-width: 600px;
}

.cs__header-desc {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: rgba(238, 242, 246, 0.82);
  margin: 0;
}

.cs__view-all-arrow { transition: transform 0.2s; }
.cs__view-all:hover .cs__view-all-arrow { transform: translateX(4px); }

.cs--scoop .cs__inner {
  perspective: 1200px;
  perspective-origin: 50% 50%;
}

/* Wander-enabled cards override base transition for smooth tilt */
.cs--stories .cs__card,
.cs--scoop .cs__card {
  transform-style: preserve-3d;
  transform-origin: center center;
  transition:
    transform  0.12s ease-out,
    box-shadow 0.12s ease-out;
  will-change: transform;
}

/* Reset transition on mouse-leave (slower spring back) */
.cs--stories .cs__card.is-leaving,
.cs--scoop .cs__card.is-leaving {
  transition:
    transform  0.65s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 0.65s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Spotlight — radial gradient that follows the cursor */
.cs__spotlight {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(
    circle 280px at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.10) 0%,
    rgba(127, 185, 66, 0.06) 40%,
    transparent 70%
  );
}

.cs--stories .cs__card:hover .cs__spotlight,
.cs--scoop .cs__card:hover .cs__spotlight {
  opacity: 1;
}

/* Photo */
.cs__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.72s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}
.cs__card:hover .cs__img {
  transform: scale(1.06);
}

/* Gradient overlay */
.cs__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(2, 12, 4, 0.78)  0%,
    rgba(2, 12, 4, 0.35) 40%,
    rgba(2, 12, 4, 0.05) 100%
  );
}

/* Default content block (image cards) */
.cs__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.8rem 2rem 1.75rem;
  gap: 0.6rem;
}

/* Card title (image cards) */
.cs__card-title {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.22;
  color: rgba(238, 242, 246, 0.93);
  margin: 0;
  max-width: 360px;
}

/* Read More link — hidden, reveals on hover */
.cs__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(238, 242, 246, 0.78);
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity   0.3s ease 0.08s,
    transform 0.3s ease 0.08s,
    color     0.22s ease;
}
.cs__card:hover .cs__link {
  opacity: 1;
  transform: translateY(0);
  color: rgba(238, 242, 246, 0.80);
}

.cs__link-arrow {
  display: inline-block;
  transition: transform 0.25s ease;
}
.cs__card:hover .cs__link-arrow {
  transform: translateX(5px);
}

/* ════════════════════════════════════════════════════════════
   VIDEO CARD  (Card 1 — Here's the Scoop)
   ════════════════════════════════════════════════════════════ */

/* Muted looping video fills the card */
.cs__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.72s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}
.cs__card--video:hover .cs__video {
  transform: scale(1.04);
}

/* Slightly heavier overlay for the video card so text reads well */
.cs__card--video .cs__overlay {
  background: linear-gradient(
    to top,
    rgba(2, 12, 4, 0.80)  0%,
    rgba(2, 12, 4, 0.45) 45%,
    rgba(2, 12, 4, 0.12) 100%
  );
}

/* Video card content — everything visible (no hover reveal) */
.cs__content--video {
  justify-content: flex-end;
  padding: 2.2rem 2.4rem 2rem;
  gap: 0.9rem;
}

/* "HERE'S THE SCOOP" headline — same style as image card titles */
.cs__scoop-eyebrow {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.22;
  color: rgba(238, 242, 246, 0.93);
  margin: 0;
  max-width: 360px;
}

/* Body copy */
.cs__scoop-body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.70;
  color: rgba(238, 242, 246, 0.82);
  margin: 0;
  max-width: 360px;   /* keeps text from running into the play button */
}

/* ── Play button — anchored to bottom-right of card ─────────── */
.cs__play-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.72em;
  position: absolute;
  right: 2.4rem;
  bottom: 2rem;
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}

.cs__play-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.5px solid rgba(127, 185, 66, 0.55);
  background: rgba(127, 185, 66, 0.10);
  color: #7fb942;
  flex-shrink: 0;
  transition:
    background 0.28s ease,
    border-color 0.28s ease,
    transform 0.28s ease;
}

.cs__play-btn:hover .cs__play-icon,
.cs__card--video:hover .cs__play-icon {
  background: rgba(127, 185, 66, 0.22);
  border-color: rgba(127, 185, 66, 0.85);
  transform: scale(1.08);
}

.cs__play-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(238, 242, 246, 0.85);
  transition: color 0.25s ease;
}
.cs__play-btn:hover .cs__play-label {
  color: #ffffff;
}

/* ── Full-width video card (Here's the Scoop standalone) ────── */
.cs__card--full {
  width: 100%;
  height: 520px;
}

/* ── Here's the Scoop: compact padding + smaller video to fit 1 viewport ── */
.cs--scoop {
  padding: 44px 0 36px;
}
.cs--scoop .cs__card--full {
  height: 400px;
}

/* ── 3-card equal row (Stories That Shape HZL 2.0) ─────────── */
.cs__row--three {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  height: 420px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .cs__row--top    { height: 420px; }
  .cs__row--bottom { height: 310px; }
}

@media (max-width: 860px) {
  .cs__row--top {
    grid-template-columns: 1fr;
    height: auto;
  }
  .cs__card--video { height: 420px; }
  .cs__row--top .cs__card:not(.cs__card--video) { height: 320px; }

  .cs__row--bottom { height: auto; }
  .cs__row--bottom .cs__card { height: 280px; }

  .cs__card--full  { height: 420px; }

  .cs__row--three {
    grid-template-columns: 1fr;
    height: auto;
  }
  .cs__row--three .cs__card { height: 280px; }
}

@media (max-width: 560px) {
  .cs { padding: 4.5rem 0 4rem; }

  .cs__row--top,
  .cs__row--bottom {
    grid-template-columns: 1fr;
    height: auto;
  }
  .cs__card--video,
  .cs__row--top .cs__card:not(.cs__card--video),
  .cs__row--bottom .cs__card {
    height: 300px;
  }

  /* Always show link on touch */
  .cs__link { opacity: 1; transform: none; }

  .cs__scoop-body { font-size: 0.875rem; }
}

/* ── Energy saver ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .cs__bar,
  .cs__img,
  .cs__video { animation: none; transition: none; }
}

/* ════════════════════════════════════════════════════════════
   HERE'S THE SCOOP — 7-card horizontal slider
   ════════════════════════════════════════════════════════════ */

/* Header foot: view-all + nav arrows in one row */
.scoop-header-foot {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-top: 0.5rem;
}

/* Arrow nav buttons */
.scoop-nav {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
.scoop-nav__btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(238, 242, 246, 0.80);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}
.scoop-nav__btn:hover {
  background: rgba(127, 185, 66, 0.14);
  border-color: rgba(127, 185, 66, 0.50);
  color: #7fb942;
}
.scoop-nav__btn:disabled {
  opacity: 0.30;
  cursor: default;
  pointer-events: none;
}
.scoop-nav__btn svg { width: 16px; height: 16px; }

/* Slider viewport — overflow hidden, no lenis interference */
.scoop-slider {
  overflow: hidden;
  margin-top: 2rem;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.scoop-slider.is-dragging { cursor: grabbing; }

/* Track — flex row, JS sets translateX */
.scoop-track {
  display: flex;
  gap: 18px;
  transition: transform 0.52s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

/* Individual card — flex column: image on top, text below */
.scoop-card {
  flex: 0 0 clamp(260px, 36vw, 460px);
  border-radius: 14px;
  overflow: hidden;
  background: #0d1e10;
  display: flex;
  flex-direction: column;
}

/* Image wrapper — clickable link */
.scoop-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: block;
  flex-shrink: 0;
  text-decoration: none;
}

/* YouTube thumbnail */
.scoop-card__thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.scoop-card__media:hover .scoop-card__thumb { transform: scale(1.05); }

/* Light centre scrim for play icon visibility */
.scoop-card__scrim {
  position: absolute;
  inset: 0;
  background: rgba(2, 12, 4, 0.28);
  transition: background 0.25s;
}
.scoop-card__media:hover .scoop-card__scrim { background: rgba(2, 12, 4, 0.42); }

/* Centred play icon on image */
.scoop-card__play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.80);
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
  backdrop-filter: blur(4px);
}
.scoop-card__media:hover .scoop-card__play-icon {
  background: rgba(127, 185, 66, 0.85);
  border-color: #7fb942;
  transform: translate(-50%, -50%) scale(1.10);
}

/* Text block below the image */
.scoop-card__body {
  padding: 1rem 1.2rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.scoop-card__num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #7fb942;
  margin: 0;
}

.scoop-card__title {
  font-family: var(--font-display);
  font-size: clamp(13px, 1.2vw, 16px);
  font-weight: 700;
  line-height: 1.3;
  color: rgba(238, 242, 246, 0.95);
  margin: 0;
}

.scoop-card__desc {
  font-family: var(--font-body);
  font-size: clamp(11px, 0.9vw, 13px);
  line-height: 1.55;
  color: rgba(238, 242, 246, 0.68);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Progress dots */
.scoop-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  margin-top: 1.6rem;
}
.scoop-dot {
  height: 6px;
  width: 6px;
  border-radius: 3px;
  background: rgba(238, 242, 246, 0.22);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s, width 0.3s;
  flex-shrink: 0;
}
.scoop-dot.is-active {
  background: #7fb942;
  width: 22px;
}

/* Responsive */
@media (max-width: 860px) {
  .scoop-card {
    flex: 0 0 clamp(240px, 75vw, 360px);
  }
}
@media (max-width: 560px) {
  .scoop-card {
    flex: 0 0 calc(88vw - 2rem);
    /* No fixed aspect-ratio — it forced a 4:3 box too short for the 16:9 image
       + title/desc, clipping the title. Let the card size to its content. */
  }
  .scoop-header-foot { flex-wrap: wrap; }
}
