/* ==========================================================
   EFFECTS.CSS — carregue DEPOIS do style.css
   Correção dos selos + efeitos JavaScript
========================================================== */

/* ---------- CORREÇÃO DOS SELOS (ficavam atrás da foto) ---------- */
.product-image { isolation: isolate; }
.product-image img { position: relative; z-index: 1; }
.product-badge {
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 13px;
  font-size: 10px;
  box-shadow: 0 6px 20px rgba(199,255,82,.35);
}

/* ---------- BARRA DE PROGRESSO DA PÁGINA ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  z-index: 2000;
  background: linear-gradient(90deg, var(--purple), var(--lime));
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

/* ---------- 7. TRANSIÇÕES SUAVES (entrada da página) ---------- */
.page-veil {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity .7s ease, visibility .7s ease;
}
.page-veil .veil-mark {
  width: 64px; height: 64px;
  display: grid; place-items: center;
  border-radius: 18px;
  background: var(--lime);
  color: #101010;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 24px;
  animation: veilPulse 1s ease-in-out infinite;
}
@keyframes veilPulse {
  0%,100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(199,255,82,.4); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 18px rgba(199,255,82,0); }
}
.page-veil.hide { opacity: 0; visibility: hidden; }

/* entrada escalonada do hero */
.hero-content > * {
  opacity: 0;
  transform: translateY(28px);
}
body.is-ready .hero-content > * {
  animation: heroIn .9s cubic-bezier(.2,.7,.2,1) forwards;
}
body.is-ready .hero-content > *:nth-child(1) { animation-delay: .10s; }
body.is-ready .hero-content > *:nth-child(2) { animation-delay: .22s; }
body.is-ready .hero-content > *:nth-child(3) { animation-delay: .34s; }
body.is-ready .hero-content > *:nth-child(4) { animation-delay: .46s; }
body.is-ready .hero-content > *:nth-child(5) { animation-delay: .58s; }
@keyframes heroIn {
  to { opacity: 1; transform: translateY(0); }
}
.hero-visual { opacity: 0; transform: scale(.92); }
body.is-ready .hero-visual {
  animation: visualIn 1.1s .25s cubic-bezier(.2,.7,.2,1) forwards;
}
@keyframes visualIn { to { opacity: 1; transform: scale(1); } }

/* navbar encolhe ao rolar */
.navbar { transition: padding .3s ease, background .3s ease; }
.navbar.scrolled { padding: 10px 0; background: rgba(8,8,13,.92); }

/* ---------- 1. ANIMAÇÃO AO ROLAR (variações) ---------- */
.reveal { transition-delay: var(--d, 0s); }
.reveal.from-left  { transform: translateX(-35px); }
.reveal.from-right { transform: translateX(35px); }
.reveal.zoom       { transform: scale(.92); }
.reveal.visible    { transform: none; }

/* ---------- 3. LUZ QUE ACOMPANHA O MOUSE ---------- */
.hero-spot {
  position: absolute;
  width: 520px; height: 520px;
  left: 0; top: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,.22), transparent 65%);
  transform: translate(var(--hx, 70vw), var(--hy, 30%)) translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity .5s ease;
}
.hero:hover .hero-spot { opacity: 1; }

.product-card::after,
.benefit-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    360px circle at var(--mx, 50%) var(--my, 50%),
    rgba(139,92,246,.20),
    transparent 60%
  );
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
  z-index: 0;
}
.product-card:hover::after,
.benefit-card:hover::after { opacity: 1; }
.benefit-card { position: relative; overflow: hidden; }
.product-body, .product-image { position: relative; z-index: 1; }
.benefit-card > * { position: relative; z-index: 1; }

/* ---------- 2. CARDS 3D ---------- */
.product-card {
  transition: border-color .35s ease, box-shadow .35s ease, scale .45s ease, opacity .45s ease;
  transform-style: preserve-3d;
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
}
.product-card:hover { transform: none; }   /* o tilt agora é feito pelo JS */
.product-card:hover .product-image img { transform: scale(1.07) translateZ(30px); }

