/* ==========================================================================
   VionTech Header Component
   ------------------------------------------------------------------------
   Tipografia: "Chakra Petch" (títulos/logo/nav, pegada tech/HUD de jogo)
   + "Space Grotesk" (texto de apoio, geométrica, legível).
   Importe no <head> antes deste arquivo:

   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link href="https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@500;600;700&family=Space+Grotesk:wght@400;500&display=swap" rel="stylesheet">

   IMPORTANTE: a página que inclui este header PRECISA ter no <head>:
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   Sem isso, as media queries de mobile abaixo não funcionam corretamente.
   ========================================================================== */

:root {
  --vt-purple-500: #7C3AED;
  --vt-purple-600: #6D28D9;
  --vt-purple-700: #5B21B6;
  --vt-ink: #14141A;
  --vt-gray-600: #55555F;
  --vt-gray-300: #E4E4EA;
  --vt-gray-100: #F7F7FA;
  --vt-white: #FFFFFF;
  --vt-header-height: 72px;
  --vt-radius: 10px;
  --vt-transition: 140ms cubic-bezier(0.2, 0, 0.2, 1);
  --vt-shadow-menu: 0 16px 40px -12px rgba(20, 20, 26, 0.18), 0 4px 12px -4px rgba(20, 20, 26, 0.08);

  /* Tipografia */
  --vt-font-display: "Chakra Petch", "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --vt-font: "Space Grotesk", "Chakra Petch", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Efeito 2D dos botões (estilo "game UI": sombra sólida deslocada) */
  --vt-btn-radius: 8px;
  --vt-btn-border: 2px;
  --vt-shadow-ink: 4px 4px 0 0 var(--vt-ink);
  --vt-shadow-ink-hover: 6px 6px 0 0 var(--vt-ink);
  --vt-shadow-ink-active: 1px 1px 0 0 var(--vt-ink);
  --vt-shadow-purple: 4px 4px 0 0 var(--vt-purple-700);
  --vt-shadow-purple-hover: 6px 6px 0 0 var(--vt-purple-700);
  --vt-shadow-purple-active: 1px 1px 0 0 var(--vt-purple-700);

  /* Camadas (z-index) do menu mobile */
  --vt-z-header: 1000;
  --vt-z-overlay: 900;
  --vt-z-drawer: 1100;
}

.vt-header * {
  box-sizing: border-box;
}

/* ---------- Header shell (fixed) ---------- */
.vt-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--vt-z-header);
  height: var(--vt-header-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--vt-gray-300);
  font-family: var(--vt-font);
}

.vt-header-spacer {
  height: var(--vt-header-height);
}

.vt-header__inner {
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.vt-logo__text--accent {
    background: linear-gradient(
        90deg,
        #20e0c2 0%,
        #6d3ef5 100%
    );

    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* ---------- Logo ---------- */
.vt-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--vt-ink);
  flex-shrink: 0;
}

.vt-logo__mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.vt-logo__mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.vt-logo__mark svg {
  width: 20px;
  height: 20px;
  color: var(--vt-white);
}

.vt-logo__text {
  font-family: var(--vt-font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* ---------- Painel mobile (wrapper de nav + ações) ----------
   Diferente da versão anterior, este wrapper é SEMPRE um flex real
   (nunca "display: contents"), tanto no desktop quanto no mobile.
   No desktop ele só reaproveita o layout do header (nav centralizada,
   ações à direita). No mobile, vira o painel/drawer que desliza
   da lateral. Essa abordagem é mais previsível entre navegadores. */
.vt-mobile-drawer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  gap: 24px;
  min-width: 0;
}

/* Botão de fechar (X) do drawer — só existe visualmente no mobile */
.vt-drawer-close {
  display: none;
}

/* ---------- Nav (desktop) ---------- */
.vt-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.vt-nav__item {
  position: relative;
}

.vt-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: var(--vt-radius);
  font-family: var(--vt-font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--vt-gray-600);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--vt-transition), background var(--vt-transition);
}

.vt-nav__link:hover {
  color: var(--vt-ink);
  background: var(--vt-gray-100);
}

.vt-nav__item.is-open .vt-nav__link {
  color: var(--vt-ink);
  background: var(--vt-gray-100);
}

.vt-nav__chevron {
  width: 15px;
  height: 15px;
  transition: transform var(--vt-transition);
}

.vt-nav__item.is-open .vt-nav__chevron {
  transform: rotate(180deg);
}

