E-bike launch page with colour wipe
A dark launch page where picking a colour repaints the bike with a circular wipe, a range calculator drains a battery, and a pre-order bar slides up.
"use client";
import {
useEffect,
useRef,
useState,
type CSSProperties,
type ReactNode,
} from "react";
import "./ebike-page.css";
/**
* EbikePage: a launch page for a compact city e-bike ("Pell One").
* Signature moves: picking a colour repaints the bike with a circular wipe that
* grows from the swatch you pressed, and a range calculator drains a battery as
* you set your commute. A pre-order bar slides up once the hero leaves.
* It is a demo: connect `onPreorder` to your checkout.
*/
const COLORS = [
{
id: "chalk",
name: "Chalk",
hex: "#e9e4d8",
accent: "#e9e4d8",
onBand: "#0e0e10",
glow: "#bfb8a6",
img: "/images/landing-ebike-chalk-10.jpg",
},
{
id: "signal",
name: "Signal",
hex: "#ff5a1f",
accent: "#ff5a1f",
onBand: "#0e0e10",
glow: "#ff5a1f",
img: "/images/landing-ebike-signal-11.jpg",
},
{
id: "ink",
name: "Ink",
hex: "#262b3a",
accent: "#9aa8ff",
onBand: "#f3eee3",
glow: "#3b4a8a",
img: "/images/landing-ebike-ink-12.jpg",
},
];
const PRICE = "€2,190";
const MODES = [
{ id: "eco", label: "Eco", range: 110 },
{ id: "tour", label: "Tour", range: 80 },
{ id: "boost", label: "Boost", range: 50 },
];
const SPOTS = [
{
x: 61,
y: 52,
title: "Battery in the frame",
text: "540 Wh, slides out with one key and charges in 3.5 hours.",
},
{
x: 23,
y: 70,
title: "Silent rear motor",
text: "45 Nm, quiet enough to hear the street. Helps up to 25 km/h.",
},
{
x: 82,
y: 41,
title: "Front rack",
text: "Holds 15 kg: a crate, a bag of groceries, a sleepy dog.",
},
];
/* ------------------------------------------------------------------ */
/** A drawn bike in the chosen colour, used until the photo exists. */
function BikeDrawing({ color }: { color: string }) {
return (
<svg viewBox="0 0 1200 800" className="gu-pell__drawing" aria-hidden="true">
<g fill="none" strokeLinecap="round" strokeLinejoin="round">
<circle cx="300" cy="560" r="150" stroke="#0b0b0c" strokeWidth="26" />
<circle cx="900" cy="560" r="150" stroke="#0b0b0c" strokeWidth="26" />
<circle cx="300" cy="560" r="128" stroke="#b58d62" strokeWidth="6" />
<circle cx="900" cy="560" r="128" stroke="#b58d62" strokeWidth="6" />
<path
d="M300 560 L 380 300 L 340 240 M 380 300 L 560 560 L 900 560 L 760 330 L 600 330 M 560 560 L 520 470 Q 600 380 760 330"
stroke={color}
strokeWidth="34"
/>
<path d="M760 330 L 730 250" stroke={color} strokeWidth="28" />
<path
d="M690 240 Q 730 225 790 245"
stroke="#4a3426"
strokeWidth="26"
/>
<path
d="M300 240 L 400 240 M 250 330 L 400 330 L 390 270"
stroke="#0b0b0c"
strokeWidth="14"
/>
<path
d="M150 470 Q 300 360 450 470 M 750 470 Q 900 360 1050 470"
stroke="#0b0b0c"
strokeWidth="12"
/>
<circle cx="560" cy="560" r="34" stroke="#0b0b0c" strokeWidth="14" />
<circle cx="900" cy="560" r="44" fill="#0b0b0c" />
</g>
</svg>
);
}
function BikeLayer({
src,
color,
alt,
}: {
src: string;
color: string;
alt: string;
}) {
const img = useRef<HTMLImageElement>(null);
const [missing, setMissing] = useState(false);
useEffect(() => {
const el = img.current;
if (el && el.complete && el.naturalWidth === 0) setMissing(true);
}, []);
return missing ? (
<BikeDrawing color={color} />
) : (
<img ref={img} src={src} alt={alt} onError={() => setMissing(true)} />
);
}
function Photo({
src,
alt,
className = "",
}: {
src: string;
alt: string;
className?: string;
}) {
const [missing, setMissing] = useState(false);
const img = useRef<HTMLImageElement>(null);
useEffect(() => {
const el = img.current;
if (el && el.complete && el.naturalWidth === 0) setMissing(true);
}, []);
return (
<div className={`gu-pell__photo ${className}`}>
{!missing && (
<img
ref={img}
src={src}
alt={alt}
loading="lazy"
onError={() => setMissing(true)}
/>
)}
</div>
);
}
/** Counts up to a number the first time it scrolls into view. */
function CountUp({ to, decimals = 0 }: { to: number; decimals?: number }) {
const [node, setNode] = useState<HTMLSpanElement | null>(null);
const [v, setV] = useState(0);
useEffect(() => {
if (!node) return;
const reduce = window.matchMedia(
"(prefers-reduced-motion: reduce)",
).matches;
let raf = 0;
const io = new IntersectionObserver(
([e]) => {
if (!e.isIntersecting) return;
io.disconnect();
let t0 = 0;
const tick = (now: number) => {
if (!t0) t0 = now;
const p = reduce ? 1 : Math.min(1, (now - t0) / 1400);
setV(to * (1 - Math.pow(1 - p, 4)));
if (p < 1) raf = requestAnimationFrame(tick);
};
raf = requestAnimationFrame(tick);
},
{ threshold: 0.6 },
);
io.observe(node);
return () => {
io.disconnect();
cancelAnimationFrame(raf);
};
}, [node, to]);
return (
<span ref={setNode} aria-label={to.toFixed(decimals)}>
{v.toFixed(decimals)}
</span>
);
}
/* ------------------------------------------------------------------ */
function Hero({
color,
setColor,
heroRef,
}: {
color: number;
setColor: (i: number) => void;
heroRef: (el: HTMLElement | null) => void;
}) {
const stage = useRef<HTMLDivElement>(null);
const layers = useRef<(HTMLDivElement | null)[]>([]);
const [under, setUnder] = useState(color);
const [spot, setSpot] = useState<number | null>(null);
const choose = (i: number, from: HTMLElement) => {
if (i === color) return;
const st = stage.current;
const layer = layers.current[i];
setUnder(color);
setColor(i);
if (
!st ||
!layer ||
window.matchMedia("(prefers-reduced-motion: reduce)").matches
)
return;
const s = st.getBoundingClientRect();
const b = from.getBoundingClientRect();
const x = b.left + b.width / 2 - s.left;
const y = b.top + b.height / 2 - s.top;
layer.animate(
[
{ clipPath: `circle(0px at ${x}px ${y}px)` },
{
clipPath: `circle(${Math.hypot(s.width, s.height)}px at ${x}px ${y}px)`,
},
],
{ duration: 900, easing: "cubic-bezier(0.65, 0, 0.35, 1)" },
);
};
const c = COLORS[color];
return (
<header
ref={heroRef}
className="gu-pell__hero"
style={{ "--paint": c.hex, "--glow": c.glow } as CSSProperties}
>
<nav className="gu-pell__nav" aria-label="Main">
<a href="#" className="gu-pell__logo">
pell<span aria-hidden="true">●</span>
</a>
<div className="gu-pell__links">
<a href="#pell-range">Range</a>
<a href="#pell-specs">Specs</a>
</div>
<a href="#pell-order" className="gu-pell__ghost">
Pre-order
</a>
</nav>
<div className="gu-pell__hero-grid">
<div className="gu-pell__copy">
<p className="gu-pell__kicker">Pell One, shipping in March</p>
<h1 className="gu-pell__h1">
Small bike.
<br />
Long days.
</h1>
<p className="gu-pell__lede">
A 16 kg step-through that fits in a lift, carries the shopping and
does 80 km on one charge.
</p>
<fieldset className="gu-pell__swatches">
<legend>
Colour: <strong key={c.id}>{c.name}</strong>
</legend>
{COLORS.map((x, i) => (
<label key={x.id} style={{ "--sw": x.hex } as CSSProperties}>
<input
type="radio"
name="pell-color"
checked={color === i}
onChange={(e) =>
choose(i, e.currentTarget.parentElement as HTMLElement)
}
/>
<span className="sr-only">{x.name}</span>
</label>
))}
</fieldset>
<div className="gu-pell__buy">
<p className="gu-pell__price">{PRICE}</p>
<a href="#pell-order" className="gu-pell__cta">
Pre-order for €100
</a>
</div>
</div>
<div className="gu-pell__stage" ref={stage}>
<div className="gu-pell__glow" aria-hidden="true" />
{COLORS.map((x, i) => (
<div
key={x.id}
ref={(el) => {
layers.current[i] = el;
}}
className="gu-pell__layer"
data-z={i === color ? 3 : i === under ? 2 : 1}
aria-hidden={i !== color}
>
<BikeLayer
src={x.img}
color={x.hex}
alt={`Pell One in ${x.name}, side view`}
/>
</div>
))}
{SPOTS.map((s, i) => (
<div
key={s.title}
className="gu-pell__spot"
style={{ left: `${s.x}%`, top: `${s.y}%` }}
data-open={spot === i}
onPointerEnter={(e) => e.pointerType === "mouse" && setSpot(i)}
onPointerLeave={(e) => e.pointerType === "mouse" && setSpot(null)}
>
<button
type="button"
aria-expanded={spot === i}
aria-label={s.title}
onClick={() => setSpot(spot === i ? null : i)}
onBlur={() => setSpot(null)}
/>
<div className="gu-pell__tip" role="tooltip">
<strong>{s.title}</strong>
{s.text}
</div>
</div>
))}
</div>
</div>
</header>
);
}
/* ------------------------------------------------------------------ */
function Range() {
const [km, setKm] = useState(8);
const [mode, setMode] = useState(1);
const range = MODES[mode].range;
const daily = km * 2;
const days = Math.max(1, Math.floor(range / daily));
const used = Math.min(1, daily / range);
const cells = 10;
const left = Math.round((1 - used) * cells);
return (
<section
className="gu-pell__range"
id="pell-range"
aria-labelledby="pell-r-title"
>
<div>
<h2 id="pell-r-title" className="gu-pell__h2">
Will it get you there?
</h2>
<p className="gu-pell__muted">
Set your ride to work and the help you like.
</p>
<label className="gu-pell__slider">
<span>
One way <output>{km} km</output>
</span>
<input
type="range"
min={1}
max={40}
value={km}
onChange={(e) => setKm(Number(e.target.value))}
style={{ "--p": `${((km - 1) / 39) * 100}%` } as CSSProperties}
/>
</label>
<fieldset className="gu-pell__modes">
<legend>Pedal help</legend>
{MODES.map((m, i) => (
<label key={m.id}>
<input
type="radio"
name="pell-mode"
checked={mode === i}
onChange={() => setMode(i)}
/>
<span>
{m.label}
<small>{m.range} km</small>
</span>
</label>
))}
</fieldset>
</div>
<div className="gu-pell__battery-card" aria-live="polite">
<div
className="gu-pell__battery"
role="img"
aria-label={`After one day, about ${Math.round((1 - used) * 100)}% of the battery is left`}
>
{Array.from({ length: cells }, (_, i) => (
<span
key={i}
data-on={i < left}
style={{ "--i": i } as CSSProperties}
/>
))}
</div>
<p className="gu-pell__days">
<span className="gu-pell__days-n">{days}</span>
{days === 1 ? " day" : " days"}
</p>
<p className="gu-pell__muted">
{daily > range
? `That's ${daily} km a day, more than one charge. Take the spare battery.`
: `between charges, riding ${daily} km a day in ${MODES[mode].label}.`}
</p>
</div>
</section>
);
}
/* ------------------------------------------------------------------ */
export function EbikePage({
onPreorder,
}: {
onPreorder?: (order: { color: string }) => void;
}) {
const [color, setColor] = useState(1);
const [hero, setHero] = useState<HTMLElement | null>(null);
const [past, setPast] = useState(false);
const [ordered, setOrdered] = useState(false);
const ride = useRef<HTMLDivElement>(null);
// The pre-order bar shows once the hero has scrolled away.
useEffect(() => {
if (!hero) return;
const io = new IntersectionObserver(([e]) => setPast(!e.isIntersecting), {
threshold: 0.05,
});
io.observe(hero);
return () => io.disconnect();
}, [hero]);
// The ride photo drifts a little slower than the page.
useEffect(() => {
const el = ride.current;
if (!el || window.matchMedia("(prefers-reduced-motion: reduce)").matches)
return;
let raf = 0;
const update = () => {
const r = el.getBoundingClientRect();
const vh = window.innerHeight || 1;
const p = (r.top + r.height / 2 - vh / 2) / vh;
el.style.setProperty("--shift", `${(p * -12).toFixed(2)}%`);
};
const onScroll = () => {
cancelAnimationFrame(raf);
raf = requestAnimationFrame(update);
};
update();
window.addEventListener("scroll", onScroll, {
passive: true,
capture: true,
});
return () => {
cancelAnimationFrame(raf);
window.removeEventListener("scroll", onScroll, { capture: true });
};
}, []);
const c = COLORS[color];
const order = () => {
setOrdered(true);
onPreorder?.({ color: c.id });
};
return (
<div
className="gu-pell"
style={
{
"--paint": c.hex,
"--accent": c.accent,
"--on-band": c.onBand,
} as CSSProperties
}
>
<Hero color={color} setColor={setColor} heroRef={setHero} />
<Range />
<section className="gu-pell__ride" aria-labelledby="pell-ride-title">
<div className="gu-pell__ride-media" ref={ride}>
<Photo
src="/images/landing-ebike-ride-13.jpg"
alt="A woman with grey hair rides an orange e-bike with groceries along a wet cobbled street at dusk"
/>
</div>
<div className="gu-pell__ride-copy">
<h2 id="pell-ride-title" className="gu-pell__h2">
Your city, shorter.
</h2>
<p>
Most trips in a city are under 8 km. On a Pell that's twenty
minutes, no parking, no sweat, door to door.
</p>
</div>
</section>
<section
className="gu-pell__specs"
id="pell-specs"
aria-labelledby="pell-s-title"
>
<h2 id="pell-s-title" className="gu-pell__h2">
The numbers.
</h2>
<dl>
{(
[
[16, 0, "kg", "Light enough to carry up the stairs."],
[80, 0, "km", "Range in Tour mode, on one charge."],
[3.5, 1, "h", "From empty to full on any socket."],
[15, 0, "kg", "On the front rack, plus 25 kg behind."],
] as [number, number, string, ReactNode][]
).map(([n, d, unit, text], i) => (
<div key={i}>
<dt className="gu-pell__muted">{text}</dt>
<dd>
<CountUp to={n} decimals={d} />
<small>{unit}</small>
</dd>
</div>
))}
</dl>
</section>
<section
className="gu-pell__order"
id="pell-order"
aria-labelledby="pell-o-title"
>
<h2 id="pell-o-title" className="gu-pell__h2">
Reserve yours for €100.
</h2>
<p className="gu-pell__muted">
Fully refundable until it ships. The rest, {PRICE} in total, is due
when your bike is ready.
</p>
{ordered ? (
<p className="gu-pell__ok" role="status">
Reserved: a Pell One in {c.name}. We'll email you before it
ships.
</p>
) : (
<button type="button" className="gu-pell__cta" onClick={order}>
Reserve in {c.name}
</button>
)}
</section>
<footer className="gu-pell__foot">
<p className="gu-pell__logo">
pell<span aria-hidden="true">●</span>
</p>
<p className="gu-pell__muted">
Designed and built in small batches. Two-year warranty.
</p>
</footer>
<div
className="gu-pell__bar"
data-on={past && !ordered}
aria-hidden={!past || ordered}
>
<span className="gu-pell__bar-dot" aria-hidden="true" />
<p>
<strong>Pell One</strong> in {c.name}, {PRICE}
</p>
<button
type="button"
className="gu-pell__cta"
onClick={order}
tabIndex={past && !ordered ? 0 : -1}
>
Pre-order
</button>
</div>
</div>
);
}
Paste this into ChatGPT, Claude, Cursor, v0, Lovable or Bolt. It describes the layout, motion, colors and accessibility and includes the code, so the AI can rebuild it in any framework.
# Build this UI piece: E-bike launch page with colour wipe
You are a senior front-end engineer. Recreate the piece below in my project. If I don't say which framework I use, ask once, then build it in that framework (React, Vue, Svelte, Angular, Astro, plain HTML/CSS/JS or anything else). Keep the behavior, motion, colors, spacing and accessibility exactly as described. Keep the code clean and commented for beginners.
## What it is
A dark launch page for a compact city e-bike ("Pell One"). Its signature: three colour swatches (Chalk, Signal, Ink), where picking one repaints the bike with a circular clip-path wipe that grows from the swatch you pressed. The glow behind the bike, the logo dot, the slider fill, the units in the specs, the sticky bar dot and the whole order band all take on the new paint colour. Sections: a hero with copy, swatches and price beside a 3:2 bike stage with three pulsing hotspots, a range calculator with a draining battery, a full-bleed parallax ride photo, four count-up specs, a coloured order band, a footer, and a floating pre-order bar that slides up once the hero leaves the screen.
## Palette
Background #0e0e10, surface #17171b, text #f3eee3, muted #a39d92, lines rgba(243,238,227,0.14), and volt #d7ff3a (only for hotspots, battery cells and the focus ring). Paint colours: chalk #e9e4d8, signal #ff5a1f, ink #262b3a, exposed as --paint. Type is system-ui at weight 900, tight tracking (-0.045em) and font-stretch 125%.
## Layout
- Hero:
- Nav: a lowercase wordmark with a paint-coloured dot, two links and an outlined "Pre-order" pill.
- At 920px and wider, two columns, 0.8fr and 1.2fr.
- Copy: a kicker, a two-line headline up to 7rem, a lede, a fieldset of 48px round swatch radios with a ring on the chosen one and a legend naming the colour, then the price and a "Pre-order for €100" pill.
- Stage: a rounded 3:2 box with a blurred glow and three stacked colour layers (the chosen one on top, the previous one underneath during the wipe).
- Hotspots: 36px buttons with a volt core and a ping ring. Each opens a small cream card on hover or tap.
- Range: two columns. On the left, a heading, a 1–40 km "One way" range input whose track fills with the paint, and three mode tiles (Eco 110 km, Tour 80 km, Boost 50 km). On the right, a surface card with a 10-cell battery drawn in CSS (cells dim and shrink right to left), a huge "N days" figure and a sentence.
- Ride: a 620px full-bleed photo that moves slower than the scroll, a left shade, a heading and a paragraph.
- Specs: four count-up figures (16 kg, 80 km, 3.5 h, 15 kg) with the unit in the paint colour, each above a one-line note, in an auto-fit grid separated by lines.
- Order: the full band is painted the chosen colour, with dark text, a "Reserve in Signal" button, and an inline status message after reserving.
- Sticky bar: a pill fixed to the bottom with the paint dot, "Pell One in Signal, €2,190" and a Pre-order button. It slides up when the hero is out of view and leaves after ordering.
## Images
- landing-ebike-chalk-10.jpg, landing-ebike-signal-11.jpg and landing-ebike-ink-12.jpg (3:2): the same bike in three colours, from the same studio angle.
- landing-ebike-ride-13.jpg (16:9): a rider at dusk.
Until a photo exists, each colour layer shows a drawn SVG bike in that colour, and the ride section shows a dusky gradient.
## Motion
- Wipe: 900ms, cubic-bezier(0.65,0,0.35,1), clip-path circle from the swatch centre to the stage diagonal.
- The glow breathes for 5s, hotspot rings ping for 2.2s, and hero copy rises in 100ms steps.
- Battery cells change in a staggered order.
- Specs count up over 1.4s with an ease-out curve when they come into view.
- The ride photo shifts up to 12%.
- The sticky bar slides up over 0.6s.
## Accessibility
- Swatches and modes are radio inputs in fieldsets with legends, and the range is a native input with a visible output.
- Hotspots are buttons with aria-expanded and role="tooltip" cards.
- The battery has role="img" with a sentence, and the results card is aria-live="polite".
- The order confirmation has role="status".
- The sticky bar is aria-hidden and its button can't be tabbed to while it is hidden.
- prefers-reduced-motion: no wipe, glow, count-up, parallax or stagger.
## Reference implementation
The original is written in React with one plain CSS file. Dependencies: none (plain React and CSS). Translate it faithfully; do not add new libraries unless my framework needs them.
### EbikePage.tsx
```tsx
"use client";
import {
useEffect,
useRef,
useState,
type CSSProperties,
type ReactNode,
} from "react";
import "./ebike-page.css";
/**
* EbikePage: a launch page for a compact city e-bike ("Pell One").
* Signature moves: picking a colour repaints the bike with a circular wipe that
* grows from the swatch you pressed, and a range calculator drains a battery as
* you set your commute. A pre-order bar slides up once the hero leaves.
* It is a demo: connect `onPreorder` to your checkout.
*/
const COLORS = [
{
id: "chalk",
name: "Chalk",
hex: "#e9e4d8",
accent: "#e9e4d8",
onBand: "#0e0e10",
glow: "#bfb8a6",
img: "/images/landing-ebike-chalk-10.jpg",
},
{
id: "signal",
name: "Signal",
hex: "#ff5a1f",
accent: "#ff5a1f",
onBand: "#0e0e10",
glow: "#ff5a1f",
img: "/images/landing-ebike-signal-11.jpg",
},
{
id: "ink",
name: "Ink",
hex: "#262b3a",
accent: "#9aa8ff",
onBand: "#f3eee3",
glow: "#3b4a8a",
img: "/images/landing-ebike-ink-12.jpg",
},
];
const PRICE = "€2,190";
const MODES = [
{ id: "eco", label: "Eco", range: 110 },
{ id: "tour", label: "Tour", range: 80 },
{ id: "boost", label: "Boost", range: 50 },
];
const SPOTS = [
{
x: 61,
y: 52,
title: "Battery in the frame",
text: "540 Wh, slides out with one key and charges in 3.5 hours.",
},
{
x: 23,
y: 70,
title: "Silent rear motor",
text: "45 Nm, quiet enough to hear the street. Helps up to 25 km/h.",
},
{
x: 82,
y: 41,
title: "Front rack",
text: "Holds 15 kg: a crate, a bag of groceries, a sleepy dog.",
},
];
/* ------------------------------------------------------------------ */
/** A drawn bike in the chosen colour, used until the photo exists. */
function BikeDrawing({ color }: { color: string }) {
return (
<svg viewBox="0 0 1200 800" className="gu-pell__drawing" aria-hidden="true">
<g fill="none" strokeLinecap="round" strokeLinejoin="round">
<circle cx="300" cy="560" r="150" stroke="#0b0b0c" strokeWidth="26" />
<circle cx="900" cy="560" r="150" stroke="#0b0b0c" strokeWidth="26" />
<circle cx="300" cy="560" r="128" stroke="#b58d62" strokeWidth="6" />
<circle cx="900" cy="560" r="128" stroke="#b58d62" strokeWidth="6" />
<path
d="M300 560 L 380 300 L 340 240 M 380 300 L 560 560 L 900 560 L 760 330 L 600 330 M 560 560 L 520 470 Q 600 380 760 330"
stroke={color}
strokeWidth="34"
/>
<path d="M760 330 L 730 250" stroke={color} strokeWidth="28" />
<path
d="M690 240 Q 730 225 790 245"
stroke="#4a3426"
strokeWidth="26"
/>
<path
d="M300 240 L 400 240 M 250 330 L 400 330 L 390 270"
stroke="#0b0b0c"
strokeWidth="14"
/>
<path
d="M150 470 Q 300 360 450 470 M 750 470 Q 900 360 1050 470"
stroke="#0b0b0c"
strokeWidth="12"
/>
<circle cx="560" cy="560" r="34" stroke="#0b0b0c" strokeWidth="14" />
<circle cx="900" cy="560" r="44" fill="#0b0b0c" />
</g>
</svg>
);
}
function BikeLayer({
src,
color,
alt,
}: {
src: string;
color: string;
alt: string;
}) {
const img = useRef<HTMLImageElement>(null);
const [missing, setMissing] = useState(false);
useEffect(() => {
const el = img.current;
if (el && el.complete && el.naturalWidth === 0) setMissing(true);
}, []);
return missing ? (
<BikeDrawing color={color} />
) : (
<img ref={img} src={src} alt={alt} onError={() => setMissing(true)} />
);
}
function Photo({
src,
alt,
className = "",
}: {
src: string;
alt: string;
className?: string;
}) {
const [missing, setMissing] = useState(false);
const img = useRef<HTMLImageElement>(null);
useEffect(() => {
const el = img.current;
if (el && el.complete && el.naturalWidth === 0) setMissing(true);
}, []);
return (
<div className={`gu-pell__photo ${className}`}>
{!missing && (
<img
ref={img}
src={src}
alt={alt}
loading="lazy"
onError={() => setMissing(true)}
/>
)}
</div>
);
}
/** Counts up to a number the first time it scrolls into view. */
function CountUp({ to, decimals = 0 }: { to: number; decimals?: number }) {
const [node, setNode] = useState<HTMLSpanElement | null>(null);
const [v, setV] = useState(0);
useEffect(() => {
if (!node) return;
const reduce = window.matchMedia(
"(prefers-reduced-motion: reduce)",
).matches;
let raf = 0;
const io = new IntersectionObserver(
([e]) => {
if (!e.isIntersecting) return;
io.disconnect();
let t0 = 0;
const tick = (now: number) => {
if (!t0) t0 = now;
const p = reduce ? 1 : Math.min(1, (now - t0) / 1400);
setV(to * (1 - Math.pow(1 - p, 4)));
if (p < 1) raf = requestAnimationFrame(tick);
};
raf = requestAnimationFrame(tick);
},
{ threshold: 0.6 },
);
io.observe(node);
return () => {
io.disconnect();
cancelAnimationFrame(raf);
};
}, [node, to]);
return (
<span ref={setNode} aria-label={to.toFixed(decimals)}>
{v.toFixed(decimals)}
</span>
);
}
/* ------------------------------------------------------------------ */
function Hero({
color,
setColor,
heroRef,
}: {
color: number;
setColor: (i: number) => void;
heroRef: (el: HTMLElement | null) => void;
}) {
const stage = useRef<HTMLDivElement>(null);
const layers = useRef<(HTMLDivElement | null)[]>([]);
const [under, setUnder] = useState(color);
const [spot, setSpot] = useState<number | null>(null);
const choose = (i: number, from: HTMLElement) => {
if (i === color) return;
const st = stage.current;
const layer = layers.current[i];
setUnder(color);
setColor(i);
if (
!st ||
!layer ||
window.matchMedia("(prefers-reduced-motion: reduce)").matches
)
return;
const s = st.getBoundingClientRect();
const b = from.getBoundingClientRect();
const x = b.left + b.width / 2 - s.left;
const y = b.top + b.height / 2 - s.top;
layer.animate(
[
{ clipPath: `circle(0px at ${x}px ${y}px)` },
{
clipPath: `circle(${Math.hypot(s.width, s.height)}px at ${x}px ${y}px)`,
},
],
{ duration: 900, easing: "cubic-bezier(0.65, 0, 0.35, 1)" },
);
};
const c = COLORS[color];
return (
<header
ref={heroRef}
className="gu-pell__hero"
style={{ "--paint": c.hex, "--glow": c.glow } as CSSProperties}
>
<nav className="gu-pell__nav" aria-label="Main">
<a href="#" className="gu-pell__logo">
pell<span aria-hidden="true">●</span>
</a>
<div className="gu-pell__links">
<a href="#pell-range">Range</a>
<a href="#pell-specs">Specs</a>
</div>
<a href="#pell-order" className="gu-pell__ghost">
Pre-order
</a>
</nav>
<div className="gu-pell__hero-grid">
<div className="gu-pell__copy">
<p className="gu-pell__kicker">Pell One, shipping in March</p>
<h1 className="gu-pell__h1">
Small bike.
<br />
Long days.
</h1>
<p className="gu-pell__lede">
A 16 kg step-through that fits in a lift, carries the shopping and
does 80 km on one charge.
</p>
<fieldset className="gu-pell__swatches">
<legend>
Colour: <strong key={c.id}>{c.name}</strong>
</legend>
{COLORS.map((x, i) => (
<label key={x.id} style={{ "--sw": x.hex } as CSSProperties}>
<input
type="radio"
name="pell-color"
checked={color === i}
onChange={(e) =>
choose(i, e.currentTarget.parentElement as HTMLElement)
}
/>
<span className="sr-only">{x.name}</span>
</label>
))}
</fieldset>
<div className="gu-pell__buy">
<p className="gu-pell__price">{PRICE}</p>
<a href="#pell-order" className="gu-pell__cta">
Pre-order for €100
</a>
</div>
</div>
<div className="gu-pell__stage" ref={stage}>
<div className="gu-pell__glow" aria-hidden="true" />
{COLORS.map((x, i) => (
<div
key={x.id}
ref={(el) => {
layers.current[i] = el;
}}
className="gu-pell__layer"
data-z={i === color ? 3 : i === under ? 2 : 1}
aria-hidden={i !== color}
>
<BikeLayer
src={x.img}
color={x.hex}
alt={`Pell One in ${x.name}, side view`}
/>
</div>
))}
{SPOTS.map((s, i) => (
<div
key={s.title}
className="gu-pell__spot"
style={{ left: `${s.x}%`, top: `${s.y}%` }}
data-open={spot === i}
onPointerEnter={(e) => e.pointerType === "mouse" && setSpot(i)}
onPointerLeave={(e) => e.pointerType === "mouse" && setSpot(null)}
>
<button
type="button"
aria-expanded={spot === i}
aria-label={s.title}
onClick={() => setSpot(spot === i ? null : i)}
onBlur={() => setSpot(null)}
/>
<div className="gu-pell__tip" role="tooltip">
<strong>{s.title}</strong>
{s.text}
</div>
</div>
))}
</div>
</div>
</header>
);
}
/* ------------------------------------------------------------------ */
function Range() {
const [km, setKm] = useState(8);
const [mode, setMode] = useState(1);
const range = MODES[mode].range;
const daily = km * 2;
const days = Math.max(1, Math.floor(range / daily));
const used = Math.min(1, daily / range);
const cells = 10;
const left = Math.round((1 - used) * cells);
return (
<section
className="gu-pell__range"
id="pell-range"
aria-labelledby="pell-r-title"
>
<div>
<h2 id="pell-r-title" className="gu-pell__h2">
Will it get you there?
</h2>
<p className="gu-pell__muted">
Set your ride to work and the help you like.
</p>
<label className="gu-pell__slider">
<span>
One way <output>{km} km</output>
</span>
<input
type="range"
min={1}
max={40}
value={km}
onChange={(e) => setKm(Number(e.target.value))}
style={{ "--p": `${((km - 1) / 39) * 100}%` } as CSSProperties}
/>
</label>
<fieldset className="gu-pell__modes">
<legend>Pedal help</legend>
{MODES.map((m, i) => (
<label key={m.id}>
<input
type="radio"
name="pell-mode"
checked={mode === i}
onChange={() => setMode(i)}
/>
<span>
{m.label}
<small>{m.range} km</small>
</span>
</label>
))}
</fieldset>
</div>
<div className="gu-pell__battery-card" aria-live="polite">
<div
className="gu-pell__battery"
role="img"
aria-label={`After one day, about ${Math.round((1 - used) * 100)}% of the battery is left`}
>
{Array.from({ length: cells }, (_, i) => (
<span
key={i}
data-on={i < left}
style={{ "--i": i } as CSSProperties}
/>
))}
</div>
<p className="gu-pell__days">
<span className="gu-pell__days-n">{days}</span>
{days === 1 ? " day" : " days"}
</p>
<p className="gu-pell__muted">
{daily > range
? `That's ${daily} km a day, more than one charge. Take the spare battery.`
: `between charges, riding ${daily} km a day in ${MODES[mode].label}.`}
</p>
</div>
</section>
);
}
/* ------------------------------------------------------------------ */
export function EbikePage({
onPreorder,
}: {
onPreorder?: (order: { color: string }) => void;
}) {
const [color, setColor] = useState(1);
const [hero, setHero] = useState<HTMLElement | null>(null);
const [past, setPast] = useState(false);
const [ordered, setOrdered] = useState(false);
const ride = useRef<HTMLDivElement>(null);
// The pre-order bar shows once the hero has scrolled away.
useEffect(() => {
if (!hero) return;
const io = new IntersectionObserver(([e]) => setPast(!e.isIntersecting), {
threshold: 0.05,
});
io.observe(hero);
return () => io.disconnect();
}, [hero]);
// The ride photo drifts a little slower than the page.
useEffect(() => {
const el = ride.current;
if (!el || window.matchMedia("(prefers-reduced-motion: reduce)").matches)
return;
let raf = 0;
const update = () => {
const r = el.getBoundingClientRect();
const vh = window.innerHeight || 1;
const p = (r.top + r.height / 2 - vh / 2) / vh;
el.style.setProperty("--shift", `${(p * -12).toFixed(2)}%`);
};
const onScroll = () => {
cancelAnimationFrame(raf);
raf = requestAnimationFrame(update);
};
update();
window.addEventListener("scroll", onScroll, {
passive: true,
capture: true,
});
return () => {
cancelAnimationFrame(raf);
window.removeEventListener("scroll", onScroll, { capture: true });
};
}, []);
const c = COLORS[color];
const order = () => {
setOrdered(true);
onPreorder?.({ color: c.id });
};
return (
<div
className="gu-pell"
style={
{
"--paint": c.hex,
"--accent": c.accent,
"--on-band": c.onBand,
} as CSSProperties
}
>
<Hero color={color} setColor={setColor} heroRef={setHero} />
<Range />
<section className="gu-pell__ride" aria-labelledby="pell-ride-title">
<div className="gu-pell__ride-media" ref={ride}>
<Photo
src="/images/landing-ebike-ride-13.jpg"
alt="A woman with grey hair rides an orange e-bike with groceries along a wet cobbled street at dusk"
/>
</div>
<div className="gu-pell__ride-copy">
<h2 id="pell-ride-title" className="gu-pell__h2">
Your city, shorter.
</h2>
<p>
Most trips in a city are under 8 km. On a Pell that's twenty
minutes, no parking, no sweat, door to door.
</p>
</div>
</section>
<section
className="gu-pell__specs"
id="pell-specs"
aria-labelledby="pell-s-title"
>
<h2 id="pell-s-title" className="gu-pell__h2">
The numbers.
</h2>
<dl>
{(
[
[16, 0, "kg", "Light enough to carry up the stairs."],
[80, 0, "km", "Range in Tour mode, on one charge."],
[3.5, 1, "h", "From empty to full on any socket."],
[15, 0, "kg", "On the front rack, plus 25 kg behind."],
] as [number, number, string, ReactNode][]
).map(([n, d, unit, text], i) => (
<div key={i}>
<dt className="gu-pell__muted">{text}</dt>
<dd>
<CountUp to={n} decimals={d} />
<small>{unit}</small>
</dd>
</div>
))}
</dl>
</section>
<section
className="gu-pell__order"
id="pell-order"
aria-labelledby="pell-o-title"
>
<h2 id="pell-o-title" className="gu-pell__h2">
Reserve yours for €100.
</h2>
<p className="gu-pell__muted">
Fully refundable until it ships. The rest, {PRICE} in total, is due
when your bike is ready.
</p>
{ordered ? (
<p className="gu-pell__ok" role="status">
Reserved: a Pell One in {c.name}. We'll email you before it
ships.
</p>
) : (
<button type="button" className="gu-pell__cta" onClick={order}>
Reserve in {c.name}
</button>
)}
</section>
<footer className="gu-pell__foot">
<p className="gu-pell__logo">
pell<span aria-hidden="true">●</span>
</p>
<p className="gu-pell__muted">
Designed and built in small batches. Two-year warranty.
</p>
</footer>
<div
className="gu-pell__bar"
data-on={past && !ordered}
aria-hidden={!past || ordered}
>
<span className="gu-pell__bar-dot" aria-hidden="true" />
<p>
<strong>Pell One</strong> in {c.name}, {PRICE}
</p>
<button
type="button"
className="gu-pell__cta"
onClick={order}
tabIndex={past && !ordered ? 0 : -1}
>
Pre-order
</button>
</div>
</div>
);
}
```
### ebike-page.css
```css
/* Pell One: a dark stage where the bike's paint colour leads everything. */
.gu-pell {
--bg: #0e0e10;
--surface: #17171b;
--fg: #f3eee3;
--muted: #a39d92;
--line: rgb(243 238 227 / 0.14);
--volt: #d7ff3a;
--focus: #d7ff3a;
--ease: cubic-bezier(0.22, 1, 0.36, 1);
position: relative;
container-type: inline-size;
background: var(--bg);
color: var(--fg);
font-family:
system-ui,
-apple-system,
"Segoe UI",
sans-serif;
line-height: 1.5;
}
.gu-pell *,
.gu-pell *::before,
.gu-pell *::after {
box-sizing: border-box;
}
.gu-pell a {
color: inherit;
}
.gu-pell :focus-visible {
outline: 3px solid var(--focus);
outline-offset: 3px;
}
.gu-pell .sr-only {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
}
.gu-pell__muted {
color: var(--muted);
}
.gu-pell__h1,
.gu-pell__h2 {
margin: 0;
font-weight: 900;
letter-spacing: -0.045em;
line-height: 0.92;
font-stretch: 125%;
}
.gu-pell__h1 {
font-size: clamp(3.2rem, 8cqi, 7rem);
}
.gu-pell__h2 {
font-size: clamp(2.4rem, 5.6cqi, 4.6rem);
}
.gu-pell .gu-pell__cta {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 52px;
padding: 0 26px;
border: 0;
border-radius: 999px;
background: var(--fg);
color: var(--bg);
font: inherit;
font-weight: 800;
text-decoration: none;
cursor: pointer;
transition:
transform 0.3s var(--ease),
box-shadow 0.4s;
}
.gu-pell .gu-pell__cta:hover {
transform: translateY(-2px);
box-shadow: 0 10px 30px -8px var(--accent);
}
/* ---------- Hero ---------- */
.gu-pell__hero {
position: relative;
padding: 22px 5% 72px;
overflow: hidden;
}
.gu-pell__nav {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
}
.gu-pell__logo {
margin: 0;
font-size: 1.7rem;
font-weight: 900;
letter-spacing: -0.06em;
text-decoration: none;
}
.gu-pell__logo span {
color: var(--accent);
font-size: 0.6em;
transition: color 0.6s;
}
.gu-pell__links {
display: none;
gap: 28px;
font-weight: 600;
}
.gu-pell__links a {
text-decoration: none;
color: var(--muted);
transition: color 0.3s;
}
.gu-pell__links a:hover {
color: var(--fg);
}
@container (min-width: 760px) {
.gu-pell__links {
display: flex;
}
}
.gu-pell__ghost {
display: inline-flex;
align-items: center;
min-height: 44px;
padding: 0 18px;
border: 1px solid var(--line);
border-radius: 999px;
font-weight: 700;
text-decoration: none;
transition: border-color 0.3s;
}
.gu-pell__ghost:hover {
border-color: var(--fg);
}
.gu-pell__hero-grid {
display: grid;
gap: 32px;
margin-top: 48px;
}
@container (min-width: 920px) {
.gu-pell__hero-grid {
grid-template-columns: 0.8fr 1.2fr;
align-items: center;
gap: 24px;
}
}
.gu-pell__copy > * {
animation: gu-pell-rise 0.9s var(--ease) both;
}
.gu-pell__copy > :nth-child(2) {
animation-delay: 0.1s;
}
.gu-pell__copy > :nth-child(3) {
animation-delay: 0.2s;
}
.gu-pell__copy > :nth-child(4) {
animation-delay: 0.3s;
}
.gu-pell__copy > :nth-child(5) {
animation-delay: 0.4s;
}
@keyframes gu-pell-rise {
from {
opacity: 0;
transform: translateY(24px);
}
}
.gu-pell__kicker {
margin: 0 0 16px;
color: var(--muted);
font-weight: 600;
}
.gu-pell__lede {
max-width: 36ch;
margin: 20px 0 28px;
color: var(--muted);
font-size: 1.1rem;
}
.gu-pell__swatches {
display: flex;
gap: 12px;
margin: 0;
padding: 0;
border: 0;
}
.gu-pell__swatches legend {
width: 100%;
margin-bottom: 12px;
padding: 0;
color: var(--muted);
font-weight: 600;
}
.gu-pell__swatches legend strong {
display: inline-block;
color: var(--fg);
animation: gu-pell-rise 0.5s var(--ease);
}
.gu-pell__swatches label {
position: relative;
width: 48px;
height: 48px;
border-radius: 50%;
background: var(--sw);
box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.15);
cursor: pointer;
transition: transform 0.4s var(--ease);
}
.gu-pell__swatches label::after {
content: "";
position: absolute;
inset: -6px;
border: 2px solid var(--fg);
border-radius: 50%;
opacity: 0;
transform: scale(0.8);
transition:
opacity 0.3s,
transform 0.4s var(--ease);
}
.gu-pell__swatches label:hover {
transform: scale(1.08);
}
.gu-pell__swatches label:has(:checked)::after {
opacity: 1;
transform: none;
}
.gu-pell__swatches label:has(:focus-visible) {
outline: 3px solid var(--focus);
outline-offset: 8px;
}
.gu-pell__swatches input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.gu-pell__buy {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 20px;
margin-top: 32px;
}
.gu-pell__price {
margin: 0;
font-size: 2rem;
font-weight: 900;
letter-spacing: -0.04em;
}
.gu-pell__stage {
position: relative;
aspect-ratio: 3 / 2;
border-radius: 32px;
background: radial-gradient(90% 70% at 50% 100%, #26262c, #141417 70%);
overflow: hidden;
isolation: isolate;
}
.gu-pell__glow {
position: absolute;
inset: 30% 15% -20%;
border-radius: 50%;
background: var(--glow);
opacity: 0.35;
filter: blur(70px);
transition: background-color 0.9s;
z-index: 0;
animation: gu-pell-breathe 5s ease-in-out infinite;
}
@keyframes gu-pell-breathe {
50% {
opacity: 0.5;
transform: scale(1.08);
}
}
.gu-pell__layer {
position: absolute;
inset: 0;
z-index: 1;
}
.gu-pell__layer[data-z="2"] {
z-index: 2;
}
.gu-pell__layer[data-z="3"] {
z-index: 3;
}
.gu-pell__layer img,
.gu-pell__drawing {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
}
.gu-pell__drawing {
padding: 6% 8% 2%;
object-fit: contain;
background: radial-gradient(70% 60% at 50% 60%, #57565c, #2c2c31);
}
.gu-pell__spot {
position: absolute;
z-index: 5;
translate: -50% -50%;
}
.gu-pell__spot button {
position: relative;
width: 36px;
height: 36px;
border: 0;
border-radius: 50%;
background: rgb(14 14 16 / 0.55);
cursor: pointer;
backdrop-filter: blur(6px);
}
.gu-pell__spot button::before,
.gu-pell__spot button::after {
content: "";
position: absolute;
inset: 12px;
border-radius: 50%;
background: var(--volt);
}
.gu-pell__spot button::after {
inset: 4px;
background: none;
border: 2px solid var(--volt);
animation: gu-pell-ping 2.2s var(--ease) infinite;
}
@keyframes gu-pell-ping {
from {
opacity: 1;
transform: scale(0.6);
}
to {
opacity: 0;
transform: scale(1.6);
}
}
.gu-pell__tip {
position: absolute;
left: 50%;
bottom: calc(100% + 12px);
width: 230px;
padding: 12px 14px;
border-radius: 16px;
background: rgb(243 238 227 / 0.95);
color: #111;
font-size: 0.88rem;
line-height: 1.4;
pointer-events: none;
opacity: 0;
transform: translate(-50%, 8px) scale(0.96);
transform-origin: bottom center;
transition:
opacity 0.25s,
transform 0.4s var(--ease);
}
.gu-pell__tip strong {
display: block;
margin-bottom: 2px;
}
.gu-pell__spot[data-open="true"] .gu-pell__tip {
opacity: 1;
transform: translate(-50%, 0);
}
/* ---------- Range ---------- */
.gu-pell__range .gu-pell__muted {
margin: 14px 0 0;
}
.gu-pell__range {
display: grid;
gap: 40px;
padding: 96px 5%;
border-top: 1px solid var(--line);
}
@container (min-width: 860px) {
.gu-pell__range {
grid-template-columns: 1fr 1fr;
align-items: center;
gap: 64px;
}
}
.gu-pell__slider {
display: grid;
gap: 14px;
margin-top: 32px;
font-weight: 700;
}
.gu-pell__slider > span {
display: flex;
justify-content: space-between;
}
.gu-pell__slider output {
font-variant-numeric: tabular-nums;
}
.gu-pell__slider input {
width: 100%;
height: 44px;
margin: 0;
background: transparent;
appearance: none;
cursor: pointer;
}
.gu-pell__slider input::-webkit-slider-runnable-track {
height: 10px;
border-radius: 999px;
background: linear-gradient(
90deg,
var(--accent) var(--p),
var(--surface) var(--p)
);
}
.gu-pell__slider input::-moz-range-track {
height: 10px;
border-radius: 999px;
background: linear-gradient(
90deg,
var(--accent) var(--p),
var(--surface) var(--p)
);
}
.gu-pell__slider input::-webkit-slider-thumb {
width: 30px;
height: 30px;
margin-top: -10px;
border-radius: 50%;
background: var(--fg);
box-shadow: 0 4px 14px rgb(0 0 0 / 0.5);
appearance: none;
transition: transform 0.2s var(--ease);
}
.gu-pell__slider input:active::-webkit-slider-thumb {
transform: scale(1.15);
}
.gu-pell__slider input::-moz-range-thumb {
width: 30px;
height: 30px;
border: 0;
border-radius: 50%;
background: var(--fg);
}
.gu-pell__modes {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 8px;
margin: 28px 0 0;
padding: 0;
border: 0;
}
.gu-pell__modes legend {
grid-column: 1 / -1;
margin-bottom: 10px;
padding: 0;
font-weight: 700;
}
.gu-pell__modes label {
position: relative;
cursor: pointer;
}
.gu-pell__modes input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.gu-pell__modes span {
display: grid;
place-items: center;
min-height: 64px;
border: 1px solid var(--line);
border-radius: 16px;
font-weight: 800;
transition:
background-color 0.3s,
color 0.3s,
border-color 0.3s;
}
.gu-pell__modes small {
color: var(--muted);
font-weight: 600;
}
.gu-pell__modes label:hover span {
border-color: var(--fg);
}
.gu-pell__modes label:has(:checked) span {
background: var(--fg);
color: var(--bg);
}
.gu-pell__modes label:has(:checked) small {
color: #5d5850;
}
.gu-pell__modes label:has(:focus-visible) span {
outline: 3px solid var(--focus);
outline-offset: 3px;
}
.gu-pell__battery-card {
padding: 32px;
border-radius: 32px;
background: var(--surface);
}
.gu-pell__battery {
position: relative;
display: grid;
grid-template-columns: repeat(10, 1fr);
gap: 6px;
padding: 10px;
border: 3px solid var(--fg);
border-radius: 18px;
margin-right: 14px;
}
.gu-pell__battery::after {
content: "";
position: absolute;
right: -14px;
top: 30%;
bottom: 30%;
width: 8px;
border-radius: 0 6px 6px 0;
background: var(--fg);
}
.gu-pell__battery span {
height: 72px;
border-radius: 8px;
background: rgb(243 238 227 / 0.08);
transition:
background-color 0.5s,
transform 0.5s var(--ease);
transition-delay: calc((9 - var(--i)) * 35ms);
}
.gu-pell__battery span[data-on="true"] {
background: var(--volt);
}
.gu-pell__battery span[data-on="false"] {
transform: scaleY(0.82);
}
.gu-pell__days {
margin: 28px 0 4px;
font-size: 1.6rem;
font-weight: 800;
}
.gu-pell__days-n {
font-size: clamp(4rem, 9cqi, 6.5rem);
font-weight: 900;
letter-spacing: -0.05em;
line-height: 1;
font-variant-numeric: tabular-nums;
}
/* ---------- Ride ---------- */
.gu-pell__ride {
position: relative;
min-height: 620px;
display: flex;
align-items: flex-end;
padding: 72px 5%;
overflow: hidden;
isolation: isolate;
}
.gu-pell__ride-media {
position: absolute;
inset: -12% 0;
z-index: -1;
transform: translateY(var(--shift, 0));
will-change: transform;
}
.gu-pell__photo {
position: absolute;
inset: 0;
background:
radial-gradient(
40% 50% at 70% 60%,
color-mix(in srgb, var(--paint) 60%, transparent),
transparent 70%
),
radial-gradient(60% 40% at 20% 40%, #6b4a2c, transparent 70%),
linear-gradient(180deg, #1c2230, #0e0e10);
}
.gu-pell__photo img {
width: 100%;
height: 100%;
object-fit: cover;
}
.gu-pell__ride::after {
content: "";
position: absolute;
inset: 0;
z-index: -1;
background: linear-gradient(90deg, rgb(14 14 16 / 0.85), transparent 60%);
}
.gu-pell__ride-copy {
max-width: 520px;
}
.gu-pell__ride-copy p {
margin: 20px 0 0;
font-size: 1.15rem;
opacity: 0.85;
}
/* ---------- Specs ---------- */
.gu-pell__specs {
padding: 96px 5%;
}
.gu-pell__specs dl {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 0;
margin: 48px 0 0;
border-top: 1px solid var(--line);
}
.gu-pell__specs dl > div {
display: flex;
flex-direction: column-reverse;
justify-content: flex-end;
gap: 10px;
padding: 28px 24px 28px 0;
border-bottom: 1px solid var(--line);
}
.gu-pell__specs dd {
margin: 0;
font-size: clamp(3.4rem, 7cqi, 5.4rem);
font-weight: 900;
letter-spacing: -0.05em;
line-height: 1;
font-variant-numeric: tabular-nums;
}
.gu-pell__specs dd small {
margin-left: 6px;
color: var(--accent);
font-size: 0.4em;
letter-spacing: 0;
transition: color 0.6s;
}
.gu-pell__specs dt {
max-width: 24ch;
}
/* ---------- Order ---------- */
.gu-pell__order {
display: grid;
justify-items: start;
gap: 16px;
padding: 96px 5% 120px;
background: var(--paint);
color: var(--on-band);
transition:
background-color 0.8s,
color 0.8s;
}
.gu-pell__order .gu-pell__muted {
max-width: 48ch;
color: inherit;
opacity: 0.75;
}
.gu-pell__order .gu-pell__cta,
.gu-pell__ok {
background: var(--on-band);
color: var(--paint);
}
.gu-pell__ok {
margin: 0;
padding: 16px 20px;
border-radius: 16px;
font-weight: 700;
animation: gu-pell-rise 0.6s var(--ease) both;
}
.gu-pell__foot {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
gap: 16px;
padding: 40px 5% 120px;
}
/* ---------- Sticky pre-order bar ---------- */
.gu-pell__bar {
position: sticky;
bottom: 16px;
z-index: 20;
display: flex;
align-items: center;
gap: 14px;
width: min(560px, calc(100% - 32px));
margin: -84px auto 16px;
padding: 8px 8px 8px 18px;
border: 1px solid var(--line);
border-radius: 999px;
background: rgb(23 23 27 / 0.85);
backdrop-filter: blur(14px) saturate(1.3);
box-shadow: 0 20px 40px -12px rgb(0 0 0 / 0.6);
opacity: 0;
transform: translateY(120%);
pointer-events: none;
transition:
transform 0.6s var(--ease),
opacity 0.4s;
}
.gu-pell__bar[data-on="true"] {
opacity: 1;
transform: none;
pointer-events: auto;
}
.gu-pell__bar p {
flex: 1;
margin: 0;
font-size: 0.95rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.gu-pell__bar-dot {
flex: none;
width: 20px;
height: 20px;
border-radius: 50%;
background: var(--paint);
box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.2);
transition: background-color 0.6s;
}
.gu-pell__bar .gu-pell__cta {
min-height: 44px;
}
@media (prefers-reduced-motion: reduce) {
.gu-pell *,
.gu-pell *::before,
.gu-pell *::after {
animation: none !important;
transition: none !important;
}
}
```
You might also want
Next piece: Estate agent landing page with a local mapFreelancer money app page with a live split
Landing pages, advanced
Agency page with stacking cases
Landing pages, intermediate
Boutique hotel page with a sun-path day
Landing pages, advanced



