/* ═══════════════════════════════════════════════
   FlowAI — Custom Styles
   ═══════════════════════════════════════════════ */

/* ─── Base Reset & Smooth Scroll ─── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* ─── Custom Scrollbar ─── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0f0f1a;
}
::-webkit-scrollbar-thumb {
  background: #2e1065;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #4c1d95;
}

/* ─── Selection Color ─── */
::selection {
  background: rgba(109, 40, 217, 0.3);
  color: #fff;
}

/* ═══════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════ */
#navbar {
  background: transparent;
  backdrop-filter: none;
}

#navbar.scrolled {
  background: rgba(15, 15, 26, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #7f40ff, #3b82f6);
  border-radius: 1px;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* ═══════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════ */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:active::before {
  width: 300px;
  height: 300px;
}

/* ═══════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════ */
#hero-canvas {
  opacity: 0.6;
}

/* Scroll indicator bounce animation */
.scroll-indicator .scroll-dot {
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.3; }
}

/* ═══════════════════════════════════════════════
   FEATURE CARDS — Glow Effect
   ═══════════════════════════════════════════════ */
.feature-card {
  position: relative;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
              border-color 0.5s ease,
              box-shadow 0.5s ease;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 1rem;
  padding: 1px;
  background: linear-gradient(135deg, transparent 0%, transparent 100%);
  -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;
  opacity: 0;
  transition: opacity 0.5s ease, background 0.5s ease;
  pointer-events: none;
}

.feature-card:hover {
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.4);
}

.feature-card:hover::before {
  opacity: 1;
  background: linear-gradient(135deg, rgba(127, 64, 255, 0.3), rgba(59, 130, 246, 0.3));
}

/* ═══════════════════════════════════════════════
   TIMELINE
   ═══════════════════════════════════════════════ */
.timeline-line {
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(127, 64, 255, 0.5) 10%,
    rgba(59, 130, 246, 0.5) 50%,
    rgba(139, 92, 246, 0.5) 90%,
    transparent 100%
  );
}

.step-dot {
  position: relative;
}

.step-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: inherit;
  opacity: 0;
  filter: blur(8px);
  z-index: -1;
  transition: opacity 0.5s ease;
}

.step-item:hover .step-dot::after {
  opacity: 0.4;
}

/* ═══════════════════════════════════════════════
   PRICING CARDS
   ═══════════════════════════════════════════════ */
.pricing-card {
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
              border-color 0.5s ease,
              box-shadow 0.5s ease;
}

.pricing-card:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.pricing-card.popular {
  transform: scale(1.02);
}

.pricing-card.popular:hover {
  transform: scale(1.05);
}

/* Popular badge pulse */
.popular-badge {
  animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(109, 40, 217, 0.3); }
  50% { box-shadow: 0 4px 30px rgba(109, 40, 217, 0.5); }
}

/* ═══════════════════════════════════════════════
   TESTIMONIAL CAROUSEL
   ═══════════════════════════════════════════════ */
.carousel-dot {
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dot.active {
  background: #6d28d9;
  width: 24px;
  border-radius: 9999px;
}

/* ═══════════════════════════════════════════════
   CTA SECTION — Animated Gradient
   ═══════════════════════════════════════════════ */
.cta-gradient {
  background: linear-gradient(
    135deg,
    #0f0f1a 0%,
    #1a0a3e 25%,
    #0e1a3d 50%,
    #1a0a3e 75%,
    #0f0f1a 100%
  );
  background-size: 400% 400%;
  animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ═══════════════════════════════════════════════
   FLOATING ANIMATIONS
   ═══════════════════════════════════════════════ */
@keyframes float-slow {
  0%, 100% { transform: translateY(0) translateX(0); }
  33% { transform: translateY(-20px) translateX(10px); }
  66% { transform: translateY(10px) translateX(-10px); }
}

@keyframes float-slower {
  0%, 100% { transform: translateY(0) translateX(0); }
  33% { transform: translateY(15px) translateX(-15px); }
  66% { transform: translateY(-10px) translateX(20px); }
}

.animate-float-slow {
  animation: float-slow 8s ease-in-out infinite;
}

.animate-float-slower {
  animation: float-slower 12s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════
   SECTION LABEL ANIMATIONS (GSAP will handle these)
   ═══════════════════════════════════════════════ */
.section-label,
.section-title,
.section-subtitle {
  will-change: transform, opacity;
}

.feature-card,
.pricing-card,
.step-item {
  will-change: transform, opacity;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE ADJUSTMENTS
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  #hero-canvas {
    opacity: 0.3;
  }

  .pricing-card.popular {
    transform: scale(1);
  }

  .pricing-card.popular:hover {
    transform: scale(1.02);
  }
}

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

  .scroll-indicator .scroll-dot {
    animation: none;
  }

  .cta-gradient {
    animation: none;
  }

  .popular-badge {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}
