/* ============================================================
   SCALESYNC — style.css
   Organização: Variáveis → Reset → Base → Layout → Componentes
                → Animações → Utilitários → Responsivo
   ============================================================ */

/* ─── 1. VARIÁVEIS DE DESIGN ─────────────────────────────── */
:root {
  /* Cores principais */
  --color-cyan:        #00f0ff;
  --color-purple:      #7b2eff;
  --color-cyan-rgb:    0, 240, 255;
  --color-purple-rgb:  123, 46, 255;

  /* Superfícies */
  --bg:        #03030a;
  --surface:   #0d0d1a;
  --surface-2: #111122;

  /* Tipografia */
  --text:      #e8eaf6;
  --text-body: #9090b0;
  --muted:     #7a7a9a;

  /* Gradientes reutilizáveis */
  --gradient-brand: linear-gradient(90deg, var(--color-cyan), var(--color-purple));
  --gradient-card:  linear-gradient(145deg, var(--surface), var(--surface-2));

  /* Sombras / Glows */
  --glow-cyan:   0 0 30px rgba(var(--color-cyan-rgb), 0.4);
  --glow-purple: 0 0 30px rgba(var(--color-purple-rgb), 0.4);
  --glow-btn:    0 0 20px rgba(var(--color-cyan-rgb), 0.5),
                 0 0 40px rgba(var(--color-purple-rgb), 0.3);

  /* Bordas */
  --border-subtle:  1px solid rgba(var(--color-cyan-rgb), 0.12);
  --border-medium:  1px solid rgba(var(--color-cyan-rgb), 0.3);
  --border-bright:  1px solid rgba(var(--color-cyan-rgb), 0.45);

  /* Raios */
  --radius-sm:  10px;
  --radius-md:  18px;
  --radius-lg:  20px;
  --radius-pill: 50px;

  /* Espaçamento de seção */
  --section-padding: clamp(50px, 8vw, 90px) clamp(15px, 5vw, 60px);

  /* Transições */
  --transition-fast:   0.3s ease;
  --transition-medium: 0.4s ease;

  /* Fontes */
  --font-display: 'Orbitron', monospace;
  --font-body:    'Syne', sans-serif;
}

/* ─── 2. RESET ───────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ─── 3. BASE ────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  /* Evita reflow ao scrollar com scrollbar */
  scrollbar-gutter: stable;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.6;
  /* Hinting de texto melhorado */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ─── 4. CANVAS DE PARTÍCULAS ────────────────────────────── */
#particles-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  /* will-change previne repaint desnecessário */
  will-change: contents;
}

/* ─── 5. TIPOGRAFIA ──────────────────────────────────────── */
h2 {
  font-family: var(--font-display);
  font-size: clamp(20px, 4vw, 34px);
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 20px;
  /* Gradiente no texto */
  background: linear-gradient(135deg, #fff 40%, var(--color-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── 6. LAYOUT — SEÇÕES ─────────────────────────────────── */
section,
header.hero {
  position: relative;
  z-index: 1;
}

section {
  padding: var(--section-padding);
  text-align: center;
}

/* ─── 7. HERO ────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  overflow: hidden;
}

/* Glow de fundo — separado em pseudo-elemento para não afetar stacking context dos filhos */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(var(--color-cyan-rgb), 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(var(--color-purple-rgb), 0.10) 0%, transparent 60%);
  z-index: -1;
  pointer-events: none;
}

/* Grade scanline sutil — separada para não interferir com outros pseudo-elementos */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(var(--color-cyan-rgb), 0.015) 2px,
    rgba(var(--color-cyan-rgb), 0.015) 4px
  );
  pointer-events: none;
  z-index: -1;
}

/* Logo */
.logo-container {
  margin-bottom: 30px;
  /* will-change para animation de float — ativado só quando necessário */
  animation: floatLogo 4s ease-in-out infinite;
}

.logo-container img {
  width: 260px;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(var(--color-cyan-rgb), 0.5));
  /* Garante que o img não cause layout shift */
  display: block;
}

/* Tagline principal */
.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(22px, 5vw, 42px);
  font-weight: 900;
  letter-spacing: 3px;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

/* Subtítulo */
.hero-sub {
  color: var(--muted);
  font-size: clamp(13px, 2vw, 17px);
  font-weight: 300;
  letter-spacing: 2px;
  margin-bottom: 40px;
}

/* Badge de urgência */
.urgency {
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 1px;
}

.urgency span {
  color: var(--color-cyan);
  font-weight: 700;
}

