/* Current team experience: profile cards, biography canvas, contact form, and responsive states. */
.team-showcase {
  padding: clamp(72px, 9vw, 140px) clamp(32px, 9vw, 140px) clamp(96px, 10vw, 160px);
  background: var(--color-surface-cream);
}

.team-showcase__header {
  max-width: 1020px;
  display: block;
  margin: 0 auto clamp(48px, 6vw, 80px);
  text-align: center;
}

.team-showcase__eyebrow,
.team-profile__copy > p {
  margin: 0 0 var(--space-3);
  color: var(--color-brand);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.team-showcase h1 {
  margin: 0;
  color: var(--color-brand);
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 4.8vw, 4.8rem);
  font-weight: 400;
  letter-spacing: -0.018em;
  line-height: 0.95;
}

/* The shared headline reveal defaults to left alignment; this directory title remains centered. */
.team-showcase__header .hero-headline-reveal h1 {
  text-align: center;
}

.team-showcase__header > p {
  margin: 0 0 4px;
  color: color-mix(in srgb, var(--color-text) 72%, transparent);
  font-size: var(--type-body-lg);
  line-height: 1.55;
}

/* Team directory layout; card reveal and hover transforms are coordinated with the global controller. */
.team-card-grid {
  max-width: 1020px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 24px);
  margin: 0 auto;
}

.team-card.team-card--advisory {
  width: calc((100% - (2 * clamp(14px, 1.6vw, 24px))) / 3);
  grid-column: 1 / -1;
  border-color: color-mix(in srgb, #becf99 38%, #2e7d52);
  background: #2e7d52;
}

.team-advisory-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
  margin-top: clamp(42px, 6vw, 76px);
  padding: clamp(22px, 3vw, 34px) 0 10px;
  color: var(--color-brand);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.team-advisory-heading::before,
.team-advisory-heading::after {
  height: 1px;
  flex: 1;
  background: color-mix(in srgb, #becf99 86%, transparent);
  content: "";
}

.team-advisory-heading span {
  flex: 0 0 auto;
}

.team-card {
  position: relative;
  min-height: 540px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 36px 24px 22px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--color-brand-accent) 30%, var(--color-brand));
  border-radius: var(--radius-card);
  background: var(--color-brand);
  box-shadow: 0 14px 34px rgba(0, 55, 44, 0.15);
  color: var(--color-text-inverse);
  cursor: default;
  text-align: left;
  transition:
    transform var(--motion-base) var(--motion-ease),
    box-shadow var(--motion-base) var(--motion-ease);
}

.team-card__image {
  position: relative;
  width: min(44%, 150px);
  aspect-ratio: 228 / 346;
  display: block;
  flex: 0 0 auto;
  align-self: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
  background: var(--color-brand-accent);
  box-shadow: 0 16px 34px rgba(0, 39, 31, 0.26);
}

.team-card__image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform var(--motion-slow) var(--motion-ease);
}

.team-card__content {
  position: relative;
  z-index: 4;
  width: 100%;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  padding: 22px 0 0;
  background: transparent;
  text-align: center;
}

.team-card__content small {
  position: absolute;
  top: 18px;
  left: 20px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.team-card__content strong {
  color: var(--color-text-inverse);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.65vw, 1.65rem);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.16;
}

.team-card__content > span {
  max-width: 32ch;
  color: #becf99;
  font-size: clamp(0.9rem, 1.05vw, 1rem);
  font-weight: 500;
  line-height: 1.4;
}

.team-card__bio {
  position: relative;
  min-width: 110px;
  min-height: 46px;
  display: inline-grid;
  margin-top: 0;
  padding: 0 20px;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: var(--color-surface);
  color: var(--color-brand);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    color var(--motion-fast) var(--motion-ease),
    background var(--motion-fast) var(--motion-ease);
}

.team-card__rule {
  width: 100%;
  height: 1px;
  display: block;
  flex: 0 0 auto;
  margin: 22px 0 13px;
  background: rgba(190, 207, 153, 0.52);
}

.team-card__socials {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(190, 207, 153, 0.52);
}

.team-card__socials :is(a, button) {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: var(--color-brand-accent);
  color: var(--color-text-inverse);
  cursor: pointer;
  transition:
    color var(--motion-fast) var(--motion-ease),
    background var(--motion-fast) var(--motion-ease);
}

.team-card__socials :is(a, button):hover {
  background: color-mix(in srgb, var(--color-brand-accent) 78%, white);
  color: var(--color-text-inverse);
}

.team-card__socials :is(a, button) img {
  width: auto;
  max-width: 17px;
  max-height: 16px;
  display: block;
}

