/* ==========================================================================
   AGP — Team
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.team-hero__blob {
  top: -200px;
  right: -140px;
  width: 520px;
  height: 520px;
}

.team-hero__ring {
  bottom: -140px;
  left: 38%;
  width: 280px;
  height: 280px;
}

.team-hero__line {
  top: 30%;
}

.team-hero__grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
}

.team-hero__cluster {
  position: relative;
  height: 360px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.team-hero__cluster li {
  position: absolute;
}

.team-hero__cluster li:nth-child(1) {
  top: 0;
  left: 28%;
}

.team-hero__cluster li:nth-child(1) .blob-avatar {
  --blob-size: 128px;
}

.team-hero__cluster li:nth-child(2) {
  top: 42px;
  right: 2%;
}

.team-hero__cluster li:nth-child(2) .blob-avatar {
  --blob-size: 84px;
}

.team-hero__cluster li:nth-child(3) {
  top: 150px;
  left: 0;
}

.team-hero__cluster li:nth-child(3) .blob-avatar {
  --blob-size: 100px;
}

.team-hero__cluster li:nth-child(4) {
  top: 170px;
  left: 46%;
}

.team-hero__cluster li:nth-child(4) .blob-avatar {
  --blob-size: 112px;
}

.team-hero__cluster li:nth-child(5) {
  right: 4%;
  bottom: 18px;
}

.team-hero__cluster li:nth-child(5) .blob-avatar {
  --blob-size: 76px;
}

.team-hero__cluster li:nth-child(6) {
  bottom: 0;
  left: 20%;
}

.team-hero__cluster li:nth-child(6) .blob-avatar {
  --blob-size: 82px;
}

/* --------------------------------------------------------------------------
   Directory
   -------------------------------------------------------------------------- */
.team-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  margin-bottom: clamp(28px, 4vw, 48px);
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.team-toolbar__count {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: clamp(18px, 2.4vw, 30px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.member-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: clamp(24px, 2.6vw, 32px);
  padding-bottom: 84px;
  border: 1px solid var(--line);
  border-radius: var(--r-asym);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) ease, border-color var(--dur-base) ease;
}

.member-card:nth-child(even) {
  border-radius: var(--r-asym-2);
}

.member-card:hover {
  transform: translateY(-4px);
  border-color: rgba(169, 122, 60, 0.4);
  box-shadow: var(--shadow-float);
}

.member-card__visual {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0 0 7px;
}

.member-card__serial {
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 500;
  font-variant-numeric: lining-nums;
  line-height: 0.8;
  color: var(--accent-soft);
}

.member-card__name {
  margin: 6px 0 6px;
  font-size: clamp(1.45rem, 2vw, 1.7rem);
}

.member-card__focus {
  margin-bottom: 16px;
  font-size: 0.95rem;
  color: var(--muted);
}

.member-card__open {
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: none;
  color: var(--accent);
}

.member-card__open:focus-visible {
  outline-offset: 4px;
  border-radius: inherit;
}

.member-card__icon {
  position: absolute;
  right: 24px;
  bottom: 24px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 14px 5px 14px 5px;
  transition: background-color var(--dur-base) ease, color var(--dur-base) ease, transform var(--dur-base) var(--ease-spring);
}

.member-card__icon svg {
  width: 20px;
  height: 20px;
}

.member-card:hover .member-card__icon {
  background: var(--gold-gradient);
  border-color: transparent;
  color: #15120e;
  transform: rotate(-8deg);
}

@keyframes team-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.team-grid.is-refreshing .member-card {
  animation: team-in 0.55s var(--ease-out) both;
}

.team-grid.is-refreshing .member-card:nth-child(2) {
  animation-delay: 60ms;
}

.team-grid.is-refreshing .member-card:nth-child(3) {
  animation-delay: 120ms;
}

.team-grid.is-refreshing .member-card:nth-child(n + 4) {
  animation-delay: 180ms;
}

/* --------------------------------------------------------------------------
   How we work (night)
   -------------------------------------------------------------------------- */
.team-how {
  overflow: hidden;
}

.team-how__ring {
  right: -160px;
  bottom: -200px;
  width: 460px;
  height: 460px;
  border-color: rgba(207, 165, 101, 0.22);
}

.team-how__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.team-how__item {
  position: relative;
  padding-top: 26px;
  border-top: 1px solid rgba(207, 165, 101, 0.3);
}

.team-how__item::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 56px;
  height: 3px;
  border-radius: 3px;
  background: var(--gold-gradient);
}

.team-how__num {
  display: block;
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 5vw, 4.6rem);
  font-weight: 500;
  font-variant-numeric: lining-nums;
  line-height: 0.85;
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.team-how__item h3 {
  margin-bottom: 10px;
}

.team-how__item p {
  margin: 0;
  color: var(--on-night-muted);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (min-width: 1025px) {
  .member-card:nth-child(3n + 2) {
    margin-top: 44px;
  }

  .team-how__item:nth-child(even) {
    margin-top: 48px;
  }
}

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

  .team-how__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .team-hero__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .team-hero__cluster {
    display: flex;
    align-items: center;
    height: auto;
    padding-left: 10px;
  }

  .team-hero__cluster li {
    position: static;
    margin-left: -10px;
  }

  .team-hero__cluster li:nth-child(even) {
    transform: translateY(12px);
  }

  .team-hero__cluster .blob-avatar,
  .team-hero__cluster li:nth-child(n) .blob-avatar {
    --blob-size: 58px;
  }

  .team-hero__cluster li:nth-child(1) .blob-avatar {
    --blob-size: 70px;
  }
}

@media (max-width: 640px) {
  .team-grid,
  .team-how__list {
    grid-template-columns: 1fr;
  }

  .member-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 18px;
    padding: 22px 20px 22px;
  }

  .member-card .blob-avatar {
    --blob-size: 72px;
  }

  .member-card__serial {
    display: none;
  }

  .member-card__body {
    padding-right: 36px;
  }

  .member-card__name {
    margin-top: 2px;
  }

  .member-card__focus {
    margin-bottom: 12px;
  }

  .member-card__icon {
    top: 18px;
    right: 18px;
    bottom: auto;
    width: 38px;
    height: 38px;
  }
}
