.team-hero {
  --team-primary: #203041;
  --team-secondary: #365068;
  --team-accent: #8199b0;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: block;
  width: 100%;
  background:
    linear-gradient(140deg, var(--team-primary) 0%, var(--team-secondary) 58%, var(--team-accent) 100%);
}

.team-hero.team-hero--neutral {
  --team-primary: #141215;
  --team-secondary: #50483b;
  --team-accent: #b2a68c;
}

.team-hero::before {
  content: "";
  position: absolute;
  inset: -36%;
  background:
    radial-gradient(circle at 17% 18%, rgba(255, 255, 255, 0.22), transparent 36%),
    radial-gradient(circle at 84% 80%, rgba(255, 255, 255, 0.18), transparent 42%);
  z-index: 0;
}

.team-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 10, 18, 0.1) 0%, rgba(5, 10, 18, 0.36) 100%);
  z-index: 1;
}

.team-hero-frame {
  position: absolute;
  inset: clamp(0.48rem, 1.5vw, 1rem);
  border: 1px solid rgba(255, 255, 255, 0.7);
  z-index: 2;
  pointer-events: none;
}

.team-hero-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(84px, 20%, 164px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.34));
  z-index: 3;
}

.team-hero-split {
  position: absolute;
  inset: clamp(0.48rem, 1.5vw, 1rem);
  z-index: 3;
  display: grid;
}

.team-hero[data-team-count="2"] .team-hero-split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.team-hero[data-team-count="3"] .team-hero-split { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.team-hero[data-team-count="4"] .team-hero-split { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.team-hero-cell {
  position: relative;
  display: grid;
  place-items: center;
}

.team-hero-cell + .team-hero-cell {
  border-left: 1px solid rgba(255, 255, 255, 0.68);
}

.team-hero-cell img {
  width: clamp(54px, 50%, 120px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
}

.team-hero-code {
  position: absolute;
  left: 50%;
  top: calc(50% + clamp(42px, 9%, 72px));
  transform: translateX(-50%);
  color: #f4f8ff;
  font-size: clamp(0.72rem, 1.1vw, 0.84rem);
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  z-index: 3;
}

.team-hero-tags {
  position: absolute;
  left: 50%;
  bottom: clamp(0.72rem, 1.8vw, 1.25rem);
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem;
  max-width: min(92%, 520px);
}

.team-hero-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.35rem;
  padding: 0.12rem 0.42rem;
  border: 1px solid rgba(232, 224, 212, 0.8);
  background: rgba(20, 18, 21, 0.44);
  color: #e8e0d4;
  font-size: 0.68rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.team-hero--lead { aspect-ratio: 16 / 9; }
.team-hero--grid { aspect-ratio: 16 / 10; }
.team-hero--rail { aspect-ratio: 16 / 8.4; }
.team-hero--article { aspect-ratio: 16 / 6.2; }

@media (max-width: 700px) {
  .team-hero-code {
    top: calc(50% + 38px);
    letter-spacing: 0.12em;
  }

  .team-hero-tag {
    font-size: 0.64rem;
    padding: 0.1rem 0.34rem;
  }

  .team-hero-cell img {
    width: clamp(44px, 56%, 92px);
  }
}
