.team-block__inner {
  display: grid;
}
.team-block__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.team-block__card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  min-block-size: 100%;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 1rem 2rem rgba(17, 17, 17, 0.08);
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'><path fill='white' d='M97.8 0H2.2A2.2 2.2 0 0 0 0 2.2V85A2.2 2.2 0 0 0 2.2 87.2H1.9C34.3 95.9 65.7 95.9 98.1 87.2H97.8A2.2 2.2 0 0 0 100 85V2.2A2.2 2.2 0 0 0 97.8 0Z'/></svg>");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: 100% 100%;
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'><path fill='white' d='M97.8 0H2.2A2.2 2.2 0 0 0 0 2.2V85A2.2 2.2 0 0 0 2.2 87.2H1.9C34.3 95.9 65.7 95.9 98.1 87.2H97.8A2.2 2.2 0 0 0 100 85V2.2A2.2 2.2 0 0 0 97.8 0Z'/></svg>");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: 100% 100%;
  transition: box-shadow 240ms ease;
}
.team-block__card:hover {
  box-shadow: 0 1rem 2rem rgba(17, 17, 17, 0.08);
}
.team-block__media {
  position: relative;
  min-block-size: 13rem;
  background: inherit;
}
.team-block__texture {
  position: absolute;
  inset: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 1;
}
.team-block__image {
  position: absolute;
  left: 50%;
  bottom: 30%;
  display: block;
  inline-size: 13rem;
  block-size: 13rem;
  object-fit: cover;
  transform: translate(-50%, 50%);
  border-radius: 999px;
}
.team-block__toggle {
  position: absolute;
  right: 1.5rem;
  bottom: 5rem;
  display: grid;
  place-items: center;
  inline-size: 2.625rem;
  block-size: 2.625rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-white);
  cursor: pointer;
  transition: transform 200ms ease;
}
.team-block__toggle:hover {
  transform: scale(1.15);
}
.team-block__toggle-icon {
  display: block;
  inline-size: 1.75rem;
  block-size: 1.625rem;
  transform-origin: center center;
  transition: transform 240ms ease;
}
.team-block__card.is-rotated .team-block__toggle-icon {
  transform: rotate(180deg);
}
.team-block__body {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  align-content: start;
  gap: 0.5rem;
  padding: 4rem 2.5rem 13.5rem;
}
.team-block__name, .team-block__title, .team-block__bio {
  margin: 0;
  color: var(--color-white);
}
.team-block__name {
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-size: var(--step-1);
}
.team-block__title {
  font-size: var(--step-0);
  line-height: 1.35;
  font-weight: 400;
}
.team-block__divider {
  display: none;
  inline-size: 100%;
  block-size: 1px;
  background-color: rgba(255, 255, 255, 0.78);
}
.team-block__bio {
  font-size: var(--step-0);
  line-height: 1.45;
}
.team-block__bio > :first-child, .team-block__bio > :last-child {
  margin: 0;
}
.team-block__bio p + p {
  margin-top: 0.75rem;
}
.team-block__bio[hidden] {
  display: none;
}
.team-block__card.is-open {
  background-color: var(--color-black);
  max-block-size: 560px;
}
.team-block__card.is-open .team-block__media {
  display: none;
}
.team-block__card.is-open .team-block__body {
  display: flex;
  flex-direction: column;
  min-block-size: 0;
  gap: 0.875rem;
  padding: 2rem 2.5rem 13.5rem;
}
.team-block__card.is-open .team-block__name {
  font-size: var(--step-1);
  line-height: 1.15;
}
.team-block__card.is-open .team-block__title {
  font-size: var(--step-0);
  line-height: 1.35;
}
.team-block__card.is-open .team-block__divider {
  display: block;
  margin-block: 0.5rem 0.75rem;
}
.team-block__card.is-open .team-block__bio {
  position: relative;
  flex: 1 1 auto;
  margin-top: 0;
  padding-top: 0;
  min-block-size: 18rem;
  overflow-y: auto;
  padding-right: 0.5rem;
  scrollbar-gutter: stable;
  font-size: var(--step-0);
  line-height: 1.7;
}
.team-block__card.is-open .team-block__bio p {
  margin: 0 0 1rem;
}
.team-block__card.is-open .team-block__bio p:last-child {
  margin-bottom: 0;
}
.team-block__card.is-open .team-block__texture {
  display: none;
}
.team-block__card.is-open .team-block__toggle {
  right: 1.5rem;
  bottom: 5rem;
}
.team-block__card--palette-1 {
  background-color: var(--color-purple-dark);
}
.team-block__card--palette-1 .team-block__texture {
  background-image: url("../img/team-texture-1.svg");
}
.team-block__card--palette-2 {
  background-color: var(--color-green-dark);
}
.team-block__card--palette-2 .team-block__texture {
  background-image: url("../img/team-texture-2.svg");
}
.team-block__card--palette-3 {
  background-color: var(--color-purple);
}
.team-block__card--palette-3 .team-block__texture {
  background-image: url("../img/team-texture-3.svg");
}
.team-block__card--palette-4 {
  background-color: var(--color-green);
}
.team-block__card--palette-4 .team-block__texture {
  background-image: url("../img/team-texture-4.svg");
}
.team-block__card.is-open .team-block__bio[hidden] {
  display: block;
}
.team-block__card.is-open .team-block__body {
  padding-bottom: 15.5rem;
}

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