.team-list {
    position: relative;
    background-color: var(--color-black);
    padding: 4rem 2.25rem;

    @media (min-width: 768px) {
        padding: 10rem 2.25rem;
    }

    /* Bricks' container styles (flex-row, no auto margins) don't suit
       hand-rendered markup: own layout, centered. */
    .brxe-container {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 2rem;
        width: 100%;
        max-width: 87.5rem;
        margin-inline: auto;

        /* Desktop: title/button column left, member cards right */
        @media (min-width: 768px) {
            grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
            gap: 4rem;
            align-items: start;
        }
    }

    .intro {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;

        .section-title {
            color: var(--color-white);
            font-size: var(--text-h3);
            line-height: 1.05;
            margin: 0;
        }

        /* Mobile: full-width button per design */
        .brxe-button {
            justify-content: center;
            text-align: center;

            @media (min-width: 768px) {
                align-self: flex-start;
            }
        }
    }

    .members {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.625rem;

        @media (min-width: 768px) {
            grid-template-columns: repeat(2, 1fr);
        }
    }
}

.team-card {
    position: relative;
    display: flex;
    align-items: flex-end;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background-color: var(--color-offblack);

    .photo {
        position: absolute;
        inset: 0;
        width: 100%;
        max-width: none;
        height: 100%;
        object-fit: cover;
        filter: grayscale(100%);
        transition: filter 0.45s ease, transform 0.45s ease;
    }

    /* Placeholder until real photos are added */
    .photo-placeholder {
        position: absolute;
        inset: 0;
        background: linear-gradient(115deg, #0b3c4d 0%, var(--color-blue) 45%, var(--color-blue-two) 70%, #0b3c4d 100%);
        opacity: 0.85;
    }

    /* Legibility gradient over the photo */
    &::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 45%, rgba(0, 0, 0, 0.85) 100%);
        pointer-events: none;
        z-index: 1;
    }

    .content {
        position: relative;
        z-index: 2;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        width: 100%;
        max-height: 100%; /* content can never grow beyond the card */
        padding: 1.5rem;
    }

    .member-name {
        color: var(--color-white);
        font-family: var(--font-heading);
        font-size: clamp(1.25rem, 1.16rem + 0.45vw, 1.5rem);
        line-height: 1.15;
        margin: 0;
    }

    .member-role {
        display: block;
        color: var(--color-blue);
        padding-top: 0.5rem;
    }

    /* Bio hidden until hover: grid-rows 0fr -> 1fr expands and raises
       the name/role (same treatment as the Why ESA cards) */
    .reveal {
        display: grid;
        grid-template-rows: 0fr;
        min-height: 0; /* allow the bio row to shrink within the card */
        transition: grid-template-rows 0.45s ease;

        .reveal-inner {
            overflow: hidden;
        }
    }

    .paragraph {
        color: var(--color-white);
        font-size: 0.875rem;
        line-height: 1.5;
        padding-top: 1rem;
        margin: 0;
        opacity: 0;
        transition: opacity 0.3s ease;
        /* Tidy ellipsis truncation for long bios */
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 8;
        line-clamp: 8;
        overflow: hidden;
    }

    &:hover,
    &:focus-within,
    &:focus,
    &.is-active {
        .photo {
            filter: grayscale(0%);
            transform: scale(1.03);
        }

        .reveal {
            grid-template-rows: 1fr;
        }

        .paragraph {
            opacity: 1;
        }
    }
}
