/* =================================
   Team Showcase Styles (Team Page)
   ================================= */

.team-showcase {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 5.5rem 1.6rem 6.2rem;
  background:
    radial-gradient(
      120% 140% at 15% 50%,
      rgba(var(--fg-green-rgb), 0.22) 0%,
      transparent 62%
    ),
    radial-gradient(
      120% 140% at 85% 40%,
      rgba(var(--fg-blue-rgb), 0.28) 0%,
      transparent 60%
    ),
    linear-gradient(
      185deg,
      rgba(var(--fg-black-rgb), 0.9) 0%,
      rgba(var(--fg-gradient-3-rgb), 0.55) 52%,
      rgba(var(--fg-black-rgb), 0.95) 100%
    );
}

.team-showcase__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.team-showcase__bg span {
  position: absolute;
  --bg-hex-width: clamp(170px, 16vw, 260px);
  --bg-hex-height: calc(var(--bg-hex-width) * 0.866);
  width: var(--bg-hex-width);
  height: var(--bg-hex-height);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  background: linear-gradient(135deg, rgba(var(--fg-green-rgb), 0.35), rgba(var(--fg-blue-rgb), 0.22));
  opacity: 0.35;
  filter: blur(0.8px);
}

.team-showcase__bg span:nth-child(1) {
  top: 6%;
  left: 8%;
  transform: scale(0.82);
}

.team-showcase__bg span:nth-child(2) {
  top: 24%;
  left: 18%;
  opacity: 0.28;
  transform: scale(0.92);
}

.team-showcase__bg span:nth-child(3) {
  bottom: 18%;
  left: 12%;
  background: linear-gradient(135deg, rgba(var(--fg-blue-rgb), 0.3), rgba(var(--fg-purple-rgb), 0.26));
  transform: scale(0.88);
}

.team-showcase__bg span:nth-child(4) {
  top: 4%;
  right: 14%;
  background: linear-gradient(135deg, rgba(var(--fg-blue-rgb), 0.28), rgba(var(--fg-white-rgb), 0.22));
  transform: scale(0.95);
}

.team-showcase__bg span:nth-child(5) {
  top: 32%;
  right: 6%;
  opacity: 0.3;
  transform: scale(0.78);
}

.team-showcase__bg span:nth-child(6) {
  bottom: 14%;
  right: 18%;
  background: linear-gradient(135deg, rgba(var(--fg-green-rgb), 0.32), rgba(var(--fg-blue-rgb), 0.24));
  transform: scale(0.9);
}

.team-showcase__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--fg-max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: stretch;
  gap: clamp(2.4rem, 6vw, 4.6rem);
}

.team-showcase__intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.9rem;
}

.team-showcase__eyebrow {
  font-size: 0.82rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(var(--fg-white-rgb), 0.65);
  margin: 0;
}

.team-showcase__title {
  margin: 0;
  font-size: clamp(2.2rem, 3vw + 1.6rem, 3.2rem);
  color: var(--fg-white);
}

.team-showcase__title span {
  color: var(--fg-blue);
}

.team-showcase__body {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.8;
  color: rgba(var(--fg-white-rgb), 0.78);
}

.team-showcase__grid {
  position: relative;
  display: grid;
  --team-hex-size: clamp(202px, 23vw, 253px);
  gap: clamp(1.5rem, 4.5vw, 2.6rem) clamp(1.1rem, 3.5vw, 1.9rem);
  grid-template-columns: repeat(auto-fit, minmax(min(var(--team-hex-size), 42vw), var(--team-hex-size)));
  justify-content: center;
  padding-block: 1rem;
}

.team-hex {
  position: relative;
  width: min(var(--team-hex-size), 100%);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--fg-white);
  transition: transform 0.18s ease;
}

