/* Minification failed. Returning unminified contents.
(1,1): run-time error CSS1019: Unexpected token, found '('
(1,11): run-time error CSS1031: Expected selector, found '('
(1,11): run-time error CSS1025: Expected comma or open brace, found '('
(94,2): run-time error CSS1019: Unexpected token, found ')'
(94,3): run-time error CSS1019: Unexpected token, found '('
(94,4): run-time error CSS1019: Unexpected token, found ')'
 */
(function () {
    "use strict";

    // Scroll animations
    const observerOptions = {
        threshold: 0.1,
        rootMargin: '0px 0px -50px 0px'
    };

    const observer = new IntersectionObserver((entries) => {
        entries.forEach(entry => {
            if (entry.isIntersecting) {
                entry.target.classList.add('visible');
            }
        });
    }, observerOptions);

    document.querySelectorAll('.fade-in').forEach(el => {
        observer.observe(el);
    });

    // Navbar scroll effect
    window.addEventListener('scroll', () => {
        const nav = document.getElementById('nav');
        if (window.scrollY > 50) {
            nav.classList.add('scrolled');
        } else {
            nav.classList.remove('scrolled');
        }
    });

    // Smooth scrolling for anchor links
    document.querySelectorAll('a[href^="#"]').forEach(anchor => {
        anchor.addEventListener('click', function (e) {
            e.preventDefault();
            const target = document.querySelector(this.getAttribute('href'));
            if (target) {
                target.scrollIntoView({
                    behavior: 'smooth',
                    block: 'start'
                });
            }
        });
    });

    // FAQ Accordion
    document.querySelectorAll('.faq-question').forEach(question => {
        question.addEventListener('click', () => {
            const faqItem = question.parentElement;
            const isActive = faqItem.classList.contains('active');

            // Close all other FAQ items
            document.querySelectorAll('.faq-item').forEach(item => {
                item.classList.remove('active');
            });

            // Toggle current item
            if (!isActive) {
                faqItem.classList.add('active');
            }
        });
    });

    // Billing Toggle
    const billingToggle = document.getElementById('billing-toggle');
    const priceElement = document.getElementById('pro-price');
    const periodElement = document.getElementById('pro-period');
    const annualNote = document.getElementById('annual-note');
    const monthlyLabel = document.getElementById('monthly-label');
    const annualLabel = document.getElementById('annual-label');

    if (billingToggle) {
        billingToggle.addEventListener('change', function () {
            if (this.checked) {
                // Annual pricing
                priceElement.textContent = '$4';
                periodElement.textContent = '/month';
                annualNote.style.display = 'block';
                monthlyLabel.classList.remove('active');
                annualLabel.classList.add('active');
            } else {
                // Monthly pricing
                priceElement.textContent = '$5';
                periodElement.textContent = '/month';
                annualNote.style.display = 'none';
                monthlyLabel.classList.add('active');
                annualLabel.classList.remove('active');
            }
        });

        // Set initial state
        monthlyLabel.classList.add('active');
    }
})();
