/* ===========================
   BES — Team page
   Builds on the shared BLISSS header/footer styles.
   =========================== */

.team-main {
  overflow: hidden;
  font-family: "Inter", sans-serif;
  /* Solid white strip behind the transparent navbar (like the rest of the
     site), plus a bit of breathing room below it before the cream hero
     starts. Keep .team-hero's own top padding small (just internal
     spacing) — it should NOT also carry navbar clearance, or the two
     stack into a huge empty gap. */
  padding-top: 120px;
}

@media (max-width: 700px) {
  /* .header switches to position: relative below this breakpoint (see style.css),
     so it no longer overlays the content and doesn't need extra top padding. */
  .team-main {
    padding-top: 32px;
  }
}

@media (max-width: 550px) {
  /* style.css re-fixes .header at this breakpoint (overlaid navbar for the
     home hero), so .team-main needs its top clearance back here too. */
  .team-main {
    padding-top: 120px;
  }
}

.team-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  align-items: start;
  gap: 72px;
  min-height: 430px;
  padding: 32px 7vw 72px;
  background: #f1f1e1;
}

.team-hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 8%;
  width: 1px;
  height: 100%;
  background: rgba(96, 129, 56, 0.2);
}

.team-hero::after {
  content: "";
  position: absolute;
  right: calc(8% - 7px);
  bottom: 70px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #b35910;
}

