/* Clients wall: hairline grid of client logos + names. Scoped to .clients / .client-* */

.clients {
  position: relative;
  width: 100%;
  padding: .5em 2em 6em;
  box-sizing: border-box;
}

.clients .client-grid {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 1080px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);           /* hairlines show through the 1px gaps */
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* 12 clients fill every layout (4/3/2 cols) evenly */

.clients .client-item {
  margin: 0;
  min-width: 0;
  background: var(--surface);
  padding: 2.25rem 1.25rem 1.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1.35rem;
  text-align: center;
}
/* hover stays on the mark only: the uofk logo has an opaque white ground */
.section-header:has(+ .clients) .ss { text-wrap: balance; }

.clients .client-mark {
  height: 64px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.clients .client-mark img {
  display: block;
  width: auto;
  height: auto;
  max-height: 64px;
  max-width: min(150px, 100%);
  object-fit: contain;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.clients .client-item:hover .client-mark img { transform: scale(1.04); }

/* Wide wordmarks read larger than emblems at equal height; trim them optically */
.clients .client-mark--wide img { max-height: 40px; }

/* White-on-transparent logos: render as solid ink silhouettes */
.clients .client-mark--inverse img {
  filter: brightness(0);
  opacity: .82;
}

/* Clients without a supplied logo: a quiet typographic mark */
.clients .client-wordmark {
  font-family: var(--read);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.35;
  color: var(--ink-2);
  padding: .55em .95em;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}

.clients .client-name {
  margin: 0;
  font-family: var(--read);
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -.005em;
  color: var(--ink-2);
  text-wrap: balance;
  max-width: 22ch;
}

@media (max-width: 1000px) {
  .clients { padding: .25em 1.5em 4.5em; }
  .clients .client-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .clients { padding: 0 1rem 4em; }
  .clients .client-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 12px;
  }
  .clients .client-item { padding: 1.6rem .75rem 1.2rem; gap: 1rem; }
  .clients .client-mark { height: 48px; }
  .clients .client-mark img { max-height: 48px; max-width: min(120px, 100%); }
  .clients .client-mark--wide img { max-height: 30px; }
  .clients .client-wordmark { font-size: .75rem; letter-spacing: .12em; padding: .5em .7em; }
  .clients .client-name { font-size: .8125rem; }
}

@media (prefers-reduced-motion: reduce) {
  .clients .client-mark img { transition: none; }
  .clients .client-item:hover .client-mark img { transform: none; }
}
