@tailwind base;
@tailwind components;
@tailwind utilities;

/* Custom styles */
@layer base {
  html {
    scroll-behavior: smooth;
  }
}

@layer components {
  .hero-gradient-overlay {
    @apply absolute inset-0 bg-gradient-to-b from-white/80 to-transparent pointer-events-none z-0;
  }
}

/* Animations */
@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(20px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Animation Classes */
.animate-float {
  animation: float 6s ease-in-out infinite;
  will-change: transform;
  transform: translateY(0);
}

.animate-pulse-subtle {
  animation: pulse 3s ease-in-out infinite;
  will-change: transform;
}

.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
}

.fade-in {
  opacity: 0;
}

/* Intersection Observer Triggered Animations */
.fade-in-up.visible {
  animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in.visible {
  animation: fadeIn 0.8s ease-out forwards;
}

.delay-100 {
  animation-delay: 100ms;
}

.delay-200 {
  animation-delay: 200ms;
}

.delay-300 {
  animation-delay: 300ms;
}

.delay-400 {
  animation-delay: 400ms;
}

/* Blob Animation */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.7;
  transform-origin: center;
  animation: blob-float 15s ease-in-out infinite;
  mix-blend-mode: multiply;
}

.blob-1 {
  background: rgba(29, 78, 216, 0.55);  /* darker blue-700 */
  width: 600px;
  height: 600px;
  left: -5%;
  top: 15%;
  animation-delay: 0s;
}

.blob-2 {
  background: rgba(37, 99, 235, 0.5);  /* blue-600 */
  width: 800px;
  height: 800px;
  right: -10%;
  top: 5%;
  animation-delay: -5s;
}

.blob-3 {
  background: rgba(29, 78, 216, 0.45);  /* darker blue-700 */
  width: 500px;
  height: 500px;
  left: 35%;
  top: 40%;
  animation-delay: -2s;
}

/* Hero Animations */
.hero-tools-float {
  transform: translateY(0);
  animation: tools-float 6s ease-in-out infinite;
}

.fade-delay-1 {
  animation-delay: 0.2s;
}

.fade-delay-2 {
  animation-delay: 0.4s;
}

.fade-delay-3 {
  animation-delay: 0.6s;
}

.badge-hover {
  transition: transform 0.2s ease;
}

.badge-hover:hover {
  transform: translateY(-2px);
}

.cta-pulse {
  transform: scale(1);
  animation: cta-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Keyframes */
@keyframes blob-float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(5%, 5%) scale(1.1);
  }
  50% {
    transform: translate(-5%, 8%) scale(0.9);
  }
  75% {
    transform: translate(7%, -5%) scale(1.05);
  }
}

@keyframes tools-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(15px);
  }
}

@keyframes cta-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Sparkle Animation */
.sparkle-bg {
    position: relative;
    overflow: hidden;
}

.sparkle {
    position: absolute;
    width: 8px;
    height: 8px;
    pointer-events: none;
}

.sparkle::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    clip-path: path('M4 0C4 0 8 4 8 4C8 4 4 8 4 8C4 8 0 4 0 4C0 4 4 0 4 0Z');
}

@keyframes sparkle-fade {
    0%, 100% { opacity: 0; transform: scale(0); }
    25% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1); }
    75% { opacity: 0.3; transform: scale(0.8); }
}

