/* ==========================================================================
   teams.css — page-specific styles for the Team page
   Layers on top of styles.css (shared tokens/variables)
   ========================================================================== */

/* ------------------------------- HERO ----------------------------------- */
.team-hero {
    position: relative; overflow: hidden;
    padding: calc(var(--header-h) + 4rem) 0 5rem;
    background: linear-gradient(160deg, #f7f8fc 0%, #eef1fb 55%, #e7ebfa 100%);
    text-align: center;
}
.team-hero .hero-bg { position: absolute; inset: 0; z-index: 0; }
.team-hero .container { position: relative; z-index: 2; }
.team-hero-content { max-width: 760px; margin: 0 auto; }
.team-hero-content .hero-eyebrow { margin-bottom: 1.4rem; }
.team-hero-content .hero-title { margin-bottom: 1.3rem; }
.team-hero-content .hero-lead { margin: 0 auto 2.2rem; }

.team-hero-stats { display: flex; justify-content: center; gap: clamp(1.6rem, 5vw, 3.5rem); }
.ths-item { display: flex; flex-direction: column; }
.ths-num { font-family: var(--font-heading); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; color: var(--royal-blue); line-height: 1; }
.ths-label { font-size: 0.82rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 1px; margin-top: 0.4rem; }

/* ------------------------------- GRID ----------------------------------- */
.team-grid-section { padding: clamp(4.5rem, 9vw, 8rem) 0; }
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.8rem;
}

.member-card {
    background: #fff; border-radius: var(--r-lg); overflow: hidden;
    box-shadow: var(--shadow-md); border: 1px solid var(--border);
    transition: all var(--t-med); display: flex; flex-direction: column;
    opacity: 0; transform: translateY(30px);
}
.member-card.in-view { opacity: 1; transform: translateY(0); }
.member-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); }

.mc-image { position: relative; width: 100%; padding-top: 112%; overflow: hidden; background: var(--bg-soft); }
.mc-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 12%; transition: transform 0.6s var(--ease); }
.member-card:hover .mc-image img { transform: scale(1.06); }
.mc-badge {
    position: absolute; top: 14px; left: 14px; z-index: 1;
    padding: 0.35rem 0.85rem; border-radius: var(--r-pill);
    background: rgba(13,17,71,0.82); backdrop-filter: blur(6px);
    color: #fff; font-size: 0.72rem; font-weight: 600;
}