.team-hex::before {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(50% 0, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
  background: rgba(var(--fg-black-rgb), 0.92);
  border: 1px solid rgba(var(--fg-white-rgb), 0.14);
  box-shadow: 0 24px 48px rgba(var(--fg-black-rgb), 0.48);
  z-index: 0;
  transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.team-hex__figure {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  clip-path: polygon(50% 0, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
  overflow: hidden;
}

.team-hex__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.24s ease;
}

.team-hex__overlay {
  position: absolute;
  inset: auto clamp(0.35rem, 2.8vw, 0.8rem) clamp(2.1%, 4.1vw, 6.2%) clamp(0.35rem, 2.8vw, 0.8rem);
  padding: 0.9rem clamp(0.5rem, 2vw, 0.8rem) clamp(0.3rem, 2.5vw, 0.66rem);
  display: grid;
  gap: 0.2rem;
  pointer-events: none;
}

.team-hex__name {
  margin: 0;
  font-size: 0.765rem;
  font-weight: 600;
  letter-spacing: 0.035em;
  line-height: 1.2;
  color: var(--fg-white);
  text-shadow: 0 2px 6px rgba(var(--fg-black-rgb), 0.6);
}

.team-hex__role {
  margin: 0;
  font-size: 0.561rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.24;
  color: rgba(var(--fg-white-rgb), 0.78);
  text-shadow: 0 2px 6px rgba(var(--fg-black-rgb), 0.5);
}

.team-hex:hover,
.team-hex:focus-within {
  transform: translateY(-6px);
}

.team-hex:hover::before,
.team-hex:focus-within::before {
  border-color: rgba(var(--fg-white-rgb), 0.32);
  box-shadow: 0 32px 60px rgba(var(--fg-black-rgb), 0.55);
}

.team-hex:hover .team-hex__photo,
.team-hex:focus-within .team-hex__photo {
  transform: scale(1.04);
}

.team-values {
  position: relative;
  padding: clamp(4.5rem, 7vw, 6rem) clamp(1.6rem, 4vw, 3rem) clamp(5rem, 8vw, 6.5rem);
  background:
    radial-gradient(120% 140% at 18% 20%, rgba(var(--fg-green-rgb), 0.18) 0%, transparent 60%),
    radial-gradient(130% 150% at 82% 12%, rgba(var(--fg-blue-rgb), 0.2) 0%, transparent 58%),
    linear-gradient(190deg, rgba(var(--fg-black-rgb), 0.92) 0%, rgba(var(--fg-gradient-3-rgb), 0.6) 60%, rgba(var(--fg-black-rgb), 0.95) 100%);
  border-top: 1px solid rgba(var(--fg-white-rgb), 0.08);
  border-bottom: 1px solid rgba(var(--fg-white-rgb), 0.08);
  overflow: hidden;
}

.team-values::before {
  content: "";
  position: absolute;
  inset: auto 18% -35% auto;
  width: clamp(220px, 26vw, 320px);
  height: clamp(220px, 26vw, 320px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--fg-purple-rgb), 0.18) 0%, transparent 65%);
  filter: blur(22px);
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}

.team-values::after {
  content: "";
  position: absolute;
  inset: -18% -22% -24% -22%;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(var(--fg-blue-rgb), 0.24) 0%, transparent 58%),
    radial-gradient(circle at 72% 32%, rgba(var(--fg-purple-rgb), 0.18) 0%, transparent 55%),
    radial-gradient(circle at 28% 78%, rgba(var(--fg-green-rgb), 0.2) 0%, transparent 60%),
    radial-gradient(circle at 86% 76%, rgba(var(--fg-white-rgb), 0.12) 0%, transparent 62%);
  background-size: 42% 42%, 38% 38%, 40% 40%, 36% 36%;
  background-repeat: no-repeat;
  animation: team-values-particles-shift 38s ease-in-out infinite alternate;
  mix-blend-mode: screen;
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.team-values__inner {
  position: relative;
  max-width: min(880px, 92vw);
  margin: 0 auto;
  text-align: center;
  display: grid;
  gap: clamp(2rem, 4vw, 2.8rem);
  z-index: 1;
}

.team-values__title {
  margin: 0;
  font-size: clamp(2rem, 3vw + 1rem, 2.8rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-white);
}

.team-values__list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: values;
  display: grid;
  gap: clamp(1.4rem, 3vw, 1.9rem);
}

.team-values__item {
  position: relative;
  --values-badge-size: clamp(2.6rem, 6.4vw, 3.6rem);
  --values-badge-gap: clamp(2rem, 3.4vw, 2.6rem);
  margin: 0;
  padding: clamp(1.15rem, 3vw, 1.7rem) clamp(1.3rem, 4vw, 2.2rem) clamp(1.15rem, 3vw, 1.7rem) calc(var(--values-badge-size) + var(--values-badge-gap));
  border-radius: var(--fg-radius-lg);
  background: linear-gradient(135deg, rgba(var(--fg-black-rgb), 0.7), rgba(var(--fg-gradient-2-rgb), 0.38));
  border: 1px solid rgba(var(--fg-white-rgb), 0.12);
  box-shadow: 0 22px 48px rgba(var(--fg-black-rgb), 0.45);
  color: rgba(var(--fg-white-rgb), 0.86);
  font-size: clamp(1rem, 0.6vw + 0.95rem, 1.15rem);
  line-height: 1.65;
  letter-spacing: 0.04em;
  text-align: left;
  counter-increment: values;
}

.team-values__item::before {
  content: counter(values);
  position: absolute;
  left: clamp(1.25rem, 3.2vw, 1.8rem);
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--values-badge-size);
  height: var(--values-badge-size);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(var(--fg-blue-rgb), 0.85), rgba(var(--fg-purple-rgb), 0.75));
  border: 1px solid rgba(var(--fg-white-rgb), 0.28);
  color: var(--fg-white);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: clamp(0.82rem, 0.6vw + 0.48rem, 1rem);
  box-shadow: 0 16px 32px rgba(var(--fg-black-rgb), 0.4);
}

