The build guide

Helios — a website that follows the sun.

A residential-solar showpiece where the page itself performs a sunrise: the background interpolates from pre-dawn indigo to noon white as you scroll, a live SVG sun climbs an arc overhead, and a hand-built home cross-section shows energy actually flowing. Here's how it was made.

← Back to the site

Concept

Light made livable

The brief called for warm optimism without greenwash clichés — California modernism, sunrise gradients, precise engineering underneath. The organizing idea: don't just describe solar, dramatize daylight. Scroll position is time of day. You begin before dawn in cool indigo, the sun rises as you read, and you arrive at the closing call-to-action at bright noon. Every section is timed to where the sun sits in the sky.

Palette — a dawn-to-noon system

Pre-dawn indigo#2B2D5C
Horizon peach#FFB08A
Morning gold#FFC65C
Sky blue#7EC4E8
Solar amber#F59E0B
Ink#1E2230

Type

Sora for display and the big engineering numerals — a geometric sans with just enough warmth to feel human rather than corporate. Inter for body at comfortable reading sizes. Tabular figures (font-feature-settings:"tnum") keep the counters and calculator numbers from jittering as they animate.

Assets

Original imagery — GPT Image 2

Three images, generated at high quality via the OpenAI gpt-image-2 model, then inspected and kept. The exact prompts:

House at golden hour — 1536×1024

Architectural photography of a modern California-modernism single-story
house at golden hour sunrise, flat roof fully covered with sleek dark
monocrystalline solar panels in a clean grid, warm peach and gold dawn
light raking across white stucco walls and floor-to-ceiling glass, long
soft shadows, low warm sun flare, desert landscaping with agave, calm
optimistic mood, shot on 35mm, shallow depth, palette of warm amber
gold sky blue and cream, ultra sharp, no text no watermark no people

Macro solar cell — 1536×1024

Extreme macro photograph of a monocrystalline solar photovoltaic cell
surface, deep blue-indigo silicon with fine geometric grid of silver
busbar lines, iridescent light refraction, a bright warm golden sun
flare bursting across one corner, dewdrops catching amber light, high
detail texture, cinematic shallow depth of field, palette indigo silver
and solar amber, no text no watermark

Installers at dawn — 1536×1024

Silhouette photograph of two solar installers working on a residential
rooftop at dawn, carrying a solar panel against a vast dawn sky gradient
from pre-dawn indigo to horizon peach, warm rim light outlining figures,
minimal clean composition, distant hills, hopeful cinematic mood,
palette indigo to peach gold, no text no watermark

Techniques

How the motion works

The scroll-driven day cycle

A single fixed backdrop layer holds a vertical gradient whose two colours are CSS custom properties. On scroll, JavaScript computes page progress (0→1) and interpolates between three keyframes — indigo/peach → sky/gold → white/amber — writing the results back as --sky-top and --sky-bot. The whole page temperature rises with the reader.

// interpolate between 3 colour stops by scroll progress
const p = scrollY / (scrollHeight - innerHeight);
const m = mix(p);              // {top:[r,g,b], bot:[r,g,b]}
root.style.setProperty('--sky-top', m.top.join(','));
root.style.setProperty('--sky-bot', m.bot.join(','));

The rising sun

An inline SVG sun (radial-gradient core + 16 procedurally generated rays that slowly rotate) is fixed to the viewport. Its left/top follow a sine arc keyed to scroll — low on the left before dawn, climbing to high overhead by noon — and it scales up as it rises. Stars fade out in the first screenful; parallax clouds fade in as the sky brightens.

// sun climbs a sine arc as you scroll
const sx = lerp(16, 74, p);                  // % across
const sy = 88 - Math.sin(p * Math.PI*0.5) * 74;  // % up

The animated home cross-section

The centrepiece is a hand-authored SVG: house, roof panels, inverter, battery and grid tower, wired together with four bezier paths. Energy is rendered as glowing dots that ride those paths — each frame samples path.getPointAtLength() at an advancing offset. A day/night toggle flips which wires are active and reverses flow direction: by day the roof feeds home, battery and grid; after dark the battery discharges back into the house and the windows light up.

Everything else

Process

Three iteration passes

Pass 1

Structure & the day engine

Built all sections, wired the scroll day-cycle, sun arc, flow dots and calculator. Found the nav contrast flipped too late over the light world and the cross-section battery didn't visibly change on the night toggle — tuned both.

Pass 2

Rhythm & imagery

Integrated the three GPT Image 2 photos as full-bleed bands, tightened vertical spacing, balanced type hierarchy, and verified mobile at 375px — collapsed the calculator and steps to single columns, fixed the macro band gradient so text stays legible on small screens.

Pass 3

Polish & elevation

Added star twinkle, cloud parallax fade-in, sun scaling, smoother easing on reveals and the offset bar, and richer hover states. Final console + contrast sweep across desktop and mobile, all clean.

Ship it

Deploy

Fully static — no build step. Deploy the folder to Cloudflare Pages:

npx wrangler pages deploy . --project-name helios
← Back to the site
Designed & built end-to-end by Claude (Fable 5) — concept, code & AI-generated imagery.