/* Generate multiple sparkles with different positions, scales, and timings */
.sparkle:nth-child(1) { left: 5%; top: 10%; }
.sparkle:nth-child(1)::before { animation: sparkle-fade 3s ease-in-out infinite; }
.sparkle:nth-child(2) { left: 15%; top: 20%; }
.sparkle:nth-child(2)::before { animation: sparkle-fade 4s ease-in-out 0.5s infinite; }
.sparkle:nth-child(3) { left: 25%; top: 15%; }
.sparkle:nth-child(3)::before { animation: sparkle-fade 3.5s ease-in-out 1s infinite; }
.sparkle:nth-child(4) { left: 35%; top: 25%; }
.sparkle:nth-child(4)::before { animation: sparkle-fade 4.5s ease-in-out 1.5s infinite; }
.sparkle:nth-child(5) { left: 45%; top: 10%; }
.sparkle:nth-child(5)::before { animation: sparkle-fade 3s ease-in-out 2s infinite; }
.sparkle:nth-child(6) { left: 55%; top: 20%; }
.sparkle:nth-child(6)::before { animation: sparkle-fade 4s ease-in-out 2.5s infinite; }
.sparkle:nth-child(7) { left: 65%; top: 15%; }
.sparkle:nth-child(7)::before { animation: sparkle-fade 3.5s ease-in-out 3s infinite; }
.sparkle:nth-child(8) { left: 75%; top: 25%; }
.sparkle:nth-child(8)::before { animation: sparkle-fade 4.5s ease-in-out 3.5s infinite; }
.sparkle:nth-child(9) { left: 85%; top: 10%; }
.sparkle:nth-child(9)::before { animation: sparkle-fade 3s ease-in-out 4s infinite; }
.sparkle:nth-child(10) { left: 95%; top: 20%; }
.sparkle:nth-child(10)::before { animation: sparkle-fade 4s ease-in-out 4.5s infinite; }
.sparkle:nth-child(11) { left: 10%; top: 30%; }
.sparkle:nth-child(11)::before { animation: sparkle-fade 3.5s ease-in-out 0.2s infinite; }
.sparkle:nth-child(12) { left: 20%; top: 40%; }
.sparkle:nth-child(12)::before { animation: sparkle-fade 4.5s ease-in-out 0.7s infinite; }
.sparkle:nth-child(13) { left: 30%; top: 35%; }
.sparkle:nth-child(13)::before { animation: sparkle-fade 3s ease-in-out 1.2s infinite; }
.sparkle:nth-child(14) { left: 40%; top: 45%; }
.sparkle:nth-child(14)::before { animation: sparkle-fade 4s ease-in-out 1.7s infinite; }
.sparkle:nth-child(15) { left: 50%; top: 30%; }
.sparkle:nth-child(15)::before { animation: sparkle-fade 3.5s ease-in-out 2.2s infinite; }
.sparkle:nth-child(16) { left: 60%; top: 40%; }
.sparkle:nth-child(16)::before { animation: sparkle-fade 4.5s ease-in-out 2.7s infinite; }
.sparkle:nth-child(17) { left: 70%; top: 35%; }
.sparkle:nth-child(17)::before { animation: sparkle-fade 3s ease-in-out 3.2s infinite; }
.sparkle:nth-child(18) { left: 80%; top: 45%; }
.sparkle:nth-child(18)::before { animation: sparkle-fade 4s ease-in-out 3.7s infinite; }
.sparkle:nth-child(19) { left: 90%; top: 30%; }
.sparkle:nth-child(19)::before { animation: sparkle-fade 3.5s ease-in-out 4.2s infinite; }
.sparkle:nth-child(20) { left: 8%; top: 50%; }
.sparkle:nth-child(20)::before { animation: sparkle-fade 4.5s ease-in-out 4.7s infinite; }
.sparkle:nth-child(21) { left: 18%; top: 60%; }
.sparkle:nth-child(21)::before { animation: sparkle-fade 3s ease-in-out 0.3s infinite; }
.sparkle:nth-child(22) { left: 28%; top: 55%; }
.sparkle:nth-child(22)::before { animation: sparkle-fade 4s ease-in-out 0.8s infinite; }
.sparkle:nth-child(23) { left: 38%; top: 65%; }
.sparkle:nth-child(23)::before { animation: sparkle-fade 3.5s ease-in-out 1.3s infinite; }
.sparkle:nth-child(24) { left: 48%; top: 50%; }
.sparkle:nth-child(24)::before { animation: sparkle-fade 4.5s ease-in-out 1.8s infinite; }
.sparkle:nth-child(25) { left: 58%; top: 60%; }
.sparkle:nth-child(25)::before { animation: sparkle-fade 3s ease-in-out 2.3s infinite; }
.sparkle:nth-child(26) { left: 68%; top: 55%; }
.sparkle:nth-child(26)::before { animation: sparkle-fade 4s ease-in-out 2.8s infinite; }
.sparkle:nth-child(27) { left: 78%; top: 65%; }
.sparkle:nth-child(27)::before { animation: sparkle-fade 3.5s ease-in-out 3.3s infinite; }
.sparkle:nth-child(28) { left: 88%; top: 50%; }
.sparkle:nth-child(28)::before { animation: sparkle-fade 4.5s ease-in-out 3.8s infinite; }
.sparkle:nth-child(29) { left: 13%; top: 70%; }
.sparkle:nth-child(29)::before { animation: sparkle-fade 3s ease-in-out 4.3s infinite; }
.sparkle:nth-child(30) { left: 23%; top: 80%; }
.sparkle:nth-child(30)::before { animation: sparkle-fade 4s ease-in-out 4.8s infinite; }
.sparkle:nth-child(31) { left: 33%; top: 75%; }
.sparkle:nth-child(31)::before { animation: sparkle-fade 3.5s ease-in-out 0.4s infinite; }
.sparkle:nth-child(32) { left: 43%; top: 85%; }
.sparkle:nth-child(32)::before { animation: sparkle-fade 4.5s ease-in-out 0.9s infinite; }
.sparkle:nth-child(33) { left: 53%; top: 70%; }
.sparkle:nth-child(33)::before { animation: sparkle-fade 3s ease-in-out 1.4s infinite; }
.sparkle:nth-child(34) { left: 63%; top: 80%; }
.sparkle:nth-child(34)::before { animation: sparkle-fade 4s ease-in-out 1.9s infinite; }
.sparkle:nth-child(35) { left: 73%; top: 75%; }
.sparkle:nth-child(35)::before { animation: sparkle-fade 3.5s ease-in-out 2.4s infinite; }
.sparkle:nth-child(36) { left: 83%; top: 85%; }
.sparkle:nth-child(36)::before { animation: sparkle-fade 4.5s ease-in-out 2.9s infinite; }
.sparkle:nth-child(37) { left: 93%; top: 70%; }
.sparkle:nth-child(37)::before { animation: sparkle-fade 3s ease-in-out 3.4s infinite; }
.sparkle:nth-child(38) { left: 3%; top: 90%; }
.sparkle:nth-child(38)::before { animation: sparkle-fade 4s ease-in-out 3.9s infinite; }
.sparkle:nth-child(39) { left: 98%; top: 95%; }
.sparkle:nth-child(39)::before { animation: sparkle-fade 3.5s ease-in-out 4.4s infinite; }
.sparkle:nth-child(40) { left: 43%; top: 98%; }
.sparkle:nth-child(40)::before { animation: sparkle-fade 4.5s ease-in-out 4.9s infinite; }

