/* ==========================================================================
   collection.css - blog posts (/blogs) and case studies (/case-studies)
   --------------------------------------------------------------------------
   Both sections share this sheet. It carries ONLY what is new to them:

     - the card grid on the two index pages
     - the eyebrow + date line in an article hero
     - the facts panel at the top of a case study

   The two-column article layout itself (.service-layout, .service-body,
   .service-aside, .service-cta, .related, .breadcrumb) is NOT duplicated here.
   Article pages load service.css alongside this file - see articleMeta() in
   worker.js - because that layout is identical to a service page's and there
   is no reason to maintain a second copy of it.
   ========================================================================== */

.collection-intro {
  max-width: 62ch;
  margin-block: var(--space-5) 0;
  font-size: var(--text-lg);
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   index card grid
   -------------------------------------------------------------------------- */

.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-block: var(--space-4) var(--space-6);
}

.collection-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--on-light);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.collection-card:hover,
.collection-card:focus-visible {
  box-shadow: var(--shadow-hover);
}

.collection-card__figure {
  overflow: hidden;
}

.collection-card__figure img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
  filter: brightness(80%) saturate(0%);
  transition: transform var(--transition);
}

.collection-card:hover .collection-card__figure img {
  transform: scale(1.08);
}

.collection-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
}

.collection-card__date {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--muted);
}

.collection-card__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  line-height: 1.3;
  color: var(--ink);
}

.collection-card__summary {
  font-size: var(--text-sm);
  color: var(--on-light);
}

/* Pushed to the bottom so cards of unequal copy length still line up. */
.collection-card__more {
  margin-top: auto;
  padding-top: var(--space-2);
  font-weight: var(--weight-medium);
  color: var(--ink);
}

.collection-card__more::after {
  content: "\00a0\2192";
  transition: margin-inline-start var(--transition);
}

.collection-card:hover .collection-card__more::after {
  margin-inline-start: 4px;
}

/* --------------------------------------------------------------------------
   article hero
   -------------------------------------------------------------------------- */

.hero--article .hero__title {
  max-width: 20ch;
}

.hero__eyebrow {
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-dark-dim);
}

.hero__meta {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--on-dark-dim);
}

/* --------------------------------------------------------------------------
   case-study facts panel
   -------------------------------------------------------------------------- */

.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2) var(--space-3);
  margin-bottom: var(--space-4);
  padding: var(--space-3);
  border-radius: var(--radius);
  background: var(--ink-raised);
}

.facts__row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.facts dt {
  font-size: var(--text-sm);
  color: var(--on-dark-dim);
}

.facts dd {
  font-weight: var(--weight-medium);
  color: var(--on-dark);
}

@media (max-width: 1024px) {
  .collection-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .collection-grid {
    grid-template-columns: 1fr;
  }

  .collection-card__figure img {
    height: 180px;
  }

  .facts {
    grid-template-columns: 1fr;
  }
}
