Here's a thinking process that leads to the suggested web design:
-
Analyze the Request:
- Topic: A civic-focused web accessibility initiative offering community office hours, bug bounties, and shared remediation playbooks.
- Role: Top-tier creative frontend engineer & UI/UX designer (10 years experience, award-winning). Style: Minimalist, Swiss Design, Avant-garde digital interaction.
- Design Principles: Deep typography hierarchy, negative space, color psychology (60-30-10), mesh gradients, dynamic shadows, grain texture, 3D depth if content sparse.
- Imagination Triggers: Micro-interactions (magnetic), non-linear layout, narrative scrolling (Lenis/Parallax), Bento Grids.
- Tech Stack: Tailwind CSS, GSAP/Framer Motion (simulated via vanilla JS/CSS/RequestAnimationFrame for a single file), SVG filters, glassmorphism, mesh gradients, potential Three.js (simplified to CSS/Canvas for this single file to keep performance high without heavy dependencies). No external frameworks (React/Vue) but libraries via CDN are allowed (Tailwind via CDN, GSAP via CDN).
- Constraint: Single HTML file, no build steps, no external API keys, executable.
- Language: The user asked in English, so the response (reasoning, code, explanation) must be in English.
-
Conceptualization & UX Strategy:
- Theme: "Accessibility" implies inclusiveness, clarity, structure, and trust. The design should reflect that—clean, organized, but with the "award-winning" flair (smooth motion, deep textures, sophisticated typography).
- Name: "A11y Nexus" or "Open Access Initiative". Let's go with "A11Y.COMMUNITY" – a civic hub.
- Core Sections:
- Hero: Strong typographic statement. "Building a Web for Everyone." Interactive particle/network background (representing connection).
- About/Mission: Brief context on web accessibility.
- Programs (Bento Grid):
- Community Office Hours (Video call/mentorship).
- Bug Bounty (Rewards for finding flaws).
- Shared Playbooks (Documentation).
- Stats/Numbers: Animated counters showing impact (e.g., issues fixed, participants).
- Call to Action / Newsletter: Simple form with validation visuals.
- Footer: Links, social icons, accessibility statement compliance icon.
-
Visual Design System (Tailwind + Custom CSS):
- Colors: Dark mode preference (feels premium/modern). Deep charcoal/black background (#050505), off-white text (#f0f0f0).
- Accent: Accessible teal/cyan (#0ea5e9) or a gradient from purple to pink for the "future" vibe. Let's use a vibrant mesh gradient using CSS radial-gradients to keep it performant but flashy.
- Typography:
- Headings: 'Inter' or 'Montserrat' (Swiss style).
- Serif for details: 'Playfair Display' or similar (for elegance).
- Textures: Subtle noise grain overlay (
opacity: 0.05) to reduce "digital flatness".
- Cards: Glassmorphism (backdrop-blur, slight border, dark semi-transparent background).
- Shadows: Dynamic colored shadows that shift on mouse move (using JS to update CSS variables).
-
Animation Implementation (GSAP & Custom):
- Use GSAP (via CDN) for heavy lifting: ScrollTrigger for reveal animations, magnetic buttons, parallax effects.
- Lenis Smooth Scroll: Use Lenis library via CDN for that "weighty" smooth scroll feel.
- Canvas Background: A Three.js shader-like effect but implemented in lightweight Canvas JS to avoid massive overhead, drawing a "network" of nodes and lines that react to the mouse to symbolize accessibility connectivity.
-
Step-by-Step Implementation Plan:
- HTML Structure:
<canvas> for background.
<div id="smooth-wrapper"> for Lenis.
- Header (Logo + Nav).
- Hero Section.
- Mission Section (Text + Graphic).
- Bento Grid Section (The 3 cards).
- Stats Section.
- Footer.
- CSS (Tailwind + Custom):
- Import Tailwind via script.
- Config colors in
tailwind.config within the script tag.
- Define custom classes for glassmorphism, grain, and typography.
- JavaScript:
- Initialize Lenis.
- Initialize Particle Network (Canvas).
- GSAP Registration (ScrollTrigger).
- Magnetic button logic.
- Parallax text movement.
- Custom cursor (maybe a subtle circle follower to enhance "tactile" feel).
-
Refining the "Wow" Factor:
- Hero: Huge "A11Y" text with a clipping mask or reveal animation.
- Grid: Bento layout using CSS Grid with
grid-cols-1 md:grid-cols-3 but with some items spanning two rows or columns for the "swiss design" asymmetry.
- Cards: When hovering, the card shouldn't just lift—it should cast a glow or the border should animate.
- Grain: Use a base64 noise image or CSS gradient noise generator to keep it self-contained.
- Accessibility Compliance: Since it's an accessibility site, ensure actual ARIA labels are correct. Use
tabindex, aria-label for icons.
-
Drafting the Code (Mental or Scratchpad):
- Noise Texture: Can use a tiny base64 placeholder or a CSS
url('data:image/svg+xml;base64,...'). I'll use a simple SVG data URI for noise to keep it robust.
- Lenis Integration:
lenis.scrollTo(target) on button clicks.
- Canvas Animation: A classic "constellations" effect (dots connected by lines). It's effective and not too heavy.
-
Writing the Code (Iterative refinement):
- Setup: HTML5 boilerplate. Add Tailwind CDN. Add Google Fonts (Inter, Playfair Display).
- Styles: Add
.noise overlay fixed on top pointer-events-none.
- Hero: Centered text. "WEB ACCESSIBILITY INITIATIVE" in small caps tracking. "A11Y.COMMUNITY" huge.
- Grid:
- Card 1: Office Hours (Calendar icon?). Hover effect: Pulse.
- Card 2: Bug Bounty (Bug/Trophy icon).
- Card 3: Playbooks (Book/Cube icon).
- Stats: Simple number counting animation using GSAP.
-
Addressing "Dynamic Shadows" & "Mesh Gradients":
- Mesh Gradient: I'll create an absolute positioned
div with a blur-3xl radial gradient that moves slowly in the background behind the main content, simulating a mesh.
- Shadows: I'll create an ambient light effect where a light source follows the mouse. This will be applied to the Hero text or specific floating elements. I'll use
mousemove event to update --mouse-x and --mouse-y variables.
-
Final Polish:
- Check contrast (light text on dark bg).
- Ensure buttons are accessible (focus states).
- Add "Magnetic" effect buttons using GSAP (linear interpolation of button position towards mouse cursor).
- Add a custom cursor (a small ring) that blends difference or outlines content. This adds a "design-forward" feel.
-
Review against Principles:
- Typography: Inter + Playfair. Check.
- Negative Space: Generous padding (py-24, py-32).
- Color: Dark theme, teal accent.
- Micro-interactions: Hover states, magnetic buttons, scroll reveals.
- Tech: GSAP, Tailwind, Canvas, Lenis. No build step.
-
Constructing the Single File: Combine HTML, CSS (in <style>), JS (in <script>). Ensure no local assets are required. Use placeholder images (Picsum) if needed, but prefer CSS shapes/Icons (SVG inline).
(Self-Correction during drafting):
Initial thought: Use Three.js for the background.
Correction: Three.js is heavy and the code can get verbose for a single file if I want a complex shader. A well-written 2D Canvas particle system is performant, looks 80% as good for this specific "network" theme, and keeps code maintainable within the prompt's constraints. I will stick to Canvas API.
Initial thought: Use complex WebGL shader for grain.
Correction: CSS SVG noise is easier and widely supported. I'll use a base64 tiny noise tile.
Accessibility: The prompt asks for a civic accessibility initiative. So the page itself must be accessible. High contrast, meaningful link text, skip links if possible, ARIA. Even though it's a "cool" design, I must respect the core domain. I will add a skip-to-content link.
- Final Code Assembly: (Proceeding to generate the actual code block).
- Structure:
<!DOCTYPE html>
<head>: Tailwind script, Google Fonts, GSAP CDN, Lenis CDN, Custom Styles.
<body>:
#cursor: custom cursor.
.noise-overlay
<a class="skip-link" href="#main">Skip to content</a>
<nav>
<header id="main"> (Hero)
<section id="mission">
<section id="programs"> (Bento)
<section id="stats">
<section id="join"> (Newsletter)
<footer>
<canvas>
<script>: Logic.
-
Detailing the Interactions:
- Magnetic Buttons: Select buttons with class
.magnetic. Onmousemove, track mouse relative to button center, apply transform: translate(...) with easing. On mouseleave, reset to 0.
- Scroll Animations:
- Hero text:
y: 50, opacity: 0 -> y: 0, opacity: 1.
- Bento cards: Staggered fade up.
- Parallax: Background elements move slightly slower than scroll.
-
Executing the specific creative triggers:
- Swiss Design: bold oversized typography, justified alignment maybe, strict grid but with overlapping elements.
- Glassmorphism:
bg-white/5 backdrop-blur-md border border-white/10.
- Dynamic Shadows: I'll add a
spotlight effect on cards using a radial gradient mask that moves with the mouse over the card.
-
Final Code Generation & Check: Ensure all tags are closed, Tailwind classes are valid. Ensure the script runs after DOM load.
(Produce Output)
Here is a complete, single-file HTML solution implementing the civic-focused web accessibility initiative "A11Y.COMMUNITY."
It incorporates the requested aesthetic: Swiss design typography, deep negative space, noise textures, smooth inertia scrolling (Lenis), magnetic buttons, glassmorphism, and a dynamic Canvas particle background representing connection and network structure.
Implementation Highlights:
- Visuals: Dark mode aesthetic (
#050505) with a vibrant teal/cyan mesh gradient accent. Uses Inter and Playfair Display.
- Interactivity: Custom cursor, magnetic hover effects on primary buttons, spotlight lens effects on cards, and smooth scroll-triggered entrance animations (GSAP).
- Background: A lightweight HTML5 Canvas particle network that reacts to mouse movement, symbolising connectivity and the "web".
- Structure:
- Hero: Massive typography, mission statement.
- Bento Grid: Asymmetric 2x2 grid showcasing Office Hours, Bug Bounties, and Playbooks with glassmorphism and hover effects.
- Impact: Animated statistics counter.
- Join: Call to action with accessibility-focused form design.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>A11Y.COMMUNITY | Civic Accessibility Initiative</title>
<meta name="description" content="A civic-focused web accessibility initiative offering community office hours, bug bounties, and shared remediation playbooks.">
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap" rel="stylesheet">
<!-- Tailwind CSS (CDN) -->
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
darkMode: 'class',
theme: {
extend: {
fontFamily: {
sans: ['Inter', 'sans-serif'],
serif: ['Playfair Display', 'serif'],
},
colors: {
brand: {
DEFAULT: '#0ea5e9',
glow: 'rgba(14, 165, 233, 0.4)',
dark: '#0f172a'
},
deep: {
bg: '#050505',
surface: 'rgba(20, 20, 20, 0.6)',
border: 'rgba(255, 255, 255, 0.08)'
}
},
backgroundImage: {
'mesh-gradient': 'radial-gradient(at 0% 0%, hsla(189, 100%, 56%, 0.15) 0px, transparent 50%), radial-gradient(at 100% 100%, hsla(273, 100%, 66%, 0.15) 0px, transparent 50%)',
},
boxShadow: {
'glow': '0 0 40px -10px rgba(14, 165, 233, 0.3)',
'card-glow': 'inset 0 0 20px rgba(255,255,255,0.02)',
},
animation: {
'float': 'float 6s ease-in-out infinite',
},
keyframes: {
float: {
'0%, 100%': { transform: 'translateY(0)' },
'50%': { transform: 'translateY(-10px)' },
}
}
}
}
}
</script>
<!-- Libraries -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/gsap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/ScrollTrigger.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/studio-freight/lenis@1.0.29/bundled/lenis.min.js"></script>
<style>
:root {
--mouse-x: 0;
--mouse-y: 0;
}
body {
background-color: #050505;
color: #e5e5e5;
overflow-x: hidden;
-webkit-font-smoothing: antialiased;
}
/* Noise Texture Overlay */
.noise-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 50;
opacity: 0.04;
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}
/* Custom Cursor */
#cursor {
position: fixed;
top: 0;
left: 0;
width: 20px;
height: 20px;
border: 1px solid rgba(255, 255, 255, 0.5);
border-radius: 50%;
pointer-events: none;
z-index: 1000;
transform: translate(-50%, -50%);
transition: width 0.3s, height 0.3s, background-color 0.3s;
mix-blend-mode: difference;
}
#cursor.hovered {
width: 50px;
height: 50px;
background-color: rgba(255, 255, 255, 0.1);
border-color: transparent;
}
/* Navigation links */
.nav-link {
position: relative;
}
.nav-link::after {
content: '';
position: absolute;
bottom: -2px;
left: 0;
width: 0%;
height: 1px;
background: linear-gradient(90deg, #0ea5e9, #8b5cf6);
transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-link:hover::after {
width: 100%;
}
/* Bento Card Glassmorphism with Spotlight */
.bento-card {
background: rgba(25, 25, 25, 0.4);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
border: 1px solid rgba(255, 255, 255, 0.08);
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
transition: transform 0.3s ease;
position: relative;
overflow: hidden;
}
.bento-card::before {
content: '';
position: absolute;
top: var(--mouse-y);
left: var(--mouse-x);
width: 300px;
height: 300px;
background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, transparent 60%);
transform: translate(-50%, -50%);
opacity: 0;
transition: opacity 0.3s;
pointer-events: none;
}
.bento-card:hover::before {
opacity: 1;
}
.bento-card:hover {
border-color: rgba(14, 165, 233, 0.3);
transform: translateY(-5px);
}
/* Magnetic Button */
.magnetic-wrap {
display: inline-block;
position: relative;
}
.magnetic {
display: inline-flex;
align-items: center;
justify-content: center;
transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
position: relative;
}
/* Canvas */
#bg-canvas {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
opacity: 0.4;
}
/* Typography overrides */
.text-outline {
-webkit-text-stroke: 1px rgba(255,255,255,0.2);
color: transparent;
}
/* Utility for smooth scroll */
html.lenis {
height: auto;
}
.lenis.lenis-smooth {
scroll-behavior: auto;
}
.lenis.lenis-smooth [data-lenis-prevent] {
overscroll-behavior: contain;
}
.lenis.lenis-stopped {
overflow: hidden;
}
</style>
</head>
<body class="selection:bg-brand selection:text-white">
<!-- Noise Grain -->
<div class="noise-overlay"></div>
<!-- Custom Cursor -->
<div id="cursor"></div>
<!-- Background Network Canvas -->
<canvas id="bg-canvas"></canvas>
<!-- Skip Link for Accessibility -->
<a href="#main" class="sr-only focus:not-sr-only focus:absolute focus:top-4 focus:left-4 z-50 bg-white text-black px-4 py-2 rounded font-bold">Skip to content</a>
<!-- Navigation -->
<nav class="fixed w-full z-40 top-0 left-0 mix-blend-difference text-white">
<div class="max-w-7xl mx-auto px-6 h-20 flex items-center justify-between">
<a href="#" class="nav-link magnetic-wrap">
<span class="text-xl font-sans font-semibold tracking-tighter">A11Y.COMMUNITY</span>
</a>
<div class="hidden md:flex items-center space-x-12">
<a href="#mission" class="nav-link text-sm font-medium tracking-wide uppercase">Mission</a>
<a href="#programs" class="nav-link text-sm font-medium tracking-wide uppercase">Programs</a>
<a href="#join" class="nav-link magnetic-wrap">
<button class="magnetic px-6 py-2 border border-white/20 rounded-full text-sm font-medium hover:bg-white hover:text-black transition-colors duration-300">
Join Us
</button>
</a>
</div>
</div>
</nav>
<!-- Main Content -->
<main id="main" class="relative">
<!-- Hero Section -->
<section class="min-h-screen flex flex-col justify-center items-center text-center relative pt-20">
<!-- Mesh Gradient Background Element -->
<div class="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] bg-mesh-gradient blur-3xl rounded-full opacity-30 animate-float"></div>
<div class="relative z-10 px-4 max-w-5xl mx-auto">
<p class="text-brand text-xs md:text-sm tracking-[0.2em] uppercase font-semibold mb-6 animate-reveal opacity-0 translate-y-4">
Civic Accessibility Initiative
</p>
<h1 class="text-5xl md:text-8xl lg:text-9xl font-sans font-bold tracking-tight leading-[0.9] mb-8 animate-reveal opacity-0 translate-y-4">
ACCESS IS <br>
<span class="text-outline italic font-serif">A Right.</span>
</h1>
<p class="text-gray-400 max-w-2xl mx-auto text-lg md:text-xl font-light leading-relaxed mb-12 animate-reveal opacity-0 translate-y-4">
We provide the tools, playbooks, and community support to build a web that works for everyone. Join the movement for digital equity.
</p>
<div class="flex flex-col sm:flex-row gap-4 justify-center animate-reveal opacity-0 translate-y-4">
<a href="#programs" class="magnetic-wrap">
<button class="magnetic bg-brand text-white px-8 py-4 rounded-sm font-medium text-sm uppercase tracking-wide transition-all hover:shadow-glow">
Explore Programs
</button>
</a>
<a href="#join" class="magnetic-wrap">
<button class="magnetic border border-white/20 bg-white/5 backdrop-blur-sm text-white px-8 py-4 rounded-sm font-medium text-sm uppercase tracking-wide hover:bg-white/10 transition-all">
Get Involved
</button>
</a>
</div>
</div>
<!-- Scroll Indicator -->
<div class="absolute bottom-12 left-1/2 -translate-x-1/2 flex flex-col items-center gap-2 opacity-50 animate-pulse">
<span class="text-[10px] uppercase tracking-widest">Scroll</span>
<div class="w-[1px] h-12 bg-gradient-to-b from-white to-transparent"></div>
</div>
</section>
<!-- Mission Section -->
<section id="mission" class="py-24 md:py-32 px-6 relative">
<div class="max-w-7xl mx-auto grid grid-cols-1 md:grid-cols-2 gap-16 items-center">
<div class="gsap-mission-text">
<h2 class="text-4xl md:text-6xl font-serif font-semibold mb-8 text-white">
"Code is read <br> far more often <br> than it is written."
</h2>
<div class="h-0.5 w-24 bg-gradient-to-r from-brand to-purple-500 mb-8"></div>
<p class="text-gray-400 text-lg leading-relaxed">
Accessibility isn't a checklist; it's a mindset. Our initiative bridges the gap between legal requirements and human-centered design. We host weekly office hours for developers, run public bug bounties to find barriers, and maintain a living library of <strong>Remediation Playbooks</strong> that anyone can use.
</p>
</div>
<div class="relative h-full min-h-[400px] flex items-center justify-center perspective-1000">
<!-- Abstract 3D-ish representation using CSS transforms -->
<div class="absolute w-64 h-64 bg-brand/20 rounded-full blur-3xl animate-float" style="animation-delay: 1s;"></div>
<div class="relative w-full max-w-sm transform rotate-y-12 rotate-x-6 shadow-2xl border border-white/10 bg-black/40 backdrop-blur-md p-8 rounded-2xl gsap-mission-card">
<h3 class="text-2xl font-sans font-bold mb-4">Core Pillars</h3>
<ul class="space-y-4 text-gray-300">
<li class="flex items-center gap-3">
<span class="w-2 h-2 rounded-full bg-brand"></span>
Community Office Hours
</li>
<li class="flex items-center gap-3">
<span class="w-2 h-2 rounded-full bg-purple-500"></span>
Public Bug Bounties
</li>
<li class="flex items-center gap-3">
<span class="w-2 h-2 rounded-full bg-emerald-400"></span>
Shared Playbooks
</li>
</ul>
</div>
</div>
</div>
</section>
<!-- Bento Grid Section -->
<section id="programs" class="py-24 px-6 bg-mesh-gradient bg-fixed relative">
<div class="max-w-7xl mx-auto">
<div class="mb-20">
<h2 class="text-3xl md:text-5xl font-bold font-sans mb-4">Our Programs</h2>
<p class="text-gray-400 max-w-xl">A modular approach to fixing the web, one component at a time.</p>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 auto-rows-[300px] gap-6">
<!-- Card 1: Office Hours (Tall) -->
<div class="bento-card md:col-span-1 md:row-span-2 p-8 flex flex-col justify-between group relative cursor-pointer">
<div class="absolute top-8 right-8 text-6xl text-white/5 font-serif group-hover:scale-110 transition-transform duration-500">01</div>
<div>
<h3 class="text-2xl font-bold mb-4 text-white group-hover:text-brand transition-colors">Office Hours</h3>
<p class="text-gray-400 mb-6">Live, weekly sessions where accessibility experts review your code or design mockups in real-time.</p>
</div>
<div class="mt-auto">
<div class="w-12 h-12 bg-white/5 rounded-full flex items-center justify-center mb-4 group-hover:bg-brand group-hover:text-black transition-colors">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"></path></svg>
</div>
<span class="text-sm uppercase tracking-widest text-gray-500">Every Tuesday</span>
</div>
</div>
<!-- Card 2: Bug Bounties -->
<div class="bento-card md:col-span-1 p-8 flex flex-col justify-between group cursor-pointer">
<div class="absolute top-8 right-8 text-6xl text-white/5 font-serif">02</div>
<div>
<h3 class="text-2xl font-bold mb-4 text-white group-hover:text-emerald-400 transition-colors">Bug Bounties</h3>
<p class="text-gray-400">Reward researchers who identify critical accessibility barriers on public civic websites.</p>
</div>
<div class="mt-auto">
<span class="inline-block border border-emerald-500/30 text-emerald-400 text-xs px-3 py-1 rounded-full uppercase tracking-wider">Active</span>
</div>
</div>
<!-- Card 3: Playbooks -->
<div class="bento-card md:col-span-1 p-8 flex flex-col justify-between group cursor-pointer">
<div class="absolute top-8 right-8 text-6xl text-white/5 font-serif">03</div>
<div>
<h3 class="text-2xl font-bold mb-4 text-white group-hover:text-purple-400 transition-colors">Playbooks</h3>
<p class="text-gray-400">Open-source remediation guides for WCAG failures, component libraries, and pattern examples.</p>
</div>
<div class="mt-auto">
<div class="text-xs text-gray-500 flex items-center gap-2">
<span class="w-2 h-2 bg-purple-500 rounded-full animate-pulse"></span> Updated 2h ago
</div>
</div>
</div>
<!-- Card 4: Stats (Wide) -->
<div class="bento-card md:col-span-2 p-8 flex items-center justify-center bbg-gradient-to-br from-white/5 to-transparent cursor-pointer border-t border-brand/20">
<div class="w-full grid grid-cols-3 divide-x divide-white/10 text-center">
<div class="gsap-stat-item">
<div class="text-4xl md:text-5xl font-bold font-sans counters text-white mb-2">0</div>
<div class="text-sm text-gray-500 uppercase tracking-wider">Issues Fixed</div>
</div>
<div class="gsap-stat-item">
<div class="text-4xl md:text-5xl font-bold font-sans counters text-white mb-2">0</div>
<div class="text-sm text-gray-500 uppercase tracking-wider">Experts Enlisted</div>
</div>
<div class="gsap-stat-item">
<div class="text-4xl md:text-5xl font-bold font-sans counters text-white mb-2">0</div>
<div class="text-sm text-gray-500 uppercase tracking-wider">Playbooks Shared</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Join / CTA Section -->
<section id="join" class="py-32 px-6 relative overflow-hidden">
<!-- Decoration -->
<div class="absolute right-0 top-1/2 -translate-y-1/2 w-96 h-96 bg-brand/10 rounded-full blur-3xl -z-10"></div>
<div class="max-w-3xl mx-auto text-center">
<h2 class="text-3xl md:text-5xl font-bold mb-8 font-serif">Join the Initiative</h2>
<p class="text-gray-400 mb-12 text-lg">Whether you're a developer, designer, or advocate, there's a role for you. Subscribe to our weekly newsletter to stay updated.</p>
<form class="flex flex-col sm:flex-row gap-4 max-w-lg mx-auto relative group" onsubmit="event.preventDefault(); alert('Thanks for joining! (This is a demo)');">
<div class="flex-1 relative">
<input type="email" required placeholder="Enter your email" class="w-full bg-white/5 border border-white/10 rounded-sm py-4 px-6 text-white placeholder-gray-500 focus:outline-none focus:border-brand focus:ring-1 focus:ring-brand transition-all">
</div>
<button type="submit" class="magnetic-wrap">
<span class="magnetic bg-white text-black px-8 py-4 rounded-sm font-bold uppercase tracking-wider hover:bg-brand hover:text-white transition-colors">
Subscribe
</span>
</button>
</form>
<p class="text-xs text-gray-600 mt-6">Respecting your privacy. No tracking, no spam.</p>
</div>
</section>
<!-- Footer -->
<footer class="border-t border-white/10 py-16 px-6 bg-deep-bg">
<div class="max-w-7xl mx-auto flex flex-col md:flex-row justify-between items-center gap-8">
<div class="text-center md:text-left">
<span class="text-xl font-bold tracking-tight text-white">A11Y.COMMUNITY</span>
<p class="mt-2 text-sm text-gray-500">© 2023 Civic Accessibility Initiative.<br>Built with Open Source Spirits.</p>
</div>
<div class="flex gap-6">
<a href="#" class="text-gray-400 hover:text-white transition-colors text-sm">GitHub</a>
<a href="#" class="text-gray-400 hover:text-white transition-colors text-sm">Twitter/X</a>
<a href="#" class="text-gray-400 hover:text-white transition-colors text-sm">WCAG Guidelines</a>
<a href="#" class="text-gray-400 hover:text-white transition-colors text-sm">Contact</a>
</div>
</div>
<div class="mt-12 text-center md:text-right">
<span class="inline-flex items-center gap-2 rounded-full border border-gray-700 px-3 py-1 text-[10px] uppercase text-gray-500">
<svg class="w-3 h-3 text-green-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path></svg>
Passed WCAG AA Audit
</span>
</div>
</footer>
</main>
<!-- Logic -->
<script>
// --- 1. Lenis Smooth Scroll ---
const lenis = new Lenis({
duration: 1.2,
easing: (t) => Math.min(1, 1.001 - Math.pow(2, -10 * t)),
direction: 'vertical',
smooth: true,
mouseMultiplier: 1,
smoothTouch: false,
touchMultiplier: 2,
});
function raf(time) {
lenis.raf(time);
requestAnimationFrame(raf);
}
requestAnimationFrame(raf);
// --- 2. GSAP Animations ---
gsap.registerPlugin(ScrollTrigger);
// Hero Reveal
gsap.to(".animate-reveal", {
y: 0,
opacity: 1,
duration: 1,
stagger: 0.2,
ease: "power3.out"
});
// Mission Parallax
gsap.to(".gsap-mission-text", {
scrollTrigger: {
trigger: "#mission",
scrub: 1,
},
y: 50,
});
gsap.to(".gsap-mission-card", {
scrollTrigger: {
trigger: "#mission",
scrub: 1,
},
rotateX: 0,
rotateY: 0,
x: -50,
easing: "none"
});
// Initialize card rotation
gsap.set(".gsap-mission-card", { rotationY: -15, rotationX: 5 });
// Bento Stagger
gsap.from(".bento-card", {
scrollTrigger: {
trigger: "#programs",
start: "top 80%",
},
y: 60,
opacity: 0,
duration: 0.8,
stagger: 0.1,
ease: "power3.out"
});
// Stats Counter
ScrollTrigger.create({
trigger: "#programs",
start: "top 70%",
once: true,
onEnter: () => {
const counters = document.querySelectorAll('.counters');
counters.forEach(counter => {
const target = +counter.getAttribute('data-target') || Math.floor(Math.random() * 1000) + 100;
counter.innerText = target;
// Animate visual count manually or just set text, here we do a simple snap
gsap.fromTo(counter,
{ innerText: 0 },
{
innerText: target,
duration: 2,
snap: { innerText: 1 },
ease: "power2.out"
}
);
});
}
});
// Set dummy targets for demo purposes
document.querySelectorAll('.counters').forEach((el, i) => {
const val = [1240, 85, 32][i];
el.setAttribute('data-target', val);
});
// --- 3. Magnetic Buttons ---
const magneticBtns = document.querySelectorAll('.magnetic');
magneticBtns.forEach(btn => {
btn.addEventListener('mousemove', (e) => {
const rect = btn.getBoundingClientRect();
const x = e.clientX - rect.left - rect.width / 2;
const y = e.clientY - rect.top - rect.height / 2;
gsap.to(btn, {
x: x * 0.3,
y: y * 0.3,
duration: 0.3
});
});
btn.addEventListener('mouseleave', () => {
gsap.to(btn, {
x: 0,
y: 0,
duration: 0.5,
ease: "elastic.out(1, 0.3)"
});
});
});
// --- 4. Custom Cursor & Spotlight ---
const cursor = document.getElementById('cursor');
const spotlightCards = document.querySelectorAll('.bento-card, button, a');
document.addEventListener('mousemove', (e) => {
cursor.style.left = e.clientX + 'px';
cursor.style.top = e.clientY + 'px';
// Update CSS variables for spotlight effect
document.documentElement.style.setProperty('--mouse-x', e.clientX + 'px');
document.documentElement.style.setProperty('--mouse-y', e.clientY + 'px');
});
spotlightItems.forEach(item => {
item.addEventListener('mouseenter', () => cursor.classList.add('hovered'));
item.addEventListener('mouseleave', () => cursor.classList.remove('hovered'));
});
// --- 5. Canvas Particle Network Background ---
const canvas = document.getElementById('bg-canvas');
const ctx = canvas.getContext('2d');
let width, height;
let particles = [];
function resize() {
width = canvas.width = window.innerWidth;
height = canvas.height = window.innerHeight;
}
window.addEventListener('resize', resize);
resize();
class Particle {
constructor() {
this.x = Math.random() * width;
this.y = Math.random() * height;
this.vx = (Math.random() - 0.5) * 0.5;
this.vy = (Math.random() - 0.5) * 0.5;
this.size = Math.random() * 2 + 1;
// Color: White with low opacity
this.color = `rgba(255, 255, 255, ${Math.random() * 0.3 + 0.1})`;
}
update() {
this.x += this.vx;
this.y += this.vy;
if (this.x < 0 || this.x > width) this.vx *= -1;
if (this.y < 0 || this.y > height) this.vy *= -1;
}
draw() {
ctx.fillStyle = this.color;
ctx.beginPath();
ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2);
ctx.fill();
}
}
// Init particles
const particleCount = Math.min(window.innerWidth / 8, 80); // Responsive count
for (let i = 0; i < particleCount; i++) {
particles.push(new Particle());
}
// Connect particles with lines
function animateParticles() {
ctx.clearRect(0, 0, width, height);
for (let i = 0; i < particles.length; i++) {
particles[i].update();
particles[i].draw();
for (let j = i; j < particles.length; j++) {
const dx = particles[i].x - particles[j].x;
const dy = particles[i].y - particles[j].y;
const distance = Math.sqrt(dx * dx + dy * dy);
if (distance < 150) {
ctx.beginPath();
ctx.strokeStyle = `rgba(255, 255, 255, ${0.1 - distance/1500})`;
ctx.lineWidth = 0.5;
ctx.moveTo(particles[i].x, particles[i].y);
ctx.lineTo(particles[j].x, particles[j].y);
ctx.stroke();
}
}
}
requestAnimationFrame(animateParticles);
}
animateParticles();
</script>
</body>
</html>