.team-section {
    padding: 112px 0;
    background-color: var(--terracotta-200, #EEDADB);
}
.team-header {
    text-align: center;
    max-width: 768px;
    margin: 0 auto 80px;
}
.team-title {
    margin: 0 0 24px;
    color: var(--Terracotta-950, #331C1D);
}
.team-text {
    font-weight: 300;
}
.team-text > :last-child {
    margin-bottom: 0;
}
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 48px 32px;
    padding-bottom: 48px;
}
.team-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}
.team-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.team-card-body {
    padding: 24px 0 0;
}
.team-card-name {
    margin: 0 0 4px;
    color: var(--Terracotta-950, #331C1D);
    border-bottom: 1px solid var(--terracotta-500, #B97779);
    padding-bottom: 8px;
}
.team-card-role {
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 300;
    font-size: 16px;
    color: var(--Terracotta-950, #331C1D);
    border-bottom: 1px solid var(--terracotta-500, #B97779);
    padding-bottom: 8px;
    padding-top: 8px;
}
.team-card-links {
    display: flex;
    align-items: center;
    gap: 5px;
    border-bottom: 1px solid var(--terracotta-500, #B97779);
    padding-bottom: 8px;
}
.team-card-links a {
    text-decoration: none;
    font-size: 16px;
    font-weight: 300;
    color: var(--Terracotta-950, #331C1D);
}
.team-top {
    display: none;
}

@media screen and (max-width: 1024px) {
    .team-section {
        padding: 64px 0;
    }
    .team-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .team-title {
        margin-bottom: 20px;
    }
    .team-top {
        margin-bottom: 20px;
        font-weight: 300px;
        color: var(--navy-950, #161A1E);
        display: block;
    }
    .team-header {
        margin-bottom: 48px;
    }
}

@media screen and (max-width: 767px) {
    .team-section {
        overflow: hidden;
    }
    .team-grid {
        grid-template-columns: 1fr;
        gap: 28px 0;
        padding-bottom: 0;
    }

    /* A full-height rise carries the last card over the image below. Keep the move short. */
    .team-card.animate__animated {
        animation-name: team-card-in;
        --animate-duration: 0.8s;
    }
}

@keyframes team-card-in {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}
