/* ==========================================================================
   10. Seção "Quem está por trás" — Equipe e carrossel circular 3D
   ========================================================================== */

/* -----------------------------------------------------------------------
   10a. Estrutura e fundo próprio da seção
   ----------------------------------------------------------------------- */

.team-section {
  position: relative;
  color: var(--color-cream);
  padding: clamp(5.5rem, 10vw, 9rem) 0 clamp(5rem, 9vw, 8rem);
  isolation: isolate;
  background-color: transparent;
  /* A base escura vem do campo global; aqui ficam só os brilhos da equipe */
  background-image:
    radial-gradient(ellipse 80% 50% at 50% 28%, rgba(0, 200, 196, 0.05) 0%, transparent 62%),
    radial-gradient(ellipse 55% 45% at 10% 46%, rgba(81, 193, 230, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 90% 64%, rgba(0, 200, 196, 0.035) 0%, transparent 60%);
}

.team-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.team-bg__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}

.team-bg__glow--1 {
  width: min(760px, 82vw);
  aspect-ratio: 1;
  left: -18%;
  top: 18%;
  background: radial-gradient(circle, rgba(0, 200, 196, 0.12) 0%, transparent 68%);
}

.team-bg__glow--2 {
  width: min(620px, 72vw);
  aspect-ratio: 1;
  right: -14%;
  top: 38%;
  background: radial-gradient(circle, rgba(81, 193, 230, 0.11) 0%, transparent 68%);
}

.team-bg__caustics {
  position: absolute;
  top: -12%;
  left: -5%;
  width: 110%;
  height: 46%;
  opacity: 0.26;
  background:
    repeating-linear-gradient(
      112deg,
      transparent 0 46px,
      rgba(98, 220, 228, 0.045) 47px 50px,
      transparent 51px 96px
    );
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, #000 0%, transparent 76%);
  mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, #000 0%, transparent 76%);
  animation: team-caustics 18s ease-in-out infinite alternate;
}

.team-bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      180deg,
      transparent 0 119px,
      rgba(0, 200, 196, 0.03) 120px
    );
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 20%, #000 52%, transparent 86%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 20%, #000 52%, transparent 86%);
}

@keyframes team-caustics {
  0%   { transform: translate3d(-2%, 0, 0) scale(1); opacity: 0.35; }
  100% { transform: translate3d(2%, 1.5%, 0) scale(1.04); opacity: 0.6; }
}

/* -----------------------------------------------------------------------
   10b. Termoclina — transição entre o pelágico e a zona crepuscular
   Não é uma onda de superfície: é uma camada de água mais fria e densa,
   marcada por uma linha tênue de luz, sem espuma.
   ----------------------------------------------------------------------- */

.team-wave {
  position: absolute;
  left: 0;
  bottom: 100%;
  width: 100%;
  height: clamp(90px, 12vw, 170px);
  z-index: 4;
  overflow: hidden;
  pointer-events: none;
  line-height: 0;
  transform: translateY(calc(var(--team-wave-shift, 0) * 1px));
  will-change: transform;
}

.team-wave__svg {
  display: block;
  width: 100%;
  height: 100%;
}

.team-wave__layer {
  transform-box: fill-box;
  transform-origin: center bottom;
}

.team-wave__layer--back {
  opacity: 0.38;
  animation: team-wave-drift-a 17s ease-in-out infinite;
}

.team-wave__layer--mid {
  opacity: 0.5;
  animation: team-wave-drift-b 12s ease-in-out infinite;
}

.team-wave__layer--front {
  opacity: 0.62;
  animation: team-wave-drift-a 21s ease-in-out infinite reverse;
}

/* Linha de termoclina: um fio de luz fria que separa as massas d'água */
.team-wave__line {
  opacity: 0.5;
  animation: team-wave-line 11s ease-in-out infinite;
}

@keyframes team-wave-line {
  0%, 100% { opacity: 0.28; }
  50%      { opacity: 0.62; }
}

@keyframes team-wave-drift-a {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(-18px, 2px, 0); }
}

@keyframes team-wave-drift-b {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(14px, -2px, 0); }
}

@keyframes team-wave-foam {
  0%, 100% { opacity: 0.45; }
  50%      { opacity: 0.9; }
}

/* Pausa as animações ambientais quando a seção está fora de vista */
.team-section:not(.is-in-view) .team-wave__layer,
.team-section:not(.is-in-view) .team-wave__line,
.team-section:not(.is-in-view) .team-bg__caustics {
  animation-play-state: paused;
}

/* -----------------------------------------------------------------------
   10c. Cabeçalho da seção
   ----------------------------------------------------------------------- */

.team-container {
  position: relative;
  z-index: 1;
  max-width: var(--max-width-content);
  width: 100%;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3.5rem);
}

.team-header {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}

.team-tag {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.35rem 1rem;
  border: 1px solid rgba(98, 220, 228, 0.28);
  border-radius: var(--radius-pill);
  background: rgba(0, 200, 196, 0.08);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-aqua);
}

.team-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.25rem + 2.8vw, 3.8rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--color-cream);
  margin: 0 auto 1.15rem;
  max-width: 18ch;
  text-wrap: balance;
}

.team-lead {
  max-width: 62ch;
  margin: 0 auto;
  font-size: clamp(1rem, 0.94rem + 0.22vw, 1.12rem);
  line-height: 1.65;
  color: var(--color-cream-soft);
  text-wrap: pretty;
}

.team-proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 1.35rem;
  margin-top: clamp(1.35rem, 3vw, 2rem);
}

.team-proof__item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-cream-muted);
}

.team-proof__item strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: none;
  color: var(--color-aqua);
}

.team-proof__item--place strong {
  color: var(--color-amber);
}

/* -----------------------------------------------------------------------
   10e. Responsividade da seção de equipe
   ----------------------------------------------------------------------- */

@media (max-width: 1023px) {
  .team-title {
    max-width: 20ch;
  }
}

@media (max-width: 767px) {
  .team-section {
    padding: clamp(4.5rem, 11vw, 6.5rem) 0 clamp(4rem, 10vw, 6rem);
  }
}

@media (max-width: 479px) {
  .team-title {
    font-size: clamp(1.75rem, 8.6vw, 2.35rem);
    max-width: 17ch;
  }
}

@media (max-width: 639px) {
  .team-proof {
    gap: 0.5rem 0.9rem;
  }

  .team-proof__item {
    font-size: 0.62rem;
  }

  .team-proof__item strong {
    font-size: 1.08rem;
  }

  .team-lead {
    font-size: 0.94rem;
  }
}