/* ---------- 6. CARROSSEL INTELIGENTE ---------- */
.product-track { cursor: grab; padding-top: 18px; padding-bottom: 30px; }
.product-track.dragging { cursor: grabbing; scroll-snap-type: none; }
.product-track.dragging .product-card { pointer-events: none; }
.product-card { scale: .94; opacity: .72; }
.product-card.is-active { scale: 1; opacity: 1; border-color: rgba(182,154,255,.4); }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}
.carousel-dots button {
  width: 8px; height: 8px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(255,255,255,.2);
  transition: width .3s ease, background .3s ease;
}
.carousel-dots button.active { width: 26px; background: var(--lime); }

/* ---------- 5. BOTÕES MAGNÉTICOS + BRILHO ---------- */
[data-magnetic] {
  position: relative;
  overflow: hidden;
  transform: translate(var(--tx, 0px), var(--ty, 0px));
  transition: transform .25s ease-out, box-shadow .3s ease, background .25s ease, color .25s ease;
}
[data-magnetic]:hover { transform: translate(var(--tx, 0px), var(--ty, 0px)); }
[data-magnetic]::before {
  content: "";
  position: absolute;
  top: 0; left: -80%;
  width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
}
[data-magnetic]:hover::before { animation: shine .8s ease; }
@keyframes shine { to { left: 130%; } }
.btn-outline-custom[data-magnetic]::before {
  background: linear-gradient(100deg, transparent, rgba(199,255,82,.25), transparent);
}

/* ---------- 4. NÚMEROS ANIMADOS ---------- */
.stats-strip { padding: 70px 0 10px; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.stat-card {
  text-align: center;
  padding: 32px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(38px, 6vw, 60px);
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1;
  color: var(--lime);
}
.stat-label {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .5px;
}

/* ---------- MOBILE ---------- */
@media (max-width: 575px) {
  .stats-grid { grid-template-columns: 1fr; }
  .product-card { scale: .96; }
  .hero-spot { display: none; }
}

/* ---------- MENOS MOVIMENTO ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-content > *, .hero-visual { opacity: 1 !important; transform: none !important; animation: none !important; }
  .page-veil { display: none; }
  .product-card { scale: 1; opacity: 1; }
  [data-magnetic]::before { display: none; }
}


/* ---------- WHATSAPP ---------- */
.whatsapp-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1500;
  display: flex;
  align-items: center;
  gap: 0;
  height: 58px;
  padding: 0 17px;
  border-radius: 40px;
  background: #25d366;
  color: #fff;
  font-size: 28px;
  box-shadow: 0 10px 30px rgba(37,211,102,.4);
  transition: transform .3s ease, box-shadow .3s ease;
}
.whatsapp-fab:hover { color: #fff; transform: translateY(-4px); box-shadow: 0 14px 36px rgba(37,211,102,.55); }
.whatsapp-fab::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid #25d366;
  animation: waPulse 2.2s ease-out infinite;
  pointer-events: none;
}
@keyframes waPulse {
  0% { transform: scale(1); opacity: .7; }
  100% { transform: scale(1.45); opacity: 0; }
}
.fab-label {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
  transition: max-width .4s ease, margin .4s ease;
}
.whatsapp-fab:hover .fab-label,
.whatsapp-fab.show-label .fab-label { max-width: 160px; margin-right: 10px; }

.cta-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  margin-left: 10px;
  padding: 16px 24px;
  border-radius: 12px;
  border: 1px solid rgba(37,211,102,.5);
  color: #25d366;
  font-size: 12px;
  font-weight: 800;
  transition: .3s ease;
}
.cta-whatsapp i { font-size: 17px; }
.cta-whatsapp:hover { background: #25d366; color: #0b0b10; }

@media (max-width: 575px) {
  .whatsapp-fab { right: 14px; bottom: 14px; }
  .cta-whatsapp { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .whatsapp-fab::after { display: none; }
}
