// Smooth scrolling for navigation 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' }); } }); }); // Contact form handling document.getElementById('contactForm').addEventListener('submit', function(e) { e.preventDefault(); // Get form data const formData = new FormData(this); const data = { name: formData.get('name'), email: formData.get('email'), company: formData.get('company'), interest: formData.get('interest'), message: formData.get('message') }; // In production, this would send to your backend/email service // For now, we'll show a success message [REDACTED: private contact or credential material] // Reset form this.reset(); // You can integrate with email services like: // - EmailJS // - FormSpree // - Your own backend API // Example: /* fetch('YOUR_API_ENDPOINT', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify(data) }) .then(response => response.json()) .then(data => { alert('Inquiry sent successfully!'); this.reset(); }) .catch(error => { console.error('Error:', error); [REDACTED: private contact or credential material] }); */ }); // Add active state to navigation on scroll window.addEventListener('scroll', function() { const sections = document.querySelectorAll('section[id]'); const navLinks = document.querySelectorAll('.nav-links a'); let current = ''; sections.forEach(section => { const sectionTop = section.offsetTop; const sectionHeight = section.clientHeight; if (pageYOffset >= (sectionTop - 200)) { current = section.getAttribute('id'); } }); navLinks.forEach(link => { link.classList.remove('active'); if (link.getAttribute('href') === `#${current}`) { link.classList.add('active'); } }); }); // Add fade-in animation on scroll const observerOptions = { threshold: 0.1, rootMargin: '0px 0px -100px 0px' }; const observer = new IntersectionObserver(function(entries) { entries.forEach(entry => { if (entry.isIntersecting) { entry.target.style.opacity = '1'; entry.target.style.transform = 'translateY(0)'; } }); }, observerOptions); // Observe all cards and sections for fade-in document.querySelectorAll('.system-card, .pricing-card, .spec-item').forEach(element => { element.style.opacity = '0'; element.style.transform = 'translateY(30px)'; element.style.transition = 'opacity 0.6s ease, transform 0.6s ease'; observer.observe(element); }); // Payment button handlers (to be integrated with actual payment systems) document.querySelectorAll('.pricing-button').forEach(button => { button.addEventListener('click', function(e) { const card = this.closest('.pricing-card'); const licenseType = card.querySelector('h3').textContent; // Scroll to contact form // In production, this would integrate with Stripe/payment gateway }); }); // Add loading state helper function function showLoading(element) { element.innerHTML = 'Processing...'; element.disabled = true; } function hideLoading(element, text) { element.innerHTML = text; element.disabled = false; } // Navbar background on scroll window.addEventListener('scroll', function() { const header = document.querySelector('header'); if (window.scrollY > 50) { header.style.background = 'rgba(26, 26, 46, 0.98)'; header.style.backdropFilter = 'blur(10px)'; } else { header.style.background = 'var(--dark)'; header.style.backdropFilter = 'none'; } }); console.log('ThatAIGuy.org - Enterprise AGI Systems'); console.log('For licensing inquiries: [author/contact email redacted]'); [REDACTED: private contact or credential material]