File size: 1,381 Bytes
a0eb9e2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Initialize feather icons
document.addEventListener('DOMContentLoaded', function() {
    feather.replace();
});

// Simple animation for feature cards on scroll
const observerOptions = {
    root: null,
    rootMargin: '0px',
    threshold: 0.1
};

const observer = new IntersectionObserver((entries) => {
    entries.forEach(entry => {
        if (entry.isIntersecting) {
            entry.target.style.opacity = 1;
            entry.target.style.transform = 'translateY(0)';
        }
    });
}, observerOptions);

// Apply animation to feature cards
document.querySelectorAll('.bg-gray-800').forEach(card => {
    card.style.opacity = 0;
    card.style.transform = 'translateY(20px)';
    card.style.transition = 'opacity 0.5s ease, transform 0.5s ease';
    observer.observe(card);
});

// Simulate unlock process
document.querySelectorAll('button').forEach(button => {
    button.addEventListener('click', function() {
        const originalText = this.textContent;
        this.innerHTML = '<i data-feather="loader" class="animate-spin"></i> Processing...';
        feather.replace();
        
        setTimeout(() => {
            this.innerHTML = '<i data-feather="check-circle"></i> Success!';
            feather.replace();
            
            setTimeout(() => {
                this.textContent = originalText;
            }, 2000);
        }, 3000);
    });
});