/* ============================================================
   ABAplay Landing — Premium UI Layer
   Tokens, componentes e motion. Carregado após tailwind.min.css.
   ============================================================ */

:root {
  --ap-indigo-500: #6366f1;
  --ap-indigo-600: #4f46e5;
  --ap-indigo-700: #4338ca;
  --ap-violet-600: #7c3aed;
  --ap-deep-900: #1e1b4b;
  --ap-deep-950: #16142e;
  --ap-warm-50: #faf9f7;
  --ap-warm-100: #f4f2ee;
  --ap-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Aurora background ---------- */
.aurora-bg {
  position: relative;
  overflow: hidden;
}
.aurora-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 75% 55% at 18% 8%, rgba(79, 70, 229, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 55% 60% at 85% 18%, rgba(124, 58, 237, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 50% 45% at 50% 95%, rgba(99, 102, 241, 0.06) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
  animation: aurora-drift 24s ease-in-out infinite;
}
.aurora-soft::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 45% at 80% 10%, rgba(79, 70, 229, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse 45% 40% at 12% 85%, rgba(124, 58, 237, 0.05) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}
.aurora-soft {
  position: relative;
  overflow: hidden;
}

/* ---------- Glass card ---------- */
.glass-card {
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 1rem;
  box-shadow: 0 8px 32px rgba(30, 27, 75, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* ---------- Premium card (borda gradiente + lift) ---------- */
.premium-card {
  position: relative;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 4px 24px rgba(30, 27, 75, 0.06);
  transition: transform 0.4s var(--ap-ease), box-shadow 0.4s var(--ap-ease);
}
.premium-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.28), rgba(124, 58, 237, 0.12), rgba(79, 70, 229, 0.08));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.premium-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(30, 27, 75, 0.12);
}

/* ---------- CTA premium (único estilo primário) ---------- */
.cta-premium {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #ffffff !important;
  padding: 1rem 2rem;
  border-radius: 9999px;
  overflow: hidden;
  background: linear-gradient(135deg, #4f46e5 0%, #6d5ae8 50%, #7c3aed 100%);
  background-size: 200% 100%;
  box-shadow: 0 12px 32px rgba(79, 70, 229, 0.32), 0 0 0 1px rgba(79, 70, 229, 0.15);
  transition: all 0.4s var(--ap-ease);
}
.cta-premium:hover {
  background-position: 100% 0;
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(79, 70, 229, 0.42), 0 0 0 1px rgba(124, 58, 237, 0.25);
}
.cta-premium::after {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 50%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  transform: skewX(-18deg);
  transition: left 0.6s var(--ap-ease);
}
.cta-premium:hover::after {
  left: 130%;
}

/* CTA invertido para fundos escuros */
.cta-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--ap-indigo-700);
  background: #ffffff;
  padding: 1rem 2rem;
  border-radius: 9999px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  transition: all 0.4s var(--ap-ease);
}
.cta-light:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

/* Botão secundário (ghost) */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 500;
  color: #4338ca;
  padding: 1rem 1.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(79, 70, 229, 0.25);
  background: rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: all 0.3s var(--ap-ease);
}
.btn-ghost:hover {
  background: #ffffff;
  border-color: rgba(79, 70, 229, 0.5);
  transform: translateY(-1px);
}

/* CTA WhatsApp (baixa fricção) */
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #ffffff !important;
  padding: 1rem 1.75rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  box-shadow: 0 10px 28px rgba(22, 163, 74, 0.3);
  transition: all 0.3s var(--ap-ease);
}
.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(22, 163, 74, 0.4);
}

/* ---------- Seção dark premium ---------- */
.section-dark {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, #1a1838 0%, #2b2768 45%, #1e1b4b 100%);
}
.section-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 40% at 25% 15%, rgba(99, 102, 241, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse 45% 50% at 78% 85%, rgba(124, 58, 237, 0.16) 0%, transparent 55%);
  pointer-events: none;
}
.section-dark > * {
  position: relative;
  z-index: 1;
}

