/* ─── Insights (Case Studies) page ───────────────────────── */
.insights-page {
  background: var(--dark-bg);
  min-height: 100vh;
}

.insights-hero {
  padding: calc(var(--nav-offset) + var(--section-y-sm)) 0 5rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.insights-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.insights-hero-copy {
  max-width: 52rem;
}

.insights-hero-headline {
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.08;
  color: var(--text-strong);
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.8s cubic-bezier(0.16,1,0.3,1) 0.2s forwards;
}

.insights-hero-sub {
  font-size: 1rem;
  color: var(--text-strong);
  max-width: 33rem;
  line-height: 1.65;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s cubic-bezier(0.16,1,0.3,1) 0.35s forwards;
}

.insights-section {
  padding: 0 0 8rem;
  position: relative;
  z-index: 1;
}

.insights-list {
  display: grid;
  gap: 2rem;
}

/* ─── Card ───────────────────────────────────────────────── */
.insight-card {
  display: grid;
  grid-template-columns: 1fr;
  /* gap separates video from body in stacked layout, and
     provides column gutter in horizontal layout              */
  gap: clamp(1rem, 1.8vw, 1.5rem);
  container-type: inline-size;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.8rem;
  padding: clamp(1rem, 1.8vw, 1.5rem);
}

/* ─── Video ──────────────────────────────────────────────── */
/* Base: stacked layout — video sits above body at 16:9 */
.insight-card-video {
  position: relative;
  background: #0a101b;
  aspect-ratio: 16 / 9;
  border-radius: 1rem;
  overflow: hidden;
}

.insight-card-video iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
  min-height: 100%;
}

/* ─── Body ───────────────────────────────────────────────── */
.insight-card-body {
  display: grid;
  align-content: start;
  gap: 1.25rem;
  /* No extra padding — the card's own padding handles spacing  */
  padding: 0;
}

.insight-card-eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
}

.insight-card-index,
.insight-card-runtime {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.insight-card-index {
  color: var(--gold);
}

.insight-card-runtime {
  color: var(--text-dim);
}

.insight-card-title {
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-strong);
  margin: 0;
  max-width: 22ch;
}

.insight-card-desc {
  margin: 0;
  max-width: 52ch;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--text-strong);
}

.insight-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
  padding-top: 0.25rem;
}

.insight-card-watch {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}

.insight-card-watch svg {
  transition: transform 0.2s ease;
}

.insight-card-watch:hover svg,
.insight-card-watch:focus-visible svg {
  transform: translateX(4px);
}

.insight-card-aside {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 30ch;
}

/* ─── Horizontal layout (video left, text right) ─────────── */
/* Defined AFTER base rules so these overrides win correctly  */
@media (min-width: 700px) {
  .insight-card {
    /* minmax(0,…) prevents fr tracks expanding beyond their
       fraction to satisfy min-content, avoiding overflow       */
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  }

  .insight-card-video {
    /* 700–899px: let the video stretch to match the text
       column height — avoids a large empty gap below video     */
    aspect-ratio: unset;
  }

  .insight-card-title {
    max-width: none;
  }

  .insight-card-desc {
    max-width: none;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* ─── Wider horizontal: restore 16:9 thumbnail ───────────── */
/* At ≥900px the video column is wide enough (≥ 340px) that
   a 16:9 thumbnail is clear, and the dark gap below is small  */
@media (min-width: 900px) {
  .insight-card {
    /* Give the video more room — 2fr:3fr (video = 40%)         */
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  }

  .insight-card-video {
    aspect-ratio: 16 / 9;
    /* Centre the video vertically within the card              */
    align-self: center;
  }
}

/* ─── Mobile ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .insights-hero {
    padding: calc(var(--nav-offset) + 4rem) 0 2rem;
  }

  .insights-section {
    padding: 0 0 5rem;
  }

  .insight-card {
    border-radius: 1.45rem;
  }

  .insight-card-body {
    gap: 0.85rem;
  }

  .insight-card-title,
  .insight-card-desc,
  .insight-card-aside {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .insight-card-watch svg {
    transition: none;
  }
}
