/* ==========================================================================
   sections/team.css — the team photo slot across the layout, people beneath
   ========================================================================== */

.team {
  padding-block: clamp(3.5rem, 7vw, 6.5rem);
  background: var(--white);
  border-bottom: 1px solid var(--paper-edge);
}

/* The group shot, full width of the window rather than the layout. */
.team__photo {
  margin-inline: calc(50% - 50vw + var(--gutter));
  aspect-ratio: 21 / 7;
  min-height: 260px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--paper-tint);
}

.team__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.team__people {
  display: grid;
  /* The crew is a collection the shop edits, not a fixed four, so the row fits
     as many cards as it holds rather than freezing at the four people here
     today: hiring someone used to land one orphan card on a second row on both
     the homepage and About with no page editing at all. 190px is the smallest
     minimum that still lays four cards across every width down to the 900px
     breakpoint below, so the approved pages are unchanged; five then make one
     clean line at 1440. The max has to stay 1fr: a definite max is what the
     repetition count is worked out from, and minmax(190px, 380px) here gives
     two columns at 1440, not five. The ceiling is on the card instead. */
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  justify-items: center;
  gap: var(--grid-gap);
  margin: var(--grid-gap) 0 0;
  padding: 0;
  list-style: none;
}

/* Each person sits in a small outlined card with a slot for their photo */
.team__person {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* Fills its track, up to a point: a crew of one or two would otherwise get a
     card the width of the page with a 56px avatar in the corner. Never reached
     at three or more, where the track is narrower than this. */
  width: 100%;
  max-width: 380px;
  padding: var(--sp-4);
  background: var(--white);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius-lg);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.team__person:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

/* Head-and-shoulders shot */
.team__avatar {
  width: 56px;
  height: 56px;
  margin-bottom: var(--sp-3);
  overflow: hidden;
  border: 1px solid var(--paper-edge);
  border-radius: 50%;
  background: var(--paper-tint);
}

.team__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Per-person framing tweaks so each headshot sits right in the circle */
.team__avatar img[src*="team-cody"] { transform: scale(1.15); }
.team__avatar img[src*="team-chaz"] { transform: scale(1.10); }

.team__person h3 {
  font-size: var(--step-1);
  margin-bottom: 0.25rem;
}

.team__role {
  margin-bottom: var(--sp-3);
  font-size: var(--step--1);
  color: var(--ink-soft);
}

.team__tenure {
  margin-top: auto;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(200, 32, 42, 0.08);
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--red-ink);
}


@media (max-width: 900px) {
  .team__photo { aspect-ratio: 16 / 9; min-height: 200px; }
  .team__people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Two up on a phone rather than a single tall column */
@media (max-width: 560px) {
  .team__people {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-3);
  }

  .team__person { padding: var(--sp-3); }

  .team__avatar {
    width: 46px;
    height: 46px;
    margin-bottom: var(--sp-2);
  }

  .team__person h3 { font-size: 1.0625rem; }
}
