/* A compact portrait collage with the invitation at its geometric center. */
.team-photo-grid {
  position: relative;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 1;
  justify-self: center;
  isolation: isolate;
  container-type: inline-size;
}
.team-photo {
  position: absolute;
  left: var(--photo-x);
  top: var(--photo-y);
  width: 23%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #1d1d1d;
  border: 1px solid #444;
  border-radius: 9px;
  transform: rotate(var(--photo-tilt));
  box-shadow: 0 6px 16px #0009;
}
.team-photo > img {
  position: absolute;
  width: var(--portrait-width, 100%);
  max-width: none;
  height: auto;
  left: 50%;
  top: 32%;
  transform: translate(var(--portrait-x, -50%), var(--portrait-y, -32%));
  filter: grayscale(1);
}
.team-photo--invitation {
  left: 50%;
  top: 50%;
  width: 24%;
  aspect-ratio: 4 / 5;
  transform: translate(-50%, -50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: #000;
  text-decoration: none;
  border: 0;
  border-radius: 12px;
}
.team-photo--invitation > img {
  /* The square Join the team graphic fills the space above the label, so its shoulders end at the label. */
  position: static;
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  height: 0;
  transform: none;
  object-fit: contain;
  object-position: center bottom;
  filter: none;
}
.team-photo--invitation > span {
  position: relative;
  z-index: 1;
  padding: 7px 2px;
  width: 100%;
  text-align: center;
  font-size: clamp(10px, 3cqi, 14px);
  font-weight: 600;
  color: #000;
  background: #ddfa23;
}
.team-photo--invitation:focus-visible {
  outline: 3px solid white;
  outline-offset: 5px;
}
.team-photo--invitation:hover { box-shadow: 0 0 0 3px #ddfa2340; }
@media (max-width: 800px) {
  .team-photo-grid { max-width: 400px; }
}
@media (max-width: 420px) {
  .team-photo { border-radius: 6px; }
  .team-photo--invitation { border-radius: 9px; }
  .team-photo--invitation > span { padding: 5px 1px; }
}
