/* =====================================================================
   Program Instructors — single-mm_program "Who teaches this" section.

   Server-rendered card grid scoped to the current program's
   `instructor_ids` meta. Sits inside the single-program template, which
   already runs on a content-heavy column (hero, quick-facts, accordion,
   testimonials, lead-form CTA), so cards are intentionally MORE COMPACT
   than the canonical /meet-our-team/ grid:
     - no bio paragraph
     - no "Teaching since" line
     - no "Accepting students" badge
     - smaller card body padding + tighter name size
     - 4:5 portrait crop (matched to /meet-our-team/ for visual rhythm)
     - section background WHITE so it lifts off the cream paper page bg

   Style language and tokens otherwise follow assets/css/meet-our-team.css.
   Token-only — no hardcoded hexes.

   Layout cap: 1280px inner, matching programs-page.css and
   meet-our-team.css.

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

/* =====================================================================
   Section wrapper
===================================================================== */

.mm-program-team {
    /* Soft teal→paper→grape diagonal wash — same vocabulary as the video
       section background, ties the brand colors to a section that
       otherwise sits flat between the trial-callout and FAQs. The grape
       end echoes the section's grape eyebrow ("Who teaches this"). */
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(64, 176, 160, 0.16) 0%, rgba(64, 176, 160, 0) 55%),
        radial-gradient(120% 80% at 100% 100%, rgba(122, 58, 150, 0.16) 0%, rgba(122, 58, 150, 0) 55%),
        linear-gradient(135deg, var(--mm-teal-50) 0%, var(--mm-paper, #fbf6ea) 50%, var(--mm-grape-100) 100%);
    color: var(--mm-fg);
    padding-block: clamp(48px, 5vw, 80px) clamp(48px, 5vw, 80px);
    scroll-margin-top: 88px;
}

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

/* Editor-preview placeholder (no queried program) — quiet, low-contrast. */
.mm-program-team--preview {
    background: var(--mm-paper-2);
}

.mm-program-team__empty-preview {
    margin: 0;
    padding: var(--mm-s-8);
    text-align: center;
    font-family: var(--mm-font-body);
    font-size: 14px;
    color: var(--mm-ink-3);
}

/* =====================================================================
   Header
===================================================================== */

.mm-program-team__header {
    max-width: 720px;
    margin: 0 auto var(--mm-s-10);
    text-align: center;
}

.mm-program-team__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 var(--mm-s-3) 0;
    font-family: var(--mm-font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mm-grape-700);
}

.mm-program-team__eyebrow-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--mm-grape-700);
}

.mm-program-team__heading {
    margin: 0;
    font-family: var(--mm-font-display);
    font-weight: 800;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--mm-ink);
    text-wrap: balance;
}

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

/* Flex (not grid) so programs with 1 or 2 instructors center naturally
   instead of left-aligning into empty grid cells. Cards have an explicit
   flex-basis matching the desktop 3-col layout (1/3 of the row minus
   gap), with a min so the cards wrap cleanly at narrow widths. */
.mm-program-team__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--mm-s-6);
}

.mm-program-team__card {
    /* Default flex sizing — overridden by the desktop breakpoint below. */
    flex: 1 1 100%;
    max-width: 100%;
}

/* =====================================================================
   Card — compact variant of mm-team__card
===================================================================== */

.mm-program-team__card {
    display: flex;
    flex-direction: column;
    background: var(--wp--preset--color--white);
    border: 1px solid var(--mm-line);
    border-radius: 18px;
    overflow: hidden;
    min-height: 360px;
    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-program-team__card:hover {
    border-color: var(--wp--preset--color--teal-300);
    box-shadow: 0 18px 36px -16px rgba(21, 92, 85, 0.18), 0 4px 10px rgba(21, 92, 85, 0.05);
    transform: translateY(-2px);
}

/* Photo */

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

.mm-program-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-program-team__card:hover .mm-program-team__card-photo img {
    transform: scale(1.03);
}

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

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

/* Body — tighter than mm-team__card-body */

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

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

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

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

.mm-program-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;
}

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

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

    .mm-program-team__grid {
        gap: var(--mm-s-6);
    }

    .mm-program-team__card {
        /* 2-up: each card takes ~half the row minus the gap. */
        flex: 0 1 calc((100% - var(--mm-s-6)) / 2);
        max-width: calc((100% - var(--mm-s-6)) / 2);
        min-height: 380px;
    }
}

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

@media (min-width: 1024px) {
    .mm-program-team__grid {
        gap: var(--mm-s-8);
    }

    .mm-program-team__card {
        /* 3-up: each card takes ~1/3 the row minus the two gaps. */
        flex: 0 1 calc((100% - 2 * var(--mm-s-8)) / 3);
        max-width: calc((100% - 2 * var(--mm-s-8)) / 3);
        min-height: 400px;
    }

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

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

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