/* ============================================
   HeliosDB - Animations & Scroll Effects
   ============================================ */

/* Scroll-triggered fade animations */
.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* Section reveal */
.section-header,
.feature-card,
.tier-card,
.pricing-card,
.metric-card,
.investor-card,
.dev-info-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.section-header.visible,
.feature-card.visible,
.tier-card.visible,
.pricing-card.visible,
.metric-card.visible,
.investor-card.visible,
.dev-info-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered card reveals */
.feature-card:nth-child(1) { transition-delay: 0s; }
.feature-card:nth-child(2) { transition-delay: 0.08s; }
.feature-card:nth-child(3) { transition-delay: 0.16s; }
.feature-card:nth-child(4) { transition-delay: 0.24s; }
.feature-card:nth-child(5) { transition-delay: 0.32s; }
.feature-card:nth-child(6) { transition-delay: 0.4s; }

.tier-card:nth-child(1) { transition-delay: 0s; }
.tier-card:nth-child(2) { transition-delay: 0.1s; }
.tier-card:nth-child(3) { transition-delay: 0.2s; }

.pricing-card:nth-child(1) { transition-delay: 0s; }
.pricing-card:nth-child(2) { transition-delay: 0.1s; }
.pricing-card:nth-child(3) { transition-delay: 0.2s; }

.metric-card:nth-child(1) { transition-delay: 0s; }
.metric-card:nth-child(2) { transition-delay: 0.08s; }
.metric-card:nth-child(3) { transition-delay: 0.16s; }
.metric-card:nth-child(4) { transition-delay: 0.24s; }

/* Neon glow pulse */
@keyframes neon-pulse {
    0%, 100% {
        filter: drop-shadow(0 0 6px rgba(158, 140, 252, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 16px rgba(158, 140, 252, 0.5));
    }
}

.logo-icon {
    animation: neon-pulse 3s ease-in-out infinite;
}

/* Gradient shimmer */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-text {
    background-size: 200% 200%;
    animation: gradient-shift 6s ease infinite;
}

/* Hero glow float */
@keyframes glow-float-1 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(30px, -20px); }
    50% { transform: translate(-20px, 30px); }
    75% { transform: translate(20px, 20px); }
}

@keyframes glow-float-2 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-30px, 20px); }
    50% { transform: translate(20px, -30px); }
    75% { transform: translate(-20px, -20px); }
}

@keyframes glow-float-3 {
    0%, 100% { transform: translateX(-50%) translate(0, 0); }
    33% { transform: translateX(-50%) translate(30px, -15px); }
    66% { transform: translateX(-50%) translate(-30px, 15px); }
}

.hero-glow-1 { animation: glow-float-1 15s ease-in-out infinite; }
.hero-glow-2 { animation: glow-float-2 18s ease-in-out infinite; }
.hero-glow-3 { animation: glow-float-3 12s ease-in-out infinite; }

/* Feature card hover glow */
.feature-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(158, 140, 252, 0.06) 0%, transparent 60%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Comparison table row highlight */
.comparison-table tbody tr {
    transition: background 0.2s ease;
}

.comparison-table tbody tr:hover {
    background: rgba(158, 140, 252, 0.03);
}

/* Use case card entrance */
.uc-card {
    transition: all 0.25s ease, opacity 0.4s ease, transform 0.4s ease;
}

/* Button hover scale */
.btn:active {
    transform: scale(0.98);
}

/* Nav link hover glow */
.nav-link:hover {
    text-shadow: 0 0 20px rgba(158, 140, 252, 0.3);
}

/* Metric value counting animation placeholder */
.metric-value {
    transition: all 0.5s ease;
}

/* Code block typing cursor */
.hero-code::after {
    content: '';
    display: inline-block;
    width: 2px;
    height: 16px;
    background: var(--neon-purple);
    animation: blink-cursor 1s step-end infinite;
    position: absolute;
    bottom: 28px;
    right: 28px;
}

@keyframes blink-cursor {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* CTA glow animation */
.cta-glow {
    animation: cta-pulse 4s ease-in-out infinite;
}

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

/* Scroll indicator */
@keyframes scroll-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* Mobile hamburger animation */
.nav-hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

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

    .animate-fade-up {
        opacity: 1;
        transform: none;
    }

    .section-header,
    .feature-card,
    .tier-card,
    .pricing-card,
    .metric-card,
    .investor-card,
    .dev-info-card {
        opacity: 1;
        transform: none;
    }
}
