/*
 * Meet The Team — Page Styles
 * Font sizes inherit from theme.
 */

/* ── Tokens ──────────────────────────────────────── */
:root {
    --mtt-green:      #495037;
    --mtt-gold:       #c9b97a;
    --mtt-cream:      #f5f3f0;
    --mtt-white:      #ffffff;
    --mtt-text:       #3a3228;
    --mtt-text-mid:   #6b5f50;
    --mtt-text-muted: #9a8c6e;
    --mtt-border:     #e0d8cc;
    --mtt-px:         80px;
}

/* ── Wrapper breakout ────────────────────────────── */
.mtt-page-template .entry-content {
    max-width: none !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    float: none !important;
}

/* ── Base ────────────────────────────────────────── */
.mtt-page {
    background: var(--mtt-cream);
    color: var(--mtt-text);
    width: 100%;
    max-width: none;
}

.mtt-eyebrow {
    display: block;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--mtt-text-muted);
    margin-bottom: 14px;
}

/* ── Hero ────────────────────────────────────────── */
.mtt-hero {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    min-height: 520px;
    width: 100%;
}

.mtt-hero__text {
    background: var(--mtt-white);
    padding: 80px var(--mtt-px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.mtt-hero__heading {
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 20px;
}

.mtt-hero__body p {
    color: var(--mtt-text-mid);
    line-height: 1.85;
    margin-bottom: 14px;
}

.mtt-hero__media {
    overflow: hidden;
    min-width: 0;
    aspect-ratio: 16 / 9;
}

.mtt-hero__media img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    display: block;
}

/* ── Groups ──────────────────────────────────────── */
.mtt-groups {
    padding: 0;
}

.mtt-group {
    padding-top: 50px;
    padding-bottom: 100px;
    padding-left: var(--mtt-px);
    padding-right: var(--mtt-px);
}

/* Alternating backgrounds — odd groups cream, even groups light grey */
.mtt-group:nth-child(odd)  { background: var(--mtt-cream); }
.mtt-group:nth-child(even) { background: #ece9e4; }

.mtt-group__title {
    text-align: center;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--mtt-text-muted);
    margin-bottom: 48px;
}

/* ── Member grid ─────────────────────────────────── */
.mtt-group__grid {
    display: grid;
    grid-template-columns: repeat( auto-fit, minmax( 280px, 360px ) );
    max-width: 1140px;
    margin: 0 auto;
    gap: 24px;
    justify-content: center;
    justify-items: center;
}

/* All members same size — grid enforces this */
.mtt-group__grid .mtt-member {
    width: 360px;
}

/* ── Member card ─────────────────────────────────── */
.mtt-member {
    cursor: pointer;
    outline: none;
}

.mtt-member:focus .mtt-member__img-wrap {
    box-shadow: 0 0 0 2px var(--mtt-gold);
}

.mtt-member__img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #d0c9c0;
}

/* Greyscale by default, colour on hover */
.mtt-member__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(100%);
    transition: filter 0.4s ease, transform 0.5s ease;
}

.mtt-member:hover .mtt-member__img,
.mtt-member:focus .mtt-member__img {
    filter: grayscale(0%);
    transform: scale(1.03);
}

/* Name overlay — white bar, hidden until hover */
.mtt-member__overlay {
    position: absolute;
    bottom: 20%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.mtt-member:hover .mtt-member__overlay,
.mtt-member:focus .mtt-member__overlay {
    opacity: 1;
}

.mtt-member__name {
    background: rgba(255, 255, 255, 0.92);
    color: var(--mtt-text);
    font-weight: 400;
    letter-spacing: 0.04em;
    padding: 10px 32px;
    display: block;
    text-align: center;
    min-width: 60%;
}

/* ── Modal ───────────────────────────────────────── */
.mtt-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.mtt-modal[hidden] { display: none; }

.mtt-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20,14,8,0.72);
    cursor: pointer;
}

.mtt-modal__box {
    position: relative;
    background: var(--mtt-white);
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 2px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.35);
    animation: mtt-fadein 0.25s ease;
}

@keyframes mtt-fadein {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.mtt-modal__close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--mtt-text-muted);
    cursor: pointer;
    z-index: 2;
    padding: 4px 8px;
    transition: color 0.2s ease;
}

.mtt-modal__close:hover { color: var(--mtt-text); }

.mtt-modal__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 400px;
}

.mtt-modal__image-col { overflow: hidden; }

.mtt-modal__image-col img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mtt-modal__content-col {
    padding: 56px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mtt-modal__name {
    font-weight: 400;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
    color: var(--mtt-text);
}

.mtt-modal__role {
    color: var(--mtt-text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 0.5px solid var(--mtt-border);
}

.mtt-modal__bio p {
    color: var(--mtt-text-mid);
    line-height: 1.85;
    margin-bottom: 12px;
}

/* ── Responsive ──────────────────────────────────── */
@media ( max-width: 900px ) {
    :root { --mtt-px: 40px; }
    .mtt-group__grid { grid-template-columns: repeat( auto-fit, 300px ); }
    .mtt-group__grid .mtt-member { width: 300px; }
}

@media ( max-width: 768px ) {
    :root { --mtt-px: 20px; }

    .mtt-hero { grid-template-columns: 1fr; }
    .mtt-hero__media { aspect-ratio: 4 / 3; }
    .mtt-hero__text { padding: 48px 20px; }

    .mtt-group__grid { grid-template-columns: repeat( 2, 1fr ); }
    .mtt-group__grid .mtt-member { width: 100%; }

    .mtt-modal__inner { grid-template-columns: 1fr; }
    .mtt-modal__image-col { max-height: 280px; }
    .mtt-modal__content-col { padding: 32px 24px; }
}

@media ( max-width: 480px ) {
    .mtt-group__grid { grid-template-columns: 1fr; }
}