@media (max-width: 720px) {
  .team-values__inner {
    gap: clamp(1.6rem, 5vw, 2.1rem);
  }

  .team-values__item {
    --values-badge-size: clamp(2.4rem, 8vw, 3.2rem);
    --values-badge-gap: clamp(1.5rem, 4vw, 2.2rem);
    padding: clamp(1.05rem, 4.5vw, 1.5rem) clamp(1rem, 4.5vw, 1.6rem) clamp(1.05rem, 4.5vw, 1.5rem) calc(var(--values-badge-size) + var(--values-badge-gap));
  }

  .team-values__item::before {
    left: clamp(1.15rem, 3.6vw, 1.6rem);
  }
}

@media (max-width: 520px) {
  .team-values {
    padding: clamp(3.8rem, 9vw, 4.6rem) clamp(1.1rem, 6vw, 1.8rem) clamp(4.4rem, 9vw, 5.4rem);
  }

  .team-values__item::before {
    border-radius: 12px;
  }

  .team-values__item {
    --values-badge-size: clamp(2.3rem, 9vw, 2.8rem);
    --values-badge-gap: clamp(1.4rem, 5vw, 1.9rem);
    padding: clamp(1rem, 5vw, 1.4rem) clamp(0.95rem, 5vw, 1.4rem) clamp(1rem, 5vw, 1.4rem) calc(var(--values-badge-size) + var(--values-badge-gap));
  }
}

@keyframes team-values-particles-shift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0px) saturate(1.05);
    background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%;
  }

  40% {
    transform: translate3d(-2%, -1%, 0) scale(1.01);
    filter: blur(1px) saturate(1.08);
    background-position: 6% 4%, 4% 7%, -3% -5%, 3% -4%;
  }

  70% {
    transform: translate3d(1.5%, 1%, 0) scale(1.015);
    filter: blur(1.2px) saturate(1.1);
    background-position: -4% -3%, -6% 2%, 5% 6%, -5% 4%;
  }

  100% {
    transform: translate3d(0, 0, 0) scale(1.005);
    filter: blur(0.6px) saturate(1.12);
    background-position: 8% -6%, -6% -4%, -4% 6%, 4% 6%;
  }
}

@media (max-width: 1080px) {
  .team-showcase__inner {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }

  .team-showcase__grid {
    margin-top: 2rem;
  }
}

@media (min-width: 961px) {
  .team-showcase__grid {
    grid-template-columns: repeat(6, minmax(0, var(--team-hex-size)));
    column-gap: clamp(1rem, 3vw, 1.8rem);
    row-gap: calc(var(--team-hex-size) * 0.48);
    padding-bottom: calc(var(--team-hex-size) * 0.6);
  }

  .team-showcase__grid .team-hex {
    grid-column: span 2;
    margin-top: 0;
  }

  .team-showcase__grid .team-hex:nth-child(1) {
    grid-column: 1 / span 2;
    grid-row: 1;
  }

  .team-showcase__grid .team-hex:nth-child(2) {
    grid-column: 3 / span 2;
    grid-row: 1;
  }

  .team-showcase__grid .team-hex:nth-child(3) {
    grid-column: 5 / span 2;
    grid-row: 1;
  }

  .team-showcase__grid .team-hex:nth-child(4) {
    grid-column: 2 / span 2;
    grid-row: 2;
    margin-top: calc(var(--team-hex-size) * -0.5);
  }

  .team-showcase__grid .team-hex:nth-child(5) {
    grid-column: 4 / span 2;
    grid-row: 2;
    margin-top: calc(var(--team-hex-size) * -0.5);
  }

  .team-showcase__grid .team-hex:nth-child(6) {
    grid-column: 1 / span 2;
    grid-row: 3;
    margin-top: calc(var(--team-hex-size) * -0.5);
  }

  .team-showcase__grid .team-hex:nth-child(7) {
    grid-column: 3 / span 2;
    grid-row: 3;
    margin-top: calc(var(--team-hex-size) * -0.5);
  }

  .team-showcase__grid .team-hex:nth-child(8) {
    grid-column: 5 / span 2;
    grid-row: 3;
    margin-top: calc(var(--team-hex-size) * -0.5);
  }
}

@media (max-width: 720px) {
  .team-showcase {
    padding: 4.2rem 1.2rem 5rem;
  }

  .team-showcase__grid {
    --team-hex-size: min(253px, 57vw);
    gap: clamp(1.3rem, 6.5vw, 2.1rem) clamp(1rem, 5.4vw, 1.6rem);
  }
}

@media (max-width: 520px) {
  .team-showcase__grid {
    --team-hex-size: min(189px, 86vw);
  }

  .team-hex__overlay {
    inset: auto clamp(0.25rem, 3.5vw, 0.55rem) clamp(1.1%, 5.6vw, 8.1%) clamp(0.25rem, 3.5vw, 0.55rem);
    padding: 0.8rem 0.6rem 0.8rem;
    gap: 0.18rem;
  }

  .team-hex__name {
    font-size: 0.697rem;
    line-height: 1.18;
  }

  .team-hex__role {
    font-size: 0.51rem;
    letter-spacing: 0.08em;
    line-height: 1.2;
  }
}