.team-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--color-brand-accent) 72%, var(--color-brand));
  box-shadow: 0 24px 46px rgba(0, 55, 44, 0.24);
}

.team-card:hover .team-card__image img {
  transform: scale(1.055);
}

/* Progressive reveal: keep the existing card design and hover lift intact. */
.team-showcase.is-team-card-reveal-ready .team-card {
  opacity: 0;
  filter: blur(1.5px);
  translate: 0 16px;
  transition:
    opacity 720ms var(--motion-ease-soft),
    filter 720ms var(--motion-ease-soft),
    translate 820ms var(--motion-ease-soft),
    transform var(--motion-base) var(--motion-ease),
    box-shadow var(--motion-base) var(--motion-ease);
  transition-delay: calc(var(--team-card-reveal-index, 0) * 90ms);
  will-change: opacity, filter, translate;
}

.team-showcase.is-team-card-reveal-ready .team-card.is-team-card-visible {
  opacity: 1;
  filter: blur(0);
  translate: 0 0;
}

.team-card__bio:hover {
  background: var(--color-brand-accent);
  color: var(--color-text-inverse);
}

.team-card__bio:focus-visible,
.team-card__socials :is(a, button):focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 4px;
}

/* Native biography dialog: the later editorial expansion refines this base surface. team-rebuild.js owns opening, closing, and focus return. */
.team-profile {
  width: min(960px, calc(100% - 32px));
  max-width: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--modal-surface);
  box-shadow: var(--shadow-lg);
}

.team-profile[open] {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(340px, 1.1fr);
}

.team-profile::backdrop {
  background: var(--modal-backdrop-background);
  backdrop-filter: var(--modal-backdrop-filter);
}

.team-profile__image {
  min-height: 620px;
}

.team-profile__image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform var(--motion-slow) var(--motion-ease);
}

.team-profile__image:hover img {
  transform: scale(1.045);
}

.team-profile__copy {
  align-self: center;
  padding: clamp(36px, 6vw, 76px);
}

.team-profile__copy h2 {
  margin: 0 0 var(--space-3);
  color: var(--color-brand);
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 5.2rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.team-profile__copy strong,
.team-profile__copy span {
  display: block;
}

.team-profile__copy strong {
  margin-bottom: var(--space-6);
  color: var(--color-text);
  font-size: 1rem;
}

.team-profile__copy span {
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
  line-height: 1.65;
}

.team-profile__close {
  position: absolute;
  z-index: 6;
  top: var(--modal-close-inset);
  right: var(--modal-close-inset);
  width: var(--close-control-size);
  height: var(--close-control-size);
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--modal-close-border);
  border-radius: var(--radius-round);
  background: var(--modal-close-background);
  box-shadow: var(--shadow-sm);
  color: var(--modal-close-color);
  cursor: pointer;
  transition:
    color var(--motion-fast) var(--motion-ease),
    background var(--motion-fast) var(--motion-ease),
    transform var(--motion-fast) var(--motion-ease);
}

.team-profile__close span,
.team-profile__close span::before {
  width: var(--close-control-mark);
  height: var(--close-control-stroke);
  display: block;
  border-radius: var(--radius-pill);
  background: currentColor;
}

.team-profile__close span {
  position: relative;
  transform: rotate(45deg);
}

.team-profile__close span::before {
  position: absolute;
  inset: 0;
  content: "";
  transform: rotate(90deg);
}

.team-profile__close:hover {
  background: var(--modal-close-hover-background);
  color: var(--modal-close-hover-color);
}

.team-profile__close:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

/* Responsive team grid: reduce columns before cards or profile names become cramped. */
@media (max-width: 900px) {
  .team-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-card.team-card--advisory {
    width: calc((100% - clamp(14px, 1.6vw, 24px)) / 2);
  }
}

