/* ═══════════════════════════════════════════════════════════════
   Micro-Interactions & 3D Tilt Effects (v2 Redesign)
   ═══════════════════════════════════════════════════════════════ */

/* ── 3D Tilt Card System ──────────────────────────────────── */
.tilt-card {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
  will-change: transform;
}

.tilt-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(124, 92, 255, 0.15),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: -1;
}

.tilt-card:hover::before {
  opacity: 1;
}

/* Apply to bento cards */
.bento-card {
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, box-shadow 0.3s ease;
  will-change: transform;
}

/* Enhanced glassmorphism on hover */
.bento-card:hover {
  backdrop-filter: blur(24px) saturate(180%);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 0 40px rgba(124, 92, 255, 0.15);
}

/* 3D Depth Effect on Inner Elements */
.bento-icon,
.bento-title,
.bento-desc {
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}

.bento-card:hover .bento-icon {
  transform: translateZ(20px) scale(1.05);
}

.bento-card:hover .bento-title {
  transform: translateZ(10px);
}

/* ── Cursor Glow System ──────────────────────────────────── */
.cursor-glow-container {
  position: relative;
  overflow: hidden;
}

.cursor-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(124, 92, 255, 0.08) 0%,
    rgba(46, 229, 157, 0.04) 40%,
    transparent 70%
  );
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  opacity: 0;
  will-change: transform;
  z-index: 0;
}

.cursor-glow-container:hover .cursor-glow {
  opacity: 1;
}

/* ── Button Magnetic Effect ──────────────────────────────── */
.btn-magnetic {
  position: relative;
  transition: transform 0.15s ease-out;
  will-change: transform;
}

.btn-magnetic:hover {
  transform: scale(1.02);
}

/* ── Pricing Card Enhanced Hover ──────────────────────────── */
.pricing-card {
  position: relative;
  transform-style: preserve-3d;
  transition: all 0.3s ease;
  overflow: hidden;
}

.pricing-card::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--accent2) 100%
  );
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
  filter: blur(8px);
}

.pricing-card:hover::after {
  opacity: 0.15;
}

.pricing-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 24px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset,
    0 0 60px rgba(124, 92, 255, 0.2);
}

.pricing-card--highlight:hover {
  box-shadow: 
    0 32px 64px rgba(124, 92, 255, 0.3),
    0 0 0 2px var(--accent) inset,
    0 0 80px rgba(124, 92, 255, 0.4);
}

/* ── Testimonial Card Tilt ──────────────────────────────── */
.testimonial-card {
  transform-style: preserve-3d;
  transition: transform 0.2s ease-out, box-shadow 0.3s ease;
}

.testimonial-card:hover {
  box-shadow: 
    0 16px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

/* ── Selection Card (Form) Enhanced ──────────────────────── */
.selection-card {
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.selection-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(124, 92, 255, 0.05),
    rgba(46, 229, 157, 0.05)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.selection-card:hover::before {
  opacity: 1;
}

.selection-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(124, 92, 255, 0.4);
  box-shadow: 
    0 12px 32px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(124, 92, 255, 0.3) inset,
    0 0 40px rgba(124, 92, 255, 0.15);
}

.selection-card input:checked ~ .selection-content {
  transform: scale(1.05);
}

/* ── Nav Link Underline Animation ──────────────────────────── */
.nav__links a {
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
}

.nav__links a:hover::after {
  width: 100%;
}

/* ── Badge Pulse Effect ──────────────────────────────────── */
.badge {
  position: relative;
  animation: badge-pulse 3s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(124, 92, 255, 0);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(124, 92, 255, 0.15);
  }
}

.badge:hover {
  animation: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(124, 92, 255, 0.2);
}

/* ── CTA Button Ripple Effect ──────────────────────────────── */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 70%
  );
  opacity: 0;
  transform: scale(0);
  transition: transform 0.6s ease-out, opacity 0.3s ease-out;
}

.btn:active::before {
  transform: scale(2.5);
  opacity: 1;
  transition: transform 0s, opacity 0s;
}

/* ── Deep Card Hover Lift ──────────────────────────────────── */
.deep-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.deep-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 
    0 20px 48px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.deep-card__icon {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.deep-card:hover .deep-card__icon {
  transform: scale(1.15) rotate(5deg);
}

/* ── FAQ Item Smooth Expand ──────────────────────────────── */
.faq-item[open] summary {
  color: var(--accent2);
}

.faq-item summary {
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.faq-item summary:hover {
  padding-left: 8px;
  color: var(--accent);
}

/* ── Hero Visual Parallax Effect ──────────────────────────── */
.hero__visual {
  transition: transform 0.1s ease-out;
}

/* Applied via JS */
.hero__visual.parallax {
  transform: translateY(var(--parallax-y, 0)) scale(1.02);
}

/* ── Mobile CTA Slide-in Animation ──────────────────────────── */
.mobile-cta {
  animation: slide-up 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slide-up {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ── Gradient Text Shimmer ──────────────────────────────── */
.gradient-text {
  background-size: 200% auto;
  animation: gradient-shimmer 3s linear infinite;
}

@keyframes gradient-shimmer {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* ── Smooth Scroll Snap (Optional Enhancement) ──────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
  
  /* Subtle entrance animations */
  .fade-in {
    animation: fade-in-up 0.6s ease-out backwards;
  }
  
  @keyframes fade-in-up {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
