/* Keep every documentary photo in the same compact, responsive frame. */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1120px;
  margin: 32px auto 0;
  align-items: stretch;
}

.photo-grid--pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 740px;
}

.photo-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  max-width: 360px;
  margin: 0;
  padding: 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.photo-card > img {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  /* Override HTML heights so a responsive width cannot leave an oversized image. */
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: var(--photo-focus, 50% 50%);
  border: 0;
  border-radius: 4px;
}

.photo-card > figcaption {
  margin: 0;
  padding: 12px 5px 5px;
  font-size: .875rem;
  line-height: 1.5;
  color: #506678;
  overflow-wrap: anywhere;
}

.photo-card figcaption strong { color: var(--navy); }
.photo-card--stanford { --photo-focus: 50% 12%; }
.photo-card--classroom { --photo-focus: 50% 64%; }
.photo-card--students { --photo-focus: 50% 45%; }
.photo-card--youth { --photo-focus: 50% 35%; }
.photo-card--justice { --photo-focus: 50% 68%; }
.photo-card--stage { --photo-focus: 50% 55%; }

.split > .photo-grid { grid-column: 1 / -1; margin-top: 0; }
.dark .photo-card { background: #0b2235; border-color: #54778b; }
.dark .photo-card figcaption { color: #bdd0dc; }
.dark .photo-card figcaption strong { color: #fff; }

.partner-card-wrap {
  width: min(1180px, calc(100% - 48px));
  margin: 32px auto 0;
}

.partner-card-wrap .photo-card { margin-inline: auto; }
.field-layout { display: block; }
.field-copy { max-width: 760px; }
.field-mark { width: 140px; height: auto; margin-top: 22px; }
.heritage { display: block; width: 100%; max-width: 320px; height: auto; }

/* The printed feature and branding keep their full content visible. */
.press-feature { width: 100%; max-width: 320px; margin: 24px 0 0; }
.press-feature img { display: block; width: 100%; height: auto; }

.founder-photo-wrap { padding: 24px 20px 0; }
.founder-profile-link { margin: auto 0 12px; }
.founder-photo {
  width: 140px;
  height: 140px;
  max-width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
}

@media (max-width: 850px) {
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 740px; }
}

@media (max-width: 580px) {
  .photo-grid { grid-template-columns: minmax(0, 1fr); max-width: 360px; gap: 18px; }
  .partner-card-wrap { width: min(1180px, calc(100% - 32px)); }
  .founder-photo { width: 128px; height: 128px; }
}