.mc-info { padding: 1.5rem; text-align: center; display: flex; flex-direction: column; flex-grow: 1; }
.mc-info h3 { font-family: var(--font-heading); font-size: 1.25rem; color: var(--royal-blue); margin-bottom: 0.3rem; line-height: 1.2; }
.mc-role { color: var(--gold-dark); font-weight: 600; font-size: 0.88rem; margin-bottom: 0.8rem; }
.mc-blurb { color: var(--text-medium); font-size: 0.9rem; line-height: 1.55; margin-bottom: 1.2rem; flex-grow: 1; }
.mc-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.7rem 1.2rem; border-radius: var(--r-pill);
    background: var(--bg-tint); color: var(--royal-blue); font-weight: 600; font-size: 0.9rem;
    border: none; cursor: pointer; transition: all var(--t-fast); font-family: var(--font-body);
}
.mc-btn:hover { background: var(--blue-gradient); color: #fff; }
.mc-btn i { transition: transform var(--t-fast); }
.mc-btn:hover i { transform: translateX(4px); }

/* ------------------------------- JOIN ----------------------------------- */
.join-team { padding: 0 0 clamp(4.5rem, 9vw, 8rem); }
.join-inner {
    background: var(--blue-gradient); border-radius: var(--r-xl); padding: clamp(2.5rem, 5vw, 4rem);
    text-align: center; box-shadow: var(--shadow-blue); position: relative; overflow: hidden;
}
.join-inner::before { content: ''; position: absolute; top: -80px; right: -80px; width: 260px; height: 260px; background: radial-gradient(circle, rgba(180,155,87,0.25), transparent 70%); border-radius: 50%; }
.join-inner .section-tag { position: relative; z-index: 1; }
.join-inner h2 { font-family: var(--font-heading); font-size: clamp(1.8rem, 4vw, 2.6rem); color: #fff; margin-bottom: 0.9rem; position: relative; z-index: 1; }
.join-inner p { color: rgba(255,255,255,0.85); max-width: 560px; margin: 0 auto 2rem; position: relative; z-index: 1; }
.join-inner .btn-primary { position: relative; z-index: 1; }

/* ------------------------------- MODAL ---------------------------------- */
.member-modal {
    position: fixed; inset: 0; z-index: 3000;
    display: flex; align-items: center; justify-content: center; padding: 1.2rem;
    opacity: 0; visibility: hidden; transition: opacity var(--t-med), visibility var(--t-med);
}
.member-modal.open { opacity: 1; visibility: visible; }

.mm-overlay { position: absolute; inset: 0; background: rgba(7,9,38,0.72); backdrop-filter: blur(6px); }

.mm-dialog {
    position: relative; z-index: 1; width: min(900px, 100%);
    max-height: 90vh; overflow-y: auto; background: #fff; border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg); transform: translateY(30px) scale(0.97);
    transition: transform var(--t-med) var(--ease-out);
}
.member-modal.open .mm-dialog { transform: translateY(0) scale(1); }

.mm-close {
    position: absolute; top: 1rem; right: 1rem; z-index: 2;
    width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
    background: rgba(255,255,255,0.9); color: var(--royal-blue); font-size: 1.1rem;
    display: grid; place-items: center; box-shadow: var(--shadow-sm); transition: all var(--t-fast);
}
.mm-close:hover { background: var(--royal-blue); color: #fff; transform: rotate(90deg); }

.mm-grid { display: grid; grid-template-columns: 300px 1fr; }
.mm-media { position: relative; background: var(--bg-soft); }
.mm-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; min-height: 340px; }

.mm-content { padding: clamp(1.8rem, 3vw, 2.6rem); }
.mm-content h2 { font-family: var(--font-heading); font-size: clamp(1.6rem, 3vw, 2.1rem); color: var(--royal-blue); margin-bottom: 0.3rem; }
.mm-title { display: block; color: var(--gold-dark); font-weight: 600; font-size: 1rem; margin-bottom: 0.8rem; }
.mm-specialty {
    display: inline-block; padding: 0.4rem 1rem; border-radius: var(--r-pill);
    background: var(--blue-gradient); color: #fff; font-size: 0.82rem; font-weight: 600; margin-bottom: 1.6rem;
}

.mm-sections { display: flex; flex-direction: column; gap: 1.4rem; margin-bottom: 1.8rem; }
.mm-section h3 {
    font-family: var(--font-heading); font-size: 1.15rem; color: var(--royal-blue);
    margin-bottom: 0.7rem; display: flex; align-items: center; gap: 0.5rem;
}
.mm-section h3 i { color: var(--gold); font-size: 0.95rem; }
.mm-section p { color: var(--text-medium); font-size: 0.98rem; line-height: 1.65; margin-bottom: 0.6rem; }
.mm-section p:last-child { margin-bottom: 0; }
.mm-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.mm-tags span { padding: 0.4rem 0.85rem; background: var(--bg-tint); color: var(--royal-blue); border-radius: var(--r-pill); font-size: 0.82rem; font-weight: 600; }

.mm-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; padding-top: 1.4rem; border-top: 1px solid var(--border); }

/* ------------------------------- RESPONSIVE ----------------------------- */
@media (max-width: 768px) {
    .mm-grid { grid-template-columns: 1fr; }
    .mm-media img { min-height: 260px; max-height: 320px; }
}
@media (max-width: 480px) {
    .members-grid { grid-template-columns: 1fr; max-width: 340px; margin: 0 auto; }
    .mm-cta { flex-direction: column; }
    .mm-cta .btn-primary, .mm-cta .btn-ghost { width: 100%; }
}

/* Reduced motion: cards visible immediately */
@media (prefers-reduced-motion: reduce) {
    .member-card { opacity: 1; transform: none; }
}
