Changed around line 1
+ document.addEventListener('DOMContentLoaded', () => {
+ // Animate nodes
+ const nodes = document.querySelectorAll('.node');
+ nodes.forEach(node => {
+ node.style.transform = `translate(${Math.random() * 100}px, ${Math.random() * 100}px)`;
+ });
+
+ // Smooth scroll for navigation
+ document.querySelectorAll('a[href^="#"]').forEach(anchor => {
+ anchor.addEventListener('click', function (e) {
+ e.preventDefault();
+ document.querySelector(this.getAttribute('href')).scrollIntoView({
+ behavior: 'smooth'
+ });
+ });
+ });
+
+ // Add intersection observer for fade-in animations
+ const observer = new IntersectionObserver((entries) => {
+ entries.forEach(entry => {
+ if (entry.isIntersecting) {
+ entry.target.classList.add('visible');
+ }
+ });
+ }, { threshold: 0.1 });
+
+ document.querySelectorAll('.feature-card, .price-card').forEach((el) => observer.observe(el));
+
+ // Create dynamic connection lines between nodes
+ const networkContainer = document.querySelector('.node-network');
+ if (networkContainer) {
+ const canvas = document.createElement('canvas');
+ canvas.style.position = 'absolute';
+ canvas.style.top = '0';
+ canvas.style.left = '0';
+ canvas.style.width = '100%';
+ canvas.style.height = '100%';
+ networkContainer.appendChild(canvas);
+
+ const ctx = canvas.getContext('2d');
+
+ function drawConnections() {
+ canvas.width = networkContainer.offsetWidth;
+ canvas.height = networkContainer.offsetHeight;
+
+ ctx.strokeStyle = 'rgba(99,102,241,0.2)';
+ ctx.lineWidth = 2;
+
+ nodes.forEach((node1, i) => {
+ nodes.forEach((node2, j) => {
+ if (i < j) {
+ const rect1 = node1.getBoundingClientRect();
+ const rect2 = node2.getBoundingClientRect();
+ const containerRect = networkContainer.getBoundingClientRect();
+
+ ctx.beginPath();
+ ctx.moveTo(
+ rect1.left - containerRect.left + rect1.width/2,
+ rect1.top - containerRect.top + rect1.height/2
+ );
+ ctx.lineTo(
+ rect2.left - containerRect.left + rect2.width/2,
+ rect2.top - containerRect.top + rect2.height/2
+ );
+ ctx.stroke();
+ }
+ });
+ });
+ }
+
+ window.addEventListener('resize', drawConnections);
+ setInterval(drawConnections, 100);
+ }
+ });