/* Static Decorative Sparkles */
.sparkle-decoration {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
}

.sparkle-decoration::before {
    content: '';
    display: block;
    width: 48px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.9);
    clip-path: path('M12 0L15 9L24 12L15 15L12 24L9 15L0 12L9 9L12 0Z');
    transform: rotate(-15deg) scale(0.85);
    animation: sparkle-shimmer 2s ease-in-out infinite;
}

.sparkle-decoration::after {
    content: '';
    display: block;
    width: 48px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.9);
    clip-path: path('M12 0L15 9L24 12L15 15L12 24L9 15L0 12L9 9L12 0Z');
    transform: rotate(15deg) scale(0.85);
    animation: sparkle-shimmer-reverse 2s ease-in-out infinite;
}

.sparkle-small {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: rgba(255, 255, 255, 0.9);
    clip-path: path('M8 0L10 6L16 8L10 10L8 16L6 10L0 8L6 6L8 0Z');
}

.sparkle-small.top-left {
    top: -10px;
    left: -30px;
    transform: rotate(-30deg) scale(0.7);
    animation: sparkle-small-pulse 3s ease-in-out 0.5s infinite;
}

.sparkle-small.top-right {
    top: -10px;
    right: -30px;
    transform: rotate(30deg) scale(0.7);
    animation: sparkle-small-pulse-reverse 3s ease-in-out 1s infinite;
}