/* ─── 8. DIVISOR ─────────────────────────────────────────── */
.divider {
  width: 100%;
  height: 1px;
  background: var(--gradient-brand);
  position: relative;
  overflow: hidden;
}

/* Linha de scan animada sobre o divisor */
.divider::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, white, transparent);
  animation: scanLine 3s linear infinite;
  /* transform é GPU-friendly — sem reflow */
  will-change: transform;
}

/* ─── 9. LABEL DE SEÇÃO ──────────────────────────────────── */
.section-label {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--color-cyan);
  text-transform: uppercase;
  margin-bottom: 12px;
  opacity: 0.8;
}

/* ─── 10. SOBRE ──────────────────────────────────────────── */
.about {
  max-width: 750px;
  margin: 0 auto;
}

.about-text {
  font-size: clamp(14px, 1.8vw, 17px);
  line-height: 1.9;
  color: #c0c0d8;
}

.about-text strong {
  color: var(--color-cyan);
}

/* ─── 11. ESTATÍSTICAS ───────────────────────────────────── */
.stats {
  display: flex;
  justify-content: center;
  gap: clamp(20px, 5vw, 60px);
  flex-wrap: wrap;
  margin-top: 40px;
  padding: 0 20px;
}

.stat {
  text-align: center;
}

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 900;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ─── 12. CARDS DE SERVIÇOS ──────────────────────────────── */
.cards {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 40px;
}

.card {
  background: var(--gradient-card);
  border: var(--border-subtle);
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--radius-md);
  width: clamp(240px, 28vw, 280px);
  /* Anima apenas propriedades compostas — evita reflow */
  transition:
    transform var(--transition-medium),
    box-shadow var(--transition-medium),
    border-color var(--transition-medium);
  position: relative;
  overflow: hidden;
}

/* Glow de cursor via CSS custom properties injetadas pelo JS */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--mx, 50%) var(--my, 50%),
    rgba(var(--color-cyan-rgb), 0.06),
    transparent 60%
  );
  opacity: 0;
  transition: opacity var(--transition-fast);
  pointer-events: none;
}

.card:hover::before { opacity: 1; }

.card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 20px 50px rgba(var(--color-cyan-rgb), 0.2),
              0 0 0 1px rgba(var(--color-cyan-rgb), 0.3);
  border-color: rgba(var(--color-cyan-rgb), 0.4);
}

.card-icon {
  font-size: 36px;
  margin-bottom: 14px;
  display: block;
}

.card h3 {
  font-family: var(--font-display);
  font-size: clamp(13px, 1.8vw, 16px);
  color: var(--color-cyan);
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.card p,
.card li {
  font-size: clamp(13px, 1.5vw, 15px);
  color: var(--text-body);
  line-height: 1.7;
}

/* ─── 13. PLANOS ─────────────────────────────────────────── */
.plans {
  background: var(--surface);
}

.plan-card {
  /* Reutiliza a maioria do .card mas com largura ligeiramente maior */
  background: linear-gradient(145deg, #0d0d1a, #111130);
  border: 1px solid rgba(var(--color-cyan-rgb), 0.1);
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--radius-lg);
  width: clamp(260px, 28vw, 300px);
  transition:
    transform var(--transition-medium),
    box-shadow var(--transition-medium);
  position: relative;
  overflow: hidden;
}

/* Linha colorida no topo — aparece no hover */
.plan-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-cyan), transparent);
  opacity: 0;
  transition: opacity var(--transition-medium);
}

.plan-card:hover::after { opacity: 1; }

.plan-card:hover {
  transform: translateY(-14px);
  box-shadow: 0 25px 60px rgba(var(--color-cyan-rgb), 0.15);
}

