// Мобильное меню const hamburger = document.getElementById('hamburger-menu'); const navLinks = document.querySelector('.nav-links'); hamburger.addEventListener('click', () => { navLinks.classList.toggle('active'); }); hamburger.addEventListener('keypress', (e) => { if (e.key === 'Enter') navLinks.classList.toggle('active'); }); // Плавный скролл const links = document.querySelectorAll('a[href^="#"]'); for (let link of links) { link.addEventListener('click', function (e) { const target = document.querySelector(this.getAttribute('href')); if (target) { e.preventDefault(); target.scrollIntoView({behavior: 'smooth'}); navLinks.classList.remove('active'); } }); } // Динамическая дата в футере const year = new Date().getFullYear(); document.querySelectorAll('.footer-bottom p').forEach(el => { el.innerHTML = `© ${year} Epictok. All rights reserved.`; }); // Анимация появления секций при скролле function animateSections() { const sections = document.querySelectorAll('.section-animate'); const trigger = window.innerHeight * 0.92; sections.forEach(section => { const rect = section.getBoundingClientRect(); if (rect.top < trigger) { section.classList.add('visible'); } }); } window.addEventListener('scroll', animateSections); window.addEventListener('DOMContentLoaded', animateSections);