/* ==========================================
   TEAM LIST — Horizontal editorial leadership rail
   ========================================== */
.team-list {
    position: relative;
    width: 100%;
    background: var(--bg-color);
    overflow: hidden;
    padding-top: 60px;
}

.team-list__viewport {
    position: relative;
    width: 100%;
}

.team-list__track {
    display: flex;
    align-items: center;
    gap: clamp(2rem, 5vw, 5rem);
    width: max-content;
    min-height: 100vh;
    padding: var(--section-padding);
    padding-right: 50vw;
    will-change: transform;
}

.team-list__intro {
    flex: 0 0 34vw;
    min-width: 420px;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 3vw;
}

.team-list__eyebrow {
    display: inline-block;
    position: relative;
    padding-left: 28px;
    margin-bottom: 1.8rem;
    font-family: var(--font-family-base);
    font-size: var(--font-size-eyebrow);
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--letter-spacing-eyebrow);
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0;
    transform: translateY(12px);
}

.team-list__eyebrow::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 16px;
    height: 1px;
    background: var(--gold);
    transform: translateY(-50%) scaleX(0);
    transform-origin: left center;
    transition: var(--transition-transform);
}

.team-list__eyebrow.is-visible::before {
    transform: translateY(-50%) scaleX(1);
}

.team-list__title {
    font-family: var(--font-family-base);
    font-weight: var(--font-weight-black);
    font-size: var(--font-size-h2);
    line-height: var(--line-height-heading);
    text-transform: uppercase;
    color: var(--color-white);
    margin: 0 0 2rem 0;
}

.team-list__title-line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.08em;
}

.team-list__gold {
    color: var(--gold);
    font-style: normal;
}

.team-list__intro-columns {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    max-width: 520px;
}

.team-list__text,
.team-list__intro-text > * {
    margin: 0;
    font-family: var(--font-family-base);
    font-size: var(--font-size-body);
    line-height: var(--line-height-copy);
    color: var(--color-white);
    opacity: 0;
    transform: translateY(20px);
}

.team-list__card {
    flex: 0 0 auto;
    width: 320px;
    position: relative;
    background: transparent;
    opacity: 0.26;
    transition: opacity 0.35s ease;
    will-change: transform;
}

.team-list__cards {
    display: contents;
}

.team-list__card--1  { width: 320px; transform: translateY(-7vh); }
.team-list__card--2  { width: 295px; transform: translateY(6vh);top: -50px;}
.team-list__card--3  { width: 348px; transform: translateY(-1vh); }
.team-list__card--4  { width: 286px; transform: translateY(10vh);top: -40px;}
.team-list__card--5  { width: 340px; transform: translateY(-11vh); }
.team-list__card--6  { width: 305px; transform: translateY(7vh); top: -40px;}
.team-list__card--7  { width: 334px; transform: translateY(-3vh); }
.team-list__card--8  { width: 292px; transform: translateY(10vh); top: -40px;}
.team-list__card--9  { width: 350px; transform: translateY(-9vh); }
.team-list__card--10 { width: 314px; transform: translateY(8vh); top: -40px;}
.team-list__card--11 { width: 344px; transform: translateY(-5vh); }

.team-list__card:hover,
.team-list__card:focus-visible,
.team-list__card.is-active {
    opacity: 1;
}

.team-list__card-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 0.82;
}

.team-list__card-image {
    display: block;
    width: 100%;
    height: 106%;
    object-fit: cover;
    object-position: center 58%;
    filter: brightness(0.72) saturate(0.84) contrast(1.04);
    will-change: transform;
}

.team-list__card-copy {
    position: relative;
    padding: 1rem 0 0 0.4rem;
}

.team-list__card-name {
    margin: 0;
    font-family: var(--font-family-base);
    font-size: var(--font-size-h4);
    font-weight: var(--font-weight-extrabold);
    line-height: var(--line-height-display-tight-3);
    letter-spacing: var(--letter-spacing-title-tighter);
    color: var(--color-white);
    will-change: transform;
}

.team-list__card-name span {
    display: block;
}

.team-list__card-role {
    margin: 0.55rem 0 0;
    max-width: 16rem;
    font-family: var(--font-family-base);
    font-size: var(--font-size-sm-6);
    line-height: var(--line-height-copy-tight);
    color:var(--gold);
    will-change: transform;
}

.team-list__modal {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    z-index: 10000;
    overflow: hidden;
    box-sizing: border-box;
    isolation: isolate;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

@supports (height: 100dvh) {
    .team-list__modal {
        height: 100dvh;
        min-height: 100dvh;
    }
}

html.team-list-modal-open,
body.team-list-modal-open {
    overscroll-behavior: none;
}

.team-list__modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.team-list__modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(var(--color-dark-blue-rgb), 0.86);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.team-list__modal-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%)!important;
    z-index: 10001;
    display: grid;
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    width: min(960px, calc(100vw - 3rem));
    max-height: min(88vh, 920px);
    overflow: hidden;
    padding: 1.4rem;
    background: rgba(var(--color-dark-blue-rgb), 0.92);
    border: 1px solid rgba(var(--color-white-rgb), 0.09);
    box-shadow: 0 30px 100px rgba(var(--color-black-rgb), 0.4);
}

.team-list__modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: 0;
    color: rgba(var(--color-white-rgb), 0.7);
    font-family: var(--font-family-base);
    font-size: var(--font-size-xl);
    line-height: var(--line-height-flat);
    width: 2.5rem;
    height: 2.5rem;
}

.team-list__modal-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 0.84;
    height: 100%;
    width: 100%;
}

