/* Desktop composition from Figma 89797:102458. Shared Technology stack owns
   section/heading/logo tokens; the portrait slots preserve the arc while avatars lift independently on hover. */
.developer-team {
  overflow: hidden;
  --portrait-scale: 1;
}

.developer-team__eyebrow {
  margin: 0;
}

.developer-team__portrait-viewport {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: var(--80);
}

.developer-team__portrait-viewport:focus-visible {
  outline: 1px solid var(--white-60);
  outline-offset: var(--4);
}

.developer-team__portraits {
  display: flex;
  flex: none;
  width: calc(72rem * var(--portrait-scale));
  height: calc(17.75rem * var(--portrait-scale));
}

.developer-team__slot {
  position: relative;
  flex: 0 0 calc(9rem * var(--portrait-scale));
  height: calc(13rem * var(--portrait-scale));
  --portrait-angle: 0deg;
  --portrait-offset: var(--4);
}

.developer-team__slot:nth-child(1),
.developer-team__slot:nth-child(8) {
  --portrait-angle: -12deg;
  --portrait-offset: var(--56);
}

.developer-team__slot:nth-child(2),
.developer-team__slot:nth-child(7) {
  --portrait-angle: -8deg;
  --portrait-offset: 1.875rem;
}

.developer-team__slot:nth-child(3),
.developer-team__slot:nth-child(6) {
  --portrait-angle: -5deg;
  --portrait-offset: .875rem;
}

.developer-team__slot:nth-child(4),
.developer-team__slot:nth-child(5) {
  --portrait-angle: -2deg;
}

.developer-team__slot:nth-child(n + 5) {
  --portrait-direction: -1;
}

.developer-team__avatar {
  position: absolute;
  left: calc(-2rem * var(--portrait-scale));
  width: calc(13rem * var(--portrait-scale));
  height: calc(13rem * var(--portrait-scale));
  overflow: hidden;
  border: var(--4) solid var(--blue-dark);
  border-radius: var(--radius-card);
  transform: translateY(calc(var(--portrait-offset) * var(--portrait-scale))) rotate(calc(var(--portrait-angle) * var(--portrait-direction, 1)));
}

.developer-team__avatar.is--rose { background-color: #fc9696; }
.developer-team__avatar.is--muted { background-color: #927474; }
.developer-team__avatar.is--soft { background-color: #bb8989; }
.developer-team__avatar.is--light { background-color: #d9d9d9; }
.developer-team__avatar.is--deep { background-color: #734343; }

.developer-team__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.developer-team__description {
  color: var(--white-60);
  width: 26.375rem;
  margin: var(--40) 0 0;
  font-size: var(--type-body-size);
  font-weight: 400;
  line-height: var(--type-compact-leading);
  letter-spacing: -.01em;
  text-align: center;
}

.developer-team__technologies {
  width: 100%;
  margin-top: var(--64);
}

/* Stable slots retain their hit area and rotation; translate lifts only the portrait.
   CTA's .24s return curve, with the existing overshoot curve for the requested bounce. */
@media (min-width: 992px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .developer-team__avatar {
    translate: 0 0;
    transition: translate .24s cubic-bezier(.2, .8, .2, 1);
  }

  /* The unanimated hit target stays under the pointer as the portrait lifts. */
  .developer-team__slot::before {
    content: "";
    position: absolute;
    left: calc(-2rem * var(--portrait-scale));
    width: calc(13rem * var(--portrait-scale));
    height: calc(13rem * var(--portrait-scale));
    transform: translateY(calc(var(--portrait-offset) * var(--portrait-scale))) rotate(calc(var(--portrait-angle) * var(--portrait-direction, 1)));
  }

  .developer-team__avatar {
    pointer-events: none;
  }

  .developer-team__slot:hover .developer-team__avatar {
    translate: 0 calc(-1 * var(--32));
    transition-duration: .4s;
    transition-timing-function: cubic-bezier(.175, .885, .32, 1.275);
  }
}

@media screen and (max-width: 991px) {
  .developer-team {
    --portrait-scale: .7;
  }

  .developer-team__portraits {
    width: calc(54rem * var(--portrait-scale));
  }

  .developer-team__slot:first-child,
  .developer-team__slot:last-child {
    display: none;
  }

  .developer-team__portrait-viewport {
    margin-top: var(--space-heading-content-wide);
  }

  .developer-team__description {
    width: min(100%, 22rem);
    margin-top: var(--32);
  }

  .developer-team__technologies {
    margin-top: var(--56);
  }
}

@media screen and (max-width: 767px) {
  .developer-team {
    --portrait-scale: .7;
  }

  .developer-team__portrait-viewport {
    margin-top: var(--24);
    display: block;
    width: 100vw;
    overflow: hidden;
    padding: var(--16) 0;
    touch-action: pan-y;
    user-select: none;
  }

  .developer-team__portraits {
    position: relative;
    width: 100%;
    height: 10rem;
  }

  .developer-team__slot {
    display: block;
    position: absolute;
    left: 50%;
    top: 0;
    width: calc(13rem * var(--portrait-scale));
    translate: calc(-50% + var(--portrait-orbit-x, 0rem)) var(--portrait-orbit-y, 0rem);
    rotate: var(--portrait-orbit-angle, 0deg);
  }

  .developer-team__slot:first-child,
  .developer-team__slot:last-child {
    display: block;
  }

  .developer-team__avatar {
    left: 0;
    transform: none;
  }

  .developer-team__image {
    pointer-events: none;
  }

  .developer-team__description {
    margin-top: var(--24);
  }

  .developer-team__technologies {
    margin-top: var(--32);
    width: 100vw;
  }
}

@media screen and (max-width: 767px) {
  .developer-team__slot:nth-child(1) { --portrait-position: -3.5; }
  .developer-team__slot:nth-child(2) { --portrait-position: -2.5; }
  .developer-team__slot:nth-child(3) { --portrait-position: -1.5; }
  .developer-team__slot:nth-child(4) { --portrait-position: -.5; }
  .developer-team__slot:nth-child(5) { --portrait-position: .5; }
  .developer-team__slot:nth-child(6) { --portrait-position: 1.5; }
  .developer-team__slot:nth-child(7) { --portrait-position: 2.5; }
  .developer-team__slot:nth-child(8) { --portrait-position: 3.5; }
  .developer-team__slot {
    --portrait-orbit-angle: calc(var(--portrait-position) * 4deg);
    --portrait-orbit-x: calc(80rem * sin(var(--portrait-orbit-angle)));
    --portrait-orbit-y: calc(80rem * (1 - cos(var(--portrait-orbit-angle))));
  }
}
