/* Team section */

:root {
  --team-frame: #ffffff;
  --team-mascot-bg: #110f1e;
  --team-magenta: #ff5bb0;
  --team-magenta-soft: rgba(255, 91, 176, 0.85);
  --team-block-role: #7b6dd6;
  --team-block-quote: #ff8062;
  --team-block-description: #d472e0;
  --team-block-fact: #e84c6e;
}

/* Section setup */

.team-section {
  position: relative;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
  background: transparent;
}

.team-section__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.8;
  pointer-events: none;
  background-image: url('/assets/team/background/section6.webp');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  transition: transform 0.3s ease-out;
  will-change: transform;
}

.team-section::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent 50%, #000 100%);
}

.team-section > .container {
  position: relative;
  z-index: 2;
}

/* Title strip */

.team-section__title-strip {
  position: relative;
  z-index: 2;
  width: 100%;
  background: linear-gradient(
    to bottom,
    #000 0%,
    #000 45%,
    transparent 100%
  );
  padding: var(--space-xl) var(--space-lg) calc(var(--space-3xl) + 1rem);
  text-align: center;
}

.team-section__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
  line-height: 1;
}

.team-section__title-text {
  white-space: nowrap;
}

.team-section__title-deco {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex: 0 0 120px;
}

.team-section__title-deco--left { justify-content: flex-end; }
.team-section__title-deco--right { justify-content: flex-start; }

.team-section__title-star {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.team-section__title-line {
  flex: 1;
  height: 2px;
  background: #fff;
}

/* Carousel */

.team-section__layout {
  margin-top: var(--space-lg);
}

.team-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100vw;
  max-width: 1700px;
  margin-left: 50%;
  transform: translateX(-50%);
  padding: 0 var(--space-lg);
}

/* overflow-x hides horizontal slide; overflow-y stays visible so floating orbs don't clip */
.team-carousel__viewport {
  flex: 1;
  overflow-x: hidden;
  overflow-y: visible;
  padding: 35px 0 15px;
}

.team-grid {
  display: flex;
  gap: var(--space-lg);
  width: 100%;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.team-carousel__btn {
  background: rgba(0, 0, 0, 0.5);
  color: rgba(255, 255, 255, 0.7);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  z-index: 5;
}

.team-carousel__btn:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.9);
  border-color: var(--team-magenta);
}

.team-carousel__btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

/* Card */

.team-card {
  --glow-color: var(--card-color, var(--team-magenta-soft));
  flex: 0 0 calc((100% - 4 * var(--space-lg)) / 5);
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

.team-card__orb {
  position: relative;
  width: 140px;
  height: 140px;
  margin-bottom: var(--space-md);
  z-index: 2;
  animation: orb-float 3.2s ease-in-out infinite;
}

@keyframes orb-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Staggered negative delays so orbs never sync on load */
.team-card:nth-child(5n+2) .team-card__orb { animation-delay: -0.6s; }
.team-card:nth-child(5n+3) .team-card__orb { animation-delay: -1.3s; }
.team-card:nth-child(5n+4) .team-card__orb { animation-delay: -1.9s; }
.team-card:nth-child(5n+5) .team-card__orb { animation-delay: -2.6s; }

.team-card__orb::after {
  content: '';
  position: absolute;
  inset: -15px;
  border-radius: 50%;
  background: radial-gradient(circle at center, var(--glow-color), transparent 65%);
  opacity: 0.25;
  filter: blur(14px);
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.team-card:hover .team-card__orb::after {
  opacity: 0.7;
}

.team-card__orb::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at 30% 25%,
    rgba(255, 255, 255, 0.18),
    rgba(255, 255, 255, 0.06) 18%,
    transparent 42%
  );
  pointer-events: none;
  z-index: 3;
}

.team-card__photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--glow-color);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.5),
    0 0 12px var(--glow-color),
    inset 0 -10px 18px rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 2;
  transition: box-shadow var(--transition-fast);
}

.team-card:hover .team-card__photo {
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.5),
    0 0 25px var(--glow-color),
    inset 0 -15px 30px -15px var(--glow-color),
    inset 0 -10px 18px rgba(0, 0, 0, 0.35);
}

