JSP Construction Inc. is a production-grade, multi-page business website built for a licensed Los Angeles general contractor (CSLB #1094925). Engineered with a zero-dependency, modular CSS architecture and native Vanilla JavaScript, it delivers a premium brand experience while achieving strong SEO performance, WCAG-accessible markup, and sub-second page loads β all without a single framework or build tool.
The site implements an "Elevated Professional Trust" design language β balancing visual warmth with the authority a licensed contractor needs to convert visitors into consultation requests:
- Curated Palette: A sophisticated token system pairing deep Navy Primary (
#1a1a2e) with warm Gold-Amber accents (#c9a84c), off-white warm greys, and precisely tuned text contrast ratios β all defined as CSS Custom Properties in a dedicatedvariables.cssdesign token file. - Professional Typography: Pairing Outfit (bold, architectural headings) with Inter (clean, highly legible body copy) via Google Fonts, with a fully fluid
clamp()-based type scale that smoothly adapts from mobile to ultrawide displays. - Layered Depth System: Five progressively intense
box-shadowtokens (--shadow-xsthrough--shadow-xl), customcubic-beziereasing curves (including a spring easing--ease-spring), and overlay gradients that create consistent visual depth across cards, headers, and hero sections. - Motion & Scroll Reveals: Scroll-triggered entrance animations via
IntersectionObserverwith staggered delay classes (reveal-delay-1throughreveal-delay-4), fully respectingprefers-reduced-motionfor accessibility compliance.
A centralized design token file powers the entire visual identity β 119 lines of meticulously organized custom properties covering colors, typography (scale, weight, tracking, leading), spacing (14 spatial tokens), layout constraints, border radii, shadows, transitions, and overlay effects. This separation ensures complete design consistency across all 6 pages and makes full-site visual changes a single-file operation.
/* Fluid Type Scale β no breakpoints needed */
--text-base: clamp(0.9375rem, 0.88rem + 0.25vw, 1.0625rem);
--text-3xl: clamp(1.875rem, 1.5rem + 1.5vw, 2.75rem);
--text-5xl: clamp(2.75rem, 2rem + 3vw, 4.5rem);
/* Motion Easing Tokens */
--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
--ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);Instead of a monolithic stylesheet, the CSS is broken into 5 purpose-driven modules loaded in dependency order:
| File | Purpose | Size |
|---|---|---|
variables.css |
Design tokens & custom properties | 4.4 KB |
base.css |
Resets, global element styles, skip-link | 3.5 KB |
layout.css |
Container, grid system, split layouts | 2.7 KB |
components.css |
Cards, buttons, nav, footer, forms, accordion | 12.5 KB |
pages.css |
Page-specific hero, service detail, CTA sections | 8.2 KB |
Combined CSS weight: ~31 KB β delivering a fully responsive, premium design system with no preprocessors, no PostCSS, and no build pipeline.
A lightweight navigation module that handles three concerns in one IIFE:
- Scroll-Aware Sticky Header: Dynamically adds/removes the
scrolledclass at a 60px threshold, with smart hero-page detection to preserve transparent-header aesthetics on the homepage. - Mobile Menu: Full keyboard support including
Escapeto close with focus restoration, properaria-expandedstate management, and body scroll locking. - Smooth Anchor Scrolling: Hijacks
#anchor clicks for nativescrollIntoViewbehavior.
// Smart hero-page detection prevents header flash on interior pages
if (currentScroll > 60) {
header.classList.add('scrolled');
} else {
if (document.querySelector('.hero')) {
header.classList.remove('scrolled'); // Only on pages with a hero
}
}A clean, 41-line animation module built on IntersectionObserver:
- One-shot observation: Each
.revealelement is unobserved after animation, preventing redundant DOM operations. - Reduced motion respect: Immediately sets all elements to
visibleif the user's OS-levelprefers-reduced-motion: reducepreference is detected. - Staggered timing: Works with CSS delay classes for cascading entrance effects across grid layouts.
A complete client-side form validation and submission engine:
- Declarative Validation Rules: Field rules defined as a clean configuration object with
required,validate, andmessageproperties. - Real-Time Feedback: Validates on
blurand clears errors on subsequentinput, only re-validating fields already in an error state to avoid premature warnings. - Async REST Submission: Posts
JSONpayloads to Formspree with properContent-Typeheaders, managing button disabled states and error/success UX flows. - Smart Focus Management: Automatically focuses the first field with an error on failed submission.
// Declarative validation β clean, extensible rule configuration
const validators = {
firstName: {
required: true,
validate: (val) => val.trim().length >= 2,
message: 'Please enter your first name.'
},
email: {
required: true,
validate: (val) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(val),
message: 'Please enter a valid email address.'
}
};JSPConstruction/
βββ index.html # Homepage β Hero, Services Grid, Trust Pillars, CTA
βββ about.html # Company Story, Values, Visual Timeline
βββ contact.html # Consultation Form + Contact Sidebar + Formspree
βββ faq.html # Accordion FAQ with Inline JS Controller
βββ 404.html # Brand-Cohesive 404 Error Page
βββ robots.txt # Crawler Directives
βββ sitemap.xml # XML Sitemap for Search Indexing
βββ services/
β βββ index.html # 5 Service Categories with Feature Lists & CTAs
βββ assets/
βββ css/
β βββ variables.css # Design Token System (colors, type, spacing, shadows)
β βββ base.css # Global Resets & Element Defaults
β βββ layout.css # Container, Grid & Split Layout Utilities
β βββ components.css # Reusable UI Components (nav, cards, buttons, forms)
β βββ pages.css # Page-Specific Section Styles
βββ js/
β βββ navigation.js # Sticky Header, Mobile Menu, Smooth Scroll
β βββ animations.js # IntersectionObserver Scroll Reveals
β βββ form.js # Client-Side Validation + Formspree Handler
βββ images/
βββ authentic/ # High-Resolution Project Photography (8 assets)
βββ hero/ # Hero Background Assets
βββ services/ # Service-Specific PhotographyThis site was built with organic search visibility as a first-class concern:
- Unique Title & Meta Tags on every page with location-specific keywords (e.g., "Los Angeles Home Remodeling").
- Canonical URLs to prevent duplicate content issues across
wwwand non-wwwvariants. - Open Graph Metadata for rich social sharing previews on Facebook and LinkedIn.
- Semantic HTML5 with proper heading hierarchy (
h1βh2βh3),<main>,<nav>,<section>, and<footer>landmarks. - robots.txt + XML Sitemap for crawler guidance and efficient indexing.
- Image Optimization β explicit
widthandheightattributes on all<img>tags to prevent Cumulative Layout Shift (CLS), withloading="lazy"on below-fold images. - Skip Navigation Link (
<a class="skip-link">) for screen reader users on every page.
Since the project is built on standard web standards, there are no dependencies to install and no build processes required.
- Clone this repository:
git clone https://github.com/threadbearer/JSPConstruction.git
- Run a simple static server from the root folder:
- VSCode: Right-click
index.htmland select "Open with Live Server". - Python:
python3 -m http.server 8000
- VSCode: Right-click
- Open your browser and navigate to
http://localhost:8000.
The site is deployed to a Google Cloud Storage bucket configured for static website hosting:
gsutil -m rsync -r -d ./ gs://your-bucket-name- Modular CSS Architecture: The 5-file CSS system demonstrates how to scale a design system across a multi-page site without preprocessors β achieving the maintainability of SASS/LESS through disciplined use of CSS Custom Properties and purposeful file separation.
- Zero-Dependency Performance: The entire site β HTML, CSS, and JS combined β weighs under 115 KB of source code. No framework overhead, no unused CSS, no tree-shaking necessary. Every byte is intentional.
- Production SEO Patterns: Demonstrates a complete SEO implementation (canonical URLs, Open Graph, XML sitemap, structured heading hierarchies, image optimization) that mirrors what agencies charge thousands to configure.
- Accessibility by Default: Skip links, ARIA attributes, keyboard navigation, reduced-motion respect, and semantic HTML aren't afterthoughts β they're foundational to the architecture.
- Real Client Deployment: This is not a tutorial project. It serves a real, licensed contractor and processes real consultation requests through Formspree in production.