/* ═══════════════════════════════════════════════════════════
   team.css — 3-D Carousel  (Spider-Verse QUIRKY edition)
   White comic-heading style + pop-art energy
═══════════════════════════════════════════════════════════ */

/* ── Section ────────────────────────────────────────────── */
.section--team {
  background: linear-gradient(170deg, #0b0d14 0%, #111420 50%, #0e1018 100%);
  position: relative;
  overflow: hidden;
}

.team__web-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cline x1='100' y1='0' x2='100' y2='200' stroke='%23ffffff' stroke-width='0.5'/%3E%3Cline x1='0' y1='100' x2='200' y2='100' stroke='%23ffffff' stroke-width='0.5'/%3E%3Cline x1='0' y1='0' x2='200' y2='200' stroke='%23ffffff' stroke-width='0.5'/%3E%3Cline x1='200' y1='0' x2='0' y2='200' stroke='%23ffffff' stroke-width='0.5'/%3E%3Ccircle cx='100' cy='100' r='50' fill='none' stroke='%23ffffff' stroke-width='0.3'/%3E%3Ccircle cx='100' cy='100' r='90' fill='none' stroke='%23ffffff' stroke-width='0.3'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ── Heading — white comic style ── */
.section--team .comic-heading {
  color: #ffffff;
  text-shadow: 4px 4px 0 var(--c-red), 8px 8px 0 var(--c-border-dark);
  position: relative;
  z-index: 2;
}

.section--team .section__sub {
  color: rgba(255, 255, 255, 0.6);
  position: relative;
  z-index: 2;
}

/* ── Tab Selector ───────────────────────────────────────── */
.team__tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 2;
  flex-wrap: wrap;
}

.team__tab {
  font-family: 'Bangers', var(--ff-display, 'Anton'), sans-serif;
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 30px;
  background: rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  clip-path: polygon(8% 0, 100% 0, 92% 100%, 0% 100%);
  display: inline-block;
  min-width: 120px;
}

.team__tab::before {
  content: '';
  position: absolute;
  top: 0; 
  left: -100%;
  width: 100%; 
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.team__tab:hover::before {
  left: 100%;
}

.team__tab:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px) scale(1.05);
}

.team__tab.active {
  color: #111;
  border-color: transparent;
  transform: translateY(-3px) scale(1.1);
  font-weight: 600;
}

.team__tab[data-team="race"].active {
  background: var(--c-cyan, #28c8ff);
  box-shadow: 4px 4px 0px var(--c-red, #ff2864), -2px -2px 0px rgba(255,255,255,0.2);
}

.team__tab[data-team="iete"].active {
  background: var(--c-magenta, #ff28cc);
  box-shadow: 4px 4px 0px var(--c-cyan, #28c8ff), -2px -2px 0px rgba(255,255,255,0.2);
}

.team__tab[data-team="ecea"].active {
  background: var(--c-yellow, #ffdc28);
  box-shadow: 4px 4px 0px var(--c-magenta, #ff28cc), -2px -2px 0px rgba(255,255,255,0.2);
}

/* ── Team Panels ────────────────────────────────────────── */
.team__panel {
  display: none;
  position: relative;
  z-index: 2;
}

.team__panel.active {
  display: block;
}

/* ── Card Grid (Overridden by Swiper) ───────────────────── */
.team__grid {
  display: block;
  /* Removed grid to let Swiper manage layout */
  width: 100%;
}

.team-swiper {
  width: 100%;
  padding: 40px 0 60px;
  overflow: visible;
}

/* ── Team Card (Swiper Slide) ───────────────────────────── */
.team-card {
  position: relative;
  isolation: isolate;
  width: 140px;
  /* Reduced width */
  height: auto;
  min-height: auto;
  background: #14161f;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 8px 6px 8px;
  /* Reduced padding */
  text-align: center;
  cursor: grab;
  transition:
    filter 0.5s ease,
    opacity 0.5s ease,
    box-shadow 0.4s ease,
    border-color 0.4s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);

  /* Default inactive state - completely obscure background using opaque color */
  filter: grayscale(100%) brightness(0.7);
}

.team-card.swiper-slide-active {
  filter: grayscale(0%) brightness(1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.08) translateY(-5px);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.6),
    -4px -4px 15px rgba(40, 200, 255, 0.4),
    4px 4px 15px rgba(255, 40, 100, 0.4);
  background: #1a1d2a;
  z-index: 5;
}

/* Corner Webs exclusively on active card */
.team-card.swiper-slide-active::before {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  width: 120px;
  /* Increased size to be visible */
  height: 120px;
  z-index: 10;
  pointer-events: none;
  background-image: url('../assets/spider-web.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.55;
  /* Vastly increased opacity for visibility */
  transform-origin: center;
  transform: scaleX(-1) scaleY(-1);
  /* Vertically inverted into top-left */
}

.team-card.swiper-slide-active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  right: -5px;
  width: 120px;
  height: 120px;
  z-index: 10;
  pointer-events: none;
  background-image: url('../assets/spider-web.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.55;
  /* Vastly increased opacity for visibility */
  transform-origin: center;
  transform: none;
  /* Points to bottom-right out of the box */
}

/* ── Avatar ─────────────────────────────────────────────── */
.team-card__avatar {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  margin: 0 auto 10px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: #1a1d2a;
}

.team-card__avatar-inner {
  width: 100%;
  height: 100%;
}

.team-card__avatar-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background-color: #14161f;
}

/* ── Card Info ──────────────────────────────────────────── */
.team-card__info {
  padding: 0;
}

.team-card__name {
  font-family: 'Bangers', var(--ff-display, 'Anton'), sans-serif;
  font-weight: 400;
  font-size: 0.95rem;
  /* Shrunk font size */
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.1;
  margin-bottom: 2px;
  text-shadow: 2px 2px 0px rgba(255, 40, 100, 0.8), -1px -1px 0px rgba(40, 200, 255, 0.8);
}

.team-card__role {
  font-family: var(--ff-body);
  font-weight: 500;
  font-size: 0.55rem;
  /* Shrunk font size */
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

/* ── Social Icons ──────────────────────────────────────── */
.team-card__socials {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.crew-social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.crew-social:hover {
  transform: translateY(-3px);
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
}

.crew-social--li:hover {
  background: rgba(0, 119, 181, 0.2);
  border-color: #0077b5;
  color: #0077b5;
}

.crew-social--gh:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
  color: #fff;
}

.crew-social--em:hover {
  background: rgba(255, 40, 100, 0.2);
  border-color: var(--c-red);
  color: var(--c-red);
}

/* Scroll enter animations */
.team-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease, filter 0.5s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  margin: 0 auto;
}

.team-card.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .team-card {
    width: 180px;
    padding: 12px 10px 12px;
  }
}

@media (max-width: 768px) {
  .team-card {
    width: 160px;
  }

  .team-card__avatar {
    aspect-ratio: 4 / 5;
  }

  .team__tab {
    font-size: 0.9rem;
    padding: 8px 20px;
  }
}

@media (max-width: 480px) {
  .team-card {
    width: 145px;
  }

  .team-card__avatar {
    aspect-ratio: 4 / 5;
  }

  .team-card__name {
    font-size: 1rem;
  }

  .team__tabs {
    gap: 6px;
  }

  .team__tab {
    font-size: 0.82rem;
    padding: 7px 16px;
  }
}