/* Team directory — editorial layout (doi-ngu) */

.team-page {
  --team-gap: clamp(2.5rem, 5vw, 4.5rem);
}

/* Sticky index */
.team-index {
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200);
}

.team-index__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  padding: 0.85rem 0;
}

.team-index a {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.team-index a:hover,
.team-index a:focus-visible {
  color: var(--navy);
  border-bottom-color: var(--gold);
}

/* Bands */
.team-band {
  padding: var(--team-gap) 0;
  background: var(--white);
}

.team-band--muted {
  background: var(--off-white);
}

.team-band__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--gray-200);
}

.team-band__head h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  color: var(--navy);
  letter-spacing: -0.015em;
}

.team-band__count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-400);
  white-space: nowrap;
}

/* Profile — lead */
.profile--lead {
  display: grid;
  grid-template-columns: minmax(200px, 320px) minmax(320px, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

.profile--lead .profile__media {
  max-width: 320px;
  width: 100%;
}

.profile__media {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--navy-mid), var(--navy-deep));
  aspect-ratio: 4 / 5;
}

.profile__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0.95;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile:hover .profile__media img {
  transform: scale(1.03);
}

.profile__media--placeholder {
  display: grid;
  place-items: center;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.profile__content {
  padding-top: 0.35rem;
}

.profile__role {
  display: inline-block;
  margin-bottom: 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.01em;
}

.profile__name {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin-bottom: 1rem;
}

.profile__bio {
  max-width: 58ch;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-muted);
}

.profile__bio + .profile__bio {
  margin-top: 0.75rem;
}

.profile__list {
  margin-top: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--gray-200);
}

.profile__list li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text);
}

.profile__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

/* Profile stack — counsel rows */
.profile-stack {
  display: flex;
  flex-direction: column;
}

.profile--row {
  display: grid;
  grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.25rem);
  padding: clamp(1.5rem, 3vw, 2.25rem) 0;
  border-bottom: 1px solid var(--gray-200);
}

.profile-stack > .profile--row:first-child {
  padding-top: 0;
}

.profile-stack > .profile--row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.profile--row .profile__media {
  aspect-ratio: 3 / 4;
}

.profile--row .profile__name {
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  margin-bottom: 0.75rem;
}

.profile--row .profile__bio {
  font-size: 0.92rem;
}

.profile--row .profile__list {
  margin-top: 1rem;
  padding-top: 1rem;
}

/* Compact advisors */
.profile-stack--compact .profile--row {
  grid-template-columns: minmax(110px, 160px) minmax(0, 1fr);
  padding: 1.5rem 0;
}

.profile-stack--compact .profile__name {
  font-size: 1.15rem;
}

.profile-stack--compact .profile__bio {
  font-size: 0.9rem;
}

.profile-stack--compact .profile__list li {
  font-size: 0.84rem;
}

/* CTA */
.team-cta {
  padding: clamp(3rem, 6vw, 5rem) 0;
  background: var(--gray-100);
  color: var(--text);
}

.team-cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.team-cta h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  color: var(--navy);
  letter-spacing: -0.015em;
  max-width: 18ch;
  line-height: 1.25;
}

.team-cta p {
  margin-top: 0.5rem;
  max-width: 36ch;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Reveal polish for team */
.team-page .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.team-page .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .team-page .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .profile:hover .profile__media img {
    transform: none;
  }
}

@media (max-width: 900px) {
  .profile--lead {
    grid-template-columns: 1fr;
  }

  .profile--lead .profile__media {
    max-width: 280px;
  }
}

@media (max-width: 700px) {
  .profile--row,
  .profile-stack--compact .profile--row {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 1rem;
  }

  .profile--row .profile__list {
    grid-column: 1 / -1;
  }

  .team-cta__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .team-cta .btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .profile--row,
  .profile-stack--compact .profile--row {
    grid-template-columns: 1fr;
  }

  .profile--row .profile__media {
    max-width: 220px;
  }
}
