.team {
    width: 100%;
    max-width: min(1780px, 100%);
    margin: 0 auto;
    padding: clamp(54px, 7vw, 96px) 0;
}

.team-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 0.72fr);
    gap: 70px;
    align-items: start;
    margin-bottom: 58px;
}

.tag {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #5f6673;
    font-size: 14px;
    margin-bottom: 16px;
}

.tag span {
    width: 14px;
    height: 14px;
    border-left: 3px solid #0d2456;
    border-top: 3px solid #0d2456;
    border-radius: 2px;
}

.team-title h2 {
    margin: 0;
    color: #090b10;
    font-family: Manrope, Inter, sans-serif;
    font-size: clamp(42px, 5vw, 58px);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.team-desc {
    margin: 0;
    color: #6f7787;
    font-size: 18px;
    line-height: 1.7;
}

.team-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-bottom: 36px;
    border-bottom: 1px solid #e3e7ee;
    overflow: visible;
}

.team-tab {
    position: relative;
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    padding: 0 2px 16px;
    color: #9aa1ad;
    font: inherit;
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
    transition: color 0.22s ease;
}

.team-tab::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    border-radius: 999px;
    background: #0d2456;
    opacity: 0;
    transform: scaleX(0.5);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.team-tab:hover,
.team-tab:focus-visible,
.team-tab.is-active {
    color: #0d2456;
    outline: none;
}

.team-tab.is-active::after {
    opacity: 1;
    transform: scaleX(1);
}

.team-hierarchy {
    display: grid;
}

.team-panel {
    display: none;
}

.team-panel.is-active {
    display: block;
}

.team-leader-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 26px;
    align-items: end;
    padding: 28px;
    border: none;
    border-radius: 30px;
    background: linear-gradient(135deg, #0d2456, #173a78);
    box-shadow: 0 20px 45px -38px rgba(12, 20, 35, 0.55);
}

.team-leader-copy {
    display: grid;
    align-content: end;
    gap: 4px;
    min-height: 250px;
}

.team-leader-badge {
    display: inline-flex;
    width: max-content;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.team-leader-copy h3 {
    max-width: 720px;
    margin: 10px 0 0;
    color: #ffffff;
    font-family: Manrope, Inter, sans-serif;
    font-size: clamp(32px, 3.8vw, 43px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.team-leader-card--text {
    grid-template-columns: 1fr;
}

.team-leader-card--text .team-leader-copy {
    min-height: 130px;
}

.team-member-card--text {
    min-height: 190px;
    justify-content: space-between;
    text-align: left;
}

.team-member-card--text h4 {
    margin: 0;
    color: #111827;
    line-height: 1.24;
}

.team-member-card--text p {
    margin-top: 18px;
    color: #0d2456;
}
.team-leader-photo {
    width: 260px;
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    overflow: hidden;
    background: #ddd;
}

.team-leader-photo img,
.team-member-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.team-tier-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 36px;
    margin-bottom: 26px;
}

.team-tier-head h3 {
    margin: 0;
    color: #090b10;
    font-family: Manrope, Inter, sans-serif;
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.025em;
}

.team-tier-head p {
    margin: 0;
    color: #8a92a0;
    font-size: 13px;
    font-weight: 700;
}

.team-member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 34px;
}

.team-member-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 18px;
    border: 1px solid #e3e7ee;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 16px 38px -34px rgba(12, 20, 35, 0.34);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-member-image {
    aspect-ratio: 3 / 4;
    border-radius: 22px;
    overflow: hidden;
    background: #e5e7eb;
}

.team-member-card h4 {
    margin: 17px 0 6px;
    color: #a0a7b2;
    font-size: 18px;
    font-weight: 750;
    transition: color 0.25s ease;
}

.team-member-card p {
    margin: 0;
    color: #9aa1ad;
    font-size: 13px;
    font-weight: 700;
}

.team-member-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 46px -34px rgba(12, 20, 35, 0.4);
}

.team-member-card:hover img,
.team-leader-card:hover .team-leader-photo img {
    transform: scale(1.04);
}

.team-member-card:hover h4 {
    color: #111827;
}

@media (max-width: 1000px) {
    .team-header {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .team-leader-card {
        grid-template-columns: 1fr;
    }

.team-leader-photo {
        order: -1;
    }

    .team-member-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@media (max-width: 620px) {
    .team {
        padding: 44px 0;
    }

    .team-title h2 {
        font-size: 42px;
    }

    .team-desc {
        font-size: 16px;
    }

    .team-leader-card {
        padding: 18px;
    }

    .team-leader-copy {
        min-height: 0;
    }

.team-leader-photo {
        width: 100%;
    }

    .team-tier-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .team-member-grid {
        grid-template-columns: 1fr;
    }
}

/* Keep team section breathing on wide and small screens */
.team {
    max-width: min(1780px, calc(100% - clamp(32px, 5vw, 96px)));
}

.team-title h2 {
    letter-spacing: 0;
}

@media (max-width: 760px) {
    .team {
        max-width: calc(100% - 24px);
    }
}

/* Team section final gutter polish */
.page-about .team.section-container.layout-shell {
    width: min(1780px, calc(100% - clamp(36px, 5vw, 104px)));
    max-width: none;
}

.page-about .team-header {
    gap: clamp(28px, 4vw, 70px);
}

@media (max-width: 760px) {
    .page-about .team.section-container.layout-shell {
        width: calc(100% - 24px);
    }
}