/* ---------- Actions (desktop) ---------- */
.vt-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.vt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--vt-font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 10px 22px;
  border-radius: var(--vt-btn-radius);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  border: var(--vt-btn-border) solid var(--vt-ink);
  transform: translate(0, 0);
  transition: transform 100ms cubic-bezier(0.2, 0, 0.2, 1),
              box-shadow 100ms cubic-bezier(0.2, 0, 0.2, 1),
              background 100ms ease, color 100ms ease;
}

.vt-btn--ghost {
  background: var(--vt-white);
  color: var(--vt-ink);
  box-shadow: var(--vt-shadow-ink);
}

.vt-btn--ghost:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--vt-shadow-ink-hover);
  background: var(--vt-gray-100);
}

.vt-btn--ghost:active {
  transform: translate(3px, 3px);
  box-shadow: var(--vt-shadow-ink-active);
}

.vt-btn--solid {
  background: var(--vt-purple-500);
  border-color: var(--vt-purple-700);
  color: var(--vt-white);
  box-shadow: var(--vt-shadow-purple);
}

.vt-btn--solid:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--vt-shadow-purple-hover);
  background: var(--vt-purple-600);
}

.vt-btn--solid:active {
  transform: translate(3px, 3px);
  box-shadow: var(--vt-shadow-purple-active);
}

/* ---------- Dropdown Mega Menu ---------- */
.vt-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  width: min(560px, 90vw);
  background: var(--vt-white);
  border: 1px solid var(--vt-gray-300);
  border-radius: 16px;
  box-shadow: var(--vt-shadow-menu);
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--vt-transition), transform var(--vt-transition), visibility var(--vt-transition);
  z-index: 1001;
}

.vt-nav__item.is-open .vt-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  overflow: auto;
}

.vt-dropdown__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.vt-dropdown__link {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: background var(--vt-transition);
}

.vt-dropdown__link:hover {
  background: var(--vt-gray-100);
}

.vt-dropdown__icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F1E9FE;
  color: var(--vt-purple-600);
}

.vt-dropdown__icon svg {
  width: 18px;
  height: 18px;
}

.vt-dropdown__title {
  font-family: var(--vt-font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--vt-ink);
  margin: 0 0 2px;
}

.vt-dropdown__desc {
  font-size: 12.5px;
  color: var(--vt-gray-600);
  margin: 0;
  line-height: 1.4;
}

.vt-dropdown__footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--vt-gray-300);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vt-dropdown__footer-text {
  font-size: 12.5px;
  color: var(--vt-gray-600);
}

.vt-dropdown__footer-link {
  font-family: var(--vt-font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--vt-purple-600);
  text-decoration: none;
}

.vt-dropdown__footer-link:hover {
  text-decoration: underline;
}

/* ---------- Mobile toggle ---------- */
.vt-burger {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--vt-radius);
  border: 1px solid var(--vt-gray-300);
  background: var(--vt-white);
  cursor: pointer;
  flex-shrink: 0;
}

.vt-burger svg {
  width: 20px;
  height: 20px;
  color: var(--vt-ink);
}

/* ==========================================================================
   Responsive — Drawer lateral no mobile
   ========================================================================== */

