/* Team Page — Premium Biotech Redesign */

.team-page-redesign {
  --tp-cyan: #00b8d9;
  --tp-cyan-light: #00d4ff;
  --tp-teal: #0d9488;
  --tp-teal-soft: #14b8a6;
  --tp-warm-white: #fafcfb;
  --tp-warm-cream: #f5fbf9;
  --tp-blue-soft: #e8f7fb;
  --tp-blue-mist: #d4f1f8;
  --tp-text: #0f2d3a;
  --tp-text-muted: #4a6572;
  --tp-border: rgba(0, 184, 217, 0.18);
  --tp-shadow: 0 8px 32px rgba(0, 120, 150, 0.08);
  --tp-shadow-hover: 0 20px 48px rgba(0, 184, 217, 0.16);
  --tp-radius: 1.25rem;
  --tp-radius-sm: 0.875rem;

  position: relative;
  background: #fafcfb;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 5rem;
}

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

.team-page-redesign__inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 768px) {
  .team-page-redesign__inner {
    padding: 0 2rem;
  }
}

/* Hero zone */
.team-hero-zone {
  position: relative;
  margin: 0 -1.25rem 4.5rem;
  padding: 3rem 1.25rem 0;
  min-height: auto;
  text-align: center;
  overflow: visible;
  background-color: #001428;
  background-image: url("/assets/team-hero-bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@media (min-width: 768px) {
  .team-hero-zone {
    margin-left: -2rem;
    margin-right: -2rem;
    padding: 3.5rem 2rem 0;
    min-height: 620px;
  }
}

@media (min-width: 1024px) {
  .team-hero-zone {
    min-height: 720px;
    padding-top: 4rem;
  }
}

.team-hero-zone__overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    rgba(0, 20, 40, 0.35),
    rgba(0, 20, 40, 0.45)
  );
}

.team-hero-zone__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 768px) {
  .team-hero-zone__content {
    min-height: 620px;
  }
}

@media (min-width: 1024px) {
  .team-hero-zone__content {
    min-height: 720px;
  }
}

.team-hero-zone__copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0 2rem;
  width: 100%;
}

.team-hero-zone__stats {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1100px;
  margin-top: auto;
  transform: translateY(2.5rem);
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .team-hero-zone__stats {
    transform: translateY(3.5rem);
  }
}

.team-hero-zone .team-hero__eyebrow {
  margin: 0 0 1.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(20, 199, 216, 0.95);
}

.team-hero-zone .team-hero__title {
  margin: 0 0 1.25rem;
  font-size: clamp(2.25rem, 5.5vw, 3.35rem);
  font-weight: 700;
  line-height: 1.15;
}

.team-hero-zone .team-hero__title-line {
  display: block;
  color: #ffffff;
}

.team-hero-zone .team-hero__title-line--accent {
  color: #14c7d8;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: unset;
}

.team-hero-zone .team-hero__divider {
  width: 90px;
  height: 3px;
  margin: 0 auto 1.5rem;
  border: none;
  border-radius: 9999px;
  background: linear-gradient(90deg, #14c7d8, var(--tp-teal));
  opacity: 0.9;
}

.team-hero-zone .team-hero__desc {
  margin: 0 auto;
  max-width: 650px;
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.9);
}

/* Stats (hero-integrated) */
.team-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
}

@media (min-width: 640px) {
  .team-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .team-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

.team-hero-zone .team-stat {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.team-hero-zone .team-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.14);
}

.team-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 200px;
  padding: 1.75rem 1.25rem 1.5rem;
  text-align: center;
  background: #fff;
  border: 1px solid rgba(0, 184, 217, 0.14);
  border-radius: var(--tp-radius-sm);
  box-shadow: 0 4px 20px rgba(0, 120, 150, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.team-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 120, 150, 0.08);
}

.team-stat__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.85rem;
  color: var(--tp-teal);
}

.team-stat__value {
  display: block;
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1;
  color: #0f2d3a;
  margin-bottom: 0.5rem;
}

.team-stat__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tp-teal);
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.team-stat__caption {
  display: block;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--tp-text-muted);
  max-width: 220px;
}

.team-stats-block {
  margin-bottom: 0;
}

.team-stats__collective {
  display: none;
}

/* Culture narrative */
.team-culture {
  margin-top: 0;
  margin-bottom: 1.25rem;
  padding-top: 32px;
  padding-bottom: 32px;
  border-top: 1px solid rgba(0, 184, 217, 0.1);
  border-bottom: 1px solid rgba(0, 184, 217, 0.1);
}

.team-culture__inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.team-culture__inner p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--tp-text-muted);
  margin: 0 0 0.875rem;
}

.team-culture__inner p:last-child {
  margin-bottom: 0;
}

.team-role-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tp-teal);
  background: rgba(20, 184, 166, 0.08);
  border: 1px solid rgba(20, 184, 166, 0.2);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  margin-bottom: 0.35rem;
  align-self: flex-start;
}

.team-card--advisory .team-role-badge {
  align-self: center;
}

.team-card__credential {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--tp-text-muted);
  margin: 0;
}

.team-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

.team-tag {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  color: var(--tp-teal);
  background: rgba(20, 184, 166, 0.08);
  border: 1px solid rgba(20, 184, 166, 0.18);
  line-height: 1.3;
}

.team-card__bio--short {
  -webkit-line-clamp: 2;
  margin-top: 0.35rem;
  font-size: 0.85rem;
}

/* Section blocks */
.team-section {
  margin-bottom: 4.5rem;
}