/* ---------- Badge discreto ---------- */
.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.09), rgba(124, 58, 237, 0.05));
  border: 1px solid rgba(79, 70, 229, 0.18);
  color: var(--ap-indigo-700);
}
.badge-soft-light {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #e0e7ff;
}

/* ---------- Texto gradiente (marca) ---------- */
.text-gradient-brand {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 60%, #6366f1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Nav link com underline gradiente ---------- */
.nav-link {
  position: relative;
  font-weight: 500;
  color: #374151;
  transition: color 0.25s ease;
  padding-bottom: 2px;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  border-radius: 9999px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  transition: width 0.3s var(--ap-ease);
}
.nav-link:hover {
  color: var(--ap-indigo-700);
}
.nav-link:hover::after {
  width: 100%;
}

/* ---------- Frame de dispositivo (hero) ---------- */
.device-frame {
  border-radius: 1.75rem;
  overflow: hidden;
  background: #16142e;
  box-shadow:
    0 32px 64px rgba(30, 27, 75, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 0.45rem;
}
.device-frame img {
  border-radius: 1.35rem;
  display: block;
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1rem 0.75rem;
}
.browser-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 9999px;
}
.browser-address {
  flex: 1;
  border-radius: 9999px;
  padding: 0.25rem 0.9rem;
  font-size: 0.68rem;
  color: #a5b4fc;
  background: rgba(255, 255, 255, 0.06);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Reveal on scroll (ativado via html.js-reveal) ---------- */
html.js-reveal .reveal,
html.js-reveal .reveal-stagger > * {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ap-ease), transform 0.7s var(--ap-ease);
  will-change: opacity, transform;
}
html.js-reveal .reveal.is-visible,
html.js-reveal .reveal-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}
html.js-reveal .reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0ms; }
html.js-reveal .reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 90ms; }
html.js-reveal .reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 180ms; }
html.js-reveal .reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 270ms; }
html.js-reveal .reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 360ms; }
html.js-reveal .reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 450ms; }
html.js-reveal .reveal-stagger.is-visible > *:nth-child(7) { transition-delay: 540ms; }
html.js-reveal .reveal-stagger.is-visible > *:nth-child(8) { transition-delay: 630ms; }
html.js-reveal .reveal-stagger.is-visible > *:nth-child(9) { transition-delay: 720ms; }

/* ---------- Sticky CTA ---------- */
.sticky-cta {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 50;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.35s var(--ap-ease), transform 0.35s var(--ap-ease);
}
.sticky-cta.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ---------- Slider da calculadora de preço ---------- */
input[type='range'].price-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.22);
  outline: none;
  cursor: pointer;
}
input[type='range'].price-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 9999px;
  background: #ffffff;
  border: 3px solid #818cf8;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  cursor: grab;
}
input[type='range'].price-slider::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 9999px;
  background: #ffffff;
  border: 3px solid #818cf8;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  cursor: grab;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--ap-warm-100);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #818cf8, #4f46e5);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #6366f1, #4338ca);
}

/* ---------- Animações ---------- */
@keyframes aurora-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-3%, 2%) scale(1.06); }
  66% { transform: translate(2%, -3%) scale(0.96); }
}

@keyframes float-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.animate-float-soft {
  animation: float-soft 5s ease-in-out infinite;
}

/* Fade entre screenshots do hero */
.hero-shot {
  transition: opacity 0.8s var(--ap-ease);
}

/* ---------- Acessibilidade: reduz movimento ---------- */
@media (prefers-reduced-motion: reduce) {
  html.js-reveal .reveal,
  html.js-reveal .reveal-stagger > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .aurora-bg::before,
  .animate-float-soft,
  .cta-premium::after {
    animation: none !important;
    transition: none !important;
  }
}
