/* ==========================================
   TEAM SECTION — Sticky BG + Floating Scrolling Photo Cards
   ========================================== */

/* ── Outer container: tall so scroll has room ── */
.team-section {
  position: relative;
  background: #0d0d0d;
  height: 300vh;
  min-height: unset;
}

/* ── Sticky background panel ── */
.team-sticky-bg {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;

  /* subtle gold ambient glow */
  background:
    radial-gradient(ellipse 70% 60% at 18% 50%, rgba(212, 175, 55, 0.07) 0%, transparent 65%),
    #0d0d0d;
  z-index: 1;
  pointer-events: none;
}

/* grid lines */
.team-sticky-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
}

/* ── Text content inside sticky panel ── */
.team-bg-content {
  position: relative;
  z-index: 2;
  padding: 0 80px;
  max-width: 640px;
  pointer-events: all;
}

.team-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 5px 14px;
  border-radius: 4px;
  margin-bottom: 36px;
}

.team-heading {
  font-family: var(--font-display);
  font-size: clamp(3.8rem, 7vw, 6rem);
  font-weight: 400;
  color: #ffffff;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}

.team-heading-gold {
  color: var(--gold);
  font-style: italic;
}

.team-tagline {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.38);
  line-height: 1.75;
  max-width: 320px;
}

/* ── Cards layer: positioned absolute so it scrolls over the sticky bg ── */
.team-cards-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  pointer-events: none;
}

/* ── Base card ── */
.tc {
  position: absolute;
  width: 180px; /* Reduced width */
  pointer-events: all;
  opacity: 0;
  transform: translateY(30px) scale(0.96);
  transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.tc.tc-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.tc-inner {
  display: flex;
  flex-direction: column;
}

/* Individual card positions */
.tc-1 { top: 110vh; left: 55%; }
.tc-2 { top: 130vh; left: 78%; }
.tc-3 { top: 150vh; left: 45%; }
.tc-4 { top: 170vh; left: 65%; }
.tc-5 { top: 190vh; left: 30%; }
.tc-6 { top: 210vh; left: 80%; }

/* ── ID Card Header ── */
.tc-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tc-logo {
  height: 14px;
  width: auto;
  filter: brightness(0) invert(72%) sepia(43%) saturate(583%) hue-rotate(3deg) brightness(98%) contrast(92%) drop-shadow(0 0 3px rgba(212, 175, 55, 0.6));
  opacity: 1;
}

.tc-brand {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--gold);
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

/* ── Photo card image box ── */
.tc-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  padding: 0; /* Removed padding for flush look */
  position: relative;
  background: linear-gradient(180deg, #FFD700 0%, #C89B3C 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
  overflow: hidden;
}

.tc-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 40%);
  z-index: 2;
}

.tc-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  z-index: 1;
}

/* placeholder icon */
.tc-icon {
  font-size: 2.2rem;
  color: rgba(212, 175, 55, 0.4);
  transition: all 0.4s ease;
}

.tc-info {
  padding: 20px 16px;
  text-align: center;
  background: #000;
}

.tc-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 4px 0;
  letter-spacing: -0.01em;
}

.tc-role {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
}

/* ── Hover lift ── */
.tc:hover {
  border-color: rgba(212, 175, 55, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  transform: translateY(-8px) scale(1.02);
}

.tc:hover .tc-icon {
  color: rgba(212, 175, 55, 0.8);
  transform: scale(1.1);
}

.tc:hover .tc-name {
  color: var(--gold);
}

/* ── RESPONSIVE: collapse into grid on mobile ── */
@media (max-width: 900px) {
  .team-section {
    height: auto;
    min-height: unset;
  }

  .team-sticky-bg {
    position: relative;
    height: auto;
    padding: 80px 0 56px;
  }

  .team-bg-content {
    padding: 0 28px;
    max-width: 100%;
  }

  .team-heading {
    font-size: 2.8rem;
  }

  .team-cards-layer {
    position: relative;
    top: unset;
    left: unset;
    right: unset;
    bottom: unset;
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns on tablet */
    gap: 20px;
    padding: 8px 28px 80px;
  }

  /* reset absolute positioning */
  .tc, .tc-1, .tc-2, .tc-3, .tc-4, .tc-5, .tc-6 {
    position: static;
    width: 100%;
    opacity: 1;
    transform: none;
    transition: none;
  }

  .tc-photo {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5; 
  }
}

@media (max-width: 480px) {
  .team-cards-layer {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
    padding: 8px 16px 60px;
    gap: 16px;
  }
}