/* =========================================
   TEAM INTRO SECTION
========================================= */
.team-highlights {
  background: #fff;
  padding-block: var(--space-4);
}

.team-highlights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.team-highlight-card {
  background: transparent;
  text-align: center;
  padding: 1rem;
}

.team-highlight-card:hover .team-highlight-number.is-finished {
  text-shadow: 0 0 24px rgba(46, 62, 168, 0.16);
}

.team-highlight-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  background: rgba(33, 67, 134, 0.08);
  color: var(--color-primary);
  box-shadow: inset 0 0 0 1px rgba(33, 67, 134, 0.08);
}

.team-highlight-number {
  display: inline-block;
  font-size: clamp(1.9rem, 2vw + 1rem, 3rem);
  line-height: 1;
  font-weight: 700;
  color: #2e3ea8;
  margin-bottom: 0.45rem;
  will-change: transform, filter, opacity;
  font-variant-numeric: tabular-nums;
}

.team-highlight-number.is-counting {
  animation: teamNumberPulse 0.55s ease;
}

.team-highlight-number.is-finished {
  animation: teamNumberFinish 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.team-highlight-label {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.team-intro {
  background: #fff;
  padding-top: 0;
  padding-bottom: var(--space-5);
}

.team-intro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: center;
}

.team-intro-content {
  max-width: 60ch;
}

.team-intro-eyebrow {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-round);
  background: rgba(33, 67, 134, 0.08);
  color: var(--color-primary);
  font-size: 0.8rem;
  font-weight: 600;
}

.team-intro-title {
  margin-bottom: 1rem;
  font-size: clamp(1.6rem, 1.2vw + 1.2rem, 2.5rem);
  line-height: 1.15;
}

.team-intro-content p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* Mobile: simple stacked layout */
.team-intro-media {
  position: relative;
  min-height: 360px;
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.team-intro-float {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  border-radius: calc(var(--radius-lg) + 2px);
  object-fit: cover;
  box-shadow:
    0 24px 50px rgba(17, 24, 39, 0.08),
    0 10px 24px rgba(17, 24, 39, 0.05);
}

/* =========================================
   TEAM IMAGE MODAL
========================================= */

.team-image-trigger {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
}

.team-image-trigger:focus {
  outline: none;
}

.team-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.team-modal.active {
  display: flex;
}

.team-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.3s ease;
}

.team-modal-content {
  position: relative;
  z-index: 2;
  animation: scaleIn 0.3s ease;
  max-width: 90%;
  max-height: 90%;
}

.team-modal-img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.team-modal-close {
  position: absolute;
  top: -12px;
  right: -12px;
  background: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.our-team {
  background: var(--color-bg);
  padding-block: 5rem;
}

.our-team .container {
  padding-block: var(--space-4);
  /* max-width: 1200px;
  margin: auto;
  padding: 60px 20px; */
}

.our-team h1 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.department-block {
  margin-bottom: 4rem;
}

.department-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.75rem;
  padding-left: 0.75rem;
  border-left: 4px solid var(--color-primary);
  color: var(--text-primary);
}

.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.team-card {
  background: linear-gradient(180deg, #fbfcfe 0%, #f5f7fb 100%);
  border: 1px solid var(--color-border);
  border-radius: calc(var(--radius-lg) + 4px);
  padding: 2rem 1.4rem 1.5rem;
  text-align: center;

  display: flex;
  flex-direction: column;
  align-items: center;

  min-height: 360px;
  height: 100%;

  transition:
    transform var(--dur-2) var(--ease-out),
    box-shadow var(--dur-2) var(--ease-out),
    border-color var(--dur-2) var(--ease-out);

  box-shadow:
    0 10px 24px rgba(17, 24, 39, 0.04),
    0 2px 6px rgba(17, 24, 39, 0.03);
}

.team-card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 24px 50px rgba(17, 24, 39, 0.08),
    0 8px 18px rgba(17, 24, 39, 0.05);
  border-color: rgba(33, 67, 134, 0.18);
}

.team-img {
  margin-bottom: 1.15rem;
}

.team-img .employee-img {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-primary);
  box-shadow: 0 10px 24px rgba(33, 67, 134, 0.14);
}

.team-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  width: 100%;
}