.team-list__modal-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 58%;
    transition: opacity 0.25s ease;
}

.team-list__modal-copy {
    align-self: center;
    max-width: 32rem;
    padding: 2rem 1rem 1rem 0;
}

.team-list__modal-name {
    margin: 0;
    font-family: var(--font-family-base);
    font-size: var(--font-size-h2-mobile-2);
    font-weight: var(--font-weight-black);
    line-height: var(--line-height-display-tight-2);
    letter-spacing: var(--letter-spacing-title-tightest);
    color: var(--color-white);
    margin-bottom: 15px;
}

.team-list__modal-role {
    margin: 1rem 0 1.2rem;
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-copy-snug);
    color: rgba(var(--color-white-rgb), 0.78);
}

.team-list__modal-bio {
    margin: 0 0 1.5rem;
    font-family: var(--font-family-base);
    font-size: var(--font-size-body);
    line-height: var(--line-height-copy);
    color: var(--color-white);
    /* Only the bio scrolls when the content is too long — not the whole dialog. */
    max-height: 50vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-right: 0.5rem;
}

.team-list__modal-bio > * {
    margin: 0;
}

.team-list__modal-bio > * + * {
    margin-top: var(--space-sm);
}

.team-list__modal-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding-bottom: 0.25rem;
    border-bottom: 1px solid rgba(var(--color-gold-rgb), 0.34);
    color: var(--gold);
    font-family: var(--font-family-base);
    font-size: var(--font-size-xs-4);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wider);
}

@media (max-width: 1023px) {
    .team-list {
        padding: var(--section-padding-mobile);
        padding-right: 0px!important;
        padding-left: 0px!important;
    }

    .team-list__viewport {
        overflow: visible;
    }

    .team-list__track {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-xl);
        width: 100%;
        min-height: auto;
        padding: 0;
        overflow: visible;
    }

    .team-list__intro {
        width: 100%;
        min-width: 0;
        max-width: none;
        padding-right: 1.5rem;
        padding-left: 1.5rem;
    }

    .team-list__intro-columns {
        max-width: none;
    }

    .team-list__cards {
                display: flex;
        width: 100%;
        max-width: 100vw;
        gap: 1.5rem;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0 1.5rem var(--space-sm);
        scroll-padding-inline: 1.5rem;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }

    .team-list__cards::-webkit-scrollbar {
        display: none;
    }

    .team-list__card,
    .team-list__card--1,
    .team-list__card--2,
    .team-list__card--3,
    .team-list__card--4,
    .team-list__card--5,
    .team-list__card--6,
    .team-list__card--7,
    .team-list__card--8,
    .team-list__card--9,
    .team-list__card--10,
    .team-list__card--11 {
        flex: 0 0 min(72vw, 300px);
        width: auto;
        transform: none !important;
        opacity: 1;
        scroll-snap-align: start;
        scroll-snap-stop: always;
        top: 0px!important;
    }

    .team-list__card-role {
        max-width: none;
    }

    .team-list__modal {
        display: grid;
        place-items: center;
        padding: 4.5rem 1rem;
        overflow: hidden;
        overscroll-behavior: contain;
    }

    @supports (height: 100svh) {
        .team-list__modal {
            padding-top: max(4.5rem, calc(env(safe-area-inset-top) + 3.5rem));
            padding-bottom: max(4.5rem, calc(env(safe-area-inset-bottom) + 3.5rem));
        }
    }

    .team-list__modal-dialog {
        position: relative;
        top: auto;
        left: auto;
        transform: none!important;
        z-index: 10001;
        display: flex;
        flex-direction: column;
        grid-template-columns: none;
        gap: 1.2rem;
        width: min(420px, calc(100vw - 2rem));
        max-height: calc(100vh - 9rem);
        overflow-x: hidden;
        overflow-y: auto;
        padding: 1rem;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    @supports (height: 100svh) {
        .team-list__modal-dialog {
            max-height: calc(100svh - 9rem);
        }
    }

    @supports (height: 100dvh) {
        .team-list__modal-dialog {
            max-height: calc(100dvh - 9rem);
        }
    }

    .team-list__modal-close {
        position: sticky;
        top: 0;
        right: auto;
        align-self: flex-end;
        flex: 0 0 auto;
        z-index: 4;
        margin: -0.25rem -0.25rem -0.95rem 0;
        background: rgba(var(--color-dark-blue-rgb), 0.78);
        border: 1px solid rgba(var(--color-white-rgb), 0.16);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .team-list__modal-media {
        flex: 0 0 auto;
        height: clamp(210px, 36vh, 300px);
        min-height: 0;
        aspect-ratio: auto;
    }

    @supports (height: 100svh) {
        .team-list__modal-media {
            height: clamp(210px, 36svh, 300px);
        }
    }

    .team-list__modal-image {
        object-position: center 35%;
    }

    .team-list__modal-copy {
        flex: 0 0 auto;
        max-width: none;
        padding: 0 0 0.5rem;
        width: 100%;
    }

    .team-list__modal-name {
        font-size: clamp(2rem, 11vw, var(--font-size-h2-mobile-2));
    }

    .team-list__modal-role {
        margin: 0.8rem 0 1rem;
    }

    .team-list__modal-bio {
        font-size: var(--font-size-base);
        /* On mobile the whole dialog scrolls (stacked layout), so the bio flows naturally. */
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .team-list__eyebrow,
    .team-list__text,
    .team-list__intro-text > *,
    .team-list__card {
        opacity: 1 !important;
        transform: none !important;
    }
}
