Certainly! Below is a comprehensive, single-file HTML5 code that incorporates HTML, CSS, and JavaScript to create a visually stunning and technologically advanced website. This design leverages the provided color palette to ensure a modern, luxurious, and harmonious appearance, featuring circular icons with sharp edges, sophisticated animations, and professional effects.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Legendary Luxury</title>
<style>
/* Reset and Base Styles */
*, *::before, *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #fbfbfd;
color: #2a2856;
line-height: 1.6;
overflow-x: hidden;
}
a {
text-decoration: none;
color: inherit;
}
ul {
list-style: none;
}
/* Color Palette Variables */
:root {
--gold: #f7bc3a;
--deep-purple: #47277b;
--brown: #8c5d36;
--royal-blue: #4a33a7;
--lavender: #cdc7ed;
--white: #fbfbfd;
--dark-indigo: #2a2856;
}
/* Navbar Styles */
.navbar {
position: fixed;
width: 100%;
background: rgba(255, 255, 255, 0.95);
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
z-index: 1000;
transition: background 0.3s ease;
}
.navbar.scrolled {
background: #ffffff;
}
.navbar .container {
max-width: 1200px;
margin: auto;
padding: 1rem 2rem;
display: flex;
justify-content: space-between;
align-items: center;
}
.navbar .logo {
font-size: 1.5rem;
font-weight: bold;
color: var(--dark-indigo);
letter-spacing: 1.2px;
transition: color 0.3s ease;
}
.navbar.scrolled .logo {
color: var(--deep-purple);
}
.navbar ul {
display: flex;
gap: 1.5rem;
}
.navbar ul li a {
font-size: 1rem;
font-weight: 500;
color: var(--dark-indigo);
position: relative;
}
.navbar ul li a::after {
content: '';
position: absolute;
width: 0%;
height: 2px;
background: var(--gold);
left: 0;
bottom: -5px;
transition: width 0.3s ease;
}
.navbar ul li a:hover::after {
width: 100%;
}
/* Hero Section */
.hero {
height: 100vh;
background: linear-gradient(135deg, var(--royal-blue), var(--deep-purple));
display: flex;
justify-content: center;
align-items: center;
position: relative;
overflow: hidden;
}
.hero::before {
content: '';
position: absolute;
top: -10%;
left: -10%;
width: 120%;
height: 120%;
background: rgba(255, 255, 255, 0.1);
transform: rotate(45deg);
clip-path: polygon(0% 25%, 25% 0%, 75% 0%, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0% 75%);
animation: rotateBackground 20s linear infinite;
}
@keyframes rotateBackground {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.hero .content {
position: relative;
z-index: 1;
text-align: center;
color: var(--white);
max-width: 800px;
padding: 0 1rem;
}
.hero h1 {
font-size: 3rem;
margin-bottom: 1rem;
letter-spacing: 2px;
animation: fadeInDown 1s ease forwards;
}
.hero p {
font-size: 1.2rem;
margin-bottom: 2rem;
opacity: 0;
animation: fadeInUp 1.5s ease forwards;
animation-delay: 0.5s;
}
.hero .cta-button {
padding: 0.75rem 2rem;
background: var(--gold);
color: var(--dark-indigo);
border: none;
border-radius: 50px;
font-size: 1rem;
cursor: pointer;
transition: background 0.3s ease, transform 0.3s ease;
opacity: 0;
animation: fadeInUp 2s ease forwards;
animation-delay: 1s;
}
.hero .cta-button:hover {
background: #e0a800;
transform: translateY(-3px);
}
@keyframes fadeInDown {
from { opacity: 0; transform: translateY(-20px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
/* Features Section */
.features {
padding: 4rem 2rem;
background: var(--fbfbfd);
display: flex;
flex-direction: column;
align-items: center;
max-width: 1200px;
margin: auto;
}
.features h2 {
font-size: 2.5rem;
color: var(--dark-indigo);
margin-bottom: 2rem;
position: relative;
}
.features h2::after {
content: '';
width: 60px;
height: 4px;
background: var(--gold);
position: absolute;
bottom: -10px;
left: 50%;
transform: translateX(-50%);
}
.features .cards {
display: flex;
flex-wrap: wrap;
gap: 2rem;
justify-content: center;
}
.features .card {
background: var(--white);
border-radius: 20px;
box-shadow: 0 4px 20px rgba(0,0,0,0.1);
padding: 2rem;
width: 280px;
text-align: center;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.features .card:hover {
transform: translateY(-10px);
box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}
.features .card .icon {
width: 80px;
height: 80px;
border-radius: 50%;
background: linear-gradient(135deg, var(--royal-blue), var(--deep-purple));
display: flex;
justify-content: center;
align-items: center;
margin: 0 auto 1.5rem auto;
position: relative;
overflow: hidden;
}
.features .card .icon svg {
width: 40px;
height: 40px;
fill: var(--white);
z-index: 2;
}
.features .card .icon::before {
content: '';
position: absolute;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
background: rgba(255, 255, 255, 0.2);
transform: rotate(45deg);
animation: pulse 4s infinite;
}
@keyframes pulse {
0%, 100% { transform: scale(1) rotate(45deg); opacity: 0.6; }
50% { transform: scale(1.2) rotate(45deg); opacity: 0.2; }
}
.features .card h3 {
font-size: 1.5rem;
color: var(--dark-indigo);
margin-bottom: 1rem;
}
.features .card p {
font-size: 1rem;
color: #555;
}
/* About Section */
.about {
padding: 4rem 2rem;
background: var(--lavender);
display: flex;
flex-direction: column;
align-items: center;
max-width: 1200px;
margin: auto;
}
.about h2 {
font-size: 2.5rem;
color: var(--dark-indigo);
margin-bottom: 2rem;
position: relative;
}
.about h2::after {
content: '';
width: 60px;
height: 4px;
background: var(--gold);
position: absolute;
bottom: -10px;
left: 50%;
transform: translateX(-50%);
}
.about .content {
display: flex;
flex-wrap: wrap;
gap: 2rem;
justify-content: center;
align-items: center;
max-width: 1000px;
}
.about .content img {
width: 400px;
border-radius: 20px;
box-shadow: 0 4px 20px rgba(0,0,0,0.1);
transition: transform 0.3s ease;
}
.about .content img:hover {
transform: scale(1.05);
}
.about .content .text {
max-width: 500px;
}
.about .content .text p {
font-size: 1.1rem;
color: #333;
margin-bottom: 1rem;
text-align: justify;
}
/* Contact Section */
.contact {
padding: 4rem 2rem;
background: var(--white);
display: flex;
flex-direction: column;
align-items: center;
max-width: 1200px;
margin: auto;
}
.contact h2 {
font-size: 2.5rem;
color: var(--dark-indigo);
margin-bottom: 2rem;
position: relative;
}
.contact h2::after {
content: '';
width: 60px;
height: 4px;
background: var(--gold);
position: absolute;
bottom: -10px;
left: 50%;
transform: translateX(-50%);
}
.contact form {
display: flex;
flex-direction: column;
gap: 1.5rem;
width: 100%;
max-width: 600px;
}
.contact form input, .contact form textarea {
padding: 0.75rem 1rem;
border: 2px solid #ccc;
border-radius: 10px;
font-size: 1rem;
transition: border-color 0.3s ease;
resize: none;
}
.contact form input:focus, .contact form textarea:focus {
border-color: var(--royal-blue);
outline: none;
}
.contact form button {
padding: 0.75rem 2rem;
background: var(--royal-blue);
color: var(--white);
border: none;
border-radius: 50px;
font-size: 1rem;
cursor: pointer;
transition: background 0.3s ease, transform 0.3s ease;
}
.contact form button:hover {
background: var(--deep-purple);
transform: translateY(-2px);
}
/* Footer */
.footer {
background: var(--dark-indigo);
color: var(--white);
padding: 2rem;
text-align: center;
position: relative;
}
.footer .socials {
display: flex;
justify-content: center;
gap: 1rem;
margin-bottom: 1rem;
}
.footer .socials a {
width: 40px;
height: 40px;
background: var(--royal-blue);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
transition: background 0.3s ease, transform 0.3s ease;
}
.footer .socials a:hover {
background: var(--gold);
transform: scale(1.1);
}
.footer p {
font-size: 0.9rem;
}
/* Responsive Styles */
@media (max-width: 768px) {
.navbar .container {
flex-direction: column;
gap: 1rem;
}
.features .cards {
flex-direction: column;
align-items: center;
}
.about .content {
flex-direction: column;
}
}
</style>
</head>
<body>
<!-- Navbar -->
<nav class="navbar">
<div class="container">
<div class="logo">Luxuria</div>
<ul>
<li><a href="#hero">Home</a></li>
<li><a href="#features">Features</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</div>
</nav>
<!-- Hero Section -->
<section class="hero" id="hero">
<div class="content">
<h1>Welcome to Luxuria</h1>
<p>Experience the pinnacle of luxury and sophistication with our unparalleled services and exquisite designs.</p>
<button class="cta-button">Get Started</button>
</div>
</section>
<!-- Features Section -->
<section class="features" id="features">
<h2>Our Features</h2>
<div class="cards">
<div class="card">
<div class="icon">
<!-- Example SVG Icon -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<path d="M32 4C17.64 4 6 15.64 6 30c0 12.5 8.1 23.1 19.5 27.4.9.2 1.2-?.5 1.2-1.2V42c-7.8 1.7-9.5-3.7-9.5-3.7-1.3-3.3-3.2-4.2-3.2-4.2-2.6-1.8.2-1.8.2-1.8 2.9.2 4.4 3 4.4 3 2.5 4.3 6.6 3.1 8.3 2.4.3-1.9 1-3.1 1.8-3.8-6.2-.7-12.7-3.1-12.7-13.8 0-3 .9-5.4 2.4-7.4-.2-.7-1-3.6.2-7.5 0 0 2-.7 6.6 2.6a23 23 0 0 1 12-1.6c2 .1 4 .3 6 .3s4-.2 6-.3a23 23 0 0 1 12 1.6c4.6-3.3 6.6-2.6 6.6-2.6 1.2 3.9.4 6.8.2 7.5 1.5 2 2.4 4.4 2.4 7.4 0 10.8-6.5 13-12.9 13.8 1.2 1 2.3 3 2.3 6.1v8.9c0 .7.3 1.5 1.2 1.2C49.9 53.1 58 42.5 58 30 58 15.64 46.36 4 32 4z"/>
</svg>
</div>
<h3>Innovative Design</h3>
<p>Our designs push the boundaries of creativity, ensuring unique and cutting-edge solutions for every project.</p>
</div>
<div class="card">
<div class="icon">
<!-- Example SVG Icon -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<path d="M32 2C15.43 2 2 15.43 2 32s13.43 30 30 30 30-13.43 30-30S48.57 2 32 2zm0 54c-13.23 0-24-10.77-24-24S18.77 8 32 8s24 10.77 24 24-10.77 24-24 24z"/>
</svg>
</div>
<h3>Advanced Technology</h3>
<p>We utilize the latest technologies to deliver high-performance and scalable solutions tailored to your needs.</p>
</div>
<div class="card">
<div class="icon">
<!-- Example SVG Icon -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<path d="M32 0C14.355 0 0 14.355 0 32s14.355 32 32 32 32-14.355 32-32S49.645 0 32 0zm0 58C17.664 58 6 46.336 6 32S17.664 6 32 6s26 11.664 26 26-11.664 26-26 26z"/>
</svg>
</div>
<h3>Exceptional Quality</h3>
<p>Our commitment to quality ensures that every aspect of our work meets the highest standards of excellence.</p>
</div>
</div>
</section>
<!-- About Section -->
<section class="about" id="about">
<h2>About Us</h2>
<div class="content">
<img src="https://via.placeholder.com/400" alt="About Us">
<div class="text">
<p>At Luxuria, we believe in creating unparalleled experiences through innovative design and cutting-edge technology. Our team of experts is dedicated to transforming your vision into reality, delivering solutions that are both aesthetically pleasing and functionally robust.</p>
<p>With a focus on quality and customer satisfaction, we strive to exceed expectations and set new standards in the industry. Join us on a journey of excellence and discover the difference that true luxury can make.</p>
</div>
</div>
</section>
<!-- Contact Section -->
<section class="contact" id="contact">
<h2>Contact Us</h2>
<form>
<input type="text" placeholder="Your Name" required>
<input type="email" placeholder="Your Email" required>
<textarea rows="5" placeholder="Your Message" required></textarea>
<button type="submit">Send Message</button>
</form>
</section>
<!-- Footer -->
<footer class="footer">
<div class="socials">
<a href="#" aria-label="Facebook">
<!-- Facebook SVG Icon -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white">
<path d="M22.675 0h-21.35C.595 0 0 .595 0 1.325v21.351C0 23.405.595 24 1.325 24h11.495v-9.294H9.691v-3.622h3.129V8.413c0-3.1 1.893-4.788 4.659-4.788 1.325 0 2.464.099 2.794.143v3.24l-1.918.001c-1.504 0-1.796.715-1.796 1.764v2.313h3.587l-.467 3.622h-3.12V24h6.116C23.405 24 24 23.405 24 22.675V1.325C24 .595 23.405 0 22.675 0z"/>
</svg>
</a>
<a href="#" aria-label="Twitter">
<!-- Twitter SVG Icon -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white">
<path d="M24 4.557a9.93 9.93 0 0 1-2.828.775 4.932 4.932 0 0 0 2.165-2.724c-.951.555-2.005.959-3.127 1.184a4.916 4.916 0 0 0-8.384 4.482C7.69 8.094 4.066 6.13 1.64 3.161a4.822 4.822 0 0 0-.666 2.475c0 1.708.87 3.213 2.188 4.096a4.904 4.904 0 0 1-2.228-.616c-.054 2.385 1.674 4.614 4.158 5.104a4.935 4.935 0 0 1-2.224.084c.63 1.953 2.445 3.377 4.6 3.419a9.867 9.867 0 0 1-6.102 2.104c-.396 0-.787-.023-1.17-.069a13.945 13.945 0 0 0 7.557 2.212c9.054 0 14-7.496 14-13.986 0-.21 0-.423-.015-.634A10.025 10.025 0 0 0 24 4.557z"/>
</svg>
</a>
<a href="#" aria-label="Instagram">
<!-- Instagram SVG Icon -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white">
<path d="M12 2.163c3.204 0 3.584.012 4.85.07 1.366.062 2.633.34 3.608 1.314.975.975 1.252 2.242 1.314 3.608.058 1.266.07 1.646.07 4.85s-.012 3.584-.07 4.85c-.062 1.366-.34 2.633-1.314 3.608-.975.975-2.242 1.252-3.608 1.314-1.266.058-1.646.07-4.85.07s-3.584-.012-4.85-.07c-1.366-.062-2.633-.34-3.608-1.314-.975-.975-1.252-2.242-1.314-3.608C2.175 15.747 2.163 15.367 2.163 12s.012-3.584.07-4.85c.062-1.366.34-2.633 1.314-3.608C4.517 2.503 5.784 2.225 7.15 2.163 8.416 2.105 8.796 2.163 12 2.163M12 0C8.741 0 8.332.013 7.052.072 5.775.131 4.68.391 3.75 1.321c-.93.93-1.191 2.025-1.25 3.302C2.013 6.332 2 6.741 2 12s.013 5.668.072 6.948c.059 1.277.32 2.372 1.25 3.302.93.93 2.025 1.191 3.302 1.25C8.332 21.987 8.741 22 12 22s3.668-.013 4.948-.072c1.277-.059 2.372-.32 3.302-1.25.93-.93 1.191-2.025 1.25-3.302.059-1.28.072-1.688.072-6.948s-.013-5.668-.072-6.948c-.059-1.277-.32-2.372-1.25-3.302C19.32.391 18.225.131 16.948.072 15.668.013 15.259 0 12 0zm0 5.838a6.162 6.162 0 1 0 0 12.324 6.162 6.162 0 0 0 0-12.324zm0 10.162a3.999 3.999 0 1 1 0-7.998 3.999 3.999 0 0 1 0 7.998zm6.406-11.845a1.44 1.44 0 1 0 0 2.88 1.44 1.44 0 0 0 0-2.88z"/>
</svg>
</a>
</div>
<p>© 2024 Luxuria. All rights reserved.</p>
</footer>
<!-- JavaScript for Navbar Scroll Effect -->
<script>
window.addEventListener('scroll', function() {
const navbar = document.querySelector('.navbar');
if(window.scrollY > 50){
navbar.classList.add('scrolled');
} else {
navbar.classList.remove('scrolled');
}
});
</script>
</body>
</html>
Explanation of the Code:
-
HTML Structure:
- Navbar: Fixed at the top with responsive links and a logo. It changes style upon scrolling for better user experience.
- Hero Section: A full-screen welcome area with a dynamic background, heading, subtext, and a call-to-action button with smooth animations.
- Features Section: Showcases three key features with circular icons that have sharp edges and pulsating effects to draw attention.
- About Section: Provides information about the company with an image and descriptive text.
- Contact Section: A simple contact form allowing users to reach out.
- Footer: Contains social media icons with interactive hover effects and copyright.
-
CSS Styling:
- Color Palette: Utilizes the provided hex codes via CSS variables for consistency and easy maintenance.
- Typography & Layout: Clean, modern fonts and a responsive design using Flexbox. Media queries ensure the site looks great on all devices.
- Animations & Effects:
- Hero Section: Rotating background and fade-in effects for text and buttons.
- Icons: Pulsating overlay to create a sophisticated look.
- Hover Effects: Subtle transformations and color changes to enhance interactivity.
- Responsive Design: Adjusts layout for smaller screens ensuring usability and aesthetics are maintained.
-
JavaScript Functionality:
- Navbar Scroll Effect: Adds a shadow and slight background color change to the navbar when the user scrolls down, improving readability and navigation.
-
Accessibility:
- ARIA Labels: Added to social media links for better accessibility.
- Semantic HTML: Proper use of HTML5 semantic tags to enhance SEO and accessibility.
-
SVG Icons:
- Used for scalability and crisp visuals across all devices. Icons are customized to match the luxurious theme.
Notes:
- Replace placeholder images (
https://via.placeholder.com/400) with actual high-quality images relevant to your brand.
- SVG icons can be customized or replaced with icon libraries like Font Awesome for more variety.
- Form functionality (like form submission handling) can be enhanced using backend technologies or services as per requirements.
- Further enhancements can include interactive elements, more sections, and advanced animations using libraries like GSAP for even more sophisticated effects.
This design aims to balance modern aesthetics with luxurious elements, ensuring a memorable user experience that stands out in the digital landscape.