AutoPro Garage Documentation
Welcome to the comprehensive documentation for the AutoPro Garage multi-page website. This project is a premium, immersive, scroll-driven 3D web experience tailored for an automotive and mechanic shop. It prioritizes performance, cinematic visuals, and strict adherence to modern industrial design principles.
Important Note
This project uses zero external image files. All visuals, including the complex 3D engine, car illustrations, and icons, are generated using pure CSS shapes, inline SVGs, CSS gradients, and FontAwesome. This ensures lightning-fast load times and zero broken image links.
Critical Design Directives
The entire codebase was built under strict constraints to ensure a unique, high-end aesthetic. These rules are hardcoded into the CSS and must be maintained during future updates.
- No Glassmorphism: Absolutely no frosted glass effects or
backdrop-filter: blur(). All backgrounds are solid colors. - No Text Color Gradients: All typography uses solid color values. No rainbow or gradient text effects.
- Dark Theme with Orange Accents: Primary background is deep charcoal (#0F0F14). Accents are bright automotive orange/amber (#FF6B00) to simulate sparks and garage lighting.
- No Perfect Symmetry: Layouts utilize dynamic, editorial spacing and intentional asymmetry to avoid a generic template feel.
- No Cheesy Animations: All motion is cinematic, smooth, and purposeful, driven by GSAP with custom easing.
- No Em Dashes: The em dash character (—) is strictly forbidden in the codebase. Regular hyphens (-) are used exclusively.
- No External Images Required: The user has no media files. All visuals are programmatic (CSS/SVG/FontAwesome).
Technology Stack
- HTML5: Semantic markup across 9 distinct page files.
- CSS3: Single comprehensive
style.cssfile utilizing CSS variables, 3D transforms, and custom scrollbars. - Vanilla JavaScript: Single
script.jsfile handling all logic, form validation, and DOM manipulation. - GSAP 3 + ScrollTrigger: The core engine for the pinned 3D scroll experience and camera tunnel transitions.
- Bootstrap 5.3 (Grid Only): Utilized conceptually for responsive grid layouts (implemented via custom CSS grid to maintain zero-dependency purity).
- FontAwesome 6: CDN-loaded for all iconography (wrenches, gears, cars, UI icons).
- AOS (Animate On Scroll):strong> CDN-loaded for supplementary, subtle fade-in animations on inner pages.
- Google Fonts: 'Rajdhani' for industrial/technical headings, 'Inter' for highly readable body text.
File Structure
The project is organized for maximum clarity and ease of deployment. All files should reside in the same root directory.
index.html (Homepage with 3D Scroll)
services.html (Service details and FAQ)
pricing.html (Tabbed pricing tables)
about.html (Team, mission, CSS workshop illustration)
contact.html (Booking form and contact info)
track-service.html (Service status simulator)
gallery.html (Before/after CSS slider)
faq.html (Categorized accordion FAQ)
404.html (Creative broken car error page)
style.css (Single comprehensive stylesheet)
script.js (Single comprehensive JavaScript file)
Installation & Setup
This is a static website. No build tools, Node.js, or servers are required for local development.
- Create a new folder on your computer named
autopro-garage. - Create the 9 HTML files, 1 CSS file, and 1 JS file exactly as named in the File Structure.
- Copy and paste the provided code into each respective file.
- Open
index.htmlin any modern web browser (Chrome, Firefox, Safari, Edge). - For the best GSAP ScrollTrigger experience, use a local server (like VS Code Live Server extension) to avoid local file path restrictions, though it will work directly via file:// protocol in most modern browsers.
3D Engine Mechanics
The centerpiece of the homepage is the "Exploding Engine". It is not a video or a 3D model file (like GLTF). It is constructed entirely from 8 stacked HTML div elements styled with CSS.
The 8 Layers (Front to Back)
- Valve Cover: Orange accent, contains CSS bolt circles. Translates Z: 300px.
- Camshaft: Metallic gradient rod with 3 CSS circular lobes. Translates X: 250px.
- Cylinder Head: Dark gray block with circular ports. Rotates slightly on X and Y.
- Pistons: 3 vertical metallic cylinders. Translates Y: 200px, X: -150px.
- Crankshaft: Zigzag metallic pattern using repeating gradients. Translates Y: 350px.
- Oil Pan: Bottom reservoir with rounded bottom corners. Translates Z: -300px.
- Intake Manifold: Side component with an orange right border. Translates X: -200px.
- Engine Block: The main anchor body. Stays relatively centered.
CSS 3D Setup
The parent container uses strict 3D CSS properties to enable the effect:
.engine-container {
perspective: 1200px;
}
.engine-wrapper {
transform-style: preserve-3d;
}
.engine-layer {
transform-style: preserve-3d;
/* Initial stacked positions handled via translateZ */
}
GSAP Animations Breakdown
All complex animations are managed in script.js using GSAP and ScrollTrigger. The scrubbing effect ties the animation progress directly to the user's scroll position.
Hero Explosion Timeline
let tl = gsap.timeline({
scrollTrigger: {
trigger: ".hero-3d-section",
start: "top top",
end: "+=300%",
scrub: 1 // Smooths the scroll linkage
}
});
// Explode layers outward from center
tl.to(".engine-valve-cover", { z: 300, rotateX: -15, duration: 1 }, 0)
.to(".engine-camshaft", { x: 250, rotateY: 30, duration: 1 }, 0.1)
// ... (additional layers)
.from(".hero-headline", { z: -500, opacity: 0, duration: 1 }, 0.3);
Camera Tunnel Transition
Located below the hero, this effect uses 8 concentric rectangular frames. As the user scrolls, GSAP scales them up and fades their opacity, creating a convincing illusion of flying forward through a corridor into the next section.
Customization Guide
The project is designed to be easily white-labeled or adapted for different shops. All major styling is controlled via CSS Variables at the top of style.css.
Changing Colors
:root {
--bg-primary: #0F0F14; /* Main background */
--accent: #FF6B00; /* Change this to blue (#007BFF) for a different brand */
--text-primary: #F5F5F5; /* Main text color */
}
Updating Shop Information
Search the HTML files for the comment <!-- UPDATE WITH YOUR SHOP NAME -->. The following elements should be updated globally:
- Navbar Logo Text (e.g., "AutoPro Garage")
- Footer Contact Information (Address, Phone, Email)
- Meta Title Tags in the
<head>of each HTML file
Modifying the 3D Engine
To change the speed of the explosion, adjust the duration values in the GSAP timeline in script.js. To change the spread distance, modify the x, y, and z pixel values in the same timeline.
Responsive Design Notes
The website is fully responsive, utilizing CSS Grid and Flexbox with specific breakpoints at 992px (tablet) and 768px (mobile).
- Mobile Navigation: Converts to a slide-in drawer from the right side, triggered by a hamburger icon.
- 3D Hero on Mobile: The flex direction changes to column. The 3D engine scales down and moves below the text to ensure readability on small screens.
- Grids: 4-column and 3-column grids gracefully degrade to 2-column and 1-column layouts on smaller viewports.
- Typography: Heading sizes scale down using relative units to prevent text overflow on narrow screens.
Troubleshooting
GSAP Animations are not working
Ensure you are connected to the internet so the CDN links for GSAP and ScrollTrigger can load. If testing locally, some browsers restrict advanced JS features on the file:// protocol. Use a local development server (like VS Code "Live Server").
The 3D engine looks flat or broken
Verify that the parent container has perspective: 1200px and the wrapper has transform-style: preserve-3d. Removing these properties will collapse the 3D space into a 2D plane.
Icons are not showing up
Check the FontAwesome CDN link in the <head> of your HTML files. Ensure there are no ad-blockers interfering with the CDN request.