/* --- Team Page Intro --- */
.team-intro {
    padding: 10rem 2rem 4rem; 
}

.intro-kicker {
    display: block;
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--brand-purple);
    margin-bottom: 1rem;
}

.team-intro .page-title {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    font-weight: 400; /* Lighter weight for a more elegant, distinct look */
    letter-spacing: -1px; /* Tighter letter spacing */
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.team-intro .highlight {
    color: var(--brand-purple);
}

.team-lead {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.15rem;
    color: #555;
    line-height: 1.8;
}

/* --- Team Hierarchy Layout --- */
.team-hierarchy {
    padding-bottom: 8rem;
}

.team-tier {
    margin-bottom: 6rem;
    text-align: center;
}

.tier-heading {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--bg-dark);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

/* Creates the minimal red/purple line above the tier heading */
.tier-heading::before {
    content: "";
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background-color: var(--brand-purple);
}

/* --- Dynamic Grids for Tiers --- */
.tier-grid {
    display: grid;
    gap: 3rem;
    justify-content: center;
}

.grid-1 { grid-template-columns: minmax(280px, 320px); }
.grid-2 { grid-template-columns: repeat(2, minmax(280px, 320px)); }
.grid-3 { grid-template-columns: repeat(3, minmax(280px, 320px)); }

/* --- Team Card Styling --- */
.team-card {
    background-color: transparent; /* Removed white background/shadow for cleaner look */
    text-align: center;
}

.img-wrapper {
    overflow: hidden;
    margin-bottom: 1.5rem;
    background-color: #e5e5e5; /* Placeholder background */
}

.team-img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    object-position: top center;
    filter: grayscale(0%);
    transition: filter 0.5s ease, transform 0.5s ease;
    display: block;
}

/* Hover effect applied via JS class for smoother control, but CSS fallback here */
.team-card:hover .team-img,
.team-card.is-hovered .team-img {
    filter: grayscale(0%);
    transform: scale(1.03); /* Subtle zoom effect */
}

.team-info h3 {
    font-family: var(--font-primary);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--bg-dark);
    margin-bottom: 0.2rem;
}

.team-role {
    color: #666;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Scroll Animations --- */
.animate-on-scroll {
    opacity: 0;
    will-change: opacity, transform;
}

.slide-up {
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in {
    transition: opacity 1s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Heading Dash & Accent Styles --- */
.sub-heading {
    display: block;
    color: var(--brand-purple);
    font-size: 0.85em;
    font-weight: 400;
}

.title-dash {
    display: inline-block;
    width: 80px;
    height: 4px;
    background-color: var(--brand-purple);
    margin-bottom: 0.2em;
    margin-right: 20px;
    vertical-align: middle;
}

.title-accent {
    color: var(--brand-purple);
}

/* Responsive adjustment for the dash */
@media (max-width: 768px) {
    .title-dash {
        width: 50px;
        margin-bottom: 0.3em;
    }
}


/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    .grid-3 {
        grid-template-columns: repeat(2, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .team-intro .page-title {
        font-size: 3rem;
    }
    
    .team-lead {
        font-size: 1.05rem;
        padding: 0 1rem;
    }

    .grid-2, .grid-3 {
        grid-template-columns: minmax(250px, 320px);
    }
    
    .team-tier {
        margin-bottom: 4rem;
    }
}