.sparkle-small.bottom-left {
    bottom: -10px;
    left: -25px;
    transform: rotate(-45deg) scale(0.6);
    animation: sparkle-small-pulse-alt 3s ease-in-out 1.5s infinite;
}

.sparkle-small.bottom-right {
    bottom: -10px;
    right: -25px;
    transform: rotate(45deg) scale(0.6);
    animation: sparkle-small-pulse-alt-reverse 3s ease-in-out 2s infinite;
}

@keyframes sparkle-shimmer {
    0%, 100% {
        opacity: 0.9;
        transform: rotate(-15deg) scale(0.85);
    }
    50% {
        opacity: 1;
        transform: rotate(-5deg) scale(0.95);
    }
}

@keyframes sparkle-shimmer-reverse {
    0%, 100% {
        opacity: 0.9;
        transform: rotate(15deg) scale(0.85);
    }
    50% {
        opacity: 1;
        transform: rotate(5deg) scale(0.95);
    }
}

@keyframes sparkle-small-pulse {
    0%, 100% {
        opacity: 0.9;
        transform: rotate(-30deg) scale(0.7);
    }
    50% {
        opacity: 1;
        transform: rotate(-20deg) scale(0.8);
    }
}

@keyframes sparkle-small-pulse-reverse {
    0%, 100% {
        opacity: 0.9;
        transform: rotate(30deg) scale(0.7);
    }
    50% {
        opacity: 1;
        transform: rotate(20deg) scale(0.8);
    }
}

@keyframes sparkle-small-pulse-alt {
    0%, 100% {
        opacity: 0.9;
        transform: rotate(-45deg) scale(0.6);
    }
    50% {
        opacity: 1;
        transform: rotate(-35deg) scale(0.7);
    }
}

@keyframes sparkle-small-pulse-alt-reverse {
    0%, 100% {
        opacity: 0.9;
        transform: rotate(45deg) scale(0.6);
    }
    50% {
        opacity: 1;
        transform: rotate(35deg) scale(0.7);
    }
}

/* Smaller sparkles for CTA section */
.sparkle-decoration.sparkle-small-set::before,
.sparkle-decoration.sparkle-small-set::after {
    width: 18px;
    height: 18px;
    clip-path: path('M9 0L11.25 6.75L18 9L11.25 11.25L9 18L6.75 11.25L0 9L6.75 6.75L9 0Z');
}

.sparkle-decoration.sparkle-small-set .sparkle-small {
    width: 12px;
    height: 12px;
    clip-path: path('M6 0L7.5 4.5L12 6L7.5 7.5L6 12L4.5 7.5L0 6L4.5 4.5L6 0Z');
}

.sparkle-decoration.sparkle-small-set .sparkle-small.top-left {
    top: -8px;
    left: -20px;
}

.sparkle-decoration.sparkle-small-set .sparkle-small.top-right {
    top: -8px;
    right: -20px;
}

.sparkle-decoration.sparkle-small-set .sparkle-small.bottom-left {
    bottom: -8px;
    left: -18px;
}

.sparkle-decoration.sparkle-small-set .sparkle-small.bottom-right {
    bottom: -8px;
    right: -18px;
} 

/* Shine Effect */
.shine-container {
    position: relative;
    overflow: hidden;
}

.shine-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 100%
    );
    transform: skewX(-25deg);
    pointer-events: none;
}

.shine-container.shine-animate::before {
    animation: shine 2s ease-in-out forwards;
}

@keyframes shine {
    0% {
        left: -150%;
    }
    100% {
        left: 150%;
    }
} 