.team-hero-kicker {
  margin: 0 0 20px;
  color: #608138;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.team-hero-title {
  max-width: 760px;
  margin: 0;
  color: #000000;
  font-family: "Inter", sans-serif;
  font-size: clamp(3.8rem, 6.8vw, 6.6rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.team-hero-title span {
  color: #000000;
}

.team-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 44px 4px 0;
  color: #2a2a2a;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

.patron-section {
  padding: 88px 6vw 72px;
  background: #ffffff;
}

.patron-heading {
  max-width: 1440px;
  margin: 0 auto 36px;
  padding-bottom: 22px;
  border-bottom: 1px solid #d8dccd;
}

.patron-card {
  max-width: 1200px;
  margin: 0 auto;
}

.team-card-trigger.patron-card-trigger {
  display: grid;
  grid-template-columns: minmax(280px, 400px) minmax(0, 1fr);
  align-items: stretch;
  background: #f1f1e1;
}

.patron-card-photo {
  min-height: 0;
  aspect-ratio: 1 / 1;
  background: #fafafa;
}

.patron-card-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 64px clamp(36px, 6vw, 92px);
}

.patron-card-label {
  display: block;
  margin-bottom: 14px;
  color: #608138;
  font-family: "Inter", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.patron-card .team-card-name {
  margin-bottom: 14px;
  font-family: "Inter", sans-serif;
  font-size: clamp(2.15rem, 3.4vw, 3.7rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.patron-card .team-card-role {
  color: #b35910;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;
}

.patron-card-summary {
  display: block;
  max-width: 660px;
  margin-top: 24px;
  color: #2a2a2a;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  line-height: 1.7;
}

.patron-card .team-card-action {
  margin-top: 30px;
}

.team-section {
  padding: 88px 6vw 104px;
}

.team-section--unit {
  padding-top: 80px;
  background: #f9fbfa;
}

.team-section-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
  max-width: 1440px;
  margin: 0 auto 42px;
  padding-bottom: 22px;
  border-bottom: 1px solid #d8dccd;
}

.team-section-kicker {
  margin: 0 0 9px;
  color: #608138;
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.team-section-title {
  margin: 0;
  color: #1a1a1a;
  font-family: "Inter", sans-serif;
  font-size: clamp(2.25rem, 3.5vw, 3.8rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.team-section-count {
  color: #b35910;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px 18px;
  max-width: 1440px;
  margin: 0 auto;
}

.team-card {
  min-width: 0;
}

.team-card-trigger,
.team-card-static {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  background: #f9fbfa;
  border: 0;
  border-radius: 10px;
  color: inherit;
  text-align: left;
}

.team-card-trigger {
  display: block;
  cursor: pointer;
  transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.team-card-trigger:hover,
.team-card-trigger:focus-visible {
  z-index: 2;
  background: #ffffff;
  box-shadow: -6px 17px 24px rgba(0, 0, 0, 0.15);
  transform: translateY(-6px);
}

.team-card-trigger:focus-visible {
  outline: 3px solid rgba(96, 129, 56, 0.45);
  outline-offset: 3px;
}

.team-card-photo {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #e8ebdf;
}

.team-card-photo::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  pointer-events: none;
  background: linear-gradient(to top, rgba(18, 25, 12, 0.18), transparent);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.team-card-trigger:hover .team-card-photo::after,
.team-card-trigger:focus-visible .team-card-photo::after {
  opacity: 1;
}

.team-card-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.team-card-photo img.team-card-photo--contain {
  object-fit: contain;
  padding: 22px 18px 0;
}

.team-card-trigger:hover .team-card-photo img,
.team-card-trigger:focus-visible .team-card-photo img {
  transform: scale(1.025);
}

.team-card-info {
  display: flex;
  flex-direction: column;
  min-height: 190px;
  padding: 16px 16px 15px;
}

.team-card-name {
  display: block;
  margin: 0 0 6px;
  color: #1a1a1a;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
}

.team-card-role {
  display: block;
  margin: 0;
  color: #5b6350;
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
}

.team-card-summary {
  display: block;
  margin-top: 11px;
  color: #33382f;
  font-family: "Inter", sans-serif;
  font-size: 11px;
  line-height: 1.5;
}

.team-card-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 13px;
  color: #608138;
  font-family: "Inter", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.team-card-action::after {
  content: "\2192";
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.22s ease;
}

.team-card-trigger:hover .team-card-action::after,
.team-card-trigger:focus-visible .team-card-action::after {
  transform: translateX(4px);
}

.team-profile-content {
  display: none;
}

/* Profile modal */
.team-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(16, 21, 13, 0.7);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.team-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.team-modal {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  width: min(980px, calc(100vw - 56px));
  max-height: min(760px, calc(100vh - 56px));
  overflow: hidden;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  transform: translateY(14px) scale(0.985);
  transition: transform 0.24s ease;
}

.team-overlay.is-open .team-modal {
  transform: translateY(0) scale(1);
}

.team-modal-photo {
  min-height: 520px;
  background: #e8ebdf;
}

.team-modal-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
}

.team-modal-photo img.team-card-photo--contain {
  object-fit: contain;
  padding: 40px 28px 0;
}

.team-modal-copy {
  overflow-y: auto;
  padding: 68px 56px 52px;
}

.team-modal-kicker {
  margin: 0 0 12px;
  color: #608138;
  font-family: "Inter", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.team-modal-name {
  margin: 0 0 12px;
  color: #1a1a1a;
  font-family: "Inter", sans-serif;
  font-size: clamp(2.1rem, 3.5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.team-modal-role {
  margin: 0 0 18px;
  color: #b35910;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.team-modal-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 28px;
  padding: 18px 0;
  border-top: 1px solid #e4e6dc;
  border-bottom: 1px solid #e4e6dc;
  color: #5b6350;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  line-height: 1.55;
}

.team-modal-meta a {
  color: #608138;
  text-decoration: none;
}

.team-modal-meta a:hover {
  text-decoration: underline;
}

.team-modal-bio {
  color: #272727;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  line-height: 1.7;
}

.team-modal-bio p {
  margin: 0 0 14px;
}

.team-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #608138;
  color: #ffffff;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  font-size: 23px;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.team-modal-close:hover,
.team-modal-close:focus-visible {
  background: #4e6a2e;
  transform: rotate(5deg);
}

@media (max-width: 1280px) {
  .team-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .team-hero {
    gap: 44px;
  }
}

@media (max-width: 860px) {
  .team-hero {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 34px;
    min-height: 0;
    padding: 72px 24px 60px;
  }

  .team-hero::before,
  .team-hero::after {
    display: none;
  }

  .team-hero-title {
    font-size: clamp(3.25rem, 15vw, 5.5rem);
  }

  .team-hero-copy {
    margin-right: 0;
  }

  .team-section {
    padding: 68px 24px 82px;
  }

  .patron-section {
    padding: 68px 24px;
  }

  .team-card-trigger.patron-card-trigger {
    grid-template-columns: 1fr;
  }

  .patron-card-photo {
    min-height: 0;
    aspect-ratio: 5 / 5;
  }

  .patron-card-copy {
    padding: 42px 30px 38px;
  }

  .team-section-heading {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-modal {
    grid-template-columns: 1fr;
    width: min(620px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow-y: auto;
  }

  .team-modal-photo {
    min-height: 0;
    aspect-ratio: 5 / 4;
  }

  .team-modal-copy {
    overflow: visible;
    padding: 42px 30px 34px;
  }
}

@media (max-width: 560px) {
  .team-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .team-card-info {
    min-height: 180px;
  }

  .team-overlay {
    padding: 16px;
  }

  .team-modal-photo {
    aspect-ratio: 5 / 5;
  }

  .patron-card .team-card-name {
    font-size: 2.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-card-trigger,
  .team-card-photo img,
  .team-card-action::after,
  .team-overlay,
  .team-modal {
    transition: none;
  }
}
