/* ==========================================================================
   Member Popup — FAES leadership
   Portraits are white-background cutouts of varying subject scale, so they
   are blended onto a tinted panel rather than cropped edge to edge.
   ========================================================================== */

.member_popup_module.align-left { --mpm-align: left; }
.member_popup_module.align-center { --mpm-align: center; }

.member_popup_module {
  --mpm-ink: #241c31;
  --mpm-aubergine: #3f3151;
  --mpm-panel: #f2ecee;
  --mpm-accent: #8c1d2f;
  --mpm-rule: #e0d6d9;
  --mpm-teal: #2d9379;
  --mpm-body: #453e52;

  --mpm-align: center;

  --mpm-cols: 4;
  --mpm-cols-md: 3;
  --mpm-cols-sm: 2;
  --mpm-ratio: 4 / 5;
  --mpm-gap-x: 32px;
  --mpm-gap-y: 52px;

  --mpm-display: Montserrat, sans-serif;
}

.member_popup_module *, .mpm-dialog * { box-sizing: border-box; }

.member_popup_module .sr-only, .mpm-dialog .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------- intro --- */

.member_popup_module .mpm-intro { max-width: 62ch; margin: 0 0 clamp(2.5rem, 1.5rem + 3vw, 4rem); }

.member_popup_module .mpm-heading {
  font-family: var(--mpm-display);
  font-weight: 700;
  font-size: 38px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--mpm-ink);
  margin: 0;
}

@media (max-width: 559.98px) {
  .member_popup_module .mpm-heading { font-size: 28px; }
}

.member_popup_module .mpm-heading::after {
  content: ""; display: block; width: 72px; height: 2px;
  margin-top: 1.25rem; background: var(--mpm-accent);
}

.member_popup_module .mpm-subheading {
  font-size: 1.0625rem; line-height: 1.6; color: var(--mpm-aubergine); margin: 1.25rem 0 0;
}

.member_popup_module .mpm-description {
  font-size: 1rem; line-height: 1.7; color: var(--mpm-body); margin: 1rem 0 0;
}
.member_popup_module .mpm-description > *:first-child { margin-top: 0; }
.member_popup_module .mpm-description > *:last-child  { margin-bottom: 0; }

/* -------------------------------------------------------------- grid --- */

.member_popup_module .mpm-grid {
  display: grid; grid-template-columns: 1fr;
  column-gap: var(--mpm-gap-x); row-gap: var(--mpm-gap-y);
  list-style: none; margin: 0; padding: 0;
}
.member_popup_module .mpm-grid > li::marker { content: none; }

@media (min-width: 560px) { .member_popup_module .mpm-grid { grid-template-columns: repeat(var(--mpm-cols-sm), minmax(0, 1fr)); } }
@media (min-width: 900px) { .member_popup_module .mpm-grid { grid-template-columns: repeat(var(--mpm-cols-md), minmax(0, 1fr)); } }
@media (min-width: 1200px){ .member_popup_module .mpm-grid { grid-template-columns: repeat(var(--mpm-cols), minmax(0, 1fr)); } }

.member_popup_module .mpm-card { min-width: 0; margin: 0; padding: 0; list-style: none; }

/* HubSpot themes style bare <button> heavily (they are CTAs elsewhere on the
   site). These resets are deliberately loud because the theme's rules would
   otherwise repaint the card on hover and focus. */
.member_popup_module .mpm-card__trigger,
.member_popup_module button.mpm-card__trigger:hover,
.member_popup_module .mpm-card__trigger:focus,
.member_popup_module .mpm-card__trigger:active,
.member_popup_module .mpm-card__trigger:visited {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: inherit !important;
  font: inherit !important;
  text-align: var(--mpm-align, center) !important;
  text-transform: none !important;
  text-decoration: none !important;
  letter-spacing: normal !important;
  line-height: inherit !important;
  transform: none !important;
  transition: none !important;
  cursor: pointer;
}

/* cards with no bio are plain plates, not controls */
.member_popup_module .mpm-card__trigger--static { cursor: default; }

/* The caption must not move on hover. Theme rules that target a button's
   descendants are not covered by the reset on the button itself, so the
   geometry of these three elements is pinned in every interaction state. */