.team-card__bigname {
  margin-top: var(--space-md);
  margin-bottom: var(--space-sm);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--glow-color);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  text-shadow:
    0 2px 6px rgba(0, 0, 0, 0.9),
    0 0 16px rgba(0, 0, 0, 0.7);
  line-height: 1;
}

.team-card__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  margin: var(--space-xs) auto var(--space-sm);
  width: 80%;
  max-width: 160px;
}

.team-card__divider-line {
  flex: 1;
  height: 1px;
  background: var(--glow-color);
  opacity: 0.6;
}

.team-card__diamond {
  width: 8px;
  height: 8px;
  background: var(--glow-color);
  transform: rotate(45deg);
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--glow-color);
}

.team-card__tagline {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
  text-align: center;
  line-height: 1.4;
  max-width: 220px;
  margin: 0 auto var(--space-md);
  /* Reserves 2-line space so 1-liner cards don't shrink the row height */
  min-height: calc(0.95rem * 1.4 * 2);
  text-shadow:
    0 2px 6px rgba(0, 0, 0, 0.85),
    0 0 18px rgba(0, 0, 0, 0.6);
}

.team-card__icons {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-xs);
}

.team-card__icon {
  font-size: 1.2rem;
  color: var(--glow-color);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
  transition: transform var(--transition-fast);
}

.team-card:hover .team-card__icon {
  transform: translateY(-2px);
}

/* Lightbox */

.team-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
}

.team-lightbox--open {
  display: flex;
}

.team-lightbox__close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  color: #fff;
  font-size: 1.8rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: background var(--transition-fast);
  z-index: 2;
}

.team-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.team-lightbox__content {
  position: relative;
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: #0f0a20;
  border-radius: 12px;
  padding: var(--space-xl);
}

.team-lightbox__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--space-xl);
  align-items: start;
}

.team-lightbox__left {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.team-lightbox__title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--card-color, var(--team-magenta));
  text-align: center;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
  text-shadow:
    0 2px 6px rgba(0, 0, 0, 0.9),
    0 0 16px rgba(0, 0, 0, 0.7);
}

.team-lightbox__frame {
  width: 220px;
  height: 220px;
  flex-shrink: 0;
  margin: 0 auto;
  border: 5px solid var(--card-color, var(--team-frame));
  border-radius: 50%;
  overflow: hidden;
  background: var(--team-mascot-bg);
  box-shadow:
    0 0 25px var(--card-color, transparent),
    inset 0 -15px 30px -15px var(--card-color, transparent);
  position: relative;
}

.team-lightbox__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Shared styling — JS picks which one to render */
.team-lightbox__cofounder,
.team-lightbox__role {
  margin-top: var(--space-md);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--card-color, var(--team-magenta));
  text-align: center;
  text-transform: uppercase;
  white-space: normal;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.8),
    0 0 12px rgba(0, 0, 0, 0.5);
}

.team-lightbox__socials {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.team-lightbox__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--color-text-muted);
  font-size: 1.4rem;
  transition: all var(--transition-fast);
}

.team-lightbox__social:hover {
  color: var(--card-color, var(--team-magenta));
  transform: translateY(-3px);
}

.team-lightbox__role-icons {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.team-lightbox__role-icon {
  font-size: 1.2rem;
  color: var(--card-color, var(--team-magenta));
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

.team-lightbox__right {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* Info blocks */

.team-block {
  position: relative;
  padding: var(--space-md) var(--space-lg);
  color: #fff;
  background: transparent;
  border: 2px solid;
  border-radius: 4px;
  text-align: center;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.25);
}

.team-block--role { border-color: var(--team-block-role); }
.team-block--quote { border-color: var(--team-block-quote); }
.team-block--description { border-color: var(--team-block-description); }
.team-block--fact { border-color: var(--team-block-fact); }

.team-block:nth-child(odd) { transform: rotate(-0.6deg); }
.team-block:nth-child(even) { transform: rotate(0.6deg); }

.team-block__label {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-yellow);
  margin-bottom: var(--space-xs);
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);
}

.team-block__value {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.4;
}

/* Lightbox navigation arrows */

.team-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 201;
  transition: all var(--transition-fast);
}

.team-lightbox__nav:hover {
  background: rgba(0, 0, 0, 0.8);
  border-color: var(--team-magenta);
  transform: translateY(-50%) scale(1.08);
}

