|
|
|
"styles.css": "/* Reset and base styles */\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: 'Arial', sans-serif;\n line-height: 1.6;\n color: #333;\n}\n\n/* Header and Navigation */\nheader {\n background-color: #fff;\n box-shadow: 0 2px 5px rgba(0,0,0,0.1);\n position: fixed;\n width: 100%;\n top: 0;\n z-index: 1000;\n transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;\n}\n\nnav {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 1rem 5%;\n max-width: 1200px;\n margin: 0 auto;\n}\n\n.logo {\n font-size: 1.5rem;\n font-weight: bold;\n color: #2c3e50;\n}\n\nnav ul {\n display: flex;\n list-style: none;\n gap: 2rem;\n}\n\nnav a {\n text-decoration: none;\n color: #2c3e50;\n font-weight: 500;\n transition: color 0.3s ease;\n position: relative;\n}\n\nnav a::after {\n content: '';\n position: absolute;\n width: 0;\n height: 2px;\n bottom: -5px;\n left: 0;\n background-color: #3498db;\n transition: width 0.3s ease;\n}\n\nnav a:hover::after {\n width: 100%;\n}\n\nnav a:hover {\n color: #3498db;\n}\n\n/* Hero Section */\n#hero {\n height: 100vh;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n text-align: center;\n padding: 0 1rem;\n background: linear-gradient(135deg, #3498db, #2c3e50);\n color: white;\n position: relative;\n overflow: hidden;\n}\n\n#hero::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\"><rect fill=\"rgba(255,255,255,0.1)\" x=\"0\" y=\"0\" width=\"100\" height=\"100\"/></svg>');\n opacity: 0.1;\n}\n\n#hero h1 {\n font-size: 3.5rem;\n margin-bottom: 1rem;\n text-shadow: 2px 2px 4px rgba(0,0,0,0.3);\n}\n\n#hero p {\n font-size: 1.2rem;\n margin-bottom: 2rem;\n max-width: 600px;\n}\n\n.cta-button {\n padding: 1rem 2rem;\n font-size: 1.1rem;\n background-color: #e74c3c;\n color: white;\n border: none;\n border-radius: 5px;\n cursor: pointer;\n transition: all 0.3s ease;\n position: relative;\n overflow: hidden;\n}\n\n.cta-button:hover {\n background-color: #c0392b;\n transform: translateY(-2px);\n box-shadow: 0 5px 15px rgba(0,0,0,0.3);\n}\n\n/* Services Section */\n#services {\n padding: 5rem 1rem;\n background-color: #f9f9f9;\n}\n\n#services h2 {\n text-align: center;\n margin-bottom: 3rem;\n font-size: 2.5rem;\n position: relative;\n}\n\n#services h2::after {\n content: '';\n display: block;\n width: 50px;\n height: 3px;\n background-color: #3498db;\n margin: 1rem auto;\n}\n\n.services-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));\n gap: 2rem;\n max-width: 1200px;\n margin: 0 auto;\n padding: 0 1rem;\n}\n\n.service-card {\n background: white;\n padding: 2rem;\n border-radius: 10px;\n box-shadow: 0 3px 10px rgba(0,0,0,0.1);\n transition: all 0.3s ease;\n position: relative;\n overflow: hidden;\n}\n\n.service-card::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 3px;\n background: linear-gradient(to right, #3498db, #2c3e50);\n transform: scaleX(0);\n transition: transform 0.3s ease;\n}\n\n.service-card:hover::before {\n transform: scaleX(1);\n}\n\n.service-card:hover {\n transform: translateY(-5px);\n box-shadow: 0 5px 20px rgba(0,0,0,0.15);\n}\n\n.service-card h3 {\n color: #2c3e50;\n margin-bottom: 1rem;\n font-size: 1.5rem;\n}\n\n/* Contact Section */\n#contact {\n padding: 5rem 1rem;\n background-color: white;\n}\n\n#contact h2 {\n text-align: center;\n margin-bottom: 3rem;\n font-size: 2.5rem;\n}\n\n#contact-form {\n max-width: 600px;\n margin: 0 auto;\n dis
|
|
|
|
"script.js": "// Wait for DOM to load\ndocument.addEventListener('DOMContentLoaded', () => {\n // Smooth scrolling for navigation links\n document.querySelectorAll('nav a').forEach(link => {\n link.addEventListener('click', (e) => {\n e.preventDefault();\n const targetId = link.getAttribute('href');\n const targetSection = document.querySelector(targetId);\n targetSection.scrollIntoView({ behavior: 'smooth' });\n });\n });\n\n // Dynamic navigation bar\n const header = document.querySelector('header');\n let lastScroll = 0;\n\n window.addEventListener('scroll', () => {\n const currentScroll = window.pageYOffset;\n\n // Add/remove background color based on scroll position\n if (currentScroll > 50) {\n header.style.backgroundColor = '#ffffff';\n header.style.boxShadow = '0 2px 5px rgba(0,0,0,0.1)';\n } else {\n header.style.backgroundColor = 'transparent';\n header.style.boxShadow = 'none';\n }\n\n // Hide/show header based on scroll direction\n if (currentScroll > lastScroll && currentScroll > 100) {\n header.style.transform = 'translateY(-100%)';\n } else {\n header.style.transform = 'translateY(0)';\n }\n\n lastScroll = currentScroll;\n });\n\n // Form validation and submission\n const contactForm = document.getElementById('contact-form');\n if (contactForm) {\n contactForm.addEventListener('submit', (e) => {\n e.preventDefault();\n \n // Get form inputs\n const nameInput = contactForm.querySelector('input[type=\"text\"]');\n const emailInput = contactForm.querySelector('input[type=\"email\"]');\n const messageInput = contactForm.querySelector('textarea');\n\n // Basic validation\n let isValid = true;\n \n if (!nameInput.value.trim()) {\n markInvalid(nameInput, 'Please enter your name');\n isValid = false;\n } else {\n markValid(nameInput);\n }\n\n if (!isValidEmail(emailInput.value)) {\n markInvalid(emailInput, 'Please enter a valid email');\n isValid = false;\n } else {\n markValid(emailInput);\n }\n\n if (!messageInput.value.trim()) {\n markInvalid(messageInput, 'Please enter your message');\n isValid = false;\n } else {\n markValid(messageInput);\n }\n\n if (isValid) {\n // Here you would typically send the form data to a server\n alert('Thank you for your message! We will get back to you soon.');\n contactForm.reset();\n }\n });\n }\n\n // Animate services cards on scroll\n const observerOptions = {\n threshold: 0.2\n };\n\n const observer = new IntersectionObserver((entries) => {\n entries.forEach(entry => {\n if (entry.isIntersecting) {\n entry.target.classList.add('animate');\n }\n });\n }, observerOptions);\n\n document.querySelectorAll('.service-card').forEach(card => {\n observer.observe(card);\n });\n});\n\n// Helper functions\nfunction isValidEmail(email) {\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n return emailRegex.test(email);\n}\n\nfunction markInvalid(element, message) {\n element.classList.add('invalid');\n \n // Create or update error message\n let errorDiv = element.nextElementSibling;\n if (!errorDiv || !errorDiv.classList.contains('error-message')) {\n errorDiv = document.createElement('div');\n errorDiv.classList.add('error-message');\n element.parentNode.insertBefore(errorDiv, element.nextSibling);\n }\n errorDiv.textContent = message;\n}\n\nfunction markValid(element) {\n element.classList.remove('invalid');\n
|