/* Cabeçalho: logo + só "Dúvidas", "Suporte" (e-mail) e "Contato" (Instagram, Facebook, e-mail).
   Transparente no topo; vidro ao rolar (is-solido); esconde ao descer e volta ao subir (src/ui/topo.js).
   Menus (skill-site-avanti, references/03): abrem ao passar o mouse E ao clicar; o clique fixa; Esc, clique fora ou sair fecham.
   Celular: botão "Menu" abre um painel com tudo aberto. */
.topo { position: fixed; z-index: 60; top: 10px; left: 0; right: 0; pointer-events: none; transition: translate .5s var(--ease); }
.topo.is-escondido:not(.is-aberto) { translate: 0 calc(-100% - 24px); }
.topo__in { position: relative; pointer-events: auto; display: flex; align-items: center; gap: 24px; margin-inline: max(calc(var(--gutter) - 14px), calc((100% - var(--max)) / 2 + var(--gutter) - 14px));
  min-height: 66px; padding: 8px 10px 8px 14px; border-radius: 999px; }
.topo__in::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; opacity: 0; transition: opacity .4s ease;
  background: rgba(2, 10, 34, .62); -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5); box-shadow: var(--edge), 0 18px 40px -22px rgba(1, 5, 16, .9); }
.topo.is-solido .topo__in::before { opacity: 1; }
.topo__logo { display: flex; align-items: center; min-height: 48px; flex: none; }
.topo__logo img { width: clamp(190px, 17vw, 236px); height: auto; aspect-ratio: 534 / 91; }

/* links e botões do topo */
.topo__nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.topo__link { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; border: 0; background: none; cursor: pointer;
  font: 600 .9375rem/1 var(--font-body); text-decoration: none; color: rgba(255, 255, 255, .8); transition: color .25s ease; }
.topo__link::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 10px; height: 1.5px; background: var(--pf-red); scale: 0 1; transform-origin: 100% 50%; transition: scale .45s var(--ease); }
.topo__link:hover, .topo__link:focus-visible, .topo__link[aria-expanded="true"] { color: var(--pf-white); }
.topo__link:hover::after, .topo__link:focus-visible::after, .topo__link[aria-expanded="true"]::after { scale: 1 1; transform-origin: 0 50%; }
.menu__btn::before { content: ""; order: 2; width: 7px; height: 7px; margin-top: -3px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; rotate: 45deg; transition: rotate .35s var(--ease), margin .35s var(--ease); }
.menu__btn[aria-expanded="true"]::before { rotate: -135deg; margin-top: 3px; }

/* menu suspenso */
.menu { position: relative; }
.menu__pop { position: absolute; right: 0; top: calc(100% + 10px); min-width: 260px; display: grid; gap: 2px; padding: 8px; border-radius: 20px; color: var(--pf-ink);
  background: linear-gradient(180deg, var(--pf-white), var(--pf-sky-pale)); box-shadow: 0 30px 60px -24px rgba(1, 5, 16, .9), 0 0 0 1px rgba(10, 42, 110, .08);
  opacity: 0; visibility: hidden; translate: 0 -8px; transition: opacity .25s ease, translate .35s var(--ease), visibility 0s linear .35s; }
.menu__pop::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; } /* ponte: o cursor atravessa o vão sem fechar */
.menu.is-aberto .menu__pop { opacity: 1; visibility: visible; translate: 0 0; transition: opacity .25s ease, translate .35s var(--ease), visibility 0s; }
.menu__item { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px 8px 8px; border-radius: 14px; text-decoration: none; color: inherit; transition: background-color .2s ease; }
.menu__item:hover, .menu__item:focus-visible { background: rgba(10, 42, 110, .07); }
.menu__item:focus-visible { outline: 2px solid var(--pf-blue); outline-offset: -2px; }
.menu__item > .ico { width: 40px; height: 40px; padding: 10px; border-radius: 50%; background: var(--pf-blue); color: var(--pf-white); }
.menu__item b { display: block; font-size: .9375rem; font-weight: 600; }
.menu__item small { display: block; font-size: .8125rem; color: var(--pf-slate); overflow-wrap: anywhere; }

/* botão "Menu" (só celular) */
.topo__abrir { display: none; margin-left: auto; align-items: center; gap: 10px; min-height: 46px; padding: 0 8px 0 18px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(181, 212, 244, .1); box-shadow: inset 0 0 0 1px rgba(181, 212, 244, .25); color: var(--pf-white); font: 600 .9375rem/1 var(--font-body); }
.topo__abrir i { position: relative; width: 32px; height: 32px; border-radius: 50%; background: var(--pf-white); }
.topo__abrir i::before, .topo__abrir i::after { content: ""; position: absolute; left: 10px; right: 10px; height: 1.6px; background: var(--pf-blue); border-radius: 2px; transition: translate .35s var(--ease), rotate .35s var(--ease); }
.topo__abrir i::before { top: 12px; } .topo__abrir i::after { top: 18px; }
.topo.is-aberto .topo__abrir i::before { translate: 0 3px; rotate: 45deg; }
.topo.is-aberto .topo__abrir i::after { translate: 0 -3px; rotate: -45deg; }

@media (max-width: 639px) {
  .topo { top: 6px; }
  .topo__in { flex-wrap: wrap; margin-inline: 8px; min-height: 58px; padding: 5px 6px 5px 12px; gap: 0 12px; border-radius: 29px; transition: border-radius .3s ease; }
  .topo__in::before { opacity: 1; }
  .topo.is-aberto .topo__in { border-radius: 24px; }
  .topo__logo img { width: min(176px, 46vw); }
  .topo__abrir { display: inline-flex; }
  /* painel: tudo aberto, em lista */
  .topo__nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; margin: 6px 0 4px; padding-top: 8px; border-top: 1px solid var(--line-dark); }
  .topo.is-aberto .topo__nav { display: flex; }
  .topo__link { min-height: 52px; padding: 0 6px; font-size: 1.0625rem; }
  .topo__link::after { display: none; }
  .menu__btn { pointer-events: none; color: var(--muted-on-dark); font-size: .8125rem; min-height: 36px; margin-top: 6px; }
  .menu__btn::before { display: none; }
  .menu__pop { position: static; min-width: 0; opacity: 1; visibility: visible; translate: none; transition: none; padding: 4px; margin-bottom: 4px; border-radius: 18px; }
  .menu__pop::before { display: none; }
}
@media (prefers-reduced-motion: reduce) { .topo, .topo__in::before, .menu__pop, .topo__link::after { transition: none; } }
