/* Team page — intro, leader spotlight, member grid with bio dialogs, CTA.
   Scoped to .team-page (dialogs live inside it too). */

.team-page {
  --tm-accent: var(--color-accent-1, #EB662B);
  --tm-accent-dark: var(--color-accent-1-dark, #CE5A25);
  --tm-dark: var(--color-dark-1, #05073C);
  --tm-muted: var(--color-text-muted, #4A4D63);
  --tm-border: #E7E6E6;
  --tm-surface: #FBF7F4;
}

/* ---------- Intro ---------- */

.team-page .team-intro {
  padding: 80px 0 40px;
  text-align: center;
}

.team-page .team-eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tm-accent);
}

.team-page .team-heading {
  max-width: 720px;
  margin: 0 auto;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--tm-dark);
}

.team-page .team-subheading {
  max-width: 640px;
  margin: 16px auto 0;
  font-size: 17px;
  line-height: 1.7;
  color: var(--tm-muted);
}

/* ---------- Shared ---------- */

.team-page .team-role {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--tm-accent);
}

.team-page .team-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--tm-accent), var(--tm-accent-dark));
  color: #fff;
  font-size: 56px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.team-page .team-socials {
  display: flex;
  gap: 8px;
}

.team-page .team-socials a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--tm-border);
  color: var(--tm-dark);
  font-size: 13px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.team-page .team-socials a:hover {
  background: var(--tm-accent);
  border-color: var(--tm-accent);
  color: #fff;
}

/* ---------- Leader spotlight ---------- */

.team-page .team-leaderWrap {
  padding: 20px 0 60px;
}

.team-page .team-leader {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--tm-border);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(5, 7, 60, 0.08);
}

.team-page .team-leader__photo {
  position: relative;
  min-height: 420px;
  background: var(--tm-surface);
}

.team-page .team-leader__photo picture,
.team-page .team-leader__photo img,
.team-page .team-leader__photo .team-initials {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.team-page .team-leader__photo img {
  object-fit: cover;
  object-position: center top;
}

.team-page .team-leader__body {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.team-page .team-leader__name {
  margin: 6px 0 18px;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--tm-dark);
}

.team-page .team-leader__bio {
  font-size: 16px;
  line-height: 1.8;
}

.team-page .team-leader__bio p {
  font-size: 16px;
}

.team-page .team-leader__bio > :last-child {
  margin-bottom: 0;
}

.team-page .team-leader .team-socials {
  margin-top: 24px;
}

/* ---------- Member grid ---------- */

.team-page .team-gridWrap {
  padding-bottom: 80px;
}

.team-page .team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.team-page .team-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--tm-border);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(5, 7, 60, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-page .team-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 45px rgba(5, 7, 60, 0.12);
}

.team-page .team-card__photo {
  position: relative;
  aspect-ratio: 4 / 4.2;
  overflow: hidden;
  background: var(--tm-surface);
}

.team-page .team-card__photo picture,
.team-page .team-card__photo img,
.team-page .team-card__photo .team-initials {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.team-page .team-card__photo img {
  object-fit: cover;
  object-position: center top;
  transition: transform 0.5s ease;
}

.team-page .team-card:hover .team-card__photo img {
  transform: scale(1.04);
}

.team-page .team-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 24px 22px;
}

.team-page .team-card__name {
  margin-bottom: 4px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--tm-dark);
}

.team-page .team-card__excerpt {
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--tm-muted);
}

.team-page .team-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
}

.team-page .team-card__more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--tm-dark);
  cursor: pointer;
  transition: color 0.2s ease;
}

.team-page .team-card__more i {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.team-page .team-card__more:hover {
  color: var(--tm-accent);
}

.team-page .team-card__more:hover i {
  transform: translateX(4px);
}

/* ---------- Bio dialog ---------- */

.team-page .team-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  padding: 40px;
  border: 0;
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(5, 7, 60, 0.3);
  overflow-y: auto;
}

.team-page .team-dialog::backdrop {
  background: rgba(5, 7, 60, 0.55);
  backdrop-filter: blur(3px);
}

.team-page .team-dialog[open] {
  animation: team-dialog-in 0.25s ease;
}

@keyframes team-dialog-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.team-page .team-dialog__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--tm-border);
  background: #fff;
  color: var(--tm-dark);
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.team-page .team-dialog__close:hover {
  background: var(--tm-dark);
  color: #fff;
}

.team-page .team-dialog__head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
  padding-right: 40px;
}

.team-page .team-dialog__avatar {
  position: relative;
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--tm-surface);
}

.team-page .team-dialog__avatar picture,
.team-page .team-dialog__avatar img,
.team-page .team-dialog__avatar .team-initials {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.team-page .team-dialog__avatar img {
  object-fit: cover;
  object-position: center top;
}

.team-page .team-dialog__avatar .team-initials {
  font-size: 26px;
}

.team-page .team-dialog__name {
  margin-bottom: 2px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--tm-dark);
}

.team-page .team-dialog__bio p {
  font-size: 16px;
}

.team-page .team-dialog__bio > :last-child {
  margin-bottom: 0;
}

html.team-dialog-open {
  overflow: hidden;
}

/* ---------- CTA ---------- */

.team-page .team-ctaWrap {
  padding-bottom: 90px;
}

.team-page .team-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 44px 48px;
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0%, rgba(235, 102, 43, 0.35), transparent 50%),
    var(--tm-dark);
}

.team-page .team-cta__title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}

.team-page .team-cta .team-cta__text {
  margin-top: 8px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
}

.team-page .team-dialog .team-socials {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--tm-border);
}

.team-page .team-cta__social {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

/* Light icons on the dark CTA panel */
.team-page .team-cta .team-socials a {
  width: 38px;
  height: 38px;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.team-page .team-cta .team-socials a:hover {
  background: var(--tm-accent);
  border-color: var(--tm-accent);
}

.team-page .team-cta__button {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 10px;
  background: var(--tm-accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.team-page .team-cta__button:hover {
  background: var(--tm-accent-dark);
  color: #fff;
  transform: translateY(-2px);
}

/* ---------- Responsive ---------- */

@media (max-width: 1199px) {
  .team-page .team-leader__body {
    padding: 36px;
  }
}

@media (max-width: 991px) {
  .team-page .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }

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

  .team-page .team-leader__photo {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .team-page .team-cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 36px 32px;
  }
}

@media (max-width: 767px) {
  .team-page .team-intro {
    padding: 50px 0 28px;
  }

  .team-page .team-heading {
    font-size: 28px;
  }

  .team-page .team-subheading {
    font-size: 15px;
  }

  .team-page .team-leader__photo {
    aspect-ratio: 1 / 1;
  }

  .team-page .team-leader__body {
    padding: 26px 22px;
  }

  .team-page .team-leader__name {
    font-size: 26px;
  }

  .team-page .team-dialog {
    padding: 28px 22px;
  }

  .team-page .team-cta__title {
    font-size: 23px;
  }
}

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