/* ── Grid ─────────────────────────────────────────────────────────────── */
.gsi-team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
@media (max-width: 980px) {
    .gsi-team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
    .gsi-team-grid { grid-template-columns: 1fr; }
}

/* ── Card ──────────────────────────────────────────────────────────────── */
.gsi-team-card {
    aspect-ratio: 3 / 4;
}

/* ── Flip scene ────────────────────────────────────────────────────────── */
.gsi-team-scene {
    width: 100%;
    height: 100%;
    perspective: 900px;
    cursor: pointer;
}

.gsi-team-flipper {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Desktop: CSS hover flip */
@media (hover: hover) {
    .gsi-team-scene:hover .gsi-team-flipper {
        transform: rotateY(180deg);
    }
}

/* Mobile JS tap: toggled class */
.gsi-team-flipper.flipped {
    transform: rotateY(180deg);
}

/* ── Front & Back shared ───────────────────────────────────────────────── */
.gsi-team-front,
.gsi-team-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* ── Front ─────────────────────────────────────────────────────────────── */
.gsi-team-front {
    background: #1C2B35;
    overflow: hidden;
    border-top: 2px solid #1B7E8F;
}

.gsi-team-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* ── Interim portrait unification ─────────────────────────────────────────
   The seven headshots come from very different sources (pro portrait, phone
   photos, one composite). Rendering them all monochrome makes the set read
   as deliberate until a matching pro shoot happens.
   TO REVERT: delete this one rule. */
.gsi-team-photo {
    filter: grayscale(1) contrast(1.06) brightness(1.03);
}

.gsi-team-photo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(165deg, #1a3040 0%, #0d1b24 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Initials monogram while a headshot is pending — keeps the card designed
   instead of an empty dark rectangle. */
.gsi-team-photo-placeholder span {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 72px;
    font-weight: 500;
    font-style: italic;
    color: rgba(27, 126, 143, 0.55);
    border: 1px solid rgba(27, 126, 143, 0.3);
    border-radius: 50%;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 8px;
}

.gsi-team-front-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 48px 18px 16px;
    background: linear-gradient(to top, rgba(5, 12, 20, 0.97) 55%, transparent);
}

/* ── Learn More bar (touch devices only) ──────────────────────────────── */
.gsi-team-learn-bar {
    display: none;
}

@media (hover: none) {
    .gsi-team-learn-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 9px 18px;
        background: rgba(27, 126, 143, 0.12);
        border-top: 1px solid rgba(27, 126, 143, 0.25);
        color: rgba(27, 126, 143, 0.9);
        font-family: Inter, sans-serif;
        font-size: 10px;
        font-weight: 500;
        letter-spacing: 0.15em;
        text-transform: uppercase;
    }

    /* Push name bar up so it clears the learn-more bar height (~36px) */
    .gsi-team-front-bar {
        padding-bottom: 44px;
    }
}

/* ── Back ──────────────────────────────────────────────────────────────── */
.gsi-team-back {
    transform: rotateY(180deg);
    background: #1C2B35;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px 24px;
}

/* ── Shared text ───────────────────────────────────────────────────────── */
.gsi-team-role {
    display: block;
    font-family: Inter, sans-serif;
    font-size: 10px;
    font-weight: 500;
    color: #1B7E8F;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 5px;
}

.gsi-team-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.15;
    margin: 0;
}

.gsi-team-rule {
    width: 28px;
    height: 1px;
    background: rgba(27, 126, 143, 0.7);
    margin: 12px 0;
    border: none;
    display: block;
}

.gsi-team-bio {
    font-family: Inter, sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.75;
    margin: 0;
}
