.team-tabs {
  grid-template-columns: repeat(9, minmax(78px, 1fr));
  gap: 10px;
}

.team-tabs button {
  border-color: rgba(14,40,35,.4);
  border-radius: 2px;
}

.team-coverflow {
  z-index: 3;
  height: 510px;
  margin-top: 30px;
  overflow: visible;
  cursor: grab;
  touch-action: pan-y;
}

.team-coverflow.is-dragging {
  cursor: grabbing;
}

.team-cover-card {
  z-index: var(--team-z, 1);
  top: 54px;
  width: 230px;
  height: 310px;
  padding: 0;
  border-radius: 0;
  border: 0;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: 0 16px 34px rgba(14,40,35,.22);
  transition: left .7s cubic-bezier(.2,.8,.25,1), top .7s cubic-bezier(.2,.8,.25,1), width .7s cubic-bezier(.2,.8,.25,1), height .7s cubic-bezier(.2,.8,.25,1), transform .7s cubic-bezier(.2,.8,.25,1), opacity .5s ease, filter .45s ease;
  transition-delay: calc(var(--team-order) * 150ms);
}

.team-cover-card:nth-child(1) {
  background: #c8cbc7;
}

.team-cover-card:nth-child(2) {
  background: #aeb4b0;
}

.team-cover-card:nth-child(3) {
  background: #949d98;
}

.team-cover-card:nth-child(6) {
  background: #bec3bd;
}

.team-cover-card:nth-child(7) {
  background: #7f8b85;
}

.team-cover-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 34%;
  border: 0;
  outline: 0;
  box-shadow: none;
  user-select: none;
  -webkit-user-drag: none;
}

.team-cover-card:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 4px;
}

.team-cover-card:has(img) {
  background: transparent;
}

.team-photo-card,
.team-photo-card:has(img),
.team-cover-card.team-photo-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.team-intro-card,
.team-intro-card:has(img) {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  padding: 28px;
  background: #fff;
  text-align: left;
}

.team-intro-card.is-active {
  z-index: 7;
}

.team-intro-card img,
.team-cover-card.team-intro-card img {
  width: 100%;
  height: auto;
  max-height: 150px;
  object-fit: contain;
  object-position: center;
}

.team-cover-card.team-intro-card span {
  display: block;
  height: auto;
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px);
  color: #42514d;
  font: 400 14px/1.55 var(--sans);
  transition: max-height .5s cubic-bezier(.2,.8,.25,1), margin-top .5s cubic-bezier(.2,.8,.25,1), opacity .42s ease, transform .5s cubic-bezier(.2,.8,.25,1);
}

.team-experience.is-intro-copy-ready .team-intro-card.is-active span {
  max-height: 210px;
  margin-top: 24px;
  opacity: 1;
  transform: translateY(0);
}

.team-cover-card.is-wipe-closing {
  z-index: 8;
  animation: team-card-wipe-close .3s cubic-bezier(.65,0,.35,1) forwards;
}

.team-cover-card.is-initial-wipe {
  animation: team-card-wipe-open .5s cubic-bezier(.65,0,.35,1) both;
  animation-delay: calc(var(--team-intro-order, 0) * 110ms);
}

.team-cover-card.is-wipe-opening {
  z-index: 8;
  animation: team-card-wipe-open .42s cubic-bezier(.65,0,.35,1) forwards;
}

@keyframes team-card-wipe-close {
  from { clip-path: inset(0 0 0 0); }
  to { clip-path: inset(0 100% 0 0); }
}

