/* Ajustes visuais que preservam a leitura sobre os frames animados */
.brand .brand-name {
  display: inline-flex;
  gap: 0;
  color: #fff;
}

.brand .brand-name span {
  color: var(--h);
}

/* Cobertura completa e precisa do background em qualquer resolução/mobile */
#bg-canvas,
.bg-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* O canvas já contém o escurecimento em toda sua área. */
.background-composited .bg-overlay { display: none; }

#bg-canvas {
  z-index: -3;
  display: block;
  object-fit: fill; /* Desativa object-fit: cover do style.css para o script controlar o drawCover com precisão */
}

.bg-overlay {
  z-index: -2;
  background:
    radial-gradient(
      circle at 50% 30%,
      rgba(19, 10, 33, .48),
      rgba(9, 5, 15, .78) 75%
    ),
    linear-gradient(
      180deg,
      rgba(9, 5, 15, .20) 0%,
      rgba(9, 5, 15, .60) 100%
    );
}

@media (max-width: 800px) {
  /* As luzes decorativas não podem alargar a página no navegador móvel. */
  html, body { overflow-x: hidden; }
  @supports (overflow: clip) {
    html, body { overflow-x: clip; }
  }
  .bg-overlay {
    background:
      radial-gradient(
        circle at 50% 35%,
        rgba(19, 10, 33, .40),
        rgba(9, 5, 15, .80) 80%
      ),
      linear-gradient(
        180deg,
        rgba(9, 5, 15, .15) 0%,
        rgba(9, 5, 15, .66) 100%
      );
  }
}

/* Botão Flutuante do WhatsApp Comercial */
.floating-whatsapp {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 12px;
  background: rgba(19, 10, 33, 0.82);
  border: 1px solid rgba(184, 107, 255, 0.45);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-family: 'Google Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 20px rgba(123, 46, 255, 0.25);
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.floating-whatsapp:hover {
  transform: translateY(-4px) scale(1.03);
  border-color: #25d366;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.5), 0 0 25px rgba(37, 211, 102, 0.45);
}

.floating-whatsapp .wa-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366, #128c7e);
  display: grid;
  place-items: center;
  box-shadow: 0 0 12px rgba(37, 211, 102, 0.5);
  flex-shrink: 0;
}

.floating-whatsapp .wa-icon svg {
  width: 17px;
  height: 17px;
  fill: #fff;
  display: block;
}

.floating-whatsapp .wa-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 0 8px #25d366;
  display: inline-block;
  animation: wa-pulse 2s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes wa-pulse {
  0%, 100% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
}

@media (max-width: 600px) {
  .floating-whatsapp {
    bottom: 20px;
    right: 18px;
    padding: 8px 14px 8px 10px;
    font-size: 12px;
  }

  .floating-whatsapp .wa-icon {
    width: 28px;
    height: 28px;
  }

  .floating-whatsapp .wa-icon svg {
    width: 15px;
    height: 15px;
  }
}

/* ==========================================================================
   MENU MOBILE & RESPONSIVIDADE DO HEADER
   ========================================================================== */

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  padding: 11px 10px;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  outline: none;
  z-index: 105;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #edeaf5;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.menu-toggle:hover {
  background: rgba(184, 107, 255, 0.15);
  border-color: rgba(184, 107, 255, 0.5);
  box-shadow: 0 0 15px rgba(184, 107, 255, 0.25);
}

.menu-toggle.is-active {
  background: rgba(184, 107, 255, 0.2);
  border-color: var(--h);
}

.menu-toggle.is-active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
  background: var(--h);
}

.menu-toggle.is-active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.menu-toggle.is-active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
  background: var(--h);
}

/* Estrutura do Drawer Mobile */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 85px 16px 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.mobile-nav.is-open {
  pointer-events: auto;
  opacity: 1;
}

.mobile-nav-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 5, 15, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.mobile-nav-content {
  position: relative;
  width: min(500px, 100%);
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  background: linear-gradient(145deg, rgba(25, 12, 42, 0.96), rgba(12, 6, 22, 0.98));
  border: 1px solid rgba(184, 107, 255, 0.35);
  border-radius: 24px;
  padding: 26px 22px 30px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 35px rgba(123, 46, 255, 0.22);
  display: flex;
  flex-direction: column;
  gap: 24px;
  transform: translateY(-20px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mobile-nav.is-open .mobile-nav-content {
  transform: translateY(0) scale(1);
}

.mobile-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-links a {
  font-family: 'Google Sans', sans-serif;
  font-size: 19px;
  font-weight: 600;
  color: #edeaf5;
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.25s ease;
  background: transparent;
}

.mobile-links a span {
  font-size: 11px;
  color: var(--h);
  font-weight: 700;
  background: rgba(184, 107, 255, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(184, 107, 255, 0.2);
}

.mobile-links a:hover,
.mobile-links a:active {
  background: rgba(184, 107, 255, 0.14);
  color: #fff;
  transform: translateX(6px);
}

.mobile-nav-footer {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav-footer .button {
  justify-content: center;
  width: 100%;
}

.mobile-socials {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.mobile-socials a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.25s;
}

.mobile-socials a:hover {
  color: #fff;
}

@media (max-width: 800px) {
  .menu-toggle {
    display: flex;
  }

  .nav nav.nav-links {
    display: none;
  }
}

@media (max-width: 540px) {
  .nav-cta {
    display: none;
  }
}
