/* Keep Start — menu hamburger (todas as telas).
   Substitui os links inline do cabeçalho por um botão de menu + painel deslizante.
   Progressive enhancement: sem JS (sem .js-nav) os links inline continuam visíveis. */

/* Botão de menu no cabeçalho — só aparece quando o JS está ativo */
.nav-burger { display: none; }
html.js-nav .nav-burger {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--fg-0, #f4f4f5);
  border: 1px solid var(--line, rgba(255,255,255,0.14));
  border-radius: 10px; height: 40px; padding: 0 14px;
  font: inherit; font-size: 14px; line-height: 1; cursor: pointer;
  transition: border-color .18s, background .18s, color .18s;
}
html.js-nav .nav-burger:hover { border-color: var(--accent, #f97316); color: #fff; }
html.js-nav .nav-burger svg { display: block; }
.nav-burger-label { font-weight: 500; letter-spacing: -0.01em; }
@media (max-width: 380px) { .nav-burger-label { display: none; } }

/* Esconde a navegação inline (links) quando o menu está ativo */
html.js-nav .nav-links { display: none !important; }

/* CTAs reexibidas no desktop (empurradas para a direita) */
html.js-nav .nav-right { display: flex !important; align-items: center; gap: 14px; margin-left: auto; }

/* Barra utilitária: atalhos entre o logo e o grupo Menu+CTA (desktop) */
html.js-nav .nav-inner { justify-content: flex-start; gap: 20px; }
html.js-nav .nav-util { display: inline-flex; align-items: center; gap: 20px; }
html.js-nav .nav-util a { display: inline-flex; align-items: center; gap: 7px; color: var(--fg-1, #c9ccd2); text-decoration: none; font-size: 14px; white-space: nowrap; transition: color .18s; }
html.js-nav .nav-util a:hover { color: var(--fg-0, #f6f7f8); }
html.js-nav .nav-util a svg { flex: 0 0 auto; }
html.js-nav .nav-util-car svg { color: var(--accent, #f97316); }
html.js-nav .nav-util-wa svg { color: #25D366; }

/* Desktop: agrupa o botão Menu junto do CTA "Quero o meu", ambos na ponta direita
   (por padrão o Menu ficava colado no logo, longe do CTA). Só o Menu carrega o
   margin-left:auto agora — empurra o par {Menu, CTA} inteiro pra direita. */
@media (min-width: 901px) {
  html.js-nav .nav-util { order: 1; }
  html.js-nav .nav-burger { order: 2; margin-left: auto; }
  html.js-nav .nav-right { order: 3; margin-left: 0; }
}

/* Mobile: barra enxuta — esconde atalhos e o "Como funciona"; mantém logo + Menu + "Quero o meu" */
@media (max-width: 900px) {
  html.js-nav .nav-util { display: none; }
  html.js-nav .nav-right .btn-ghost { display: none; }
  /* Centraliza o botão Menu no vão entre o logo e o CTA (sem o gap fixo que o
     empurrava para junto do logo). Dois margin-left:auto (burger + nav-right)
     dividem o espaço livre igualmente. */
  html.js-nav .nav-inner { gap: 0; }
  html.js-nav .nav-burger { margin-left: auto; }
}

/* Scrim + painel — overlay dark, idêntico em todas as páginas */
.nav-scrim {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0,0,0,0.55);
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.nav-scrim.open { opacity: 1; visibility: visible; }

.nav-drawer {
  position: fixed; top: 0; right: 0; z-index: 91;
  height: 100dvh; width: min(360px, 86vw);
  background: #101216;
  border-left: 1px solid rgba(255,255,255,0.10);
  transform: translateX(100%); visibility: hidden;
  transition: transform .3s cubic-bezier(.4,0,.2,1), visibility .3s;
  display: flex; flex-direction: column; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.nav-drawer.open { transform: translateX(0); visibility: visible; }

.nav-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 10px 0 18px; flex: 0 0 auto;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-drawer-title { font-size: 12px; letter-spacing: 0.12em; color: #80818a; text-transform: uppercase; }
.nav-drawer-close {
  background: transparent; border: none; color: #f4f4f5;
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; border-radius: 8px;
}
.nav-drawer-close:hover { background: rgba(255,255,255,0.06); }

.nav-drawer-links { display: flex; flex-direction: column; padding: 6px 0; }
.nav-drawer-links a {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 18px; color: #e9e9ec; text-decoration: none;
  font-size: 15px; line-height: 1.2;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background .15s, color .15s;
}
.nav-drawer-links a:last-child { border-bottom: none; }
.nav-drawer-links a:hover,
.nav-drawer-links a:focus-visible { background: rgba(255,255,255,0.05); color: #fff; }
.nav-drawer-links a.is-active { color: var(--accent, #f97316); }
.nav-drawer-links svg { flex: 0 0 auto; color: var(--accent, #f97316); }

.nav-drawer-cta {
  margin-top: auto; flex: 0 0 auto;
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px; border-top: 1px solid rgba(255,255,255,0.08);
}
.nav-drawer-buy {
  background: var(--accent, #f97316); color: var(--accent-ink, #1a0e05);
  font-weight: 600; text-align: center; text-decoration: none;
  padding: 13px; border-radius: 10px; font-size: 14px;
}
.nav-drawer-buy:hover { filter: brightness(1.06); }
.nav-drawer-wa {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #25D366; color: #ffffff;
  font-weight: 500; text-align: center; text-decoration: none; padding: 13px; border-radius: 10px; font-size: 14px;
}
.nav-drawer-wa:hover { background: #1fb457; color: #ffffff; }

body.nav-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .nav-scrim, .nav-drawer { transition: none; }
}

/* ——— Área de toque ≥44px (item 4 da re-auditoria) ———
   O pseudo-elemento é position:absolute (não participa do flex, não afeta gap)
   e não pinta nada — só expande a área clicável. Zero mudança visual. */
html.js-nav .nav-util a, html.js-nav .nav-burger, .nav-links a { position: relative; }
html.js-nav .nav-util a::after, html.js-nav .nav-burger::after, .nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0;
  top: 50%; height: 44px; transform: translateY(-50%);
}

.nav-drawer-close { position: relative; }
.nav-drawer-close::after { content: ''; position: absolute;
  width: 44px; height: 44px; top: 50%; left: 50%; transform: translate(-50%,-50%); }
