/* 08 Meet the Team. Component key: home.team.

   A concise trust block: the published featured people, two to four cards on
   desktop and one per row on a phone. It never stretches to fill a row. */

.team-block {
    background-color: var(--color-bg);
}

.team-block__inner {
    padding-block: var(--space-section);
}

.team-block__heading {
    max-width: 24ch;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    line-height: 1.15;
}

.team-block__body {
    max-width: 52ch;
    margin-top: var(--space-3);
    color: var(--color-ink-soft);
}

.team-block__list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-5);
    margin: var(--space-6) 0 0;
    padding: 0;
    list-style: none;
}

.team-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.team-card__image {
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-media);
    object-fit: cover;
}

.team-card__name {
    margin-top: var(--space-2);
    font-size: 1.25rem;
}

.team-card__role {
    color: var(--color-brand-green);
    font-size: 0.9375rem;
    font-weight: 600;
}

.team-card__bio {
    max-width: 34ch;
    color: var(--color-muted);
    font-size: 0.9375rem;
}

.team-block__more {
    margin-top: var(--space-6);
}

@media (min-width: 36rem) {
    .team-block__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--space-6) var(--space-5);
    }
}

@media (min-width: 64rem) {
    .team-block__list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    /* Fewer than four published people keep the wider cards of the two-up
       layout instead of leaving empty columns. */
    .team-block__list:has(> :nth-child(1):last-child),
    .team-block__list:has(> :nth-child(2):last-child) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 46rem;
    }
}
