/* ═══════════════════════════════════════════════════════════════
 * COMPONENT — Topbar (nav fixa do topo)
 *
 * Usada em: index.html, 404.html. Pode reusar via partial JS
 * (assets/js/modules/topbar.js) que injeta o HTML na página.
 * ═══════════════════════════════════════════════════════════════ */

.nav {
  position: fixed; top:0; left:0; right:0;
  z-index: 100;
  padding: 14px 0;
  transition: background .3s, backdrop-filter .3s;
}
.nav.scrolled {
  background: rgba(10,10,10,.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--b1);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Logo: 3 modos — SVG inline, IMG, fallback texto */
.logo {
  font-weight: 900;
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: var(--tx);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.logo-dot {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--or), var(--or2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem; font-weight: 900;
  color: #fff;
  flex-shrink: 0;
}
.logo-img { display:none; max-height:30px; max-width:140px; width:auto; height:auto; object-fit:contain; }
.logo-svg { display:none; max-height:30px; max-width:140px; line-height:0; }
.logo-svg svg { max-height:30px; max-width:140px; width:auto; height:auto; display:block; }
.logo-fallback { display:inline-flex; align-items:center; gap:8px; }

/* Links de navegação */
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 28px);
}
.nav-links a {
  font-size: .8rem;
  font-weight: 600;
  color: var(--tx2);
  text-decoration: none;
  transition: color .2s;
}
/* Só links "normais" ficam laranja no hover — botões (.btn-nav) mantêm a
   própria cor (senão o "Teste grátis" ficava laranja/lavado no hover/clique). */
.nav-links a:not(.btn-nav):hover { color: var(--or); }

/* CTAs da topbar — regras escopadas em .nav-links pra ganharem de
   `.nav-links a` (senão o texto do botão herda a cor dos links e o
   "Teste grátis" fica escuro/ilegível no laranja). Formato pill. */
.nav-links .btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .78rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.nav-links .btn-enter {
  background: var(--s2);
  color: var(--tx);
  border: 1px solid var(--b2);
}
.nav-links .btn-enter:hover { border-color: var(--or); color: var(--or); }
.nav-links .btn-cta {
  background: linear-gradient(135deg, var(--or), var(--or2));
  color: #fff;
  box-shadow: 0 4px 20px rgba(232,73,30,.3);
}
.nav-links .btn-cta:hover,
.nav-links .btn-cta:focus,
.nav-links .btn-cta:active {
  color: #fff;   /* trava a letra branca no hover/foco/clique */
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(232,73,30,.4);
}
/* Seta que desliza pra dentro no hover (mesma pegada do resto do site).
   margin-left:-6px (escondida) cancela o gap do flex. */
.btn-nav .tb-arw {
  display: inline-flex; align-items: center; overflow: hidden;
  width: 0; opacity: 0; margin-left: -6px; transform: translateX(-5px);
  transition: width .26s cubic-bezier(.4,0,.2,1), opacity .18s ease, transform .26s cubic-bezier(.4,0,.2,1), margin .26s cubic-bezier(.4,0,.2,1);
}
.btn-nav .tb-arw svg { width: 13px; height: 13px; display: block; }
.nav-links .btn-nav:hover .tb-arw, .nav-links .btn-nav:focus-visible .tb-arw {
  width: 13px; opacity: 1; margin-left: 0; transform: translateX(0);
}

/* Botão hamburger mobile */
.mob-menu {
  display: none;
  background: none;
  border: none;
  color: var(--tx);
  font-size: 1.3rem;
  cursor: pointer;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .mob-menu  { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(10,10,10,.97);
    backdrop-filter: blur(20px);
    padding: 20px;
    gap: 16px;
    border-bottom: 1px solid var(--b1);
  }
}
@media (max-width: 600px) {
  .logo-img, .logo-svg { max-height:26px; max-width:120px; }
  .logo-svg svg { max-height:26px; max-width:120px; }
}
