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.

Technology Stack

  • HTML5: Semantic markup across 9 distinct page files.
  • CSS3: Single comprehensive style.css file utilizing CSS variables, 3D transforms, and custom scrollbars.
  • Vanilla JavaScript: Single script.js file 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.

autopro-garage/
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.

  1. Create a new folder on your computer named autopro-garage.
  2. Create the 9 HTML files, 1 CSS file, and 1 JS file exactly as named in the File Structure.
  3. Copy and paste the provided code into each respective file.
  4. Open index.html in any modern web browser (Chrome, Firefox, Safari, Edge).
  5. 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)

  1. Valve Cover: Orange accent, contains CSS bolt circles. Translates Z: 300px.
  2. Camshaft: Metallic gradient rod with 3 CSS circular lobes. Translates X: 250px.
  3. Cylinder Head: Dark gray block with circular ports. Rotates slightly on X and Y.
  4. Pistons: 3 vertical metallic cylinders. Translates Y: 200px, X: -150px.
  5. Crankshaft: Zigzag metallic pattern using repeating gradients. Translates Y: 350px.
  6. Oil Pan: Bottom reservoir with rounded bottom corners. Translates Z: -300px.
  7. Intake Manifold: Side component with an orange right border. Translates X: -200px.
  8. 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.