/* ---------- Header ---------- */

.team-hero {
  padding-top: calc(var(--header-h) + clamp(2rem, 7vh, 5rem));
  padding-bottom: var(--space-6);
}

.team-hero__title {
  max-width: 14ch;
  margin-top: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: 1.02;
  text-shadow: 0 2px 24px rgb(40 10 6 / 0.35);
}

.team-hero__lead {
  max-width: 44ch;
  margin-top: var(--space-3);
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--on-wall-muted);
}

.team-hero__lead i {
  color: var(--plaster);
}

/* ---------- Sections ---------- */

.team-section--wall {
  padding-top: calc(var(--space-7) + 1rem);
}

/* ---------- Member cards: a photo beside room for text ---------- */

.members {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 64rem) {
  .members--pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.member {
  display: grid;
  overflow: hidden;
  color: var(--plaster); /* cards sit on parchment too, which sets dark ink */
}

@media (min-width: 36rem) {
  .member {
    grid-template-columns: minmax(10rem, 2fr) 3fr;
  }
}

.member__photo {
  position: relative;
  margin: 0;
  aspect-ratio: 1;
  overflow: hidden;
  background-color: var(--parchment);
  background-image: var(--parchment-fibre);
}

@media (min-width: 36rem) {
  .member__photo {
    aspect-ratio: auto;
    min-height: 18rem;
  }
}

.member__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Until a photo is added: the initial inside an inset frame. */
.member__initial {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: clamp(4rem, 3rem + 4vw, 6rem);
  line-height: 1;
  color: var(--wall);
}

.member__initial::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgb(138 93 18 / 0.45);
  border-radius: calc(var(--r-lg) - 12px);
}

.member__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
}

.member__role {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.member__name {
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-size: var(--text-lg);
}

.member__bio {
  margin-top: 0.75rem;
  color: var(--on-night-muted);
}

/* ---------- Contributors ---------- */

.contributors {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.contributors:empty {
  display: none;
}

.contributors li {
  padding: 0.55rem 1.1rem;
  border: 1px solid rgb(246 236 220 / 0.2);
  border-radius: var(--r-pill);
  background: rgb(255 255 255 / 0.04);
  font-size: var(--text-md);
}

.contributors-empty {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
}

.contributors-empty p {
  font-size: var(--text-md);
  font-style: italic;
  color: var(--on-night-muted);
}

/* Once names are listed, hide the placeholder note. */
.contributors:not(:empty) + .contributors-empty {
  display: none;
}
