/* Leadership Team — director profiles open in an accessible modal on click
   ("Read profile" pill, or tapping the photo). Progressive enhancement:
   with NO JS the bio renders inline (still reachable); with JS it becomes a
   focus-trapped popup. Bio text stays in ACF (single source, staff-editable). */

/* ---------- NO-JS baseline: bio inline & reachable; modal chrome hidden ---------- */
.lead-more { display: none; }                      /* non-functional without JS -> hide */
.lead-bio { margin: 0.85rem auto 0; max-width: 340px; }
.lead-bio__backdrop,
.lead-bio__close { display: none; }
.lead-bio__name { font-size: 1.05rem; margin: 0 0 .15rem; }
.lead-bio__role { color: #666; margin: 0 0 .5rem; font-size: .9rem; }
.lead-bio__text { font-size: .9rem; line-height: 1.6; color: #444; text-align: left; }

/* ---------- JS present: inline bios hidden, trigger shown, .lead-bio -> modal ---------- */
.has-js .lead-bio { display: none; }               /* closed */
.has-js .lead-member__photo.is-clickable { cursor: pointer; }
.has-js .lead-more {
    display: inline-block;
    margin-top: .6rem;
    background: none;
    border: 1px solid #d0d0d0;
    border-radius: 999px;
    padding: .4rem 1.15rem;
    font-size: .85rem;
    font-weight: 500;
    color: #222;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
.has-js .lead-more:hover,
.has-js .lead-more:focus-visible { background: #f4c400; border-color: #f4c400; }

/* open */
.has-js .lead-bio.is-open {
    display: block;
    position: fixed;
    inset: 0;
    max-width: none;   /* clear the no-JS inline cap so the overlay fills the viewport */
    margin: 0;         /* clear the no-JS inline centering */
    z-index: 100000;   /* above the site's fixed nav (z-index 1030) */
}
.has-js .lead-bio.is-open .lead-bio__backdrop,
.has-js .lead-bio.is-open .lead-bio__close { display: block; }
.lead-bio__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
}
.lead-bio__panel {
    position: relative;
    z-index: 1;
    background: #fff;
    color: #222;
    width: calc(100% - 2rem);
    max-width: 640px;
    margin: 4vh auto;
    max-height: 92vh;
    max-height: 92dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    padding: 2rem 2.25rem;
    text-align: left;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.lead-bio__close {
    position: absolute;
    top: .4rem;
    right: .7rem;
    background: none;
    border: 0;
    font-size: 1.9rem;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: .1rem .45rem;
}
.lead-bio__close:hover,
.lead-bio__close:focus-visible { color: #000; }
.has-js .lead-bio__name { font-size: 1.35rem; }
.has-js .lead-bio__role { font-size: 1rem; }
.has-js .lead-bio__text { font-size: 1rem; max-width: none; }

/* lock the page behind the modal */
body.lead-modal-open { overflow: hidden; }

/* phone: full-width sheet, scrollable, nothing cut off; keeps a tappable
   backdrop strip at the top so backdrop-to-close still works on mobile */
@media (max-width: 575.98px) {
    .has-js .lead-bio.is-open .lead-bio__panel {
        width: 100%;
        margin: 8vh 0 0;
        max-height: 92vh;
        max-height: 92dvh;
        border-radius: 14px 14px 0 0;
        padding: 2.75rem 1.25rem 2rem;
    }
}