@media (max-width: 680px) {
  .team-showcase__header {
    grid-template-columns: 1fr;
  }

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

  .team-card.team-card--advisory {
    width: 100%;
  }

  .team-card {
    min-height: 520px;
  }

  /* The advisory divider sits midway between the two card groups on phones. */
  .team-advisory-heading {
    margin: clamp(30px, 8vw, 38px) 0;
    padding: 0;
  }

  .team-profile[open] {
    display: block;
    max-height: calc(100dvh - 24px);
    overflow: auto;
  }

  .team-profile__image {
    min-height: 54dvh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-showcase.is-team-card-reveal-ready .team-card {
    opacity: 1;
    filter: none;
    translate: none;
  }

  .team-card,
  .team-card__image img,
  .team-card__bio,
  .team-profile__image img {
    transition: none;
  }

  .team-card:hover,
  .team-card:hover .team-card__image img,
  .team-profile__image:hover img {
    transform: none;
  }
}

/* Expanded editorial biography modal */
.team-profile {
  width: min(1380px, calc(100% - 32px));
  min-height: min(740px, calc(100dvh - 32px));
}

.team-profile[open] {
  animation: nka-modal-panel-enter var(--modal-panel-enter) var(--modal-motion-ease) both;
}

.team-profile[open]::backdrop {
  animation: nka-modal-backdrop-enter var(--modal-backdrop-enter) var(--modal-motion-ease) both;
}

.team-profile[open].is-closing {
  pointer-events: none;
  animation: nka-modal-panel-exit var(--modal-panel-exit) var(--modal-motion-ease) both;
}

.team-profile[open].is-closing::backdrop {
  animation: nka-modal-backdrop-exit var(--modal-backdrop-exit) var(--modal-motion-ease) both;
}

.team-profile[open] {
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: stretch;
}

.team-profile__rail {
  display: grid;
  align-content: start;
  justify-items: center;
  padding: 64px 24px 40px;
  background: var(--color-brand);
}

.team-profile__image {
  width: 116px;
  min-height: 0;
  aspect-ratio: 228 / 346;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
}

.team-profile__image img {
  object-position: center;
}

.team-profile__socials {
  width: auto;
  display: flex;
  align-self: end;
  justify-content: flex-end;
  gap: 12px;
}

.team-profile__socials :is(a, button) {
  justify-content: center;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--color-brand-accent);
  color: var(--color-text-inverse);
  cursor: pointer;
  transition:
    background var(--motion-fast) var(--motion-ease),
    transform var(--motion-fast) var(--motion-ease);
}

.team-profile__country {
  width: 32px;
  height: 22px;
  display: grid;
  flex: 0 0 auto;
  align-self: center;
  place-items: center;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  background: transparent;
}

.team-profile__country img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.team-profile__country[hidden] {
  display: none;
}

.team-profile__socials :is(a, button):hover {
  background: var(--color-brand);
  transform: translateY(-2px);
}

.team-profile__socials :is(a, button) img {
  width: auto;
  max-width: 22px;
  max-height: 20px;
  display: block;
}

.team-profile__socials span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.team-profile__socials [hidden] {
  display: none;
}

.team-profile__copy {
  align-self: stretch;
  max-height: min(716px, calc(100dvh - 56px));
  overflow: auto;
  margin: 12px 10px 12px 0;
  padding: clamp(58px, 5vw, 78px) clamp(54px, 6vw, 92px);
  border-radius: 0 16px 16px 0;
  scrollbar-gutter: stable;
}

.team-profile__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
  margin-bottom: 44px;
  padding-bottom: 30px;
  border-bottom: 1px solid color-mix(in srgb, var(--color-brand-accent) 38%, var(--color-border));
}

.team-profile__identity > p {
  display: none;
}

.team-profile__copy h2 {
  max-width: 900px;
  margin-bottom: 12px;
  font-size: clamp(2.5rem, 4vw, 3.65rem);
  letter-spacing: -0.018em;
  line-height: 1.04;
}

.team-profile__copy strong {
  margin: 0;
  color: var(--color-brand-accent);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 400;
}

.team-profile__bio {
  max-width: 76ch;
  color: color-mix(in srgb, var(--color-text) 74%, transparent);
  font-size: clamp(1rem, 1.15vw, 1.1rem);
  line-height: 1.65;
}

.team-profile__bio p {
  margin: 0 0 1.45em;
}

@media (max-width: 760px) {
  .team-profile[open] {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
  }

  .team-profile__rail {
    display: grid;
    justify-items: start;
    padding: 32px 24px 24px;
  }

  .team-profile__image {
    width: 88px;
  }

  .team-profile__copy {
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    margin: 0;
    padding: 32px 24px 56px;
    border-radius: 0;
  }

  .team-profile__copy h2 {
    font-size: clamp(2rem, 8vw, 2.4rem);
    line-height: 1.08;
  }

  .team-profile__copy strong {
    font-size: clamp(1.1rem, 4.6vw, 1.25rem);
  }

  .team-profile__header {
    grid-template-columns: 1fr;
    gap: 22px;
    margin-bottom: 32px;
    padding-bottom: 28px;
  }

  .team-profile__socials {
    justify-content: flex-start;
    gap: 10px;
  }

  .team-profile__socials :is(a, button) {
    width: 40px;
    height: 40px;
    border-radius: 9px;
  }

  .team-profile__socials :is(a, button) img {
    max-width: 18px;
    max-height: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-profile[open],
  .team-profile[open]::backdrop,
  .team-profile[open].is-closing,
  .team-profile[open].is-closing::backdrop {
    animation: none;
  }
}