@keyframes team-card-wipe-open {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

.team-cover-card[data-team-card="6"] img {
  object-position: 68% center;
}

.about.is-team-mode .team-cover-card {
  opacity: 1;
  filter: none;
  transform: translateX(calc(-50% + var(--team-expanded-x, 0px) + var(--team-drag-shift, 0px))) scale(var(--team-scale, .82)) rotateY(0deg);
}

.team-experience.is-carousel-ready .team-coverflow {
  z-index: 3;
  opacity: 1;
  transform: none;
}

.team-experience.is-carousel-ready .team-cover-card {
  top: var(--team-depth-y, 76px);
  opacity: 1;
  filter: none;
  transform: translateX(calc(-50% + var(--team-expanded-x, 0px) + var(--team-drag-shift, 0px))) scale(1) rotateY(0deg);
  transition-delay: 0ms;
}

.team-experience.is-carousel-ready .team-cover-card.is-active {
  z-index: 6;
  top: var(--team-depth-y, 38px);
  width: 350px;
  height: 450px;
  opacity: 1;
  filter: none;
  transform: translateX(calc(-50% + var(--team-expanded-x, -190px) + var(--team-drag-shift, 0px))) scale(1) rotateY(0deg);
}

.team-experience.is-carousel-ready .team-intro-card.is-active {
  z-index: 7;
}

.team-experience.is-carousel-ready .team-intro-card.is-active.is-intro-entering,
.team-experience.is-carousel-ready .team-intro-card.is-active.is-intro-collapsing {
  top: 76px;
  width: 230px;
  height: 310px;
  transform: translateX(calc(-50% + var(--team-drag-shift, 0px))) scale(1) rotateY(0deg);
}

.team-coverflow.is-dragging .team-cover-card {
  transition: none;
}

.team-experience.is-intro-selected .team-detail {
  opacity: 0;
  pointer-events: none;
}

.team-detail {
  left: calc(50% - 55px);
  top: 190px;
  z-index: 4;
  display: block;
  width: min(500px, calc(50% - 30px));
  min-height: 0;
  padding: 0;
  border-radius: 3px;
  background: var(--paper);
  box-shadow: 0 18px 38px rgba(14,40,35,.14);
  opacity: 0;
  transform: translateX(-210px) scaleX(.42);
  transform-origin: left center;
}

.team-experience.is-detail-ready .team-detail {
  opacity: 1;
  transform: translateX(0);
}

.team-detail.is-switching {
  opacity: 0;
  transform: translateX(-45px) scaleX(.88);
}

.team-detail.is-wipe-closing {
  animation: team-detail-wipe-close .3s cubic-bezier(.65,0,.35,1) forwards;
}

.team-detail.is-wipe-opening {
  animation: team-detail-wipe-open .42s cubic-bezier(.65,0,.35,1) forwards;
}

@keyframes team-detail-wipe-close {
  from { clip-path: inset(0 0 0 0); }
  to { clip-path: inset(0 100% 0 0); }
}

@keyframes team-detail-wipe-open {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

.team-detail-portrait {
  display: none;
}

.team-detail-copy {
  padding: 26px 30px 30px;
}

.team-detail-copy h3 {
  font-size: clamp(46px,5vw,66px);
}

@media (max-width: 780px) {
  .about,
  .about.is-team-mode,
  .team-shell {
    min-height: 850px;
  }

  .team-coverflow {
    height: 390px;
    margin-top: 24px;
  }

  .team-tabs {
    display: flex;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .team-tabs::-webkit-scrollbar {
    display: none;
  }

  .team-tabs button {
    flex: 0 0 92px;
  }

  .team-cover-card {
    top: 42px;
    width: 145px;
    height: 205px;
    border-radius: 2px;
  }

  .about.is-team-mode .team-cover-card {
    transform: translateX(calc(-50% + var(--team-mobile-expanded-x, 0px) + var(--team-drag-shift, 0px))) scale(var(--team-scale, .82)) rotateY(0deg);
  }

  .team-experience.is-carousel-ready .team-cover-card {
    top: var(--team-mobile-depth-y, 52px);
    transform: translateX(calc(-50% + var(--team-mobile-expanded-x, 0px) + var(--team-drag-shift, 0px))) scale(1) rotateY(0deg);
  }

  .team-experience.is-carousel-ready .team-cover-card.is-active {
    top: var(--team-mobile-depth-y, 18px);
    width: 245px;
    height: 325px;
    transform: translateX(calc(-50% + var(--team-drag-shift, 0px))) scale(1) rotateY(0deg);
  }

  .team-experience.is-carousel-ready .team-intro-card.is-active.is-intro-entering,
  .team-experience.is-carousel-ready .team-intro-card.is-active.is-intro-collapsing {
    top: 52px;
    width: 145px;
    height: 205px;
    transform: translateX(calc(-50% + var(--team-drag-shift, 0px))) scale(1) rotateY(0deg);
  }


  .team-intro-card,
  .team-intro-card:has(img) {
    gap: 16px;
    padding: 22px;
  }

  .team-intro-card img,
  .team-cover-card.team-intro-card img {
    max-height: 105px;
  }

  .team-cover-card.team-intro-card span {
    font-size: 11px;
    line-height: 1.45;
  }

  .team-experience.is-intro-copy-ready .team-intro-card.is-active span {
    max-height: 170px;
    margin-top: 16px;
  }

  .team-detail {
    left: 50%;
    top: 390px;
    width: min(320px, calc(100% - 30px));
    border-radius: 2px;
    background: var(--paper);
    transform: translate(-50%,-105px) scaleY(.5);
    transform-origin: center top;
  }

  .team-experience.is-detail-ready .team-detail {
    transform: translate(-50%,0) scaleY(1);
  }

  .team-detail.is-switching {
    transform: translate(-50%,-22px) scaleY(.9);
  }

  .team-detail-copy {
    padding: 24px 24px 27px;
  }

  .team-detail-copy h3 {
    font-size: 42px;
  }

  .team-back {
    bottom: 24px;
  }
}
