/* ==========================================================================
   28-client-cards.css — "Selected Client Work" as a responsive card grid
   The three case studies were full-width figures stacked vertically. They now
   sit in an auto-fitting grid: equal-height cards, one shot per project with a
   locked aspect ratio, and the caption promoted to a real heading + body.

   Selector note: the card keeps `k-geo-figure` (it is part of the GEO layer and
   those rules must not go missing) and adds `k-case-card`. The compound
   `.k-geo .k-geo-figure.k-case-card` scores 0,3,0 against 20-geo.css's 0,2,0,
   so the old margin/padding/background are overridden without !important.
   ========================================================================== */

.k-case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: 18px;
  align-items: stretch;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

/* ---- the card ----------------------------------------------------------- */
.k-geo .k-geo-figure.k-case-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.k-geo .k-geo-figure.k-case-card:hover {
  border-color: rgba(255, 38, 56, .45);
  transform: translateY(-6px);
  box-shadow: 0 18px 44px rgba(255, 38, 56, .16);
}
.k-geo .k-geo-figure.k-case-card:focus-within {
  border-color: rgba(255, 38, 56, .45);
  box-shadow: 0 0 0 3px rgba(255, 38, 56, .18);
}

/* ---- shot --------------------------------------------------------------- */
.k-case-shot {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0b0b0d;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.k-geo .k-geo-figure.k-case-card .k-case-shot img {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  object-position: top center;
  transition: transform .5s ease;
}
.k-geo .k-geo-figure.k-case-card:hover .k-case-shot img {
  transform: scale(1.04);
}
/* a whisper of shade along the shot's lower edge, so the card reads as one unit */
.k-case-shot::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(to top, rgba(7, 7, 8, .55), transparent);
  pointer-events: none;
}

/* ---- body --------------------------------------------------------------- */
.k-geo .k-geo-figure.k-case-card .k-case-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  margin: 0;
  padding: 15px 17px 16px;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: normal;
  color: var(--wp--preset--color--k-muted);
}
.k-case-name {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: -.01em;
  color: var(--wp--preset--color--k-white);
}
.k-case-desc {
  flex: 1;
  margin: 0 0 14px;
  font-size: .8125rem;
  line-height: 1.62;
  color: var(--wp--preset--color--k-muted);
}
.k-case-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-family: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Menlo, Consolas, monospace;
  font-size: .7rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--wp--preset--color--k-muted);
}
.k-case-meta time { color: var(--wp--preset--color--k-muted); }
.k-case-link {
  margin-left: auto;
  color: var(--wp--preset--color--k-red-bright);
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease;
}
.k-case-link::after { content: " ↗"; }
.k-case-link:hover {
  color: var(--wp--preset--color--k-white);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.k-case-link:focus-visible {
  outline: 2px solid var(--wp--preset--color--k-red-bright);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---- responsive --------------------------------------------------------- */
@media (max-width: 900px) {
  .k-case-grid { gap: 16px; }
  .k-geo .k-geo-figure.k-case-card .k-case-body { padding: 14px 15px 15px; }
  .k-case-desc { font-size: .8rem; }
}

@media (max-width: 640px) {
  .k-case-grid { gap: 14px; margin-top: 1.2rem; }
  .k-case-name { font-size: .95rem; }
  .k-case-desc { margin-bottom: 12px; }
  .k-case-meta { font-size: .66rem; }
  /* one card per row: a 16/9 frame is short enough to stay readable */
  .k-case-shot { aspect-ratio: 16 / 9; }
}

@media (prefers-reduced-motion: reduce) {
  .k-geo .k-geo-figure.k-case-card,
  .k-geo .k-geo-figure.k-case-card .k-case-shot img,
  .k-case-link { transition: none; }
  .k-geo .k-geo-figure.k-case-card:hover { transform: none; }
  .k-geo .k-geo-figure.k-case-card:hover .k-case-shot img { transform: none; }
}