.team-section:last-child {
  margin-bottom: 0;
}

.team-section__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(0, 184, 217, 0.15);
}

.team-section__title {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 700;
  color: var(--tp-text);
}

.team-section__subtitle {
  font-size: 0.95rem;
  color: var(--tp-text-muted);
  max-width: 480px;
}

.team-section__count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--tp-teal);
  background: rgba(20, 184, 166, 0.08);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
}

.team-section__footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--tp-text-muted);
  font-style: italic;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* Grids — auto-fit scalable */
.team-grid--leadership {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 1.75rem;
}

.team-grid--advisory {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
}

.team-grid--operations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1.25rem;
}

/* Leadership cards */
.team-card--leadership {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0, 120, 150, 0.05);
  cursor: pointer;
}

.team-card--leadership:hover {
  border-color: rgba(0, 184, 217, 0.35);
  box-shadow: 0 4px 20px rgba(0, 120, 150, 0.08);
}

.team-card--leadership .team-card__photo-wrap {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
}

.team-card--leadership .team-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.team-card__body--leadership {
  border-top: 2px solid rgba(13, 148, 136, 0.18);
}

.team-card--leadership .team-card__body {
  padding: 1.5rem 1.75rem 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.team-card__name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--tp-text);
  line-height: 1.3;
  word-wrap: break-word;
}

.team-card__title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--tp-cyan);
  line-height: 1.4;
  word-wrap: break-word;
}

.team-card__bio {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--tp-text-muted);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.team-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 184, 217, 0.12);
}

.team-card__linkedin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  color: var(--tp-teal);
  background: rgba(20, 184, 166, 0.1);
  border: 1px solid rgba(20, 184, 166, 0.22);
}

.team-card__linkedin:hover {
  background: var(--tp-teal);
  color: #fff;
}

.team-card__read-more {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--tp-cyan);
}

/* Advisory cards */
.team-card--advisory {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(0, 120, 150, 0.04);
  cursor: pointer;
}

.team-card--advisory:hover {
  border-color: rgba(0, 184, 217, 0.3);
  box-shadow: 0 4px 18px rgba(0, 120, 150, 0.07);
}

.team-card--advisory .team-card__photo-wrap {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.team-card--advisory .team-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.team-card__body--advisory {
  padding: 1.35rem 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: center;
  text-align: center;
  border-top: 2px solid rgba(0, 184, 217, 0.12);
}

.team-card--advisory .team-card__name {
  font-size: 1.05rem;
}

.team-card--advisory .team-card__title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--tp-cyan);
}

.team-card--advisory .team-card__credential {
  text-align: center;
}

.team-card--advisory .team-card__tags {
  justify-content: center;
}

.team-card--operations .team-card__credential {
  font-size: 0.78rem;
  margin-top: 0.2rem;
}

.team-card--operations .team-card__tags {
  margin-top: 0.35rem;
}

/* Legacy badge styles */
.team-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 0.75rem;
}

.team-badge {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  color: var(--tp-teal);
  background: rgba(20, 184, 166, 0.1);
  border: 1px solid rgba(20, 184, 166, 0.22);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Operations cards */
.team-card--operations {
  background: #fff;
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 120, 150, 0.04);
  cursor: pointer;
}

.team-card--operations:hover {
  border-color: rgba(0, 184, 217, 0.28);
  box-shadow: 0 4px 16px rgba(0, 120, 150, 0.06);
}

.team-card--operations .team-card__photo-wrap {
  aspect-ratio: 1;
  overflow: hidden;
}

.team-card--operations .team-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.team-card--operations .team-card__body {
  padding: 1rem 1.15rem 1.25rem;
}

.team-card--operations .team-card__name {
  font-size: 1rem;
}

.team-card--operations .team-card__title {
  font-size: 0.82rem;
}

/* Loading / error / empty */
.team-page-loading,
.team-page-error,
.team-section-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--tp-text-muted);
  font-size: 1rem;
}

.team-page-error {
  color: #dc2626;
}

.team-page-loading__spinner {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto 1rem;
  border: 3px solid var(--tp-blue-mist);
  border-top-color: var(--tp-cyan);
  border-radius: 50%;
  animation: team-spin 0.8s linear infinite;
}

@keyframes team-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Modal */
.team-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5rem 1rem 2rem;
  overflow-y: auto;
  background: rgba(15, 45, 58, 0.5);
}

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

.team-modal {
  width: 100%;
  max-width: 640px;
  background: #fff;
  border-radius: var(--tp-radius);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 120, 150, 0.15);
  border: 1px solid var(--tp-border);
}

.team-modal__photo {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
}

.team-modal__body {
  padding: 1.75rem;
}

.team-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--tp-text);
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  line-height: 1;
}

.team-modal__photo-wrap {
  position: relative;
}

.team-modal__bio {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--tp-text-muted);
  margin-top: 1rem;
  white-space: pre-line;
}

.team-modal__links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.team-modal__links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  color: var(--tp-teal);
  background: rgba(20, 184, 166, 0.12);
  transition: background 0.2s ease, color 0.2s ease;
}

.team-modal__links a:hover {
  background: var(--tp-teal);
  color: #fff;
}

/* Flush hero to navbar — cancel React section pt-32 clearance */
section[data-team-redesign-active="true"] {
  padding-top: 0 !important;
  background: transparent !important;
}

/* Hide original React team section content when redesign is active */
section[data-team-redesign-active="true"] > *:not(.team-page-redesign) {
  display: none !important;
}
