/* Small page-specific additions; spacing, type and color remain Tailwind-led. */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  align-items: stretch;
}

.team-people {
  padding-top: calc(4.5rem * .8455);
}

.team-hero > .container {
  padding-bottom: calc(5rem * .8455);
}

.team-scroll-cue {
  display: none;
}

.team-section-heading {
  scroll-margin-top: 112px;
}

@media (min-width: 1280px) {
  .team-hero > .container {
    padding-bottom: calc(6rem * .8455);
  }
}

.team-card {
  position: relative;
  min-width: 0;
  min-height: 27rem;
  overflow: hidden;
  padding: 2rem 1.75rem 4.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 8px 24px rgba(17, 28, 51, .08);
  transition: transform .2s ease, box-shadow .2s ease;
}

.team-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: var(--person);
  content: "";
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(17, 28, 51, .12);
}

html.dark .team-card {
  border-color: rgba(148, 163, 184, .2);
  background: #111c33;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}

.team-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.team-index {
  color: #94a3b8;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .08em;
}

.team-dot {
  width: .625rem;
  height: .625rem;
  border-radius: 50%;
  background: var(--person);
  box-shadow: 0 0 0 5px var(--person-soft);
}

.team-portrait {
  width: 9rem;
  height: 9rem;
  overflow: hidden;
  margin: 0 auto 2rem;
  border: 5px solid var(--person-soft);
  border-radius: 50%;
  background: var(--person-soft);
}

.team-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  object-position: center 35%;
}

.team-rule {
  width: 2.5rem;
  height: 4px;
  margin-bottom: 1.25rem;
  border-radius: 9999px;
  background: var(--person);
}

.team-card h3 {
  margin-bottom: 0;
}

.team-role {
  min-height: 2.5rem;
  margin: .75rem 0 1rem;
  color: var(--person);
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.55;
}

.team-bio {
  margin: 0;
  color: #61708d;
  font-size: .875rem;
  line-height: 1.75;
}

.team-card-links {
  position: absolute;
  right: 1.5rem;
  bottom: 1.5rem;
  display: flex;
  gap: .5rem;
}

.team-card-link {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: .625rem;
  color: var(--person);
  background: var(--person-soft);
  transition: color .2s ease, background-color .2s ease, transform .2s ease;
}

.team-card-link:hover {
  color: var(--person-dark);
  transform: translateY(-2px);
}

.team-card-link:focus-visible {
  outline: 2px solid var(--person);
  outline-offset: 3px;
}

.team-card-link svg {
  display: block;
  width: 1.125rem;
  height: 1.125rem;
}

html.dark .team-bio {
  color: #cbd5e1;
}

html.dark .team-card {
  --person-soft: color-mix(in srgb, var(--person) 18%, #111c33) !important;
  --person-dark: var(--person) !important;
}

html.dark .team-card:nth-child(1) {
  --person: #3b82f6 !important;
}

html.dark .team-card:nth-child(4) {
  --person: #34d399 !important;
}

html.dark .team-card:nth-child(2) {
  --person: #8b5cf6 !important;
}

html.dark .team-card:nth-child(3) {
  --person: #f18940 !important;
}

.team-values-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 5rem;
  align-items: center;
}

/* A faint tint on the right adds contrast without hiding the VPS grid. */
.team-values {
  background-image:
    linear-gradient(105deg, transparent 38%, rgba(15, 23, 42, .045) 100%),
    url("../../flex-ui-assets/elements/pattern-white.svg");
  background-position: center;
}

html.dark .team-values {
  background-image: linear-gradient(105deg, transparent 38%, rgba(148, 163, 184, .12) 100%) !important;
}

.team-values-list {
  display: grid;
  gap: 1.25rem;
}

.team-values-list article {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  padding: 1.25rem;
  border: 1px solid #e2e8f0;
  border-radius: .75rem;
  background: #fff;
}

html.dark .team-values-list article {
  border-color: rgba(148, 163, 184, .2);
  background: #111c33;
}

html.dark .team-values-list article > span {
  color: #93c5fd;
  background: rgba(59, 130, 246, .16);
}

.team-values-list article > span {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border-radius: .75rem;
  color: #246bfe;
  background: #eaf1ff;
  font-size: .8125rem;
  font-weight: 600;
}

.team-values-list h3 {
  margin: 0 0 .35rem;
  color: #1f2937;
  font-size: .9375rem;
  font-weight: 600;
}

.team-values-list p {
  margin: 0;
  color: #61708d;
  font-size: .8125rem;
  line-height: 1.65;
}

html.dark .team-values-list h3 {
  color: #f9fafb;
}

html.dark .team-values-list p {
  color: #cbd5e1;
}

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

  .team-card {
    min-height: 25rem;
  }

  .team-values-grid {
    gap: 3rem;
  }
}

@media (max-width: 767px) {
  .team-hero {
    position: relative;
  }

  .team-hero > .container {
    display: flex;
    min-height: calc(100vh - 90px);
    align-items: center;
    justify-content: center;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .team-scroll-cue {
    position: absolute;
    right: 0;
    bottom: .75rem;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
    width: max-content;
    margin: 0 auto;
    font-size: .75rem;
    font-weight: 500;
    line-height: 1.25;
    text-decoration: none;
  }

  .team-scroll-cue svg {
    display: block;
    animation: team-arrow-nudge 1.4s ease-in-out infinite;
  }

  html.team-reveal-ready .team-reveal-item {
    opacity: 0;
    transform: translateY(1rem);
    transition: opacity .55s ease, transform .55s ease;
  }

  html.team-reveal-ready .team-reveal-item.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  @supports (height: 100svh) {
    .team-hero > .container {
      min-height: calc(100svh - 90px);
    }
  }

  .team-people {
    padding-top: calc(2.5rem * .8455);
    padding-bottom: 4rem;
  }

  .team-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  .team-card {
    display: grid;
    grid-template-columns: 6rem minmax(0, 1fr);
    column-gap: 1.5rem;
    align-items: start;
    min-height: 0;
    padding: 1.5rem 1.5rem 4.5rem;
  }

  .team-card-top {
    grid-column: 1 / -1;
    margin-bottom: 1.5rem;
  }

  .team-portrait {
    grid-column: 1;
    grid-row: 2 / span 4;
    width: 6rem;
    height: 6rem;
    margin: 0;
    border-width: 4px;
  }

  .team-rule {
    grid-column: 2;
    margin: .25rem 0 .75rem;
  }

  .team-card h3,
  .team-role,
  .team-bio {
    grid-column: 2;
  }

  .team-card h3 {
    font-size: 1.25rem;
  }

  .team-role {
    min-height: 0;
    margin: .4rem 0 .75rem;
  }

  .team-values-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  .team-card {
    transition: none;
  }

  .team-scroll-cue svg {
    animation: none;
  }

  html.team-reveal-ready .team-reveal-item {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .team-card:hover {
    transform: none;
  }
}

@keyframes team-arrow-nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(.3rem); }
}