.team-info-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.team-info h3 {
  margin: 0;
  font-size: clamp(1.1rem, 0.4vw + 1rem, 1.35rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.team-info .title {
  margin: 0;
  max-width: 26ch;
  font-size: 0.96rem;
  line-height: 1.55;
  font-weight: 600;
  color: var(--color-primary);
  text-wrap: balance;
}

.team-department {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--text-secondary);
  opacity: 0.92;
}

.team-info-actions {
  margin-top: auto;
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: center;
}

.team-card .title,
.team-card .team-department {
  overflow-wrap: anywhere;
}

/* .team-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.25rem;
  text-align: center;

  display: flex;
  flex-direction: column;
  align-items: center;

  min-height: 320px;
  height: 100%;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;

  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
} */

/* .team-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.08),
    0 6px 16px rgba(0, 0, 0, 0.04);
  border-color: rgba(33, 67, 134, 0.2);
}

.team-img {
  margin-bottom: 1rem;
} */

/* .team-img .employee-img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-primary);
} */

/* .team-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
  width: 100%;
}

.team-info h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
} */

/* .team-info-main {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
} */

/* .team-info-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: center;
} */

/* .team-info .title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0;
} */

/* .team-department {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
} */

/* .team-department-label {
  font-weight: 600;
  color: var(--text-primary);
} */

.team-department-value {
  color: var(--text-secondary);
}

.team-info a {
  /* color: var(--text-primary);
  font-size: 0.9rem; */
  word-break: break-word;
}

.email-link,
.author-page-link {
  min-width: 160px;
  justify-content: center;
  align-items: center;
  display: inline-flex;
  padding: 0.72rem 1rem;
  border-radius: var(--radius-round);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition:
    transform var(--dur-1) var(--ease-out),
    background-color var(--dur-2) var(--ease-out),
    color var(--dur-2) var(--ease-out),
    box-shadow var(--dur-2) var(--ease-out),
    border-color var(--dur-2) var(--ease-out);
}

.email-link {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 10px 20px rgba(33, 67, 134, 0.18);
}

.email-link:hover {
  background: var(--color-primary-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(33, 67, 134, 0.24);
}

.author-page-link {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid rgba(33, 67, 134, 0.18);
}

.author-page-link:hover {
  background: rgba(33, 67, 134, 0.06);
  color: var(--color-primary);
  transform: translateY(-2px);
  border-color: rgba(33, 67, 134, 0.3);
}

/* .email-link {
  margin-top: auto;
  display: inline-block;
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  border-radius: var(--radius-round);
  background: rgba(33, 67, 134, 0.08);
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  transition:
    background 0.25s ease,
    transform 0.2s ease;
}

.email-link:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-2px);
}

.author-page-link {
  margin-top: 10px;
  display: inline-flex;
  justify-content: center;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-round);
  background: rgba(33, 67, 134, 0.08);
  color: var(--color-primary);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition:
    background 0.25s ease,
    transform 0.2s ease;
}

.author-page-link:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-2px);
} */

/* =========================================
   Animations
========================================= */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes teamNumberPulse {
  0% {
    transform: translateY(10px) scale(0.92);
    opacity: 0.4;
    filter: blur(1px);
  }
  55% {
    transform: translateY(-4px) scale(1.06);
    opacity: 1;
    filter: blur(0);
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes teamNumberFinish {
  0% {
    transform: scale(1);
    text-shadow: 0 0 0 rgba(46, 62, 168, 0);
  }
  45% {
    transform: scale(1.1);
    text-shadow: 0 0 22px rgba(46, 62, 168, 0.18);
  }
  100% {
    transform: scale(1);
    text-shadow: 0 0 0 rgba(46, 62, 168, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-highlight-number,
  .team-highlight-number.is-counting,
  .team-highlight-number.is-finished {
    animation: none !important;
    transition: none !important;
  }
}
/* =========================================
   TABLET
========================================= */

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

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

  .team-intro-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: clamp(2rem, 5vw, 5rem);
  }

  .team-intro-content {
    max-width: 62ch;
  }

  .team-intro-media {
    min-height: 470px;
    align-items: center;
  }

  .team-intro-float {
    max-width: 320px;
  }
}

/* =========================================
   SMALL DESKTOP
========================================= */

@media (min-width: 1024px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .team-card {
    min-height: 390px;
    /* min-height: 340px; */
  }

  .team-intro-media {
    min-height: 560px;
  }

  .team-intro-float {
    max-width: 360px;
  }
}

/* =========================================
   LARGE DESKTOP
========================================= */

@media (min-width: 1280px) {
  .team-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .team-intro-media {
    display: block;
    /* min-height: 680px; */
    min-height: 740px;
    perspective: 1200px;
  }

  @keyframes teamFloatSoft {
    0% {
      transform: translate3d(0, 0, 0) rotate(var(--r));
    }
    50% {
      transform: translate3d(0, -8px, 0) rotate(var(--r));
    }
    100% {
      transform: translate3d(0, 0, 0) rotate(var(--r));
    }
  }

  .team-intro-float {
    position: absolute;
    /* width: 360px; */
    max-width: none;

    opacity: 0;
    transform: translateY(60px) scale(0.96);
    transition:
      opacity 0.9s ease,
      transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);

    will-change: transform, opacity;
    backface-visibility: hidden;
    pointer-events: none;

    --r: 0deg;

    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.18);
  }

  .team-intro-float--one {
    width: 500px;
    top: 8%;
    left: 0;
    z-index: 1;
    --r: -2deg;
    animation: teamFloatSoft 10s ease-in-out infinite;
  }

  .team-intro-float--two {
    width: 400px;
    bottom: 14%;
    right: 0;
    z-index: 2;
    --r: 1.5deg;
    animation: teamFloatSoft 12s ease-in-out infinite;
  }

  .team-intro-media:not(.is-visible) .team-intro-float {
    animation: none;
  }

  .team-intro-media.is-visible .team-intro-float {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  .team-intro-media.is-visible .team-intro-float--one {
    transition-delay: 0s;
  }

  .team-intro-media.is-visible .team-intro-float--two {
    transition-delay: 0.15s;
  }
}
