/* ============================================================
   Paulista Invest — navegação
   ============================================================ */

/* barra de progresso de leitura */
.progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: var(--gold); z-index: 120; transition: width .08s linear;
}

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: transparent;
  transition: background .28s ease, border-color .28s ease, box-shadow .28s ease;
  border-bottom: 1px solid transparent;
}
.nav__in {
  display: flex; align-items: center; justify-content: space-between;
  height: 74px; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut);
}

/* estado: rolado */
.nav.is-scrolled { background: rgba(245,247,242,.9); backdrop-filter: blur(10px) saturate(1.1); -webkit-backdrop-filter: blur(10px) saturate(1.1); border-bottom-color: var(--line); box-shadow: 0 10px 30px -22px rgba(11,59,59,.55); }
/* sobre o hero (topo) a nav é clara sobre teal */
.nav:not(.is-scrolled) .brand__name,
.nav:not(.is-scrolled) .nav__link { color: var(--tx-on-ink); }
.nav:not(.is-scrolled) .nav__link:hover { color: #fff; }
.nav.is-scrolled .brand__name,
.nav.is-scrolled .nav__link { color: var(--ink); }

/* marca */
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__mark { width: 38px; height: 38px; border-radius: var(--r); display: block; }
.brand__name { font-family: var(--f-disp); font-weight: 700; font-size: 1.12rem; letter-spacing: -.02em; line-height: 1; }
.brand__name span { font-weight: 500; color: var(--gold); }

/* links */
.nav__links { display: flex; align-items: center; gap: 22px; }
.nav__link { font-family: var(--f-body); font-size: .93rem; font-weight: 500; transition: color .18s ease; }
.nav__cta { padding: 10px 18px; font-size: .9rem; }
.nav:not(.is-scrolled) .nav__cta { background: var(--gold); color: var(--ink); border-color: var(--gold); }

/* toggle mobile */
.nav__burger { display: none; width: 42px; height: 42px; border: 1px solid currentColor; border-radius: var(--r-btn); background: none; position: relative; color: inherit; }
.nav:not(.is-scrolled) .nav__burger { color: var(--tx-on-ink); }
.nav.is-scrolled .nav__burger { color: var(--ink); }
.nav__burger span, .nav__burger::before, .nav__burger::after {
  content: ""; position: absolute; left: 11px; width: 18px; height: 2px; background: currentColor; transition: transform .25s ease, opacity .2s ease;
}
.nav__burger span { top: 20px; }
.nav__burger::before { top: 14px; }
.nav__burger::after { top: 26px; }
body.menu-open .nav__burger span { opacity: 0; }
body.menu-open .nav__burger::before { transform: translateY(6px) rotate(45deg); }
body.menu-open .nav__burger::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav__burger { display: block; }
  .nav__links {
    position: fixed; inset: 74px 0 auto 0;
    background: var(--paper); flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gut) 26px; border-bottom: 1px solid var(--line);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: transform .25s ease, opacity .25s ease;
  }
  body.menu-open .nav__links { transform: none; opacity: 1; pointer-events: auto; }
  .nav__link, .nav.is-scrolled .nav__link, .nav:not(.is-scrolled) .nav__link { color: var(--ink); padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 1.02rem; }
  .nav__cta { margin-top: 16px; width: 100%; }
  .nav:not(.is-scrolled) .nav__cta { background: var(--ink); color: var(--paper); border-color: var(--ink); }
}

/* skip link */
.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--r-btn); }
.skip:focus { left: 12px; }

/* FAB WhatsApp */
.fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 56px; height: 56px; border-radius: 50%; background: #128c7e;
  display: grid; place-items: center; box-shadow: 0 10px 26px -8px rgba(0,0,0,.5);
  transform: translateY(120px); transition: transform .3s ease, background .2s ease;
}
.fab.is-vis { transform: none; }
.fab:hover { background: #0f7568; }
.fab svg { width: 30px; height: 30px; fill: #fff; }

/* ---- CTA da nav em pílula (menos "quadradão") ---- */
.nav__cta { border-radius: 999px; padding: 10px 20px; }

/* ---- Barra de IA do consórcio (parece uma busca; abre o chat) ---- */
.nav__ia {
  display: inline-flex; align-items: center; gap: 9px;
  height: 40px; padding: 0 12px 0 14px; border-radius: 999px;
  border: 1px solid transparent; background: transparent; cursor: pointer;
  font-family: var(--f-body); font-size: .86rem; line-height: 1;
  transition: border-color .2s ease, background .2s ease, color .2s ease, transform .2s ease;
}
.nav__ia:hover { transform: translateY(-1px); }
.nav__ia-ic { width: 16px; height: 16px; flex-shrink: 0; opacity: .85; }
.nav__ia-ph { transition: opacity .25s ease; max-width: 190px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: left; }
.nav__ia-badge {
  font-family: var(--f-mono); font-size: .6rem; font-weight: 600; letter-spacing: .08em;
  background: var(--gold); color: #23170a; padding: 3px 7px; border-radius: 999px; flex-shrink: 0;
}
.nav:not(.is-scrolled) .nav__ia { color: var(--tx-on-ink-mut); border-color: rgba(255,255,255,.26); background: rgba(255,255,255,.06); }
.nav:not(.is-scrolled) .nav__ia:hover { color: #fff; border-color: rgba(255,255,255,.55); }
.nav.is-scrolled .nav__ia { color: var(--tx-mut); border-color: var(--line-strong); background: #fff; }
.nav.is-scrolled .nav__ia:hover { color: var(--ink); border-color: var(--gold); }

/* telas médias: some o texto rotativo, vira pílula compacta com ícone */
@media (max-width: 1120px) and (min-width: 901px) {
  .nav__ia-ph { display: none; }
  .nav__ia { padding: 0 11px; }
  .nav__links { gap: 16px; }
}

/* ---- Botão de IA sempre visível na barra (só no mobile) ---- */
.nav__ia-m {
  display: none; align-items: center; gap: 8px; height: 40px; padding: 0 8px 0 12px;
  border-radius: 999px; border: 1px solid transparent; background: transparent; cursor: pointer;
  font-family: var(--f-body); font-size: .9rem; line-height: 1; color: inherit;
}
.nav__ia-m svg { width: 17px; height: 17px; flex-shrink: 0; }

@media (max-width: 900px) {
  /* a IA sai de dentro do sanduíche e aparece fixa na barra, ao lado do menu */
  .nav__ia { display: none; }
  .nav__ia-m { display: inline-flex; margin-left: auto; margin-right: 6px; }
  .nav:not(.is-scrolled) .nav__ia-m { color: var(--tx-on-ink); border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.08); }
  .nav.is-scrolled .nav__ia-m { color: var(--ink); border-color: var(--line-strong); background: #fff; }
}
/* telas bem estreitas: fica só o ícone + selo "IA" (não briga com o logo) */
@media (max-width: 400px) {
  .nav__ia-m-tx { display: none; }
  .nav__ia-m { padding: 0 8px; }
}
