/* ==========================================================================
   EQUIPE — catavento que lança a equipe num carrossel em arco
   ========================================================================== */

.team {
  --D: clamp(136px, min(16vw, 29svh), 300px);   /* diâmetro do integrante em destaque */
  --stage-h: calc(var(--D) * 1.62 + 60px);
  padding: clamp(72px, 11vh, 140px) 0 clamp(56px, 9vh, 110px);
  overflow: clip;
}

.team__head {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--margin);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: end;
}
.team__title {
  grid-column: 1 / span 7;
  font-size: clamp(40px, min(5.2vw, 10svh), 120px);
  font-weight: 860;
  font-variation-settings: "wdth" 66;
  line-height: .86;
  letter-spacing: -.008em;
  text-transform: uppercase;
}
.team__intro {
  grid-column: 9 / span 4;
  max-width: 36ch;
  color: var(--muted);
  padding-bottom: .4em;
}
.team__intro p + p { margin-top: .5em; color: var(--ink); font-weight: 560; }

/* ---------- Palco ---------- */
.team__stage {
  position: relative;
  height: var(--stage-h);
  margin-top: clamp(16px, 3vh, 40px);
}
.team__wheel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
.team__hint {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  display: grid;
  width: max-content;
  max-width: calc(100% - 2 * var(--margin));
  font-size: var(--t-small);
  color: var(--muted);
  text-align: center;
  z-index: 3;
  pointer-events: none;
}
.team__hint > span { grid-area: 1 / 1; transition: opacity .5s, transform .6s var(--ease-out); }
.team__hint-b { opacity: 0; transform: translateY(8px); }
.team.is-explore .team__hint-a { opacity: 0; transform: translateY(-8px); }
.team.is-explore .team__hint-b { opacity: 1; transform: none; }

.team__track {
  position: absolute;
  inset: 0;
  z-index: 2;
  touch-action: pan-y;
  cursor: grab;
}
.team__track.is-dragging { cursor: grabbing; }
.team__list { position: absolute; inset: 0; }

.member {
  position: absolute;
  left: 0; top: 0;
  width: var(--D);
  height: var(--D);
  transform-origin: 50% 50%;
  will-change: transform, opacity;
}
.member__btn {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  cursor: inherit;
}
.member__btn::before {
  /* anel de destaque do integrante ativo */
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--ink);
  opacity: 0;
  transform: scale(.94);
  transition: opacity .5s, transform .7s var(--ease-out);
  pointer-events: none;
}
.member.is-active .member__btn::before { opacity: 1; transform: none; }
.member__btn:focus-visible { outline-offset: 16px; border-radius: 50%; }

.member__photo {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #E2DFD6;
  will-change: transform;
  -webkit-user-drag: none;
}
.member__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}
.member__cap {
  position: absolute;
  left: 50%;
  top: 100%;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 560;
  font-variation-settings: "wdth" 100;
  white-space: nowrap;
  color: var(--muted);
  transform-origin: 50% 0;
  transform: translateX(-50%) scale(var(--inv, 1));
  opacity: var(--cap, 0);
  pointer-events: none;
}

/* ---------- Informações + controles ---------- */
.team__bottom {
  max-width: var(--max);
  margin: clamp(10px, 2vh, 28px) auto 0;
  padding: 0 var(--margin);
}
.team__info {
  text-align: center;
  min-height: 0;
}
.team__count {
  font-size: var(--t-small);
  font-weight: 560;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.team__count-sep { padding: 0 .25em; color: var(--blue); }
.team__name {
  margin-top: 8px;
  font-size: clamp(26px, min(2.8vw, 6svh), 56px);
  font-weight: 840;
  font-variation-settings: "wdth" 76;
  line-height: .95;
  text-transform: uppercase;
  letter-spacing: -.005em;
}
.imask { display: inline-block; overflow: hidden; vertical-align: top; padding: .3em 0 .08em; margin: -.3em 0 -.08em; }
.imask > span { display: inline-block; }

.team__facts {
  display: flex;
  justify-content: center;
  gap: clamp(22px, 4vw, 64px);
  margin-top: 12px;
}
.team__facts dt {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 2px;
}
.team__facts dd { font-weight: 600; font-variation-settings: "wdth" 104; }

.team__controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(16px, 3vw, 48px);
  margin-top: clamp(18px, 3vh, 40px);
  padding-top: 16px;
  border-top: 1px solid var(--line);
  transition: opacity .6s;
}
.team:not(.is-explore) .team__controls { opacity: .35; pointer-events: none; }
.js .team:not(.is-explore) .team__info { visibility: hidden; }
.team__arrows { display: flex; gap: 10px; }

.team__filter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-width: 0;
}
.team__filter-label { font-size: 13px; color: var(--muted); flex: none; }
.team__filter-scroll {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
  padding: 4px;
  margin: -4px;
}
.team__filter-scroll::-webkit-scrollbar { display: none; }
.chip {
  position: relative;
  flex: none;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 540;
  color: var(--muted);
  white-space: nowrap;
  transition: color .25s;
}
.chip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 5px; height: 5px;
  background: var(--blue);
  transform: translateX(-50%) scale(0) rotate(-90deg);
  transition: transform .5s var(--ease-snap);
}
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { color: var(--ink); }
.chip[aria-pressed="true"]::after { transform: translateX(-50%) scale(1) rotate(0deg); }

.replay {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 2px;
  font-size: 14px;
  font-weight: 600;
}
.replay__pw { width: 20px; height: 20px; color: var(--ink); transition: transform .9s var(--ease-out); }
.replay:hover .replay__pw, .replay:focus-visible .replay__pw { transform: rotate(-360deg); }
.replay:active .replay__pw { transform: rotate(-450deg); transition-duration: .3s; }

/* ---------- Sem JS: lista rolável simples ---------- */
html:not(.js) .team__stage { height: auto; }
html:not(.js) .team__track { position: relative; overflow-x: auto; }
html:not(.js) .team__list { position: relative; display: flex; gap: 24px; padding: 0 var(--margin) 48px; }
html:not(.js) .member { position: relative; flex: none; width: 180px; height: 180px; margin-bottom: 40px; }
html:not(.js) .member__cap { --cap: 1; }
html:not(.js) .team__wheel, html:not(.js) .team__hint, html:not(.js) .team__controls { display: none; }

/* ---------- Tablet ---------- */
@media (max-width: 1023px) {
  .team__title { grid-column: 1 / -1; }
  .team__intro { grid-column: 1 / span 8; margin-top: 24px; }
  .team__controls { grid-template-columns: auto auto; grid-template-areas: "arrows replay" "filter filter"; row-gap: 18px; }
  .team__arrows { grid-area: arrows; }
  .replay { grid-area: replay; justify-self: end; }
  .team__filter { grid-area: filter; justify-content: flex-start; }
}

/* ---------- Celular ---------- */
@media (max-width: 699px) {
  .team { --D: min(50vw, 240px); --stage-h: calc(var(--D) * 1.85 + 40px); }
  .team__intro { grid-column: 1 / -1; }
  .team__name { font-size: clamp(32px, 10vw, 46px); }
  .team__facts { gap: 18px; }
  .team__facts > div { min-width: 0; }
  .team__facts dd { font-size: 15px; }
  .member__cap { font-size: 13px; margin-top: 10px; }
  .round-btn { width: 48px; height: 48px; }
  .team__filter-label { display: none; }
  .team__filter { margin-inline: calc(-1 * var(--margin)); padding-inline: var(--margin); }
  .team__filter-scroll { padding-inline: var(--margin); margin-inline: calc(-1 * var(--margin)); }
}