/* Card em destaque */
.plan-card.destaque {
  border-color: rgba(var(--color-cyan-rgb), 0.45);
  background: linear-gradient(145deg, #0e1020, #141430);
  box-shadow: 0 0 40px rgba(var(--color-cyan-rgb), 0.12),
              inset 0 0 40px rgba(var(--color-cyan-rgb), 0.03);
}

.plan-card.destaque::after {
  opacity: 1; /* Linha sempre visível no destaque */
}

/* Badge "MAIS POPULAR" */
.badge {
  position: absolute;
  top: -1px;
  right: 20px;
  background: var(--gradient-brand);
  color: #000;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 5px 12px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.plan-card h3 {
  font-family: var(--font-display);
  font-size: clamp(13px, 1.8vw, 16px);
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.plan-card > p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

.plan-card ul {
  list-style: none;
  text-align: left;
  margin-bottom: 24px;
}

.plan-card li {
  font-size: clamp(12px, 1.4vw, 14px);
  color: #b0b0cc;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Marcador de lista personalizado */
.plan-card li::before {
  content: '✦';
  color: var(--color-cyan);
  font-size: 9px;
  flex-shrink: 0;
}

.obs {
  font-size: 11px;
  color: #555577;
  margin-bottom: 16px;
}

.trafego-note {
  margin-top: 30px;
  font-size: 13px;
  color: var(--color-cyan);
  opacity: 0.7;
  font-style: italic;
}

/* ─── 14. BOTÕES ─────────────────────────────────────────── */

/* Base compartilhada — todos os botões gradiente */
.btn-whatsapp,
.btn-plan,
.btn-cta-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 1px;
  color: #000;
  background: var(--gradient-brand);
  border-radius: var(--radius-pill);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
  /* Foco acessível — visível por teclado */
  outline-offset: 3px;
}

.btn-whatsapp:focus-visible,
.btn-plan:focus-visible,
.btn-cta-main:focus-visible {
  outline: 2px solid var(--color-cyan);
}

/* Botão hero */
.btn-whatsapp {
  position: relative;
  padding: 16px 38px;
  font-size: clamp(13px, 2vw, 15px);
  overflow: hidden;
  box-shadow: var(--glow-btn);
  animation: pulseCta 2.5s ease-in-out infinite;
}

/* Efeito de shimmer no hover */
.btn-whatsapp::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s;
  pointer-events: none;
}

.btn-whatsapp:hover::before  { transform: translateX(100%); }
.btn-whatsapp:hover {
  transform: scale(1.07);
  box-shadow: 0 0 35px rgba(var(--color-cyan-rgb), 0.8),
              0 0 60px rgba(var(--color-purple-rgb), 0.5);
  animation: none; /* Pausa pulse no hover */
}

/* Botão dos planos */
.btn-plan {
  padding: 12px 28px;
  font-size: 12px;
  box-shadow: 0 0 15px rgba(var(--color-cyan-rgb), 0.3);
  width: 100%;
}

.btn-plan:hover {
  transform: scale(1.04);
  box-shadow: 0 0 25px rgba(var(--color-cyan-rgb), 0.6);
}

/* Botão CTA grande */
.btn-cta-main {
  padding: 20px 50px;
  font-size: clamp(14px, 2vw, 17px);
  font-weight: 900;
  letter-spacing: 2px;
  position: relative;
  overflow: hidden;
  animation: glowPulse 2s ease-in-out infinite;
}

/* Halo borrado atrás do CTA */
.btn-cta-main::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 53px;
  background: var(--gradient-brand);
  z-index: -1;
  filter: blur(12px);
  opacity: 0.7;
  animation: glowPulse 2s ease-in-out infinite;
}

.btn-cta-main:hover {
  transform: scale(1.06);
  animation: none;
}

.btn-cta-main .btn-icon { font-size: 24px; }

/* Ícone no botão hero */
.btn-icon {
  font-size: 20px;
  animation: wiggle 2s ease-in-out infinite;
  /* Evita que o ícone seja lido por leitores de tela */
}

/* ─── 15. SEÇÃO CTA FINAL ────────────────────────────────── */
.cta-final {
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.cta-final::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(var(--color-cyan-rgb), 0.07) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 30% 70%, rgba(var(--color-purple-rgb), 0.07) 0%, transparent 60%);
  z-index: 0;
  pointer-events: none;
}

/* Todos os filhos diretos acima do glow de fundo */
.cta-final > * {
  position: relative;
  z-index: 1;
}

.cta-final p {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 30px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ─── 16. BOTÃO WHATSAPP FLUTUANTE ───────────────────────── */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 1000;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-cyan), var(--color-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  text-decoration: none;
  box-shadow: 0 0 25px rgba(var(--color-cyan-rgb), 0.6),
              0 4px 20px rgba(0, 0, 0, 0.4);
  animation: floatBtn 3s ease-in-out infinite;
  transition: transform var(--transition-fast);
  /* Força composição em GPU para evitar repaint */
  will-change: transform;
}

.whatsapp-float:hover  { transform: scale(1.15); }
.whatsapp-float:focus-visible { outline: 2px solid var(--color-cyan); outline-offset: 4px; }

