/* ——— Team: CEO center + two triangular wings ——— */
.team-section {
  position: relative;
  overflow: hidden;
}

.team-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 55% at 50% 48%, rgba(91, 140, 255, 0.14), transparent 72%);
  pointer-events: none;
}

.team-scene-wrap {
  position: relative;
  margin-top: 8px;
}

.team-space {
  position: relative;
  height: min(640px, 76vh);
  min-height: 480px;
  perspective: 1000px;
  perspective-origin: 50% 46%;
}

.team-space-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 22% 30%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1px 1px at 78% 28%, rgba(123, 92, 255, 0.4), transparent);
  opacity: 0.4;
  pointer-events: none;
}

.team-space-floor {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: min(70%, 520px);
  height: 80px;
  margin-left: min(-35%, -260px);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(91, 140, 255, 0.28), transparent 70%);
  transform: rotateX(82deg);
  filter: blur(2px);
  pointer-events: none;
}

.team-wings-lines {
  position: absolute;
  inset: 8% 4% 14%;
  width: 92%;
  height: 78%;
  pointer-events: none;
  z-index: 0;
}

.team-wing-shape {
  fill: rgba(91, 140, 255, 0.06);
  stroke: rgba(91, 140, 255, 0.22);
  stroke-width: 0.35;
  vector-effect: non-scaling-stroke;
}

.team-wing-shape--left {
  fill: rgba(255, 153, 0, 0.04);
  stroke: rgba(255, 180, 80, 0.2);
}

.team-wing-shape--right {
  fill: rgba(91, 140, 255, 0.05);
  stroke: rgba(123, 160, 255, 0.22);
}

.team-space-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  z-index: 1;
}

.team-wings-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8% 6px;
  margin: 0;
  pointer-events: none;
  z-index: 2;
}

.team-wing-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.team-wing-label--center {
  color: rgba(255, 200, 120, 0.95);
  font-size: 12px;
}

.team-wing-label--left {
  color: rgba(255, 190, 100, 0.85);
}

.team-wing-label--right {
  color: rgba(160, 190, 255, 0.9);
}

.team-card {
  position: absolute;
  width: 168px;
  transform-style: preserve-3d;
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
  z-index: 2;
}

.team-card-inner {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(165deg, rgba(28, 34, 56, 0.96), rgba(8, 10, 18, 0.98));
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.team-card--center {
  left: 50%;
  top: 50%;
  width: 236px;
  margin-left: -118px;
  margin-top: -158px;
  z-index: 12;
  transform: translateZ(75px);
}

.team-card--center .team-card-inner {
  border-color: rgba(255, 200, 80, 0.6);
  box-shadow:
    0 0 56px rgba(255, 180, 60, 0.28),
    0 28px 60px rgba(0, 0, 0, 0.5);
}

.team-card--wing {
  left: var(--px, 50%);
  top: var(--py, 50%);
  margin-left: -84px;
  margin-top: -112px;
  transform: translateZ(var(--tz, 0px)) scale(var(--scale, 1));
}

.team-card--wing-left .team-card-inner {
  border-color: rgba(255, 180, 80, 0.2);
}

.team-card--wing-right .team-card-inner {
  border-color: rgba(120, 160, 255, 0.25);
}

.team-card:hover,
.team-card:focus-within {
  z-index: 20;
}

.team-card--center:hover {
  transform: translateZ(98px) scale(1.04);
}

.team-card--wing:hover {
  transform: translateZ(calc(var(--tz, 0px) + 22px)) scale(calc(var(--scale, 1) * 1.05));
}

.team-card:hover .team-card-inner {
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.5),
    0 0 24px var(--accent-soft);
}

.team-card-photo {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #0a0e18;
}

.team-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.team-card-info {
  padding: 10px 12px 12px;
  text-align: center;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
}

.team-card-name {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.team-card--center .team-card-name {
  font-size: 18px;
}

.team-card-role {
  margin: 5px 0 0;
  font-size: 10px;
  line-height: 1.35;
  color: var(--muted);
}

.team-card--center .team-card-role {
  font-size: 11px;
}

.team-scene-cta {
  margin-top: 20px;
  text-align: center;
}

/* Mobile grid: CEO + two columns */
.team-grid-fallback {
  display: none;
}

.team-grid-fallback--wings {
  gap: 20px;
}

.team-grid-ceo-row {
  display: flex;
  justify-content: center;
}

.team-grid-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.team-grid-column-title {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.team-grid-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--card);
  text-align: center;
  margin-bottom: 10px;
}

.team-grid-card--ceo {
  border-color: rgba(255, 200, 80, 0.45);
  max-width: 280px;
  width: 100%;
}

.team-grid-card-photo {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
  background: #0a0e18;
}

.team-grid-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-grid-card h3 {
  margin: 0;
  font-size: 15px;
}

.team-grid-card p {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.team-grid-wing {
  display: none;
}

.team-page-hero {
  padding-bottom: 0;
}

@media (max-width: 900px) {
  .team-space {
    display: none;
  }

  .team-grid-fallback {
    display: flex;
    flex-direction: column;
  }
}

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

@media (max-width: 1100px) and (min-width: 901px) {
  .team-card {
    width: 148px;
  }

  .team-card--center {
    width: 208px;
    margin-left: -104px;
    margin-top: -140px;
  }

  .team-card--wing {
    margin-left: -74px;
    margin-top: -100px;
  }
}

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

  .team-space {
    display: none;
  }

  .team-grid-fallback {
    display: flex;
    flex-direction: column;
  }
}
