/* ==========================================================================
   Case studies page (case-studies.html)
   Depends on: variables.css, base.css, header.css, footer.css, style.css
   Cards reuse the home page .project-card (style.css); .case-card resizes it.
   "Load more": .load-more (style.css) + js/load-more.js
   ========================================================================== */

.cases-hero .hero__title {
  line-height: 100px;
}

/* desktop decorations (the sparkle stays on phones, placed in style.css) */
@media (min-width: 1201px) {
  .cases-hero .hero__cursor {
    top: 99px;
    left: 314px;                 /* Figma: 214px inside the 100px-inset text box */
  }

  .cases-hero .hero__sparkle {
    top: 32px;
  }
}

/* the grid sits on white, covering the hero grid lines (as in Figma) */
.cases {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
  margin-top: -40px;             /* Figma: 60px from the hero text, page gap is 100px */
  background: var(--color-white);
}

.cases__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  width: 100%;
}

.case-card {
  height: 482px;
}

.case-card .project-card__bar {
  height: 56px;
  padding: 12px 24px;
}

.case-card .project-card__name {
  font-size: var(--fs-md);
  line-height: var(--lh-md);
}

@media (max-width: 1200px) {
  .cases-hero .hero__title {
    line-height: var(--lh-display);
  }

  .case-card {
    height: 420px;
  }

  .case-card .project-card__bar {
    padding-inline: 16px;
  }

  .case-card .project-card__cta {
    display: none;
  }
}

@media (max-width: 992px) {
  .cases__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .cases {
    margin-top: -44px;           /* Figma mobile: 20px from the hero text */
    gap: 40px;
  }

  .cases__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .case-card {
    height: 482px;
  }

  .case-card .project-card__bar {
    height: 46px;
    padding: 12px 24px;
  }

  .case-card .project-card__name {
    font-size: var(--fs-sm);
    line-height: var(--lh-sm);
  }
}
