/* ============================================================
   SEÇÃO: ESTÚDIO DE CRIAÇÃO
   Dobra escura — é o contraste do meio da página, e é onde as
   logos coloridas dos provedores rendem (no branco gelo elas
   somem). Acento coral, para não repetir o dourado das outras.
   ============================================================ */

.tbx {
  position: relative;
  background: #0B0B0B;
  color: #EFE9E1;
  overflow: hidden;
  padding: clamp(80px, 10vw, 140px) 20px clamp(64px, 8vw, 108px);
}

/* atmosfera: luz coral no alto, grade fina, sem imagem nenhuma */
.tbx-fundo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 62% 46% at 50% -4%, rgba(212, 165, 116, 0.14), transparent 64%),
    radial-gradient(ellipse 48% 40% at 88% 96%, rgba(212, 165, 116, 0.08), transparent 66%);
}

.tbx-fundo::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask: radial-gradient(ellipse 76% 60% at 50% 42%, #000 28%, transparent 76%);
  mask: radial-gradient(ellipse 76% 60% at 50% 42%, #000 28%, transparent 76%);
}

.tbx-inner { position: relative; z-index: 1; max-width: 1140px; margin: 0 auto; }

/* ---------- Cabeçalho ---------- */
.tbx-head { max-width: 780px; margin: 0 auto clamp(44px, 5.5vw, 70px); text-align: center; }

.tbx-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(212, 165, 116, 0.3);
  background: rgba(212, 165, 116, 0.09);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #E8C49A;
  margin-bottom: 22px;
}

.tbx-title {
  margin: 0;
  font-size: clamp(30px, 4.6vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.038em;
  font-weight: 800;
  color: #FFFFFF;
  text-wrap: balance;
}

.tbx-title em {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-weight: 400;
  color: #E8C49A;
}

.tbx-sub {
  margin: 20px auto 0;
  max-width: 58ch;
  font-size: clamp(15px, 2vw, 17.5px);
  line-height: 1.62;
  color: #A8A29A;
  text-wrap: pretty;
}

/* ============================================================
   O PALCO
   ============================================================ */
.tbx-palco {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(38px, 4.6vw, 58px);
  padding: clamp(52px, 6vw, 82px) 0 clamp(74px, 8.5vw, 116px);
  perspective: 1800px;
}

/* ---------- Anel de provedores ---------- */
/* a cena é o que as logos orbitam: a tela, e só ela */
.tbx-cena {
  position: relative;
  width: min(100%, 860px);
  display: flex;
  justify-content: center;
}

/* elipse maior que a tela nos dois eixos — um círculo puro deixaria
   metade das logos escondidas atrás dela */
.tbx-anel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 124%;
  height: 136%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}

.tbx-anel::before {
  content: "";
  position: absolute;
  inset: 8% 6%;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.06);
}

.tbx-orb {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  animation: tbxFlutua 7s ease-in-out infinite;
  animation-delay: var(--atraso, 0s);
}

.tbx-orb img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

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

/* ---------- Abas dos dois modos ---------- */
.tbx-abas {
  position: relative;
  z-index: 3;
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  flex-wrap: wrap;
  justify-content: center;
}

.tbx-aba {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #A8A29A;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.35s var(--tbEase, cubic-bezier(0.16, 1, 0.3, 1)), color 0.35s ease;
}

.tbx-aba svg { width: 16px; height: 16px; }
.tbx-aba:hover { color: #EFE9E1; }

.tbx-aba.is-ativa {
  background: #FFFFFF;
  color: #1C1A16;
}

/* ---------- A tela ---------- */
.tbx-tela {
  position: relative;
  z-index: 2;
  width: 100%;
  border-radius: 16px;
  padding: 8px;
  background: #17150F;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 60px 120px -50px rgba(0, 0, 0, 0.95),
    0 20px 50px -30px rgba(0, 0, 0, 0.8);
  transform: rotateX(9deg) rotate(-0.4deg);
  transform-style: preserve-3d;
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.tbx-palco:hover .tbx-tela { transform: rotateX(4deg) rotate(0deg); }

/* Os quadros ficam empilhados no mesmo lugar; quem manda na altura da
   moldura é o motor em tb-abas.js. Assim a troca é um cruzamento, e não
   um corte seco. */
.tbx-tela.tem-transicao { height: 0; transition: height 0.62s cubic-bezier(0.16, 1, 0.3, 1); }

.tbx-quadro {
  position: absolute;
  inset: 8px 8px auto 8px;
  display: block;
  width: calc(100% - 16px);
  height: auto;
  border-radius: 10px;
  opacity: 0;
  transform: scale(0.985) translateY(10px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.62s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.tbx-quadro.is-ativo {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* sem o motor (ou sem JS) a primeira captura ainda aparece e dita a altura */
.tbx-tela:not(.tem-transicao) .tbx-quadro.is-ativo {
  position: relative;
  inset: auto;
  width: 100%;
}

/* ---------- Lista de modelos ---------- */
.tbx-lista {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding-top: clamp(26px, 3.4vw, 40px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tbx-lista-rotulo {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: #6f6a63;
}

.tbx-lista-itens {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.tbx-modelo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 13.5px;
  font-weight: 600;
  color: #D8D2C8;
  transition: border-color 0.4s ease, background 0.4s ease;
}

.tbx-modelo:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(212, 165, 116, 0.4);
}

.tbx-modelo img { width: 18px; height: 18px; object-fit: contain; }

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
  .tbx-anel { width: 112%; height: 124%; }
  .tbx-orb { width: 42px; height: 42px; margin: -21px 0 0 -21px; }
  .tbx-orb img { width: 21px; height: 21px; }
  .tbx-tela { transform: none; }
}

@media (max-width: 620px) {
  /* dez logos girando não cabem numa tela de celular: fica o anel,
     e a lista nomeada abaixo continua contando a história inteira */
  .tbx-anel { display: none; }
  .tbx-aba { padding: 9px 14px; font-size: 13px; }
  .tbx-modelo { font-size: 12.5px; padding: 7px 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .tbx-orb { animation: none; }
  .tbx-tela { transition: none; }
  .tbx-quadro { transition: none; }
}
