.team {
  --team-card-width: clamp(280px, 27.777778vw, 400px);
  --team-gap: clamp(32px, 3.888889vw, 56px);
  overflow: hidden;
  padding: 0 48px 100px;
  background: #f8f7fa;
  color: #0d0616;
}

.team-header {
  max-width: 1344px;
  margin: 0 auto 71px;
}

.team-label {
  margin: 0 0 19px;
  color: #e06500;
  font: 400 22px/22px Inter, sans-serif;
}

.team h2 {
  margin: 0;
  font: 600 50px/62px Inter, sans-serif;
  letter-spacing: -.8px;
}

.team-carousel {
  max-width: 1344px;
  margin-inline: auto;
}

.team-window {
  width: calc(100% + 48px);
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
  cursor: grab;
}

.team-window:active {
  cursor: grabbing;
}

.team-window:focus-visible {
  outline: 2px solid #6b42a8;
  outline-offset: 4px;
}

.team-track {
  display: flex;
  align-items: flex-start;
  gap: var(--team-gap);
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  transform: translateX(var(--team-offset, 0px));
  transition: transform 300ms ease-out;
}

.team-card {
  flex: 0 0 var(--team-card-width);
  width: var(--team-card-width);
}

.team-portrait {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 0;
}

.team-card:nth-child(-n + 4) .team-portrait {
  border-radius: 8px;
}

.team-card:nth-child(4) .team-portrait {
  border: .5px solid rgba(80, 45, 127, .6);
}

.team-portrait picture {
  display: block;
  width: 100%;
  height: 100%;
}

.team-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
}

.team-mobile-backdrop,
.team-name-mobile {
  display: none;
}

.team-caption {
  margin-top: 24px;
}

.team-caption h3 {
  margin: 0;
  font: 600 22px/33px Inter, sans-serif;
}

.team-caption p {
  margin: 0;
  color: rgba(13, 6, 22, .6);
  font: 400 18px/27px Inter, sans-serif;
}

@media (min-width: 768px) {
  .team-card:not(:first-child) h3,
  .team-card:nth-child(n + 5) .team-caption p {
    color: #020906;
  }
}

.team-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: calc(100% - 32px);
  height: 48px;
  margin-top: 40px;
}

.team-dots {
  display: flex;
  align-items: center;
  width: 88px;
}

.team-dot {
  flex: 0 0 16px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.team-dot:last-child {
  flex-basis: 8px;
}

.team-dot > span {
  display: block;
  width: 8px;
  height: 8px;
  overflow: hidden;
}

.team-dot img {
  display: block;
  max-width: none;
  transform: translateX(-16px);
}

.team-dot[aria-current="true"] img {
  transform: none;
}

.team-arrows {
  display: flex;
  gap: 16px;
}

.team-arrow {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid #000;
  border-radius: 8px;
  background: transparent;
}

.team-arrow--next {
  border-color: #6b42a8;
  background: #6b42a8;
}

.team-arrow img {
  display: block;
  max-width: none;
}

.team-arrow:disabled {
  cursor: default;
}

.team-arrow:focus-visible,
.team-dot:focus-visible {
  outline: 2px solid #6b42a8;
  outline-offset: 4px;
}

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

.team.is-resizing .team-track,
.team.is-resizing .team-card,
.team.is-resizing .team-portrait,
.team.is-resizing .team-caption {
  transition: none;
}

@media (min-width: 768px) and (max-width: 1319px) {
  .team {
    padding-inline: 32px;
  }

  .team h2 {
    font-size: 38px;
    line-height: 1.2;
  }

  .team-window {
    width: calc(100% + 32px);
  }
}

@media (max-width: 767px) {
  .team {
    --team-gap: 20px;
    --team-mobile-width: min(310px, calc(100vw - 64px));
    --team-mobile-small: calc(var(--team-mobile-width) * .8);
    padding: 0 0 64px;
  }

  .team-header {
    margin: 0 16px 64px;
  }

  .team-label {
    margin-bottom: 16px;
    color: #ff5b00;
    font-size: 18.8px;
    line-height: 22px;
    letter-spacing: -.376px;
  }

  .team h2 {
    color: #000;
    font-size: 30px;
    line-height: 34px;
    letter-spacing: -1px;
  }

  .team-desktop-break,
  .team-name-desktop {
    display: none;
  }

  .team-name-mobile {
    display: inline;
  }

  .team-window {
    width: 100%;
    height: calc(var(--team-mobile-width) * 1.3 + 84px);
  }

  .team-track {
    align-items: center;
    height: 100%;
  }

  .team-card {
    flex-basis: var(--team-mobile-small);
    width: var(--team-mobile-small);
    transition: flex-basis 300ms ease-out, width 300ms ease-out;
  }

  .team-card.is-active {
    flex-basis: var(--team-mobile-width);
    width: var(--team-mobile-width);
    height: 100%;
  }

  .team-card:nth-child(n + 6) {
    display: none;
  }

  .team-portrait {
    aspect-ratio: 1 / 1.3;
    border-radius: 5px;
  }

  .team-card:nth-child(-n + 4) .team-portrait {
    border-radius: 5px;
    border: 0;
  }

  .team-portrait picture {
    position: relative;
  }

  .team-mobile-backdrop--inactive {
    position: absolute;
    inset: 0;
    display: block;
    width: 195%;
    height: 100%;
    max-width: none;
    left: -47.5%;
  }

  .team-mobile-backdrop--wide {
    width: 161.03%;
    left: -30.51%;
  }

  .is-active .team-mobile-backdrop--inactive {
    display: none;
  }

  .is-active .team-mobile-backdrop--active {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .team-caption {
    margin-top: 15.4px;
    transition: margin-top 300ms ease-out;
  }

  .team-caption h3,
  .team-caption p {
    color: #0c1a2a;
    font-size: 12.4px;
    line-height: 17.6px;
    font-weight: 400;
    transition: font-size 300ms ease-out, line-height 300ms ease-out;
  }

  .team-caption h3 {
    font-weight: 500;
  }

  .team-card.is-active .team-caption {
    margin-top: 20px;
  }

  .team-card.is-active h3 {
    color: #000;
    font-size: 15.6px;
    line-height: 22px;
  }

  .team-card.is-active .team-caption p {
    color: rgba(0, 0, 0, .6);
    font-size: 15.5px;
    line-height: 22px;
  }

  .team-controls {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-track,
  .team-card,
  .team-portrait,
  .team-caption,
  .team-caption h3,
  .team-caption p {
    transition: none;
  }
}
