/* =====================================================================
   Meet Our Team — /meet-our-team/ singleton page.

   Page composition:
     - Full-bleed photo hero (.mm-team-hero) with background image + scrim
     - Cream-paper instructor grid (.mm-team) rendered server-side from
       patterns/meet-our-team-grid.php (queries mm_instructor by
       menu_order, title)

   Styling language matches the rest of the site:
     - Cream paper page background
     - White rounded cards with hairline border (--mm-line)
     - 1:1 square portrait crop with subtle bottom scrim
     - Teal "Accepting students" pill
     - Grape eyebrow dot to mirror the homepage TeacherBlock + FAQ

   Token-only. All colors come from theme.json palette via the
   --wp--preset--color--* slugs (or the --mm-* aliases set in
   block-styles.css). No hardcoded hexes outside the hero scrim overlay.

   Layout cap: 1280px inner, matching programs-page.css. Page padding
   token: --mm-s-8 desktop, --mm-s-5 <640.

   Mobile-first: base styles target ≤767, with min-width 768 (tablet)
   and min-width 1024 (desktop) layering on top.
===================================================================== */

/* =====================================================================
   Hero — the .is-style-mm-team-hero Cover block style now lives in its own
   stylesheet, assets/css/cover-hero.css, and rides core/cover via
   wp_enqueue_block_style() (inc/blocks.php) so it loads on EVERY page with a
   Cover hero — not just this one. /about/ reuses the same hero, so its CSS
   must not be gated behind the team-grid block (which only renders here).
   Edit the hero in cover-hero.css.
===================================================================== */

/* =====================================================================
   Grid section wrapper
===================================================================== */

.mm-team {
    background: var(--mm-paper);
    color: var(--mm-fg);
    padding-block: clamp(56px, 6vw, 96px) clamp(56px, 6vw, 96px);
    scroll-margin-top: 88px;
}

.mm-team__inner {
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: var(--mm-s-5);
}

/* =====================================================================
   Empty state — when 0 instructors are published
===================================================================== */

.mm-team__empty {
    max-width: 640px;
    margin: 0 auto;
    padding: var(--mm-s-10);
    text-align: center;
    background: var(--wp--preset--color--white);
    border: 1px solid var(--mm-line);
    border-radius: 20px;
}

.mm-team__empty p {
    margin: 0;
    font-family: var(--mm-font-body);
    font-size: 16px;
    line-height: 1.55;
    color: var(--mm-ink-2);
}

/* =====================================================================
   Grid — mobile-first 1col, 2col @ 768, 3col @ 1024
===================================================================== */

.mm-team__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--mm-s-6);
}

/* =====================================================================
   Card
===================================================================== */

.mm-team__card {
    display: flex;
    flex-direction: column;
    background: var(--wp--preset--color--white);
    border: 1px solid var(--mm-line);
    border-radius: 20px;
    overflow: hidden;
    transition:
        border-color var(--mm-dur) var(--mm-ease),
        box-shadow var(--mm-dur) var(--mm-ease),
        transform var(--mm-dur) var(--mm-ease);
}

.mm-team__card:hover {
    border-color: var(--wp--preset--color--teal-300);
    box-shadow: 0 22px 44px -18px rgba(21, 92, 85, 0.18), 0 4px 12px rgba(21, 92, 85, 0.05);
    transform: translateY(-3px);
}

/* Photo */

.mm-team__card-photo {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--mm-paper-2);
}

.mm-team__card-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--mm-dur-slow) var(--mm-ease);
}

.mm-team__card:hover .mm-team__card-photo img {
    transform: scale(1.03);
}

.mm-team__card-photo-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mm-ink-4);
}

.mm-team__card-scrim {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(14, 63, 58, 0) 55%, rgba(14, 63, 58, 0.32) 100%);
}

.mm-team__card-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 5px 10px;
    border-radius: 999px;
    font-family: var(--mm-font-display);
    font-weight: 800;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--wp--preset--color--white);
    background: var(--wp--preset--color--teal);
    box-shadow: 0 2px 8px rgba(21, 92, 85, 0.18);
}

/* Body */

.mm-team__card-body {
    display: flex;
    flex-direction: column;
    gap: var(--mm-s-3);
    padding: var(--mm-s-6) var(--mm-s-6) var(--mm-s-8);
}

.mm-team__card-name {
    margin: 0;
    font-family: var(--mm-font-display);
    font-weight: 800;
    font-size: 22px;
    line-height: 1.15;
    letter-spacing: -0.015em;
    color: var(--mm-ink);
}

.mm-team__card-role {
    margin: 0;
    font-family: var(--mm-font-display);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--wp--preset--color--teal-700);
}

.mm-team__card-chips {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mm-team__card-chip {
    padding: 4px 10px;
    border-radius: 999px;
    font-family: var(--mm-font-display);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--wp--preset--color--grape-700);
    background: var(--wp--preset--color--grape-100);
    line-height: 1.2;
}

.mm-team__card-tenure {
    margin: 0;
    font-family: var(--mm-font-body);
    font-size: 13px;
    color: var(--mm-ink-3);
}

.mm-team__card-bio {
    margin: 4px 0 0 0;
    font-family: var(--mm-font-body);
    font-size: 15px;
    line-height: 1.55;
    color: var(--mm-ink-2);
}

/* =====================================================================
   Tablet (≥768)
===================================================================== */

@media (min-width: 768px) {
    .mm-team__inner {
        padding-inline: var(--mm-s-8);
    }

    .mm-team__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--mm-s-8);
    }

    .mm-team__card-body {
        padding: var(--mm-s-6) var(--mm-s-6) var(--mm-s-8);
    }
}

/* =====================================================================
   Desktop (≥1024)
===================================================================== */

@media (min-width: 1024px) {
    .mm-team__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--mm-s-8);
    }

    .mm-team__card-name {
        font-size: 24px;
    }
}

/* =====================================================================
   Reduced motion
===================================================================== */

@media (prefers-reduced-motion: reduce) {
    .mm-team__card,
    .mm-team__card-photo img {
        transition: none;
    }
    .mm-team__card:hover {
        transform: none;
    }
    .mm-team__card:hover .mm-team__card-photo img {
        transform: none;
    }
}
