/* ==========================================================================
   Base — tokens, reset e componentes compartilhados
   Réplica dos originais: paleta e tipografia extraídas do tema UiCore/Elementor.
   Mobile-first: a esmagadora maioria do tráfego é Android mobile.
   ========================================================================== */

/* ---------- Fonte (self-hosted: sem chamada a fonts.gstatic.com) ---------- */
@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/inter-var-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  /* subset latin — cobre português */
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Paleta do original (--e-global-color-uicore_*) */
  --cor-primaria: #AB8855;   /* dourado da marca */
  --cor-titulo:   #000000;
  --cor-texto:    #343434;
  --cor-clara:    #FAFAFA;
  --cor-branco:   #FFFFFF;

  /* CTAs — cores diferentes por página, como no original */
  --cta-vsl:        #ff4f17;
  --cta-vsl-hover:  #1890ff;
  --cta-home:       #1890ff;
  --verde-whatsapp: #04b348;

  --fonte: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --largura-max: 1140px;
  --raio: 6px;
}

/* ---------- Reset enxuto ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--fonte);
  font-weight: 500;
  color: var(--cor-texto);
  background: var(--cor-branco);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { margin: 0 0 .5em; color: var(--cor-titulo); line-height: 1.2; }
p { margin: 0 0 1em; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* ---------- Acessibilidade ---------- */
:focus-visible {
  outline: 3px solid var(--cta-home);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-apenas {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--largura-max);
  margin-inline: auto;
  padding-inline: 20px;
}

/* ==========================================================================
   Pop-up pré-WhatsApp — a única divergência deliberada do original.
   Dois campos só: nome e WhatsApp. Cada campo a mais derruba conversão.
   ========================================================================== */
.vivax-popup-fundo {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}
.vivax-popup-fundo[data-aberto='true'] { display: flex; }

.vivax-popup {
  background: var(--cor-branco);
  border-radius: 14px;
  max-width: 420px;
  width: 100%;
  padding: 28px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
  position: relative;
  animation: vivax-sobe .25s ease-out;
}

@keyframes vivax-sobe {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.vivax-popup h2 {
  font-size: 1.32rem;
  margin-bottom: .35em;
  text-align: center;
}

.vivax-popup .sub {
  text-align: center;
  font-size: .95rem;
  color: var(--cor-texto);
  margin-bottom: 1.4em;
}

.vivax-popup label {
  display: block;
  font-size: .86rem;
  font-weight: 600;
  color: var(--cor-titulo);
  margin-bottom: 5px;
}

.vivax-popup input {
  width: 100%;
  padding: 13px 14px;
  font-family: var(--fonte);
  font-size: 1rem;
  color: var(--cor-titulo);
  border: 1.5px solid #d8d8d8;
  border-radius: var(--raio);
  margin-bottom: 14px;
  background: var(--cor-branco);
}
.vivax-popup input:focus {
  border-color: var(--cor-primaria);
  outline: none;
  box-shadow: 0 0 0 3px rgba(171, 136, 85, .22);
}
.vivax-popup input[aria-invalid='true'] { border-color: #c92a2a; }

.vivax-popup .erro {
  color: #c92a2a;
  font-size: .82rem;
  margin: -10px 0 12px;
  min-height: 1em;
}

.vivax-popup button[type='submit'] {
  width: 100%;
  padding: 15px;
  font-family: var(--fonte);
  font-size: 1.04rem;
  font-weight: 700;
  color: #fff;
  background: var(--verde-whatsapp);
  border: 0;
  border-radius: 100px;
  cursor: pointer;
  transition: filter .18s ease;
}
.vivax-popup button[type='submit']:hover:not(:disabled) { filter: brightness(1.08); }
.vivax-popup button[type='submit']:disabled { opacity: .6; cursor: wait; }

.vivax-popup .fechar {
  position: absolute;
  top: 8px; right: 10px;
  background: none; border: 0;
  font-size: 1.7rem; line-height: 1;
  color: #999; cursor: pointer;
  padding: 6px 10px;
}
.vivax-popup .fechar:hover { color: var(--cor-titulo); }

.vivax-popup .aviso {
  font-size: .74rem;
  color: #777;
  text-align: center;
  margin: 12px 0 0;
  line-height: 1.45;
}

/* ==========================================================================
   Botão flutuante de WhatsApp (equivalente ao plugin Join.chat)
   Comportamento replicado: direita, aparece após 60 s, balão após 10 s.
   ========================================================================== */
.vivax-flutuante {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9990;
  display: none;
}
.vivax-flutuante[data-visivel='true'] {
  display: block;
  animation: vivax-sobe .3s ease-out;
}

.vivax-flutuante a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px; height: 58px;
  background: var(--verde-whatsapp);
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .28);
  transition: transform .18s ease;
}
.vivax-flutuante a:hover { transform: scale(1.07); }
.vivax-flutuante svg { width: 32px; height: 32px; fill: #fff; }

.vivax-flutuante .balao {
  position: absolute;
  right: 72px;
  bottom: 8px;
  background: #fff;
  color: var(--cor-texto);
  padding: 11px 15px;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .18);
  font-size: .87rem;
  width: max-content;
  max-width: 62vw;
  display: none;
}
.vivax-flutuante .balao[data-visivel='true'] { display: block; }

@media (max-width: 767px) {
  .vivax-flutuante { right: 14px; bottom: 14px; }
  .vivax-flutuante .balao { max-width: 56vw; font-size: .82rem; }
}
