/* === CASE STUDIES INDEX PAGE === */

/* Nav — Case Studies link active state (portfolio.css shapes the default
   link color, this just tells the index page that the link is reachable). */
.nav-links a.nav-active {
  color: var(--charcoal);
}

.nav.scrolled .nav-links a.nav-active {
  color: var(--charcoal);
}

/* Grid wrapper — section padding mirrors .cs-brief from case-study.css */
.case-studies-section {
  padding: var(--section-gap) var(--pad-x);
  background: var(--cream);
  border-bottom: 1px solid rgba(26, 26, 26, 0.06);
}

.case-studies-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.case-studies-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Card — cream-on-cream surface with a hairline edge. Hover lift matches
   .btn-primary hover vocabulary from theme.css. */
.case-studies-card {
  border-radius: 10px;
  background: var(--cream-warm);
  box-shadow: 0 1px 0 rgba(26, 26, 26, 0.06);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.case-studies-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.case-studies-card-link {
  display: block;
  color: inherit;
}

/* Artwork frame — 16:10 aspect ratio, cover-fit image, hover scale matches
   .cs-gallery-item from case-study.css. */
.case-studies-card-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--light-surface);
}

.case-studies-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.case-studies-card:hover .case-studies-card-thumb img {
  transform: scale(1.04);
}

.case-studies-card-thumb-fallback {
  aspect-ratio: 16 / 10;
  background: var(--cream-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(26, 26, 26, 0.06);
}

.case-studies-card-thumb-fallback .section-label {
  margin-bottom: 0;
}

/* Card body padding and type */
.case-studies-card-body {
  padding: 24px 24px 28px;
}

.case-studies-card-body .section-label {
  margin-bottom: 10px;
}

.case-studies-card-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--charcoal);
  margin-bottom: 10px;
}

.case-studies-card-summary {
  font-size: 15px;
  color: var(--charcoal-mid);
  line-height: 1.6;
}

/* Responsive — collapse to two columns then one. Breakpoint scale matches
   case-study.css. */
@media (max-width: 900px) {
  .case-studies-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .case-studies-grid {
    grid-template-columns: 1fr;
  }
}
