/* ============================================================
   SEÇÃO: TRÁFEGO PAGO
   Fundo claro, para alternar com a dobra escura do Estúdio. As abas
   são numeradas — aqui elas contam uma ordem (conectar, criar,
   acompanhar), não modos paralelos como no Estúdio.
   ============================================================ */

.tbt { position: relative; padding: clamp(70px, 9vw, 120px) 20px 0; }

/* ---------- Cabeçalho ---------- */
.tbt-head {
  max-width: 820px;
  padding: clamp(40px, 5vw, 60px) clamp(16px, 3vw, 36px) clamp(26px, 3.4vw, 40px);
}

.tbt-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e4e4e4;
  box-shadow: 0 2px 5px rgba(28, 26, 22, 0.05);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #6f6f6f;
  margin-bottom: 20px;
}

.tbt-eyebrow img { width: 16px; height: 16px; }

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

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

.tbt-sub {
  margin: 18px 0 0;
  max-width: 60ch;
  font-size: clamp(15px, 2vw, 17.5px);
  line-height: 1.62;
  color: #6f6f6f;
  text-wrap: pretty;
}

/* ---------- Palco ---------- */
.tbt-palco {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 3vw, 36px);
  padding: 0 clamp(16px, 3vw, 36px) clamp(48px, 6vw, 76px);
}