.team-lightbox__nav--prev { left: var(--space-xl); }
.team-lightbox__nav--next { right: var(--space-xl); }

/* Warning banner */

.team-section__warning {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  max-width: 700px;
  margin: var(--space-xl) auto 0;
  padding: 0 var(--space-md);
}

.team-section__warning-line {
  width: 100%;
  max-width: 500px;
  height: 1px;
  background: var(--team-magenta);
  opacity: 0.5;
}

.team-section__warning-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}

.team-section__warning-skull {
  font-size: 2.2rem;
  color: var(--team-magenta);
  filter: drop-shadow(0 0 8px var(--team-magenta-soft));
  animation: skull-wobble 4s ease-in-out infinite;
}

.team-section__warning-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--team-magenta);
  text-transform: uppercase;
  text-align: center;
  line-height: 1.4;
  text-shadow:
    0 0 12px var(--team-magenta-soft),
    0 2px 4px rgba(0, 0, 0, 0.8);
}

@keyframes skull-wobble {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

/* Tablet */

@media (min-width: 769px) and (max-width: 1024px) {
  .team-card {
    flex: 0 0 calc((100% - 2 * var(--space-md)) / 3);
  }

  .team-section__title {
    font-size: 2rem; 
  }

  .team-section__title-text {
    white-space: normal; 
    text-wrap: balance; 
  }

  .team-section__title-deco {
    flex: 0 0 80px; 
  }

  .team-grid {
    gap: var(--space-md);
  }

  .team-card__orb {
    width: 100px;
    height: 100px;
  }

  .team-card__orb::after {
    inset: -10px;
  }

  .team-card__bigname {
    font-size: 1.1rem;
  }

  .team-card__tagline {
    font-size: 0.85rem;
  }

  .team-section__warning {
    margin-top: var(--space-xl);
  }

  .team-section__warning-text {
    font-size: 1rem;
  }

  .team-section__warning-skull {
    font-size: 1.5rem;
  }

  .team-lightbox__cofounder,
  .team-lightbox__role {
    white-space: normal;
  }

  .team-lightbox__nav {
    width: 38px;
    height: 38px;
    font-size: 1.6rem;
  }

  .team-lightbox__nav--prev { left: var(--space-lg); }
  .team-lightbox__nav--next { right: var(--space-lg); }
}


/* Phone */

@media (max-width: 768px) {
  .team-section__title-strip {
    padding: var(--space-lg) var(--space-md);
  }

  .team-section__title {
    align-items: center;
    gap: var(--space-md);
    font-size: 1.4rem;
    line-height: 1.2;
  }

  .team-section__title-text {
    white-space: normal;
    text-wrap: balance;
    min-width: 0;
  }

  .team-section__title-deco {
    flex: 0 0 60px;
  }

  .team-section__title-star {
    width: 16px;
    height: 16px;
  }

  .team-card {
    flex: 0 0 100%;
  }

  .team-grid {
    gap: var(--space-sm);
  }

  .team-card__orb {
    width: 110px;
    height: 110px;
    margin-bottom: var(--space-sm);
  }

  .team-card__orb::after {
    inset: -10px;
    filter: blur(8px);
  }

  .team-card__bigname {
    font-size: 1.2rem;
  }

  .team-card__tagline {
    font-size: 0.9rem;
    max-width: 200px;
  }

  .team-card__icon {
    font-size: 0.9rem;
  }

  .team-card__icons {
    gap: var(--space-sm);
  }

  .team-carousel__btn {
    width: 36px;
    height: 36px;
    font-size: 1.3rem;
  }

  .team-section__warning-text {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-align: center;
  }

  .team-section__warning-skull {
    font-size: 1.3rem;
  }

  .team-section__warning-line {
    max-width: 240px;
  }

  .team-lightbox {
    padding: var(--space-md);
  }

  .team-lightbox__content {
    padding: var(--space-lg);
  }

  .team-lightbox__inner {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .team-lightbox__left {
    max-width: 260px;
    margin: 0 auto;
  }

  .team-lightbox__title {
    font-size: 1.6rem;
  }

  .team-lightbox__cofounder,
  .team-lightbox__role {
    white-space: normal;
    font-size: 0.8rem;
  }

  .team-block__value {
    font-size: 0.95rem;
  }

  .team-lightbox__nav {
    display: none;
  }
}