Online course landing page with a free mini lesson
A warm page for an online sourdough course: drag a clock to watch a starter rise, bubble, peak and sag in its jar and decide when to bake, then tick lessons in the curriculum while a loaf rises and browns.
"use client";
import { useEffect, useRef, useState, type CSSProperties } from "react";
import "./course-page.css";
/**
* CoursePage: a landing page for an online sourdough course.
* Its signature is a free mini lesson: drag the clock to see a starter rise,
* bubble, peak and fall in its jar, then decide whether you would bake now.
* Below, the curriculum opens week by week and a loaf browns as you tick lessons.
* It is a demo: connect `onEnrol` to your checkout.
*/
const WEEKS = [
{ title: "Week 1: Your starter", lessons: ["Flour, water and patience", "Feeding on a schedule", "Reading the jar"] },
{ title: "Week 2: First loaf", lessons: ["Mixing and resting", "Stretch and fold", "Shaping a tight boule"] },
{ title: "Week 3: Bake day", lessons: ["Scoring without fear", "Steam in a home oven", "When is it done?"] },
{ title: "Week 4: Beyond the boule", lessons: ["Rye and seeds", "Focaccia", "Fixing flat loaves"] },
];
const TOTAL = WEEKS.reduce((n, w) => n + w.lessons.length, 0);
function Photo({ src, alt, tone, className = "" }: { src: string; alt: string; tone: string; className?: 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 (
<span className={`gu-crumb__photo ${className}`} style={{ "--tone": tone } as CSSProperties}>
{!missing && <img ref={img} src={src} alt={alt} loading="lazy" onError={() => setMissing(true)} />}
</span>
);
}
/** How high the starter is (0–1) after h hours: rises, peaks near 7h, then sags. */
function rise(h: number) {
if (h <= 7) return 0.18 + 0.82 * Math.sin((h / 7) * (Math.PI / 2));
return 1 - Math.min(0.45, (h - 7) * 0.09);
}
const BUBBLES = Array.from({ length: 16 }, (_, i) => ({
x: 18 + ((i * 37) % 84),
y: 0.15 + ((i * 53) % 80) / 100,
r: 2 + ((i * 7) % 5),
d: (i * 0.37) % 2.4,
}));
export function CoursePage({ onEnrol }: { onEnrol?: (email: string) => void }) {
const [hours, setHours] = useState(2);
const [answer, setAnswer] = useState<"yes" | "no" | null>(null);
const [open, setOpen] = useState(0);
const [done, setDone] = useState<string[]>([]);
const [email, setEmail] = useState("");
const [sent, setSent] = useState(false);
const level = rise(hours);
const ready = hours >= 5 && hours <= 9;
const bubbleCount = Math.round(Math.min(1, hours / 6) * BUBBLES.length);
const top = 150 - level * 110; // surface y inside the jar
const progress = done.length / TOTAL;
let feedback = "";
if (answer) {
const right = (answer === "yes") === ready;
feedback = right
? ready
? "Right. It has doubled, the top is domed and full of bubbles: bake."
: hours < 5
? "Right. It hasn’t doubled yet. Give it a few more hours somewhere warm."
: "Right. It has peaked and is sinking. Feed it and wait for the next rise."
: ready
? "Look again: it has doubled and is domed. This is the moment."
: hours < 5
? "Not yet: it’s barely risen and has few bubbles."
: "Too late: the top has collapsed. Feed it and try again.";
}
const toggle = (id: string) => setDone((d) => (d.includes(id) ? d.filter((x) => x !== id) : [...d, id]));
return (
<div className="gu-crumb">
<header className="gu-crumb__bar">
<a href="#" className="gu-crumb__mark">
Rise & Crumb
</a>
<nav aria-label="Rise and Crumb">
<a href="#crumb-lesson">Free lesson</a>
<a href="#crumb-weeks">Curriculum</a>
<a href="#crumb-enrol" className="gu-crumb__navcta">
Enrol £79
</a>
</nav>
</header>
<section className="gu-crumb__hero">
<Photo
src="/images/landing-course-hero-01.jpg"
alt="Floury hands shaping a round of dough on a wooden bench"
tone="#6b4a32"
className="gu-crumb__hero-img"
/>
<div className="gu-crumb__hero-copy">
<h1>
Bake real sourdough in four weeks, from your own kitchen.
</h1>
<p>Twelve short video lessons, a printed bake sheet and a teacher who answers your photos.</p>
<div className="gu-crumb__hero-actions">
<a href="#crumb-lesson" className="gu-crumb__cta">
Try the first lesson free
</a>
<span>4,300 bakers so far</span>
</div>
</div>
<svg className="gu-crumb__wheat" viewBox="0 0 120 300" aria-hidden="true">
<path d="M60 300 C58 220 62 140 60 40" />
{Array.from({ length: 9 }, (_, i) => (
<g key={i} style={{ "--i": i } as CSSProperties}>
<ellipse cx="48" cy={60 + i * 18} rx="7" ry="14" transform={`rotate(-28 48 ${60 + i * 18})`} />
<ellipse cx="72" cy={52 + i * 18} rx="7" ry="14" transform={`rotate(28 72 ${52 + i * 18})`} />
</g>
))}
</svg>
</section>
<section id="crumb-lesson" className="gu-crumb__lesson" aria-labelledby="crumb-lesson-title">
<div className="gu-crumb__lesson-copy">
<p className="gu-crumb__kicker">Lesson 3, free</p>
<h2 id="crumb-lesson-title">Reading the jar</h2>
<p>
You fed your starter this morning. Drag the clock and watch it work. When would you start your dough?
</p>
<label className="gu-crumb__clock">
<span>
<b>{hours}</b> {hours === 1 ? "hour" : "hours"} after feeding
</span>
<input
type="range"
min={0}
max={12}
value={hours}
onChange={(e) => {
setHours(Number(e.target.value));
setAnswer(null);
}}
style={{ "--p": `${(hours / 12) * 100}%` } as CSSProperties}
/>
</label>
<fieldset className="gu-crumb__quiz">
<legend>Would you bake now?</legend>
<button type="button" aria-pressed={answer === "yes"} onClick={() => setAnswer("yes")}>
Yes, bake
</button>
<button type="button" aria-pressed={answer === "no"} onClick={() => setAnswer("no")}>
Not yet
</button>
</fieldset>
<p className="gu-crumb__feedback" aria-live="polite" data-show={answer ? "" : undefined} key={`${hours}-${answer}`}>
{feedback}
</p>
</div>
<div className="gu-crumb__jarwrap">
<svg viewBox="0 0 160 200" className="gu-crumb__jar" role="img" aria-label={`The starter is ${Math.round(level * 100)}% of the way up the jar`}>
<defs>
<clipPath id="crumb-jar">
<path d="M30 40 h100 v130 a20 20 0 0 1 -20 20 h-60 a20 20 0 0 1 -20 -20z" />
</clipPath>
</defs>
{/* Start line: a band of tape */}
<rect x="24" y="128" width="112" height="8" className="gu-crumb__tape" />
<g clipPath="url(#crumb-jar)">
<path
className="gu-crumb__starter"
d={`M20 ${top} Q50 ${top - 10 * level} 80 ${top - (hours > 9 ? -4 : 8 * level)} T140 ${top} V200 H20Z`}
/>
{BUBBLES.slice(0, bubbleCount).map((b, i) => {
const by = top + 6 + b.y * (190 - top - 10);
return (
<circle
key={i}
cx={b.x + 20}
cy={by}
r={b.r}
className="gu-crumb__bubble"
style={{ "--d": `${b.d}s` } as CSSProperties}
/>
);
})}
</g>
<path d="M30 40 h100 v130 a20 20 0 0 1 -20 20 h-60 a20 20 0 0 1 -20 -20z" className="gu-crumb__glass" />
<rect x="24" y="22" width="112" height="20" rx="4" className="gu-crumb__lid" />
<path d="M40 60 v90" className="gu-crumb__shine" />
</svg>
<p className="gu-crumb__state" data-ready={ready || undefined}>
{hours < 5 ? "Rising" : ready ? "Peak: ready" : "Past its peak"}
</p>
</div>
</section>
<section id="crumb-weeks" className="gu-crumb__weeks" aria-labelledby="crumb-weeks-title">
<div className="gu-crumb__weeks-head">
<h2 id="crumb-weeks-title">Four weeks, twelve lessons</h2>
<div className="gu-crumb__loaf" aria-label={`${done.length} of ${TOTAL} lessons ticked`} role="img" style={{ "--k": progress } as CSSProperties}>
<svg viewBox="0 0 140 80" aria-hidden="true">
<path d="M10 70 C10 20 130 20 130 70Z" className="gu-crumb__loafbody" />
<path d="M40 40 q14 -8 22 4 M68 34 q14 -8 22 4 M96 40 q10 -4 16 6" className="gu-crumb__score" />
</svg>
<span>
{done.length}/{TOTAL}
</span>
</div>
</div>
<p className="gu-crumb__hint">Tick the lessons you’ve watched and the loaf bakes.</p>
<div className="gu-crumb__acc">
{WEEKS.map((w, wi) => {
const isOpen = open === wi;
const count = w.lessons.filter((_, li) => done.includes(`${wi}-${li}`)).length;
return (
<div key={w.title} className="gu-crumb__week" data-open={isOpen || undefined}>
<h3>
<button
type="button"
aria-expanded={isOpen}
aria-controls={`crumb-week-${wi}`}
onClick={() => setOpen(isOpen ? -1 : wi)}
>
<span>{w.title}</span>
<span className="gu-crumb__wcount">
{count}/{w.lessons.length}
</span>
<i aria-hidden="true" />
</button>
</h3>
<div id={`crumb-week-${wi}`} className="gu-crumb__panel" inert={!isOpen}>
<ul>
{w.lessons.map((l, li) => {
const id = `${wi}-${li}`;
return (
<li key={l}>
<label>
<input type="checkbox" checked={done.includes(id)} onChange={() => toggle(id)} />
<span className="gu-crumb__tick" aria-hidden="true" />
{l}
<span className="gu-crumb__mins">{8 + ((wi * 3 + li) * 5) % 12} min</span>
</label>
</li>
);
})}
</ul>
</div>
</div>
);
})}
</div>
</section>
<section className="gu-crumb__teacher">
<Photo
src="/images/landing-course-teacher-02.jpg"
alt="A baker in a floury apron holding a fresh round loaf in a bakery kitchen"
tone="#8a6446"
className="gu-crumb__teacher-img"
/>
<div>
<h2>Your teacher, Owen Marsh</h2>
<p>
Owen ran the night bake at a Bristol bakery for nine years. Now he teaches from his home kitchen, with a
normal oven, so what works for him works for you.
</p>
<p>Send a crumb photo any time in the course and he replies within two days.</p>
</div>
</section>
<section id="crumb-enrol" className="gu-crumb__enrol" aria-labelledby="crumb-enrol-title">
<h2 id="crumb-enrol-title">£79, once. Yours to keep.</h2>
<p>All twelve lessons, the bake sheet and photo feedback. If your third loaf isn’t better than your first, we refund you.</p>
{sent ? (
<p className="gu-crumb__sent" role="status">
Check {email} for your login. Feed your starter tonight.
</p>
) : (
<form
onSubmit={(e) => {
e.preventDefault();
onEnrol?.(email);
setSent(true);
}}
>
<label htmlFor="crumb-email" className="gu-crumb__sr">
Email
</label>
<input
id="crumb-email"
type="email"
required
placeholder="you@example.com"
value={email}
onChange={(e) => setEmail(e.target.value)}
/>
<button type="submit" className="gu-crumb__cta">
Enrol for £79
</button>
</form>
)}
</section>
<footer className="gu-crumb__foot">
<span>© 2026 Rise & Crumb</span>
<a href="#">Refunds</a>
<a href="#">Help</a>
</footer>
</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: Online course landing page with a free mini lesson
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 warm landing page for an online sourdough course ("Rise & Crumb", taught by Owen Marsh, £79). Its signature is a free mini lesson, "Reading the jar": a range slider sets the hours since feeding (0–12; the track marks the 5–9 hour window). An SVG jar with a teal lid and a strip of tape at the starting level shows the starter: its surface rises along an ease (peak near 7h, then sags), domes as it peaks and flattens when it falls, and fills with more wobbling bubbles over time. A pill says Rising, Peak: ready (teal, pops) or Past its peak. The quiz asks "Would you bake now?" (Yes, bake / Not yet) and explains why the answer is right or wrong for that hour. The second interaction is the curriculum: four weeks in an accordion (grid-rows open), each lesson a round checkbox with a springy tick and its minutes. A small SVG loaf beside the heading rises and browns, and gets its score marks, as you tick lessons (count shown as 4/12).
## Palette
Rye brown #2e2119, flour #faf8f4, dough #efe3cf, wheat #e2a83c (buttons with a solid #b27e22 under-shadow), enamel teal #2f6f73, muted #76675b, focus #2b35ff. Headings use a soft round serif (Cooper Black, Recoleta, Georgia); body is system-ui.
## Layout
- Bar (rye): wordmark, Free lesson, Curriculum and a wheat "Enrol £79" pill.
- Hero (rye): copy on the left, the photo on the right with a big rounded top-left corner, and a swaying wheat stalk whose grains pop on.
- Lesson: copy, clock and quiz on the left; the jar on a dough panel on the right.
- Curriculum (dough band): heading with the loaf and count, a hint, the accordion.
- Teacher: an arch-topped portrait and two short paragraphs.
- Enrol: a rounded teal panel with the price, the refund promise and an email form that confirms.
- Below 760px everything stacks.
## Images
- landing-course-hero-01.jpg (16:9) and landing-course-teacher-02.jpg (4:5). Until a file exists, each frame shows a warm tone.
## Accessibility
- The jar is role="img" with a label giving how far up the starter is; feedback is aria-live.
- Accordion buttons use aria-expanded and aria-controls; closed panels are inert. Lessons are real checkboxes.
- prefers-reduced-motion turns off all animation and transitions.
## Connect it
`onEnrol(email)` fires when the form is sent.
## 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.
### CoursePage.tsx
```tsx
"use client";
import { useEffect, useRef, useState, type CSSProperties } from "react";
import "./course-page.css";
/**
* CoursePage: a landing page for an online sourdough course.
* Its signature is a free mini lesson: drag the clock to see a starter rise,
* bubble, peak and fall in its jar, then decide whether you would bake now.
* Below, the curriculum opens week by week and a loaf browns as you tick lessons.
* It is a demo: connect `onEnrol` to your checkout.
*/
const WEEKS = [
{ title: "Week 1: Your starter", lessons: ["Flour, water and patience", "Feeding on a schedule", "Reading the jar"] },
{ title: "Week 2: First loaf", lessons: ["Mixing and resting", "Stretch and fold", "Shaping a tight boule"] },
{ title: "Week 3: Bake day", lessons: ["Scoring without fear", "Steam in a home oven", "When is it done?"] },
{ title: "Week 4: Beyond the boule", lessons: ["Rye and seeds", "Focaccia", "Fixing flat loaves"] },
];
const TOTAL = WEEKS.reduce((n, w) => n + w.lessons.length, 0);
function Photo({ src, alt, tone, className = "" }: { src: string; alt: string; tone: string; className?: 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 (
<span className={`gu-crumb__photo ${className}`} style={{ "--tone": tone } as CSSProperties}>
{!missing && <img ref={img} src={src} alt={alt} loading="lazy" onError={() => setMissing(true)} />}
</span>
);
}
/** How high the starter is (0–1) after h hours: rises, peaks near 7h, then sags. */
function rise(h: number) {
if (h <= 7) return 0.18 + 0.82 * Math.sin((h / 7) * (Math.PI / 2));
return 1 - Math.min(0.45, (h - 7) * 0.09);
}
const BUBBLES = Array.from({ length: 16 }, (_, i) => ({
x: 18 + ((i * 37) % 84),
y: 0.15 + ((i * 53) % 80) / 100,
r: 2 + ((i * 7) % 5),
d: (i * 0.37) % 2.4,
}));
export function CoursePage({ onEnrol }: { onEnrol?: (email: string) => void }) {
const [hours, setHours] = useState(2);
const [answer, setAnswer] = useState<"yes" | "no" | null>(null);
const [open, setOpen] = useState(0);
const [done, setDone] = useState<string[]>([]);
const [email, setEmail] = useState("");
const [sent, setSent] = useState(false);
const level = rise(hours);
const ready = hours >= 5 && hours <= 9;
const bubbleCount = Math.round(Math.min(1, hours / 6) * BUBBLES.length);
const top = 150 - level * 110; // surface y inside the jar
const progress = done.length / TOTAL;
let feedback = "";
if (answer) {
const right = (answer === "yes") === ready;
feedback = right
? ready
? "Right. It has doubled, the top is domed and full of bubbles: bake."
: hours < 5
? "Right. It hasn’t doubled yet. Give it a few more hours somewhere warm."
: "Right. It has peaked and is sinking. Feed it and wait for the next rise."
: ready
? "Look again: it has doubled and is domed. This is the moment."
: hours < 5
? "Not yet: it’s barely risen and has few bubbles."
: "Too late: the top has collapsed. Feed it and try again.";
}
const toggle = (id: string) => setDone((d) => (d.includes(id) ? d.filter((x) => x !== id) : [...d, id]));
return (
<div className="gu-crumb">
<header className="gu-crumb__bar">
<a href="#" className="gu-crumb__mark">
Rise & Crumb
</a>
<nav aria-label="Rise and Crumb">
<a href="#crumb-lesson">Free lesson</a>
<a href="#crumb-weeks">Curriculum</a>
<a href="#crumb-enrol" className="gu-crumb__navcta">
Enrol £79
</a>
</nav>
</header>
<section className="gu-crumb__hero">
<Photo
src="/images/landing-course-hero-01.jpg"
alt="Floury hands shaping a round of dough on a wooden bench"
tone="#6b4a32"
className="gu-crumb__hero-img"
/>
<div className="gu-crumb__hero-copy">
<h1>
Bake real sourdough in four weeks, from your own kitchen.
</h1>
<p>Twelve short video lessons, a printed bake sheet and a teacher who answers your photos.</p>
<div className="gu-crumb__hero-actions">
<a href="#crumb-lesson" className="gu-crumb__cta">
Try the first lesson free
</a>
<span>4,300 bakers so far</span>
</div>
</div>
<svg className="gu-crumb__wheat" viewBox="0 0 120 300" aria-hidden="true">
<path d="M60 300 C58 220 62 140 60 40" />
{Array.from({ length: 9 }, (_, i) => (
<g key={i} style={{ "--i": i } as CSSProperties}>
<ellipse cx="48" cy={60 + i * 18} rx="7" ry="14" transform={`rotate(-28 48 ${60 + i * 18})`} />
<ellipse cx="72" cy={52 + i * 18} rx="7" ry="14" transform={`rotate(28 72 ${52 + i * 18})`} />
</g>
))}
</svg>
</section>
<section id="crumb-lesson" className="gu-crumb__lesson" aria-labelledby="crumb-lesson-title">
<div className="gu-crumb__lesson-copy">
<p className="gu-crumb__kicker">Lesson 3, free</p>
<h2 id="crumb-lesson-title">Reading the jar</h2>
<p>
You fed your starter this morning. Drag the clock and watch it work. When would you start your dough?
</p>
<label className="gu-crumb__clock">
<span>
<b>{hours}</b> {hours === 1 ? "hour" : "hours"} after feeding
</span>
<input
type="range"
min={0}
max={12}
value={hours}
onChange={(e) => {
setHours(Number(e.target.value));
setAnswer(null);
}}
style={{ "--p": `${(hours / 12) * 100}%` } as CSSProperties}
/>
</label>
<fieldset className="gu-crumb__quiz">
<legend>Would you bake now?</legend>
<button type="button" aria-pressed={answer === "yes"} onClick={() => setAnswer("yes")}>
Yes, bake
</button>
<button type="button" aria-pressed={answer === "no"} onClick={() => setAnswer("no")}>
Not yet
</button>
</fieldset>
<p className="gu-crumb__feedback" aria-live="polite" data-show={answer ? "" : undefined} key={`${hours}-${answer}`}>
{feedback}
</p>
</div>
<div className="gu-crumb__jarwrap">
<svg viewBox="0 0 160 200" className="gu-crumb__jar" role="img" aria-label={`The starter is ${Math.round(level * 100)}% of the way up the jar`}>
<defs>
<clipPath id="crumb-jar">
<path d="M30 40 h100 v130 a20 20 0 0 1 -20 20 h-60 a20 20 0 0 1 -20 -20z" />
</clipPath>
</defs>
{/* Start line: a band of tape */}
<rect x="24" y="128" width="112" height="8" className="gu-crumb__tape" />
<g clipPath="url(#crumb-jar)">
<path
className="gu-crumb__starter"
d={`M20 ${top} Q50 ${top - 10 * level} 80 ${top - (hours > 9 ? -4 : 8 * level)} T140 ${top} V200 H20Z`}
/>
{BUBBLES.slice(0, bubbleCount).map((b, i) => {
const by = top + 6 + b.y * (190 - top - 10);
return (
<circle
key={i}
cx={b.x + 20}
cy={by}
r={b.r}
className="gu-crumb__bubble"
style={{ "--d": `${b.d}s` } as CSSProperties}
/>
);
})}
</g>
<path d="M30 40 h100 v130 a20 20 0 0 1 -20 20 h-60 a20 20 0 0 1 -20 -20z" className="gu-crumb__glass" />
<rect x="24" y="22" width="112" height="20" rx="4" className="gu-crumb__lid" />
<path d="M40 60 v90" className="gu-crumb__shine" />
</svg>
<p className="gu-crumb__state" data-ready={ready || undefined}>
{hours < 5 ? "Rising" : ready ? "Peak: ready" : "Past its peak"}
</p>
</div>
</section>
<section id="crumb-weeks" className="gu-crumb__weeks" aria-labelledby="crumb-weeks-title">
<div className="gu-crumb__weeks-head">
<h2 id="crumb-weeks-title">Four weeks, twelve lessons</h2>
<div className="gu-crumb__loaf" aria-label={`${done.length} of ${TOTAL} lessons ticked`} role="img" style={{ "--k": progress } as CSSProperties}>
<svg viewBox="0 0 140 80" aria-hidden="true">
<path d="M10 70 C10 20 130 20 130 70Z" className="gu-crumb__loafbody" />
<path d="M40 40 q14 -8 22 4 M68 34 q14 -8 22 4 M96 40 q10 -4 16 6" className="gu-crumb__score" />
</svg>
<span>
{done.length}/{TOTAL}
</span>
</div>
</div>
<p className="gu-crumb__hint">Tick the lessons you’ve watched and the loaf bakes.</p>
<div className="gu-crumb__acc">
{WEEKS.map((w, wi) => {
const isOpen = open === wi;
const count = w.lessons.filter((_, li) => done.includes(`${wi}-${li}`)).length;
return (
<div key={w.title} className="gu-crumb__week" data-open={isOpen || undefined}>
<h3>
<button
type="button"
aria-expanded={isOpen}
aria-controls={`crumb-week-${wi}`}
onClick={() => setOpen(isOpen ? -1 : wi)}
>
<span>{w.title}</span>
<span className="gu-crumb__wcount">
{count}/{w.lessons.length}
</span>
<i aria-hidden="true" />
</button>
</h3>
<div id={`crumb-week-${wi}`} className="gu-crumb__panel" inert={!isOpen}>
<ul>
{w.lessons.map((l, li) => {
const id = `${wi}-${li}`;
return (
<li key={l}>
<label>
<input type="checkbox" checked={done.includes(id)} onChange={() => toggle(id)} />
<span className="gu-crumb__tick" aria-hidden="true" />
{l}
<span className="gu-crumb__mins">{8 + ((wi * 3 + li) * 5) % 12} min</span>
</label>
</li>
);
})}
</ul>
</div>
</div>
);
})}
</div>
</section>
<section className="gu-crumb__teacher">
<Photo
src="/images/landing-course-teacher-02.jpg"
alt="A baker in a floury apron holding a fresh round loaf in a bakery kitchen"
tone="#8a6446"
className="gu-crumb__teacher-img"
/>
<div>
<h2>Your teacher, Owen Marsh</h2>
<p>
Owen ran the night bake at a Bristol bakery for nine years. Now he teaches from his home kitchen, with a
normal oven, so what works for him works for you.
</p>
<p>Send a crumb photo any time in the course and he replies within two days.</p>
</div>
</section>
<section id="crumb-enrol" className="gu-crumb__enrol" aria-labelledby="crumb-enrol-title">
<h2 id="crumb-enrol-title">£79, once. Yours to keep.</h2>
<p>All twelve lessons, the bake sheet and photo feedback. If your third loaf isn’t better than your first, we refund you.</p>
{sent ? (
<p className="gu-crumb__sent" role="status">
Check {email} for your login. Feed your starter tonight.
</p>
) : (
<form
onSubmit={(e) => {
e.preventDefault();
onEnrol?.(email);
setSent(true);
}}
>
<label htmlFor="crumb-email" className="gu-crumb__sr">
Email
</label>
<input
id="crumb-email"
type="email"
required
placeholder="you@example.com"
value={email}
onChange={(e) => setEmail(e.target.value)}
/>
<button type="submit" className="gu-crumb__cta">
Enrol for £79
</button>
</form>
)}
</section>
<footer className="gu-crumb__foot">
<span>© 2026 Rise & Crumb</span>
<a href="#">Refunds</a>
<a href="#">Help</a>
</footer>
</div>
);
}
```
### course-page.css
```css
/* CoursePage: Rise & Crumb. Rye brown, flour white, wheat and an enamel teal. */
.gu-crumb {
--rye: #2e2119;
--crust: #6b4127;
--flour: #faf8f4;
--dough: #efe3cf;
--wheat: #e2a83c;
--teal: #2f6f73;
--ink: #2e2119;
--muted: #76675b;
--line: rgb(46 33 25 / 0.14);
--focus: #2b35ff;
--round: "Cooper Black", "Recoleta", "Georgia Pro", Georgia, serif;
container-type: inline-size;
overflow: hidden;
background: var(--flour);
color: var(--ink);
font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
}
.gu-crumb *,
.gu-crumb *::before,
.gu-crumb *::after {
box-sizing: border-box;
}
.gu-crumb a {
color: inherit;
}
.gu-crumb button,
.gu-crumb input {
font: inherit;
color: inherit;
}
.gu-crumb button {
cursor: pointer;
}
.gu-crumb :focus-visible {
outline: 3px solid var(--focus);
outline-offset: 3px;
}
.gu-crumb h1,
.gu-crumb h2 {
font-family: var(--round);
font-weight: 400;
margin: 0;
line-height: 1.08;
}
.gu-crumb__sr {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
}
.gu-crumb__photo {
display: block;
overflow: hidden;
background: radial-gradient(100% 80% at 40% 30%, color-mix(in srgb, var(--tone) 55%, #fff), var(--tone));
}
.gu-crumb__photo img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}
/* Bar */
.gu-crumb__bar {
display: flex;
justify-content: space-between;
align-items: center;
gap: 16px;
padding: 16px clamp(16px, 4cqi, 40px);
background: var(--rye);
color: var(--dough);
}
.gu-crumb__mark {
font-family: var(--round);
font-size: 22px;
text-decoration: none;
}
.gu-crumb__bar nav {
display: flex;
align-items: center;
gap: 18px;
font-size: 15px;
}
.gu-crumb__bar nav a {
text-decoration: none;
opacity: 0.8;
}
.gu-crumb__bar nav a:hover {
opacity: 1;
}
.gu-crumb__bar nav .gu-crumb__navcta {
opacity: 1;
background: var(--wheat);
color: var(--rye);
padding: 8px 14px;
border-radius: 999px;
font-weight: 700;
}
/* Hero */
.gu-crumb__hero {
position: relative;
overflow: hidden;
display: grid;
grid-template-columns: 1fr 1fr;
background: var(--rye);
color: var(--dough);
min-height: 460px;
}
.gu-crumb__hero-img {
order: 2;
min-height: 100%;
border-top-left-radius: 220px;
}
.gu-crumb__hero-img img {
animation: gu-crumb-proof 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.gu-crumb__hero-copy {
padding: 48px clamp(16px, 4cqi, 40px);
align-self: center;
position: relative;
z-index: 1;
}
.gu-crumb__hero h1 {
font-size: clamp(34px, 5.6cqi, 56px);
animation: gu-crumb-rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.gu-crumb__hero p {
margin: 16px 0 26px;
max-width: 40ch;
opacity: 0.85;
animation: gu-crumb-rise 0.9s 0.12s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.gu-crumb__hero-actions {
display: flex;
flex-wrap: wrap;
gap: 12px 18px;
align-items: center;
font-size: 14px;
animation: gu-crumb-rise 0.9s 0.24s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.gu-crumb__hero-actions span {
opacity: 0.7;
}
.gu-crumb__cta {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 50px;
padding: 0 24px;
border: 0;
border-radius: 999px;
background: var(--wheat);
color: var(--rye);
font-weight: 700;
text-decoration: none;
box-shadow: 0 4px 0 #b27e22;
transition: transform 0.15s, box-shadow 0.15s;
}
.gu-crumb__cta:hover {
transform: translateY(-2px);
box-shadow: 0 6px 0 #b27e22;
}
.gu-crumb__cta:active {
transform: translateY(3px);
box-shadow: 0 1px 0 #b27e22;
}
.gu-crumb__wheat {
position: absolute;
left: 46%;
bottom: 0;
width: 90px;
height: auto;
z-index: 2;
transform-origin: 50% 100%;
animation: gu-crumb-sway 5s ease-in-out infinite;
pointer-events: none;
}
.gu-crumb__wheat path {
fill: none;
stroke: var(--wheat);
stroke-width: 3;
}
.gu-crumb__wheat ellipse {
fill: var(--wheat);
}
.gu-crumb__wheat g {
animation: gu-crumb-grain 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) both;
animation-delay: calc(0.6s + (8 - var(--i)) * 70ms);
transform-box: fill-box;
transform-origin: center;
}
/* Lesson */
.gu-crumb__lesson {
padding: 72px clamp(16px, 4cqi, 40px);
display: grid;
grid-template-columns: 1.1fr 1fr;
gap: 40px;
align-items: center;
}
.gu-crumb__kicker {
margin: 0 0 6px;
color: var(--teal);
font-weight: 700;
font-size: 14px;
}
.gu-crumb__lesson h2,
.gu-crumb__weeks h2 {
font-size: clamp(30px, 4.6cqi, 44px);
}
.gu-crumb__lesson-copy > p {
color: var(--muted);
max-width: 44ch;
}
.gu-crumb__clock {
display: grid;
gap: 4px;
margin: 20px 0;
font-size: 15px;
}
.gu-crumb__clock b {
font-family: var(--round);
font-weight: 400;
font-size: 28px;
font-variant-numeric: tabular-nums;
}
.gu-crumb__clock input {
appearance: none;
-webkit-appearance: none;
height: 34px;
background: transparent;
margin: 0;
cursor: pointer;
}
.gu-crumb__clock input::-webkit-slider-runnable-track {
height: 10px;
border-radius: 5px;
background:
linear-gradient(90deg, transparent calc(41.6% - 1px), rgb(47 111 115 / 0.35) calc(41.6% - 1px) 75%, transparent 75%),
linear-gradient(90deg, var(--wheat) var(--p), var(--dough) var(--p));
}
.gu-crumb__clock input::-moz-range-track {
height: 10px;
border-radius: 5px;
background: linear-gradient(90deg, var(--wheat) var(--p), var(--dough) var(--p));
}
.gu-crumb__clock input::-webkit-slider-thumb {
-webkit-appearance: none;
width: 28px;
height: 28px;
margin-top: -9px;
border-radius: 50%;
background: var(--flour);
border: 4px solid var(--rye);
transition: transform 0.15s;
}
.gu-crumb__clock input::-moz-range-thumb {
width: 20px;
height: 20px;
border-radius: 50%;
background: var(--flour);
border: 4px solid var(--rye);
}
.gu-crumb__clock input:active::-webkit-slider-thumb {
transform: scale(1.15);
}
.gu-crumb__quiz {
border: 0;
margin: 0;
padding: 0;
display: flex;
flex-wrap: wrap;
gap: 8px;
align-items: center;
}
.gu-crumb__quiz legend {
font-weight: 700;
margin-bottom: 8px;
padding: 0;
}
.gu-crumb__quiz button {
min-height: 44px;
padding: 0 18px;
border-radius: 999px;
border: 1.5px solid var(--rye);
background: transparent;
transition: background 0.2s, color 0.2s;
}
.gu-crumb__quiz button[aria-pressed="true"] {
background: var(--rye);
color: var(--flour);
}
.gu-crumb__feedback {
min-height: 3.2em;
margin: 14px 0 0;
max-width: 44ch;
}
.gu-crumb__feedback[data-show] {
animation: gu-crumb-rise 0.4s ease-out both;
}
.gu-crumb__jarwrap {
display: grid;
justify-items: center;
gap: 10px;
padding: 24px;
border-radius: 24px;
background:
radial-gradient(60% 50% at 50% 80%, rgb(226 168 60 / 0.18), transparent),
var(--dough);
}
.gu-crumb__jar {
width: min(100%, 260px);
height: auto;
overflow: visible;
}
.gu-crumb__starter {
fill: #f4ead6;
stroke: #d9c39a;
stroke-width: 2;
transition: d 0.6s cubic-bezier(0.3, 1.3, 0.5, 1);
}
.gu-crumb__bubble {
fill: #fff;
stroke: #d9c39a;
stroke-width: 1;
transform-box: fill-box;
transform-origin: center;
animation: gu-crumb-bubble 2.4s ease-in-out infinite;
animation-delay: calc(var(--d) * -1);
transition: cy 0.6s cubic-bezier(0.3, 1.3, 0.5, 1);
}
.gu-crumb__glass {
fill: rgb(255 255 255 / 0.12);
stroke: var(--rye);
stroke-width: 3;
}
.gu-crumb__shine {
stroke: rgb(255 255 255 / 0.7);
stroke-width: 5;
stroke-linecap: round;
}
.gu-crumb__lid {
fill: var(--teal);
}
.gu-crumb__tape {
fill: var(--wheat);
opacity: 0.85;
}
.gu-crumb__state {
margin: 0;
font-weight: 700;
padding: 6px 14px;
border-radius: 999px;
background: var(--flour);
transition: background 0.3s, color 0.3s;
}
.gu-crumb__state[data-ready] {
background: var(--teal);
color: #fff;
animation: gu-crumb-pop 0.4s cubic-bezier(0.3, 1.6, 0.5, 1);
}
/* Curriculum */
.gu-crumb__weeks {
padding: 64px clamp(16px, 4cqi, 40px);
background: var(--dough);
}
.gu-crumb__weeks-head {
display: flex;
justify-content: space-between;
align-items: end;
gap: 16px;
flex-wrap: wrap;
}
.gu-crumb__loaf {
display: flex;
align-items: center;
gap: 10px;
font-weight: 700;
font-variant-numeric: tabular-nums;
}
.gu-crumb__loaf svg {
width: 120px;
height: auto;
overflow: visible;
}
.gu-crumb__loafbody {
fill: color-mix(in srgb, #8a4a22 calc(var(--k) * 100%), #f2e6d0);
stroke: color-mix(in srgb, #5a2e14 calc(var(--k) * 100%), #d9c39a);
stroke-width: 2;
transform-box: fill-box;
transform-origin: 50% 100%;
scale: 1 calc(0.75 + var(--k) * 0.35);
transition: fill 0.5s, stroke 0.5s, scale 0.6s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.gu-crumb__score {
fill: none;
stroke: #f7e2b8;
stroke-width: 3;
stroke-linecap: round;
opacity: calc(var(--k) * 1.4 - 0.2);
transition: opacity 0.5s;
}
.gu-crumb__hint {
color: var(--muted);
margin: 6px 0 20px;
}
.gu-crumb__acc {
display: grid;
gap: 8px;
}
.gu-crumb__week {
background: var(--flour);
border-radius: 14px;
overflow: hidden;
}
.gu-crumb__week h3 {
margin: 0;
font-size: 17px;
}
.gu-crumb__week h3 button {
width: 100%;
min-height: 60px;
padding: 0 18px;
border: 0;
background: transparent;
display: flex;
align-items: center;
gap: 12px;
text-align: left;
font-weight: 700;
}
.gu-crumb__week h3 button > span:first-child {
flex: 1;
}
.gu-crumb__wcount {
font-weight: 400;
color: var(--muted);
font-variant-numeric: tabular-nums;
font-size: 14px;
}
.gu-crumb__week h3 i {
width: 14px;
height: 14px;
position: relative;
}
.gu-crumb__week h3 i::before,
.gu-crumb__week h3 i::after {
content: "";
position: absolute;
left: 0;
top: 6px;
width: 14px;
height: 2px;
background: currentColor;
transition: transform 0.3s;
}
.gu-crumb__week h3 i::after {
transform: rotate(90deg);
}
.gu-crumb__week[data-open] h3 i::after {
transform: rotate(0deg);
}
.gu-crumb__panel {
display: grid;
grid-template-rows: 0fr;
transition: grid-template-rows 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.gu-crumb__week[data-open] .gu-crumb__panel {
grid-template-rows: 1fr;
}
.gu-crumb__panel ul {
min-height: 0;
overflow: hidden;
list-style: none;
margin: 0;
padding: 0 18px;
}
.gu-crumb__week[data-open] .gu-crumb__panel ul {
padding-bottom: 12px;
}
.gu-crumb__panel label {
display: flex;
align-items: center;
gap: 12px;
min-height: 46px;
border-top: 1px solid var(--line);
cursor: pointer;
}
.gu-crumb__panel input {
position: absolute;
opacity: 0;
width: 1px;
height: 1px;
}
.gu-crumb__tick {
flex: none;
width: 24px;
height: 24px;
border-radius: 50%;
border: 2px solid var(--rye);
display: grid;
place-items: center;
transition: background 0.2s;
}
.gu-crumb__tick::after {
content: "";
width: 10px;
height: 5px;
border-left: 2.5px solid #fff;
border-bottom: 2.5px solid #fff;
transform: rotate(-45deg) scale(0);
margin-top: -2px;
transition: transform 0.3s cubic-bezier(0.3, 1.8, 0.5, 1);
}
.gu-crumb__panel input:checked + .gu-crumb__tick {
background: var(--teal);
border-color: var(--teal);
}
.gu-crumb__panel input:checked + .gu-crumb__tick::after {
transform: rotate(-45deg) scale(1);
}
.gu-crumb__panel input:focus-visible + .gu-crumb__tick {
outline: 3px solid var(--focus);
outline-offset: 2px;
}
.gu-crumb__mins {
margin-left: auto;
color: var(--muted);
font-size: 14px;
font-variant-numeric: tabular-nums;
}
/* Teacher */
.gu-crumb__teacher {
padding: 72px clamp(16px, 4cqi, 40px);
display: grid;
grid-template-columns: 0.8fr 1fr;
gap: 40px;
align-items: center;
}
.gu-crumb__teacher-img {
aspect-ratio: 4 / 5;
border-radius: 999px 999px 24px 24px;
}
.gu-crumb__teacher h2 {
font-size: clamp(28px, 4cqi, 38px);
margin-bottom: 12px;
}
.gu-crumb__teacher p {
color: var(--muted);
max-width: 46ch;
}
/* Enrol */
.gu-crumb__enrol {
margin: 0 clamp(16px, 4cqi, 40px) 56px;
padding: 48px clamp(20px, 5cqi, 56px);
border-radius: 28px;
background: var(--teal);
color: #eef6f5;
text-align: center;
}
.gu-crumb__enrol h2 {
font-size: clamp(30px, 5cqi, 48px);
}
.gu-crumb__enrol > p {
max-width: 48ch;
margin: 12px auto 24px;
opacity: 0.88;
}
.gu-crumb__enrol form {
display: flex;
gap: 10px;
justify-content: center;
flex-wrap: wrap;
}
.gu-crumb__enrol input {
min-height: 50px;
flex: 0 1 300px;
border-radius: 999px;
border: 0;
padding: 0 20px;
background: #fff;
color: var(--ink);
}
.gu-crumb__sent {
margin: 0;
font-weight: 700;
animation: gu-crumb-pop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}
.gu-crumb__foot {
display: flex;
gap: 18px;
flex-wrap: wrap;
padding: 20px clamp(16px, 4cqi, 40px);
border-top: 1px solid var(--line);
color: var(--muted);
font-size: 14px;
}
.gu-crumb__foot span {
margin-right: auto;
}
@keyframes gu-crumb-rise {
from {
opacity: 0;
transform: translateY(16px);
}
to {
opacity: 1;
transform: none;
}
}
@keyframes gu-crumb-proof {
from {
transform: scale(1.15);
filter: saturate(0.6);
}
to {
transform: none;
filter: none;
}
}
@keyframes gu-crumb-sway {
0%,
100% {
rotate: -3deg;
}
50% {
rotate: 3deg;
}
}
@keyframes gu-crumb-grain {
from {
transform: scale(0);
}
to {
transform: none;
}
}
@keyframes gu-crumb-bubble {
0%,
100% {
transform: scale(1);
}
50% {
transform: scale(1.35) translateY(-2px);
}
}
@keyframes gu-crumb-pop {
from {
transform: scale(0.8);
opacity: 0;
}
to {
transform: none;
opacity: 1;
}
}
@container (max-width: 760px) {
.gu-crumb__hero,
.gu-crumb__lesson,
.gu-crumb__teacher {
grid-template-columns: 1fr;
}
.gu-crumb__hero-img {
order: 0;
aspect-ratio: 16 / 10;
min-height: 0;
border-top-left-radius: 0;
border-bottom-right-radius: 160px;
}
.gu-crumb__wheat {
left: auto;
right: 16px;
bottom: 0;
width: 64px;
}
.gu-crumb__teacher-img {
max-width: 320px;
}
}
@container (max-width: 560px) {
.gu-crumb__bar nav a:not(.gu-crumb__navcta) {
display: none;
}
.gu-crumb__enrol form > * {
flex: 1 1 100%;
}
}
@media (prefers-reduced-motion: reduce) {
.gu-crumb *,
.gu-crumb *::before,
.gu-crumb *::after {
animation: none !important;
transition: none !important;
}
}
```
You might also want
Next piece: Plant care appTree-planting charity landing page
Landing pages, intermediate
Dental clinic landing page with a treatment finder
Landing pages, advanced
Freelancer money app page with a live split
Landing pages, advanced