.member_popup_module .mpm-card__identity,
.member_popup_module .mpm-card__name,
.member_popup_module .mpm-card__role,
.member_popup_module .mpm-card__trigger:hover .mpm-card__identity,
.member_popup_module .mpm-card__trigger:hover .mpm-card__name,
.member_popup_module .mpm-card__trigger:hover .mpm-card__role,
.member_popup_module .mpm-card__trigger:focus .mpm-card__identity,
.member_popup_module .mpm-card__trigger:focus .mpm-card__name,
.member_popup_module .mpm-card__trigger:focus .mpm-card__role,
.member_popup_module .mpm-card__trigger:active .mpm-card__identity,
.member_popup_module .mpm-card__trigger:active .mpm-card__name,
.member_popup_module .mpm-card__trigger:active .mpm-card__role {
  transition: none !important;
  transform: none !important;
  text-decoration: none !important;
  text-indent: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  top: auto !important;
  left: auto !important;
  position: static !important;
}

/* portrait ground: white cutouts multiply into the panel so every subject
   sits on the same field regardless of how the photo was shot */
.member_popup_module .mpm-card__frame {
  display: block; position: relative;
  aspect-ratio: var(--mpm-ratio);
  overflow: hidden;
  background: var(--mpm-panel);
  isolation: isolate;
  /* contain: paint stops repaints inside the blend group from reaching the
     caption below and re-rasterising its text */
  contain: paint;
}

/* The hairline is an overlay, not a shadow on the blended element. Painting a
   border on the portrait itself forced the whole multiply group to repaint,
   which is what made the name appear to shimmer. */
.member_popup_module .mpm-card__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--mpm-accent) 40%, transparent);
  transition: border-color 200ms ease;
}

.member_popup_module button.mpm-card__trigger:hover .mpm-card__frame::after,
.member_popup_module button.mpm-card__trigger:focus-visible .mpm-card__frame::after {
  border-color: var(--mpm-accent);
}

/* the frame clips and contains the paint, so the zoom cannot touch the caption */
.member_popup_module button.mpm-card__trigger:hover .mpm-card__img,
.member_popup_module button.mpm-card__trigger:focus-visible .mpm-card__img {
  transform: scale(1.04);
}

.member_popup_module.align-center .mpm-card__identity { border-top: 0; padding-top: 0; }

/* a short centred rule replaces the full-width one, matching the popup */
.member_popup_module.align-center .mpm-card__identity::before {
  content: "";
  display: block;
  width: 40px;
  height: 1px;
  margin: 0 auto 0.875rem;
  background: var(--mpm-rule);
  transition: background-color 200ms ease;
}


.member_popup_module .mpm-card__img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  transform: scale(1);
  transform-origin: center;
  backface-visibility: hidden;
  transition: transform 600ms cubic-bezier(0.2, 0.6, 0.2, 1);
}

.member_popup_module.is-cutout .mpm-card__img {
  object-fit: cover;
  object-position: center 22%;
  mix-blend-mode: multiply;
}

.member_popup_module .mpm-card__monogram,
.mpm-dialog__monogram {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mpm-display);
  font-weight: 700;
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.25rem);
  letter-spacing: 0.06em;
  text-indent: 0.06em;
  color: var(--mpm-aubergine);
  opacity: 0.3;
}

.mpm-dialog__monogram {
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 4 / 5;
  background: var(--mpm-panel);
}

.member_popup_module .mpm-card__img.is-placeholder {
  width: 45%; height: auto; max-height: 45%;
  object-fit: contain; margin: auto;
  position: absolute; inset: 0; opacity: 0.5; mix-blend-mode: normal;
}

.member_popup_module .mpm-card__identity {
  display: block;
  border-top: 1px solid var(--mpm-rule);
  padding-top: 0.875rem;
  margin-top: 1.125rem;
  transition: border-color 200ms ease;
}

.member_popup_module .mpm-card__name {
  display: block;
  font-family: inherit;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.35;
  color: var(--mpm-ink);
  transition: color 200ms ease;
}

