/* ==========================================================================
   Leadership / Team — scoped to .leadership, .team-card, .profile-panel
   ========================================================================== */

.leadership {
  background: #060607; /* matches the About section directly above it */
  position: relative;
  padding-block: clamp(80px, 10vw, 128px);
  scroll-margin-top: 90px; /* clears the fixed header when jumped to via #team */
}

.leadership-eyebrow { color: var(--prism-teal); }

.leadership-intro {
  max-width: 800px;
  margin: 0 auto 56px;
  text-align: center;
}

.leadership-copy {
  color: var(--prism-band-text-body);
  line-height: 1.7;
  margin: 0 auto 16px;
  max-width: 68ch;
}
/* strong/emphasis color+weight comes from the global rule in style.css */

/* ---- "aeroplane window" leadership carousel ---- */

.leadership-carousel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.leadership-people {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 5vw, 72px);
}

.leadership-person {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
}

/* Lizann's name sits to the left of her portrait (DOM order: name, image).
   Matthew mirrors it — his name sits to the right of his portrait (DOM
   order: image, name) — so the pair reads name / image ... image / name. */
.leadership-person--right {
  flex-direction: row;
}

.leadership-person-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.leadership-person--right .leadership-person-label {
  align-items: flex-end;
  text-align: right;
}

.leadership-person-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 28px);
  white-space: nowrap;
  color: var(--prism-band-text-secondary);
  transition: color 0.3s ease;
}

.leadership-person.is-active .leadership-person-name {
  color: var(--prism-band-text);
}

.leadership-person-title {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 13px;
  white-space: nowrap;
  color: var(--prism-band-text-secondary);
  opacity: 0.8;
}

/* the "window" itself: a tall, fully rounded capsule — porthole-shaped
   rather than a plain card. */
.leadership-window {
  position: relative;
  display: block;
  width: clamp(160px, 16vw, 220px);
  height: clamp(240px, 24vw, 330px);
  border-radius: 999px;
  overflow: hidden;
  background: var(--prism-band-card);
  box-shadow: inset 0 0 0 2px var(--prism-band-border);
  opacity: 0.45;
  filter: grayscale(1);
  transform: scale(0.94);
  transition: transform 0.4s ease, opacity 0.4s ease, box-shadow 0.4s ease, filter 0.4s ease;
}

.leadership-person.is-active .leadership-window {
  opacity: 1;
  filter: grayscale(0);
  transform: scale(1);
  box-shadow: inset 0 0 0 3px var(--prism-teal);
}

.leadership-window-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.leadership-active-copy {
  max-width: 640px;
  text-align: center;
}

.leadership-active-text {
  font-size: var(--body-size); /* matches the rest of the site's body copy */
  line-height: 1.7;
  color: var(--prism-band-text-body);
  margin: 0 0 16px;
}

/* ---- mobile: both leads' name + snippet always visible, stacked
   (no tap-to-switch) — see .leadership-mobile-list in leadership.php.
   Hidden on desktop, where the toggle carousel above is used instead. ---- */
.leadership-mobile-list { display: none; }

@media (max-width: 640px) {
  .leadership-carousel { display: none; }

  .leadership-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 100%;
  }

  /* Photo above the copy rather than beside it — at body-copy size the
     paragraph needs the full column width, otherwise it wraps to three
     or four words a line next to the avatar. */
  .leadership-mobile-person {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
  }

  .leadership-mobile-photo {
    position: relative;
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: inset 0 0 0 2px var(--prism-band-border);
  }
  .leadership-mobile-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
  }

  .leadership-mobile-body { flex: 1 1 auto; min-width: 0; }
  .leadership-mobile-body .leadership-person-name {
    display: block;
    font-size: 18px;
    white-space: normal;
    color: var(--prism-band-text);
  }
  .leadership-mobile-body .leadership-person-title {
    display: block;
    margin-top: 2px;
    margin-bottom: 8px;
    white-space: normal;
  }

  .leadership-mobile-text {
    font-size: var(--body-size); /* matches the rest of the site's body copy */
    line-height: 1.7;
    color: var(--prism-band-text-body);
    margin: 0 0 8px;
  }
}

.team-card-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--prism-teal);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.team-card-link:hover { color: var(--prism-band-text); }

/* ---- profile panel — slides in from the right edge of the viewport ---- */

.profile-panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 199;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}
.profile-panel-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease;
}

.profile-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  width: min(640px, 92vw);
  overflow-y: auto;
  background: var(--prism-band);
  border-left: 1px solid var(--prism-band-border);
  color: var(--prism-band-text);
  padding: clamp(32px, 5vw, 64px);
  transform: translateX(100%);
  transition: transform 0.4s ease;
}
.profile-panel.is-open {
  transform: translateX(0);
}

.profile-panel-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--prism-band-line);
  background: transparent;
  color: var(--prism-band-text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.profile-panel-close:hover { border-color: var(--prism-teal); color: var(--prism-teal); }

.profile-panel-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 24px;
}

.profile-panel-photo {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--prism-band-line);
}

.profile-panel-photo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.profile-panel-body .eyebrow { color: var(--prism-teal); }

.profile-panel-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(22px, 2.2vw, 26px);
  margin: 0 0 20px;
}

.profile-panel-body p {
  color: var(--prism-band-text-body);
  line-height: 1.7;
  max-width: 68ch;
  margin: 0 0 16px;
}

.profile-panel-subhead {
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--prism-band-text);
  margin: 28px 0 14px;
}

.profile-panel-list {
  margin: 0 0 24px;
  padding-left: 20px;
  color: var(--prism-band-text-body);
  line-height: 1.7;
}
.profile-panel-list li { margin-bottom: 8px; }

.profile-panel-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--prism-teal);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.profile-panel-linkedin:hover { color: var(--prism-teal-light); }

@media (max-width: 640px) {
  .profile-panel-photo { width: 96px; height: 96px; }
}

/* keep the intro/carousel above the "Leadership" backdrop word (the
   profile panel is left alone — it's fixed and must stay above the header) */
.leadership-intro,
.leadership-carousel { position: relative; z-index: 1; }
