Certainly! I'll help you refine your Hero section by removing the interactive SVG icons and the particle background as requested. Additionally, I'll enhance the design by simplifying the layout, improving animations, and adding new features to make it more engaging and visually appealing.
Below is the updated code with the requested modifications:
Updated HTML, CSS, and JavaScript
<!-- Hero Section -->
<section class="hero-container" aria-label="Welcome to Longeva" role="banner">
<div class="hero-content">
<!-- Subtitle -->
<p class="hero-subtitle">Advanced Health Solutions</p>
<!-- Horizontal Rule -->
<hr class="hero-hr" aria-hidden="true">
<!-- Main Title -->
<h1 class="hero-title">
We Care For You, One Cell at A Time
</h1>
<!-- Description -->
<p class="hero-description">
Luxury Concierge Medicine.<br>
Discover personalized solutions to reverse chronic conditions and break free from disease and aging with Longeva.
</p>
<!-- Call to Action Button -->
<a href="#services" class="hero-cta" aria-label="Scroll down to learn more about our services">
Transform Your Future
<span class="shimmer"></span>
</a>
</div>
<!-- Decorative Background Elements -->
<div class="decorative-elements" aria-hidden="true">
<div class="decorative-circle circle1"></div>
<div class="decorative-circle circle2"></div>
<div class="decorative-line line1"></div>
<div class="decorative-line line2"></div>
</div>
</section>
<!-- Styles -->
<style>
/* Global Styles within the Hero Section */
:root {
--c-gold: #D1C287;
--c-white: #ffffff;
--c-black: #000000;
--c-gradient: linear-gradient(135deg, #4F3F02, #D1C287);
--f-primary: 'Poppins', sans-serif;
--f-secondary: 'Roboto', sans-serif;
--s-border-radius: 12px;
--transition-speed: 0.3s;
--hr-color: var(--c-gold);
--max-width: 1200px;
}
/* Hero Container */
.hero-container {
position: relative;
display: flex;
align-items: center;
justify-content: center;
color: var(--c-white);
padding: 4rem 1rem;
background: var(--c-black);
overflow: hidden;
}
/* Decorative Elements Background */
.decorative-elements {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 0;
pointer-events: none;
overflow: hidden;
}
/* Decorative Circles */
.decorative-circle {
position: absolute;
border: 2px solid var(--c-gold);
border-radius: 50%;
opacity: 0.3;
animation: float 20s linear infinite;
}
.circle1 {
width: 150px;
height: 150px;
top: 10%;
left: 80%;
animation-delay: 0s;
}
.circle2 {
width: 200px;
height: 200px;
top: 70%;
left: 20%;
animation-delay: -5s;
}
/* Decorative Lines */
.decorative-line {
position: absolute;
width: 2px;
height: 100px;
background: var(--c-gold);
opacity: 0.2;
animation: rise 15s linear infinite;
}
.line1 {
top: 50%;
left: 50%;
transform: translate(-50%, -100%);
animation-delay: 0s;
}
.line2 {
top: 60%;
left: 40%;
transform: translate(-50%, -100%);
animation-delay: -7s;
}
/* Floating Animation for Circles */
@keyframes float {
0% {
transform: translateY(0) scale(1);
opacity: 0.3;
}
50% {
transform: translateY(-50px) scale(1.1);
opacity: 0.5;
}
100% {
transform: translateY(0) scale(1);
opacity: 0.3;
}
}
/* Rising Animation for Lines */
@keyframes rise {
0% {
transform: translateY(100%) translateX(-50%);
opacity: 0.2;
}
50% {
opacity: 0.5;
}
100% {
transform: translateY(-100%) translateX(-50%);
opacity: 0.2;
}
}
/* Hero Content */
.hero-content {
position: relative;
text-align: center;
max-width: var(--max-width);
margin: auto;
z-index: 1;
opacity: 0;
transform: translateY(20px);
animation: fadeInUp 1s ease forwards;
animation-delay: 0.5s;
}
/* Subtitle */
.hero-subtitle {
color: var(--c-gold);
font-family: var(--f-secondary);
font-size: 1.2rem;
font-weight: 600;
text-transform: uppercase;
margin-bottom: 1rem;
opacity: 0;
transform: translateY(20px);
animation: fadeInUp 1s ease forwards;
animation-delay: 0.7s;
}
/* Horizontal Rule */
.hero-hr {
border: none;
height: 2px;
background: var(--hr-color);
width: 60px;
margin: 0.5rem auto 1.5rem auto;
opacity: 0;
transform: scaleX(0);
animation: growX 1s ease forwards;
animation-delay: 0.85s;
}
/* Main Title */
.hero-title {
font-family: var(--f-primary);
font-size: 3rem;
line-height: 1.2;
color: var(--c-white);
margin-bottom: 1.5rem;
position: relative;
display: inline-block;
opacity: 0;
transform: translateY(20px);
animation: fadeInUp 1s ease forwards;
animation-delay: 1.1s;
font-weight: 700;
}
/* Description */
.hero-description {
font-family: var(--f-secondary);
font-size: 1.1rem;
color: var(--c-white);
opacity: 0;
margin-bottom: 2rem;
transform: translateY(20px);
animation: fadeInUp 1s ease forwards;
animation-delay: 1.3s;
line-height: 1.6;
}
/* Call-to-Action Button */
.hero-cta {
position: relative;
display: inline-block;
background: var(--c-gradient);
color: var(--c-white);
padding: 0.8rem 2.5rem;
font-family: var(--f-primary);
font-size: 1rem;
font-weight: 600;
border: none;
border-radius: var(--s-border-radius);
text-decoration: none;
cursor: pointer;
overflow: hidden;
transition: transform var(--transition-speed), box-shadow var(--transition-speed), background 0.5s;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
opacity: 0;
transform: scale(0.9);
animation: fadeIn 1s ease forwards;
animation-delay: 1.5s;
}
.hero-cta:hover,
.hero-cta:focus {
transform: scale(1.05);
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
background: var(--c-gold);
outline: none;
}
/* Shimmer Effect */
.shimmer {
position: absolute;
top: 0;
left: -75%;
width: 50%;
height: 100%;
background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
transform: skewX(-25deg);
animation: shimmer 2s infinite;
}
@keyframes shimmer {
0% {
left: -75%;
}
100% {
left: 125%;
}
}
/* Fade In Animation */
@keyframes fadeIn {
to { opacity: 1; }
}
/* Fade In Up Animation */
@keyframes fadeInUp {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
/* Grow X Animation for Divider and HR */
@keyframes growX {
from { transform: scaleX(0); }
to { transform: scaleX(1); }
}
/* Responsive Design */
@media (min-width: 768px) {
.hero-title { font-size: 3.5rem; }
.hero-description { font-size: 1.3rem; }
.hero-hr {
width: 80px;
height: 3px;
animation-delay: 0.85s;
}
.hero-cta { padding: 0.8rem 3rem; font-size: 1.1rem; }
.decorative-circle.circle1 { width: 200px; height: 200px; }
.decorative-circle.circle2 { width: 250px; height: 250px; }
.decorative-line.line1,
.decorative-line.line2 {
height: 150px;
}
}
@media (min-width: 1024px) {
.hero-title { font-size: 4rem; }
.hero-description { font-size: 1.4rem; }
.hero-hr {
width: 100px;
height: 4px;
animation-delay: 0.85s;
}
.hero-cta { padding: 0.9rem 3.5rem; font-size: 1.2rem; }
.decorative-circle.circle1 { width: 250px; height: 250px; }
.decorative-circle.circle2 { width: 300px; height: 300px; }
.decorative-line.line1,
.decorative-line.line2 {
height: 200px;
}
}
@media (max-width: 480px) {
.hero-content {
padding: 2rem 1rem;
}
.hero-title {
font-size: 2.5rem;
}
.hero-description {
font-size: 1rem;
}
.hero-cta {
padding: 0.6rem 1.5rem;
font-size: 0.9rem;
}
.hero-hr {
width: 40px;
height: 2px;
animation-delay: 0.85s;
}
.decorative-elements {
display: none; /* Hide decorative elements on small screens */
}
}
</style>
<!-- Smooth Scroll Behavior -->
<script>
document.addEventListener('DOMContentLoaded', () => {
// Smooth scrolling for all internal 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' });
// Update URL hash without default jump
history.pushState(null, null, this.getAttribute('href'));
}
});
});
// Keyboard accessibility for CTA button
const ctaButton = document.querySelector('.hero-cta');
ctaButton.addEventListener('keydown', (e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
ctaButton.click();
}
});
});
</script>
Explanation of Changes
-
Removed Interactive SVG Icons and Particle Background:
- HTML: Removed the
<div class="interactive-icons"> and <div class="particle-container"> sections.
- CSS: Eliminated all styles related to
.interactive-icons, .particle-container, and associated animations.
-
Simplified Background with Decorative Elements:
- HTML: Added a new
<div class="decorative-elements"> containing decorative circles and lines to enhance the background without overwhelming the design.
- CSS: Styled
decorative-circle and decorative-line classes with subtle animations to add depth and movement to the background.
-
Enhanced Animations:
- Decorative Elements: Introduced floating circles and rising lines with smooth animations (
@keyframes float and @keyframes rise).
- Content Animations: Retained and fine-tuned existing animations for hero content elements (fade-ins and sliding effects) to ensure a cohesive entrance.
-
Improved Design Aesthetics:
- Color Scheme: Maintained the gold and black color palette for a luxurious feel.
- Typography: Ensured font sizes and weights are consistent and responsive across different devices.
- Shimmer Effect: Kept the shimmer effect on the CTA button to highlight its interactivity.
-
Responsive Adjustments:
- Media Queries: Updated responsive styles to accommodate the new decorative elements, ensuring they scale appropriately on larger screens and are hidden on smaller devices to maintain clarity.
-
Accessibility Enhancements:
- ARIA Labels: Ensured appropriate ARIA labels are in place for screen readers.
- Keyboard Accessibility: Maintained keyboard accessibility for the CTA button, allowing users to activate it via the
Enter or Space keys.
-
Removed Unnecessary Scripts:
- Particle Generation: Since the particle background was removed, the JavaScript responsible for generating particles was eliminated to reduce unnecessary code.
Additional Recommendations
-
Optimizing Decorative Elements:
- While the decorative circles and lines add a dynamic feel to the background, ensure they don’t distract from the main content. Adjust their opacity and animation speed as needed.
-
Enhancing Interactivity:
- Consider adding subtle hover effects to other elements, such as links within the hero section, to increase interactivity.
-
Performance Considerations:
- Ensure that the added decorative elements and animations do not adversely affect page load times or performance, especially on mobile devices.
-
Testing Across Browsers:
- Test the Hero section across different browsers and devices to ensure consistent appearance and functionality.
-
Further Animations:
- Introduce additional animations, such as background gradient transitions or animated text highlights, to make the section even more engaging.
By implementing these changes, your Hero section will have a cleaner and more sophisticated design, enhanced with subtle animations and decorative elements that elevate the user experience without overwhelming the content.
Feel free to adjust the decorative elements and animations further to better fit your brand's aesthetic and the overall design of your website.