/* small caps normalises the roles, which are entered inconsistently
   ("VICE-Chair", "TREASURER"), without editing anyone's content */
.member_popup_module .mpm-card__role {
  display: block;
  margin-top: 0.5rem;
  font-size: 15px;
  font-weight: 700;
  font-variant-caps: all-small-caps;
  font-feature-settings: "c2sc", "smcp";
  letter-spacing: 0.06em;
  line-height: 1.4;
  color: var(--mpm-accent);
}


.member_popup_module button.mpm-card__trigger:focus-visible {
  outline: 2px solid var(--mpm-teal) !important;
  outline-offset: 4px !important;
}

/* ------------------------------------------------------------ dialog --- */
/* The dialog is reparented into .fancybox-content, so it cannot inherit from
   .member_popup_module. Every token is redeclared here. */

.mpm-dialog {
  --mpm-ink: #241c31;
  --mpm-aubergine: #3f3151;
  --mpm-panel: #f2ecee;
  --mpm-accent: #8c1d2f;
  --mpm-rule: #e0d6d9;
  --mpm-body: #453e52;
  --mpm-display: Montserrat, sans-serif;

  background: #fff;
  color: var(--mpm-ink);
  padding: clamp(1.75rem, 1rem + 2.5vw, 3.25rem);
  max-width: 100%;
}

.mpm-dialog__monogram { margin-inline: auto; }

.mpm-dialog__portrait { margin: 0 0 1.75rem; }

.mpm-dialog__img {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top center;
  background: transparent;
}

.mpm-dialog.is-cutout .mpm-dialog__img {
  object-fit: cover;
  object-position: center 22%;
  mix-blend-mode: multiply;
}

.mpm-dialog__img.is-placeholder {
  aspect-ratio: auto; width: 150px; object-fit: contain;
  opacity: 0.5; mix-blend-mode: normal; padding: 0;
}

.mpm-dialog__identity {
  border-bottom: 1px solid var(--mpm-rule);
  padding-bottom: 1.375rem;
  margin-bottom: 1.625rem;
}

.mpm-dialog__name {
  font-family: inherit;
  font-weight: 600;
  font-size: clamp(1.5rem, 1.15rem + 1vw, 1.875rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--mpm-ink);
  margin: 0;
}

.mpm-dialog__role {
  font-size: 17px;
  font-weight: 700;
  font-variant-caps: all-small-caps;
  font-feature-settings: "c2sc", "smcp";
  letter-spacing: 0.06em;
  line-height: 1.5;
  color: var(--mpm-accent);
  margin: 0.5rem 0 0;
}

.mpm-dialog__meta {
  font-size: 0.9375rem; line-height: 1.5;
  color: var(--mpm-aubergine); margin: 0.375rem 0 0;
}

.mpm-dialog__bio {
  font-size: 1.0625rem; line-height: 1.75;
  color: var(--mpm-body); text-align: left; max-width: 64ch;
}
.mpm-dialog__bio > *:first-child { margin-top: 0; }
.mpm-dialog__bio > *:last-child  { margin-bottom: 0; }
.mpm-dialog__bio p { margin: 0 0 1.1em; }


/* portrait beside the bio. Keyed off the dialog's own width via a container
   query, because .fancybox-content is sized by its content, not the viewport
   — a viewport media query here fires at the wrong moment. */
.mpm-dialog--split { container-type: inline-size; }

@container (min-width: 680px) {
  .mpm-dialog--split .mpm-dialog__layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    column-gap: clamp(2rem, 1rem + 2.5vw, 3.25rem);
    align-items: start;
  }
  .mpm-dialog--split .mpm-dialog__portrait { margin-bottom: 0; }
}

/* fallback for browsers without container queries */
@supports not (container-type: inline-size) {
  @media (min-width: 900px) {
    .mpm-dialog--split .mpm-dialog__layout {
      display: grid;
      grid-template-columns: 300px minmax(0, 1fr);
      column-gap: 3rem;
      align-items: start;
    }
    .mpm-dialog--split .mpm-dialog__portrait { margin-bottom: 0; }
  }
}

/* ------------------------------------------------ centred, framed --- */
/* The composition from the reference: lilac ground, gold hairline frame,
   portrait above the identity, brand mark closing the card. */

