/* ─────────────────────────────────────────────
   BLOCO 2 — TICKER LIVE
   Barra horizontal warm-2 sob o hero. 7 números:
   3 live (count-up animado, dot teal pulsante, incrementam a cada 30s)
   4 estáticos (banco, instituições, estados, anos)
   ───────────────────────────────────────────── */

.ticker {
  position: relative;
  z-index: 2;
  background: var(--bg-2);
  border-top: 1px solid rgba(10, 10, 18, 0.05);
  border-bottom: 1px solid rgba(10, 10, 18, 0.05);
  padding: 22px 0;
  /* overflow visível pra tooltip do tk-item--live aparecer acima do
     ticker sem ser cortado. Antes estava overflow:hidden e o tooltip
     ficava cortado. */
  overflow-x: clip;
  overflow-y: visible;
}

.ticker::before {
  /* Brilho terracota fade no topo, ecoa o gradient da headline */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(124, 58, 237, 0.4) 30%, rgba(226, 82, 45, 0.4) 70%, transparent 100%);
}

.ticker__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 28px;
}

/* Variante centralizada com poucos itens (5 stats fixos). Flex em vez de
   grid pra distribuir uniformemente sem deixar uma coluna sobrando. */
.ticker__row--center {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(28px, 4vw, 56px);
}

.ticker__row--center .tk-item {
  align-items: center;
  text-align: center;
}

.ticker__divider {
  width: 1px;
  height: 36px;
  background: linear-gradient(180deg, transparent, rgba(10, 10, 18, 0.18), transparent);
}

.tk-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}

.tk-item__num {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144, "SOFT" 50;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 380;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.tk-item__num sup {
  font-size: 0.55em;
  color: var(--purple);
  font-weight: 500;
  vertical-align: super;
}

.tk-item__lbl {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tk-item--live .tk-item__lbl::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.55);
  animation: pulse 2.4s ease-out infinite;
  flex-shrink: 0;
}

.tk-item--live .tk-item__num {
  color: var(--text);
}

/* Tooltip on hover — "atualizado X seg atrás" */
.tk-item--live::after {
  content: attr(data-tooltip);
  position: absolute;
  top: -38px;
  left: 0;
  z-index: 60;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--text-2);
  background: var(--surface);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(10, 10, 18, 0.08);
  box-shadow: 0 4px 12px -4px rgba(10, 10, 18, 0.15);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out);
}

.tk-item--live:hover::after {
  opacity: 1;
  transform: translateY(0);
}

/* Quando entra no viewport e dispara count-up */
.tk-item__num[data-counting] {
  font-variant-numeric: tabular-nums;
}

/* ─── Responsivo ─────────────────────── */

@media (max-width: 1080px) {
  .ticker__row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: 20px 24px;
  }
  .ticker__divider { display: none; }
}

@media (max-width: 640px) {
  .ticker {
    padding: 18px 0;
  }
  .ticker__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .tk-item__num {
    font-size: 22px;
  }
  .tk-item__lbl {
    font-size: 10px;
  }
}