/* abas numeradas: são etapas, e por isso ocupam largura igual */
.tbt-abas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tbt-aba {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px solid #e4e4e4;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.45s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.tbt-aba:hover { background: #fff; border-color: #d2cdc4; }

.tbt-aba.is-ativa {
  background: #1C1A16;
  border-color: #1C1A16;
}

.tbt-aba-num {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #f1efeb;
  color: #8a8378;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  transition: background 0.45s ease, color 0.45s ease;
}

.tbt-aba.is-ativa .tbt-aba-num { background: rgba(255, 255, 255, 0.12); color: #E8C49A; }

.tbt-aba-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.tbt-aba-txt b {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1C1A16;
  transition: color 0.45s ease;
}

.tbt-aba-txt i {
  font-style: normal;
  font-size: 13px;
  line-height: 1.35;
  color: #8a8378;
  transition: color 0.45s ease;
}

.tbt-aba.is-ativa .tbt-aba-txt b { color: #FFFFFF; }
.tbt-aba.is-ativa .tbt-aba-txt i { color: #A8A29A; }

/* ---------- A tela ---------- */
.tbt-cena { position: relative; }

.tbt-brilho {
  position: absolute;
  inset: -8% -4% -14%;
  background: radial-gradient(ellipse 58% 52% at 50% 46%, rgba(24, 119, 242, 0.12), transparent 68%);
  filter: blur(26px);
  pointer-events: none;
}

.tbt-tela {
  position: relative;
  border-radius: 18px;
  padding: 8px;
  background: #0B0B0B;
  border: 1px solid rgba(28, 26, 22, 0.14);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 50px 100px -46px rgba(28, 26, 22, 0.6),
    0 16px 40px -28px rgba(28, 26, 22, 0.4);
  transform: perspective(2000px) rotateX(6deg);
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.tbt-cena:hover .tbt-tela { transform: perspective(2000px) rotateX(2deg); }

/* 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. */
.tbt-tela.tem-transicao { height: 0; transition: height 0.62s cubic-bezier(0.16, 1, 0.3, 1); }

.tbt-quadro {
  position: absolute;
  inset: 8px 8px auto 8px;
  display: block;
  width: calc(100% - 16px);
  height: auto;
  border-radius: 11px;
  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;
}

.tbt-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 */
.tbt-tela:not(.tem-transicao) .tbt-quadro.is-ativo {
  position: relative;
  inset: auto;
  width: 100%;
}

/* ---------- Três cards, com arte própria ---------- */
.tbt-provas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: clamp(34px, 4.4vw, 52px) clamp(16px, 3vw, 36px) clamp(40px, 5vw, 62px);
}

.tbt-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid #e4e4e4;
  transition:
    background 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.tbt-card:hover { background: #ffffff; border-color: #d2cdc4; }

.tbt-card-topo { padding: clamp(26px, 3vw, 34px) clamp(22px, 2.6vw, 30px) 0; }

.tbt-card h3 {
  margin: 0 0 10px;
  font-size: clamp(17px, 2.1vw, 21px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #1C1A16;
  line-height: 1.16;
  text-wrap: balance;
}

.tbt-card p {
  margin: 0;
  font-size: clamp(14px, 1.8vw, 15.5px);
  line-height: 1.6;
  color: #6f6f6f;
  text-wrap: pretty;
}

.tbt-arte {
  width: 100%;
  height: auto;
  margin-top: auto;
  padding: clamp(18px, 2.4vw, 26px) 0 0;
  overflow: visible;
}

/* 01 — as duas pontas ligadas por uma conexão verificada */
.of-lado rect {
  fill: #ffffff;
  stroke: #e4e4e4;
  stroke-width: 1.6;
  filter: drop-shadow(0 10px 20px rgba(28, 26, 22, 0.09));
}

.of-lado text {
  fill: #8a8378;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.of-fio {
  fill: none;
  stroke: #c5c0b7;
  stroke-width: 2;
  stroke-dasharray: 3 8;
  stroke-linecap: round;
  animation: ofFio 2.4s linear infinite;
}

.of-escudo path:first-child {
  fill: #1C1A16;
  stroke: none;
  filter: drop-shadow(0 12px 22px rgba(28, 26, 22, 0.28));
}

.of-check { fill: none; stroke: #7BA88C; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.of-escudo { transform-box: fill-box; transform-origin: center; animation: ofEscudo 3.4s ease-in-out infinite; }

@keyframes ofFio    { to { stroke-dashoffset: -22; } }
@keyframes ofEscudo { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* 02 — a mesma operação nas duas telas */
.te-monitor > rect:first-child,
.te-celular > rect:first-child {
  fill: #ffffff;
  stroke: #e4e4e4;
  stroke-width: 1.6;
  filter: drop-shadow(0 12px 22px rgba(28, 26, 22, 0.1));
}

.te-celular > rect:first-child { fill: #1C1A16; stroke: rgba(255, 255, 255, 0.16); }
.te-barra { fill: none; stroke: #ededed; stroke-width: 1.6; }
.te-celular .te-barra { stroke: rgba(255, 255, 255, 0.12); }
.te-linha { fill: #ececec; }
.te-celular .te-linha { fill: rgba(255, 255, 255, 0.16); }
.te-cta { fill: rgba(232, 196, 154, 0.6); }
.te-graf rect { fill: #ddd8d0; animation: teBarra 3.4s ease-in-out infinite; }
.te-graf rect:nth-child(2) { animation-delay: 0.25s; }
.te-graf rect:nth-child(3) { animation-delay: 0.5s; }

.te-sinc {
  fill: none;
  stroke: #c5c0b7;
  stroke-width: 2;
  stroke-dasharray: 3 8;
  stroke-linecap: round;
  animation: ofFio 2.2s linear infinite;
}

@keyframes teBarra { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }

/* 03 — dois caminhos, um destino */
.ca-via {
  fill: none;
  stroke: #c5c0b7;
  stroke-width: 2;
  stroke-dasharray: 4 9;
  stroke-linecap: round;
  animation: ofFio 2.6s linear infinite;
}

.ca-via-b { animation-delay: 0.7s; }

.ca-porta rect {
  fill: #ffffff;
  stroke: #e4e4e4;
  stroke-width: 1.6;
  filter: drop-shadow(0 8px 16px rgba(28, 26, 22, 0.09));
}

.ca-porta path { fill: none; stroke: #b9b4ab; stroke-width: 2; stroke-linecap: round; }
.ca-raio { fill: rgba(232, 196, 154, 0.85); stroke: #B8956A; stroke-width: 1.4; stroke-linejoin: round; }
.ca-porta { transform-box: fill-box; transform-origin: center; animation: teBarra 3.6s ease-in-out infinite; }
.ca-porta-b { animation-delay: 0.9s; }

.ca-destino rect { fill: #1C1A16; filter: drop-shadow(0 14px 26px rgba(28, 26, 22, 0.3)); }

.ca-destino text {
  fill: #E8C49A;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------- Plataformas ---------- */
.tbt-redes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 18px;
  padding: 0 clamp(16px, 3vw, 36px) clamp(60px, 7vw, 96px);
}

.tbt-redes-rotulo {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: #a49c8f;
}

.tbt-redes-itens { display: flex; flex-wrap: wrap; gap: 8px; }

.tbt-rede {
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e4e4e4;
  font-size: 13.5px;
  font-weight: 600;
  color: #4a453e;
}

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
  .tbt-abas { grid-template-columns: 1fr; }
  .tbt-provas { grid-template-columns: 1fr; gap: 14px; }
  .tbt-tela { transform: none; }
  .tbt-aba-txt i { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tbt-tela, .tbt-quadro, .tbt-aba { transition: none; }
  .of-fio, .of-escudo, .te-graf rect, .te-sinc, .ca-via, .ca-porta { animation: none; }
}