.mpm-dialog--centered {
  background: #f7f2f3;
  background: var(--mpm-popup-bg, #f7f2f3);
  padding: clamp(0.75rem, 0.5rem + 1vw, 1.25rem);
}

.mpm-dialog--centered .mpm-dialog__layout {
  border: 2px solid #8c1d2f;
  border-width: var(--mpm-frame-w, 2px);
  border-color: var(--mpm-frame, var(--mpm-accent, #8c1d2f));
  padding: clamp(2rem, 1rem + 4vw, 4rem) clamp(1.5rem, 1rem + 4vw, 4.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.mpm-dialog--centered .mpm-dialog__portrait { margin: 0 0 2rem; }

.mpm-dialog--centered .mpm-dialog__img,
.mpm-dialog--centered .mpm-dialog__monogram {
  width: clamp(150px, 16vw, 200px);
  max-width: none;
}

.mpm-dialog--centered .mpm-dialog__body {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* role sits above the name, as in the reference */
.mpm-dialog--centered .mpm-dialog__identity {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 1.75rem;
}

.mpm-dialog--centered .mpm-dialog__role { margin: 0 0 0.625rem; }
.mpm-dialog--centered .mpm-dialog__meta { order: -2; margin: 0.75rem 0 0; }

/* a short rule closes the identity block instead of a full-width border */
.mpm-dialog--centered .mpm-dialog__name::after {
  content: "";
  display: block;
  width: 56px;
  height: 1px;
  margin: 1.5rem auto 0;
  background: var(--mpm-accent);
}

/* the block is centred; the text inside it is not. Justified type at this
   width is what produced the rivers in the old popup. */
.mpm-dialog--centered .mpm-dialog__bio {
  max-width: 66ch;
  margin: 0 auto;
  text-align: left;
}

.mpm-dialog--centered .mpm-dialog__brandmark { margin-top: 3.5rem; }

.mpm-dialog__brandmark {
  display: block;
  width: clamp(130px, 13vw, 165px);
  height: auto;
  margin: 2.5rem auto 0;
}

/* ------------------------------------------------- fancybox (scoped) --- */

.fancybox-member-popup .fancybox-bg { background: #241c31; }
.fancybox-member-popup .fancybox-slide--html { padding: 44px 20px; }
.fancybox-member-popup.fancybox-is-open .fancybox-bg { opacity: 0.93; }

/* explicit width, not just max-width: fancybox shrink-wraps to content
   otherwise and the split layout never gets the room it needs */
/* Fancybox v3 adds .fancybox-content to the inline element itself, so
   .mpm-dialog and .fancybox-content are the same node. These selectors must
   therefore out-specify both fancybox's defaults and each other, and they
   restate padding and background rather than leaving them to .mpm-dialog. */
.fancybox-member-popup .fancybox-slide--html .fancybox-content.mpm-dialog {
  width: min(880px, 92vw);
  max-width: min(880px, 92vw);
  margin: auto;
  padding: clamp(1.75rem, 1rem + 2.5vw, 3.25rem);
  background: #fff;
  overflow: visible;
}

.fancybox-member-popup .fancybox-slide--html .fancybox-content.mpm-dialog--centered {
  padding: clamp(0.75rem, 0.5rem + 1vw, 1.25rem);
  background: #f7f2f3;
  background: var(--mpm-popup-bg, #f7f2f3);
}

.fancybox-member-popup .fancybox-slide--html .fancybox-close-small {
  top: 10px; right: 10px;
  width: 40px; height: 40px;
  color: #241c31;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #dcd6e3;
  border-radius: 50%;
  opacity: 1;
}
.fancybox-member-popup .fancybox-slide--html .fancybox-close-small:hover {
  background: #fff; color: #3f3151;
}

@media (max-width: 559.98px) {
  .fancybox-member-popup .fancybox-slide--html .fancybox-content.mpm-dialog {
    width: 100%; max-width: 100%;
  }
}

body.bod-template .member_popup_module { --mpm-gap-y: 60px; }

@media (prefers-reduced-motion: reduce) {
  .member_popup_module *, .mpm-dialog * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}