/* Ondas de ripple */
.whatsapp-float::before,
.whatsapp-float::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(var(--color-cyan-rgb), 0.4);
  animation: ripple 2s ease-out infinite;
  /* Compositor-only — sem reflow */
  will-change: transform, opacity;
}

.whatsapp-float::before {
  inset: -4px;
}

.whatsapp-float::after {
  inset: -12px;
  animation-delay: 0.6s;
  border-color: rgba(var(--color-cyan-rgb), 0.2);
}

/* ─── 17. TOOLTIP FLUTUANTE ──────────────────────────────── */
.float-tooltip {
  position: fixed;
  bottom: 98px;
  right: 24px;
  z-index: 1000;
  background: var(--surface-2);
  border: var(--border-medium);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--color-cyan);
  font-family: var(--font-display);
  letter-spacing: 0.5px;
  white-space: nowrap;
  box-shadow: 0 0 15px rgba(var(--color-cyan-rgb), 0.2);
  /* Aparece com delay de 2s */
  animation: fadeInTooltip 1s ease 2s both;
  /* Transição suave para o hide via JS */
  transition: opacity 0.6s ease;
}

/* Triângulo da tooltip */
.float-tooltip::after {
  content: '';
  position: absolute;
  bottom: -7px;
  right: 22px;
  width: 12px;
  height: 12px;
  background: var(--surface-2);
  border-right: 1px solid rgba(var(--color-cyan-rgb), 0.3);
  border-bottom: 1px solid rgba(var(--color-cyan-rgb), 0.3);
  transform: rotate(45deg);
}

/* ─── 18. SCROLL REVEAL ──────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  /* Usando will-change transitório — removido pelo JS após animação */
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── 19. RODAPÉ ─────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: #333355;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  position: relative;
  z-index: 1;
}

/* ─── 20. ANIMAÇÕES ──────────────────────────────────────── */

/* Logo flutuante — usa apenas transform (compositor-only) */
@keyframes floatLogo {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

/* Pulso do botão CTA hero */
@keyframes pulseCta {
  0%, 100% {
    box-shadow: 0 0 20px rgba(var(--color-cyan-rgb), 0.5),
                0 0 40px rgba(var(--color-purple-rgb), 0.3);
  }
  50% {
    box-shadow: 0 0 35px rgba(var(--color-cyan-rgb), 0.9),
                0 0 60px rgba(var(--color-purple-rgb), 0.6);
  }
}

/* Wiggle do ícone no botão */
@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25%       { transform: rotate(-10deg); }
  75%       { transform: rotate(10deg); }
}

/* Linha de scan sobre o divisor */
@keyframes scanLine {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

/* Glow pulsante do CTA final */
@keyframes glowPulse {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1; }
}

/* Float do botão WhatsApp fixo */
@keyframes floatBtn {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

/* Ondas de ripple */
@keyframes ripple {
  0%   { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* Entrada da tooltip */
@keyframes fadeInTooltip {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── 21. RESPONSIVO ─────────────────────────────────────── */

/* Tablet / Mobile — breakpoint principal */
@media (max-width: 768px) {
  .logo-container img {
    width: 180px;
  }

  .hero-tagline {
    letter-spacing: 1px;
  }

  .hero-sub {
    letter-spacing: 1px;
  }

  /* Botões de largura total em mobile */
  .btn-whatsapp,
  .btn-cta-main {
    width: 90%;
    max-width: 320px;
    padding: 15px 28px;
  }

  /* Cards em coluna */
  .cards,
  .plan-cards {
    flex-direction: column;
    align-items: center;
  }

  .card,
  .plan-card {
    width: 92%;
    max-width: 360px;
  }

  .stats {
    gap: 30px;
  }

  /* Botão flutuante menor */
  .whatsapp-float {
    bottom: 18px;
    right: 18px;
    width: 54px;
    height: 54px;
  }

  .float-tooltip {
    right: 15px;
    bottom: 84px;
    font-size: 11px;
  }

  .btn-plan {
    font-size: 11px;
    padding: 12px 20px;
  }
}

/* Mobile pequeno */
@media (max-width: 400px) {
  .hero-tagline {
    font-size: 18px;
  }

  .logo-container img {
    width: 150px;
  }
}

/* ─── 22. ACESSIBILIDADE — PREFERÊNCIAS DO USUÁRIO ───────── */

/* Reduz animações para quem prefere */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .logo-container {
    animation: none;
  }
}

/* Foco para navegação por teclado */
:focus-visible {
  outline: 2px solid var(--color-cyan);
  outline-offset: 3px;
}