@media (max-width: 960px) {

  .vt-mobile-drawer {
    position: fixed;
    top: var(--vt-header-height);
    right: 0;
    bottom: 0;
    left: auto;
    width: min(85vw, 340px);
    flex: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    background: var(--vt-white);
    box-shadow: -12px 0 32px -12px rgba(20, 20, 26, 0.35);
    transform: translateX(100%);
    transition: transform var(--vt-transition);
    z-index: var(--vt-z-drawer);
    visibility: hidden;
  }

  .vt-header.is-menu-open .vt-mobile-drawer {
    transform: translateX(0);
    visibility: visible;
    height: 75vh;
  }

  .vt-drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--vt-gray-300);
    background: var(--vt-white);
    color: var(--vt-ink);
    cursor: pointer;
    z-index: 1;
  }

  .vt-drawer-close svg {
    width: 17px;
    height: 17px;
  }

  .vt-drawer-close:hover {
    border-color: var(--vt-purple-500);
    color: var(--vt-purple-600);
  }

  /* Nav: precisa rolar internamente quando um dropdown abre,
     senão o painel cresce além da tela e empurra os botões
     de baixo pra fora (era isso que deixava "torto"). */
  .vt-nav {
    flex: 1 1 auto;
    min-height: 0;              /* ADICIONAR — permite encolher e ativar o scroll */
    width: 100%;
    overflow-y: auto;           /* ADICIONAR — ativa a rolagem interna */
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 52px 16px 16px;
    background-color: var(--vt-white);
  }

  .vt-nav__item {
    width: 100%;
  }

  .vt-nav__link {
    width: 100%;
    justify-content: space-between;
    padding: 14px 10px;
    font-size: 16px;
    border-bottom: 1px solid var(--vt-gray-100);
  }

  /* Dropdown mobile: abre PARA BAIXO, dentro do próprio item da lista
     (nunca como card flutuante), com espaçamento mais compacto e
     uma coluna só, pra não ficar apertado num painel estreito. */
  .vt-dropdown {
    position: static;
    width: 100%;
    margin-left: 50%;
    transform: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: block;
    background: var(--vt-gray-100);
    transition: max-height var(--vt-transition);
  }

  .vt-nav__item.is-open .vt-dropdown {
    max-height: 600px;
    overflow: auto;
  }

  .vt-dropdown__grid {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 4px 4px 8px;
  }

  .vt-dropdown__link {
    padding: 10px 12px;
    border-radius: 10px;
    gap: 10px;
  }

  .vt-dropdown__icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }

  .vt-dropdown__icon svg {
    width: 15px;
    height: 15px;
  }

  .vt-dropdown__title {
    font-size: 13px;
  }

  .vt-dropdown__desc {
    font-size: 11.5px;
  }

  .vt-dropdown__footer {
    padding: 10px 12px 14px;
    margin-top: 0;
    border-top: none;
  }

  /* Ações ficam fixas na base do MESMO painel, sempre visíveis
     mesmo com o nav rolando por dentro. */
  .vt-actions {
    width: 100%;
    flex-shrink: 0;
    flex-wrap: nowrap;
    background: var(--vt-white);
    border-top: 1px solid var(--vt-gray-300);
    padding: 14px 16px;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }

  .vt-btn {
    flex: 1;
  }

  .vt-burger {
    display: inline-flex;
  }

  .vt-header__inner {
    padding: 0 16px;
  }
}

@media (max-width: 420px) {
  .vt-logo__text {
    font-size: 17px;
  }
}

/* Keyboard focus visibility */
.vt-header a:focus-visible,
.vt-header button:focus-visible {
  outline: 2px solid var(--vt-purple-500);
  outline-offset: 2px;
}

/* Overlay behind mobile menu */
.vt-overlay {
  display: none;
}

@media (max-width: 960px) {
  .vt-overlay {
    display: none;
    position: fixed;
    inset: var(--vt-header-height) 0 0 0;
    background: rgba(20, 20, 26, 0.3);
    z-index: var(--vt-z-overlay);
  }

  .vt-header.is-menu-open + .vt-overlay {
    display: block;
  }
}


/* ==========================================================
   CURSOR PERSONALIZADO — VIONTECH
   ========================================================== */

.vt-cursor {
  position: fixed;
  top: 0;
  left: 0;

  width: 14px;
  height: 14px;

  border: 2px solid var(--vt-purple-500, #7c3aed);
  border-radius: 50%;

  pointer-events: none;
  z-index: 99999;

  transform: translate3d(-50%, -50%, 0);
  will-change: transform;

  transition:
    width 180ms ease,
    height 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    opacity 120ms ease;

  opacity: 0;
}

.vt-cursor.is-visible {
  opacity: 1;
}

.vt-cursor.is-hover {
  width: 34px;
  height: 34px;

  background: rgba(124, 58, 237, 0.10);
  border-color: var(--vt-purple-500, #7c3aed);
}

.vt-cursor.is-clicking {
  width: 10px;
  height: 10px;

  background: var(--vt-purple-500, #7c3aed);
}


@media (hover: none), (pointer: coarse) {
  .vt-cursor {
    display: none;
  }
}

.vt-siteFlash {
  position: relative;
  z-index: 40;
  max-width: 1280px;
  margin: 12px 24px 0;
  padding: 12px 18px;
  border: 1.5px solid var(--vt-ink, #14141A);
  border-radius: 12px;
  box-shadow: 3px 3px 0 0 var(--vt-purple-200, #E9D5FF);
  font-family: var(--vt-font, "Space Grotesk", sans-serif);
  font-size: 14px;
  font-weight: 600;
}

.vt-siteFlash.is-ok {
  background: #F5F3FF;
  color: var(--vt-ink, #14141A);
}

.vt-siteFlash.is-erro {
  background: #FFF5F5;
  color: #9F1239;
}