/* =====================================================
   LAUNCHPAD - ANIMATIONS STYLESHEET
   CSS Animations & Effects
   ===================================================== */

/* =====================================================
   TABLE OF CONTENTS
   =====================================================
   1. Keyframe Animations
   2. Floating Elements
   3. Gradient Animations
   4. Hover Effects
   5. Page Transitions
   6. Loading States
   7. Scroll Animations
   8. Button Effects
   9. Card Effects
   10. Text Effects
   ===================================================== */

/* =====================================================
   1. KEYFRAME ANIMATIONS
   ===================================================== */

/* Float Animation - Gentle up and down movement */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Float with rotation */
@keyframes floatRotate {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(2deg);
    }
    50% {
        transform: translateY(-20px) rotate(0deg);
    }
    75% {
        transform: translateY(-10px) rotate(-2deg);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* Pulse Glow */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(99, 102, 241, 0.6);
    }
}

/* Gradient Shift Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Rotate Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-7px);
    }
}

/* Shake Animation */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Down */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Left */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fade In Right */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale In */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Blob Animation */
@keyframes blobMove {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(20px, -30px) scale(1.1);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    75% {
        transform: translate(30px, 10px) scale(1.05);
    }
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Spin Animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* =====================================================
   2. FLOATING ELEMENTS
   ===================================================== */

/* Apply floating animation to hero cards */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card.card-1 {
    animation-delay: 0s;
}

.floating-card.card-2 {
    animation-delay: 2s;
}

.floating-card.card-3 {
    animation-delay: 4s;
}

/* Hero blobs animation */
.hero-blob {
    animation: blobMove 20s ease-in-out infinite;
}

.blob-1 {
    animation-delay: 0s;
}

.blob-2 {
    animation-delay: 5s;
}

.blob-3 {
    animation-delay: 10s;
}

/* Floating icon effect */
.float-icon {
    animation: float 4s ease-in-out infinite;
}

/* =====================================================
   3. GRADIENT ANIMATIONS
   ===================================================== */

/* Animated gradient background */
.gradient-animated {
    background: linear-gradient(
        -45deg,
        #6366f1,
        #8b5cf6,
        #06b6d4,
        #6366f1
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* Gradient text animation */
.gradient-text-animated {
    background: linear-gradient(
        90deg,
        #6366f1,
        #8b5cf6,
        #ec4899,
        #6366f1
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
}

/* Gradient border animation */
.gradient-border-animated {
    position: relative;
    background: white;
    border-radius: 16px;
}

.gradient-border-animated::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(
        45deg,
        #6366f1,
        #8b5cf6,
        #06b6d4,
        #6366f1
    );
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    animation: gradientShift 10s ease infinite;
}

/* =====================================================
   4. HOVER EFFECTS
   ===================================================== */

/* Card lift effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Card scale effect */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.03);
}

/* Card glow effect */
.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
}

/* Icon rotate on hover */
.hover-rotate {
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(15deg);
}

/* Icon bounce on hover */
.hover-bounce:hover {
    animation: bounce 0.6s ease;
}

/* Link underline animation */
.hover-underline {
    position: relative;
}

.hover-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.hover-underline:hover::after {
    width: 100%;
}

/* Feature card hover effect */
.feature-card {
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(99, 102, 241, 0.05) 0%,
        rgba(139, 92, 246, 0.05) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Pricing card hover effect */
.pricing-card {
    position: relative;
    overflow: hidden;
}

.pricing-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(99, 102, 241, 0.1) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

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

/* =====================================================
   5. PAGE TRANSITIONS
   ===================================================== */

/* Page fade in */
.page-transition {
    animation: fadeInUp 0.6s ease forwards;
}

/* Staggered children animation */
.stagger-children > * {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.6s; }

/* Section reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* =====================================================
   6. LOADING STATES
   ===================================================== */

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(
        90deg,
        #f1f5f9 25%,
        #e2e8f0 50%,
        #f1f5f9 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

/* Pulse loading */
.loading-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Dots loading */
.loading-dots {
    display: flex;
    gap: 8px;
}

.loading-dots span {
    width: 10px;
    height: 10px;
    background: #6366f1;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

/* =====================================================
   7. SCROLL ANIMATIONS
   ===================================================== */

/* Parallax effect */
.parallax {
    transition: transform 0.1s ease-out;
}

/* Scroll progress indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gradient-primary);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Scroll to top button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

/* =====================================================
   8. BUTTON EFFECTS
   ===================================================== */

/* Button ripple effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

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

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Button shine effect */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s ease;
}

.btn-shine:hover::before {
    left: 100%;
}

/* Button pulse effect */
.btn-pulse {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* =====================================================
   9. CARD EFFECTS
   ===================================================== */

/* 3D tilt effect (requires JS) */
.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.card-3d:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
}

/* Card shine effect */
.card-shine {
    position: relative;
    overflow: hidden;
}

.card-shine::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    transition: transform 0.6s ease;
}

.card-shine:hover::before {
    transform: rotate(45deg) translate(50%, 50%);
}

/* Card border glow */
.card-border-glow {
    position: relative;
}

.card-border-glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, #6366f1, #8b5cf6, #06b6d4);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-border-glow:hover::before {
    opacity: 1;
}

/* =====================================================
   10. TEXT EFFECTS
   ===================================================== */

/* Typewriter effect */
.typewriter {
    overflow: hidden;
    border-right: 2px solid #6366f1;
    white-space: nowrap;
    animation:
        typing 3.5s steps(40, end),
        blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #6366f1; }
}

/* Text reveal animation */
.text-reveal {
    position: relative;
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    transform: translateY(100%);
    animation: textReveal 0.6s ease forwards;
}

@keyframes textReveal {
    to {
        transform: translateY(0);
    }
}

/* Glowing text */
.text-glow {
    text-shadow:
        0 0 10px rgba(99, 102, 241, 0.5),
        0 0 20px rgba(99, 102, 241, 0.3),
        0 0 30px rgba(99, 102, 241, 0.2);
}

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

    .floating-card,
    .hero-blob,
    .float-icon {
        animation: none;
    }
}
