.teamblock {
  margin: 56px 0;
  padding: 0 20px;
}

.teamblock__inner {
  max-width: 1240px;
  margin: 0 auto;
}

.teamblock__headline {
  margin: 0 0 54px;
  text-align: left;
  color: #002e2d;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.15;
  font-weight: 600;
}

.teamblock__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 420px));
  justify-content: center;
  gap: 34px 46px;
}

.teamblock__grid--single {
  grid-template-columns: minmax(260px, 420px);
}

.teamblock__grid--odd .teamblock__member:last-child {
  grid-column: 1 / -1;
  justify-self: center;
}

.teamblock__member {
  width: 100%;
}

.teamblock__card {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  outline: none;
  perspective: 1200px;
}

.teamblock__card:focus-visible {
  box-shadow: 0 0 0 4px #e5306a;
}

.teamblock__card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transform-style: preserve-3d;
  transition: transform 0.55s ease;
}

.teamblock__card:not(.is-sticky):hover .teamblock__card-inner,
.teamblock__card:not(.is-sticky):focus-within .teamblock__card-inner {
  transform: rotateY(180deg);
}

.teamblock__card.is-flipped .teamblock__card-inner {
  transform: rotateY(180deg);
}

.teamblock__face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.teamblock__face--front {
  background: #d9d9d9;
}

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

.teamblock__name-wrap {
  position: absolute;
  inset: 0;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
}

.teamblock__name {
  margin: 0;
  color: #ffffff;
  text-align: center;
  font-size: clamp(21px, 2.1vw, 30px);
  line-height: 1.1;
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.teamblock__face--back {
  transform: rotateY(180deg);
  background: #e5306a;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 28px;
  gap: 14px;
}

.teamblock__position {
  margin: 0;
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.2;
  font-weight: 500;
}

.teamblock__email {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.2;
  word-break: break-word;
}

.teamblock__email:hover,
.teamblock__email:focus-visible {
  opacity: 0.85;
}

.teamblock__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

@media only screen and (max-width: 900px) {
  .teamblock {
    margin: 44px 0;
    padding: 0 16px;
  }

  .teamblock__grid {
    gap: 22px;
  }

  .teamblock__card {
    max-width: 360px;
  }
}

@media only screen and (max-width: 680px) {
  .teamblock__grid,
  .teamblock__grid--single {
    grid-template-columns: 1fr;
  }

  .teamblock__grid--odd .teamblock__member:last-child {
    grid-column: auto;
  }

  .teamblock__card {
    max-width: 320px;
  }
}
