/* =========================================================
   TEAM PAGE
   ========================================================= */

.team-page{ background: #fff; }
.team-page .topnav--always-solid{ background: var(--navy); }
.team-page main, .team-page section{ position: relative; }

/* Pad below the fixed nav */
.team-intro{
  padding: calc(var(--nav-h-scrolled) + clamp(48px, 6vw, 96px)) 0 clamp(56px, 7vw, 88px);
  background: #fff;
  border-bottom: 1px solid var(--rule-soft);
}
/* team-intro__inner inherits .container width (1380px capped, gutter on the sides),
   so it aligns with the team grid below. */

.crumbs{
  display: flex; align-items: center; gap: 10px;
  font-size: 11.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(15,31,54,.55);
  margin-bottom: 36px;
}
.crumbs a{ color: rgba(15,31,54,.55); transition: color .25s var(--ease); }
.crumbs a:hover{ color: var(--navy); }
.crumbs__sep{ opacity: .4; }
.crumbs__current{ color: var(--navy); }

.team-intro__title{
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(38px, 5.4vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.012em;
  color: var(--navy);
  margin: 0 0 28px;
  max-width: 30ch;
}
.team-intro__lede{
  font-size: 17px;
  line-height: 1.65;
  color: #2D3346;
  max-width: 64ch;
  margin: 0;
}


/* =========================================================
   GRID
   ========================================================= */

.team-grid-wrap{
  padding: clamp(56px, 7vw, 96px) 0 clamp(80px, 10vw, 140px);
  background: #fff;
}
.team-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(28px, 3vw, 48px) clamp(20px, 2.4vw, 32px);
}
/* In 4-col layout, center the trailing pair so the last row reads 4-4-2 */
.team-grid > :nth-last-child(2):nth-child(odd){
  grid-column-start: 2;
}
.team-card{
  cursor: pointer;
  background: transparent;
  text-align: left;
}
.team-card__media{
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: linear-gradient(180deg, #EFEFEF 0%, #E2E2E2 100%);
  margin-bottom: 22px;
}
.team-card__media img{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 1.2s var(--ease-out), filter .6s var(--ease);
  filter: grayscale(0.18) contrast(0.98);
}
.team-card:hover .team-card__media img{
  transform: scale(1.035);
  filter: grayscale(0) contrast(1);
}
.team-card__overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(15,31,54,.65) 100%);
  opacity: 0;
  transition: opacity .45s var(--ease);
}
.team-card:hover .team-card__overlay{ opacity: 1; }

.team-card__cta{
  position: absolute;
  right: 18px; bottom: 18px;
  width: 22px; height: 22px;
  background: transparent;
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.team-card:hover .team-card__cta{
  opacity: 1; transform: none;
}
.team-card__cta svg{ width: 22px; height: 22px; }

.team-card__name{
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.005em;
  color: var(--navy);
  margin: 0 0 6px;
}
.team-card__title{
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(15,31,54,.62);
  margin: 0 0 6px;
}
.team-card__location{
  font-size: 12.5px;
  color: rgba(15,31,54,.55);
  margin: 0;
  display: inline-flex; align-items: center; gap: 8px;
}
.team-card__location::before{
  content: "";
  width: 4px; height: 4px;
  background: var(--gold);
  border-radius: 50%;
  display: inline-block;
}


/* =========================================================
   BIO OVERLAY
   ========================================================= */

.bio{
  position: fixed;
  inset: 0;
  z-index: 95;
  visibility: hidden;
  opacity: 0;
  transition: opacity .25s var(--ease-out), visibility .25s;
}
.bio.is-open{
  visibility: visible;
  opacity: 1;
}
.bio__backdrop{
  position: absolute; inset: 0;
  background: rgba(15,31,54,0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  border: 0;
  cursor: pointer;
  transition:
    background-color .28s var(--ease-out),
    backdrop-filter .28s var(--ease-out),
    -webkit-backdrop-filter .28s var(--ease-out);
}
.bio.is-open .bio__backdrop{
  background: rgba(15,31,54,.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.bio__sheet{
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(900px, 100%);
  background: var(--paper);
  color: var(--ink);
  transform: translateX(40px);
  transition: transform .42s var(--ease-out);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.bio.is-open .bio__sheet{ transform: none; }

.bio__head{
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 36px;
  border-bottom: 1px solid var(--rule-soft);
}
.bio__back{
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--navy);
  transition: gap .25s var(--ease);
}
.bio__back:hover{ gap: 16px; }
.bio__back svg{ width: 16px; height: 16px; }
.bio__close{
  width: 38px; height: 38px;
  border: 0;
  background: transparent;
  padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--navy);
  opacity: .55;
  cursor: pointer;
  transition: opacity .2s var(--ease);
}
.bio__close:hover{ opacity: 1; }
.bio__close svg{ width: 18px; height: 18px; }

.bio__body{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: clamp(40px, 6vw, 72px) clamp(32px, 5vw, 72px) clamp(48px, 6vw, 80px);
}
.bio__copy{
  max-width: 64ch;
}
.bio__location{
  font-size: 11.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 18px;
}
.bio__name{
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 4.2vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.012em;
  color: var(--navy);
  margin: 0 0 14px;
}
.bio__title{
  font-size: 12.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(15,31,54,.62);
  margin: 0 0 28px;
}
.bio__sep{
  width: 48px; height: 1px;
  background: var(--gold);
  margin-bottom: 28px;
}
.bio__paras p{
  font-size: 15.5px;
  line-height: 1.7;
  color: #2D3346;
  margin: 0 0 18px;
}
.bio__paras p:last-child{ margin-bottom: 0; }

body.bio-open{ overflow: hidden; }


/* =========================================================
   ENTER ANIMATIONS
   ========================================================= */

.team-card{
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.team-card.is-in{ opacity: 1; transform: none; }


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1180px){
  .team-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* Drop the 4-col centering when we're back in 3-col territory */
  .team-grid > :nth-last-child(2):nth-child(odd){ grid-column-start: auto; }
}
@media (max-width: 900px){
  .team-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .team-grid{ grid-template-columns: 1fr; }
  .bio__head{ padding: 16px 22px; }
}
