/* ============================================================
   animations.css — Premium Animation Layer
   Safe approach: enhance existing elements, don't replace them
   ============================================================ */

/* --- Lenis --- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }

/* --- Button hover: white slides up from bottom --- */
.btn-primary {
  position: relative;
  overflow: hidden;
  z-index: 1;
  background: var(--primary) !important;
  transition: color 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s ease;
}
.btn-primary::after {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: #fff !important;
  border-radius: inherit !important;
  transform: translateY(101%) !important;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
  z-index: -1 !important;
  opacity: 1 !important;
  filter: none !important;
}
.btn-primary:hover::after { transform: translateY(0) !important; }
.btn-primary:hover { color: var(--primary) !important; box-shadow: 0 18px 36px rgba(47,102,255,0.28); }

.btn-ghost {
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: color 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-ghost::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: -1;
}
.btn-ghost:hover::after { transform: translateY(0); }
.btn-ghost:hover { border-color: rgba(255,255,255,0.35); color: #fff; }

/* --- Nav underline slides from left --- */
.nav-links a { position: relative; }
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-links a:hover::after,
.nav-links a.is-active::after { transform: scaleX(1); }

/* --- Scroll progress glow --- */
.scroll-progress {
  box-shadow: 0 0 10px rgba(47,102,255,0.4);
}

/* --- Velocity blur --- */
body.is-scrolling-fast .hero-visual-frame img {
  filter: blur(1.5px);
  transition: filter 0.1s linear;
}
body:not(.is-scrolling-fast) .hero-visual-frame img {
  filter: blur(0);
  transition: filter 0.4s ease;
}

/* --- Counter bounce --- */
@keyframes counterBounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.15); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); }
}
.result-value.is-bounced { animation: counterBounce 0.5s cubic-bezier(0.33,1,0.68,1); }

/* Custom cursor removed — caused lag and cursor disappearing */

/* --- Card 3D tilt --- */
.layer-card, .product-card, .pricing-card, .testimonial-card {
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1), box-shadow 0.5s cubic-bezier(0.16,1,0.3,1);
}

/* --- H1 text shimmer --- */
@keyframes textShimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.text-shimmer {
  background: linear-gradient(90deg, currentColor 0%, currentColor 40%, var(--accent) 50%, currentColor 60%, currentColor 100%) !important;
  background-size: 200% auto !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  animation: textShimmer 2.5s ease-in-out 1 !important;
}

/* --- Integration badges float --- */
@keyframes badgeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
.integration-badge.is-floating {
  animation: badgeFloat 3s ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
}

/* --- FAQ smooth reveal --- */
.faq-item[open] .faq-answer {
  animation: faqReveal 0.4s cubic-bezier(0.16,1,0.3,1) forwards;
}
@keyframes faqReveal {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Pricing card enhanced hover --- */
.pricing-card {
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), box-shadow 0.4s ease;
}
.pricing-card:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15) !important;
}

/* --- Testimonial glow on hover --- */
.testimonial-card { transition: border-color 0.4s ease, box-shadow 0.4s ease; }
.testimonial-card:hover {
  border-color: rgba(47,102,255,0.3) !important;
  box-shadow: 0 0 30px rgba(47,102,255,0.08) !important;
}

/* --- Mobile: disable desktop-only effects --- */
@media (hover: none), (pointer: coarse) {
  /* custom cursor removed */
  .pricing-card:hover { transform: none !important; }
  .testimonial-card:hover { border-color: inherit !important; box-shadow: none !important; }
  .integration-badge.is-floating { animation: none !important; }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .btn-primary::after, .btn-ghost::after { display: none !important; }
  body.is-scrolling-fast .hero-visual-frame img { filter: none !important; }
  /* custom cursor removed */
  .integration-badge.is-floating { animation: none !important; }
  .text-shimmer { background: none !important; -webkit-text-fill-color: inherit !important; animation: none !important; }
  .result-value.is-bounced { animation: none !important; }
}
@media print {
  .btn-primary::after, .btn-ghost::after { display: none !important; }
}
