.brand-wall {
  background: var(--band-bg);
  color: var(--band-ink);
  padding: 72px 0;
}
.brand-wall .section-head p { color: rgba(255,255,255,0.65); }

.brand-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/*
 * The card itself is just a flex column stacking name / media / tag —
 * all the "card" look (white background, border, corner radius) lives on
 * .brand-card-media below, not here, so the name/tag captions sit as
 * plain text on the dark band above and below it, not overlaid on top of
 * the logo image.
 */
.brand-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
}

.brand-card-name,
.brand-card-tag {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
}
.brand-card-name { text-align: right; }
.brand-card-tag { text-align: left; }

/*
 * Media box stays a fixed white regardless of light/dark site mode
 * (unlike --surface, which flips dark) — a client's logo is usually only
 * designed to sit on a light background, and this section is always a
 * dark band either way, so there's no "wrong" mode to match here.
 *
 * 3/2 matches a 600x400 logo exactly — the size these cards are designed
 * around (see the "Brand logo" field's help text in the meta box).
 */
.brand-card-media {
  position: relative;
  background: #ffffff;
  border-radius: var(--radius);
  aspect-ratio: 3/2;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.brand-card:hover .brand-card-media {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-shadow), 0 16px 36px rgba(0,0,0,0.35);
  transform: translateY(-3px);
}

/*
 * object-fit: cover, not contain — for a logo already sized/cropped to
 * this exact 3:2 ratio the two are identical (fills edge-to-edge with no
 * crop), but cover is what keeps a not-quite-3:2 image filling the box
 * rather than letterboxing with visible white space around it.
 */
.brand-card-logo { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease; }
.brand-card:hover .brand-card-logo { transform: scale(1.06); }

.brand-card-fallback {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  padding: 0 24px;
}

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