# Recreate this site as a single HTML file: Halm Sourdough Bakery & Bake School

## What it is

A full landing page for *Halm*, a fictional sourdough bakery and bake school in Ghent. The palette is cream "flour" paper, crust-brown ink and one tomato-red accent, with a fine print grain. The hero is a **live three.js 3D sourdough boule** (a Meshy GLB) sitting on the linen of a **Blender Cycles-rendered bakery bench**, under a cast-iron clock bezel on a limewashed brick wall. The shop and bake school use one consistently graded set of warm, side-lit bread photos. **Signature: the oven clock.** Set into the rendered wall bezel, a large live clock dial maps the baker's day (04:00 to 16:00) onto one turn of a real 12-hour face. Each of the 11 batches is drawn on two concentric rings as a wheat-coloured *proofing* arc followed by a tomato *in the oven* arc. A hand points at the current Ghent time (`Europe/Brussels`), and the centre says what is in the oven and how many minutes until the next tray comes out. The 3D loaf on the bench acts out the same schedule: it is pale, rising dough while a batch proofs, browns with an "oven spring" while it bakes, and steams while it is still warm. It also turns with the cursor, and an oven glow on the left edge brightens while anything bakes. Visitors can **drag the hand or use the arrow keys** to scrub through the day. When the shop is closed, the clock falls back to a fixed demo time of 08:42. The same clock drives the live statuses on the oven sheet, the "Next tray" line on every shop card and the header chip, so the gimmick is also the page's data. The rest is real UI: a shop with filter chips, a FLIP re-flow and a basket dialog with validated pickup reservation; a bread-box builder with a filling crate and a live price; a two-month class calendar with seat counts and booking; and an illustrated SVG neighbourhood map with linked pins, walking routes and live open/closed status.

## Page shell & libraries

- One `index.html` with inline CSS and JS, plus `assets/` (WebP photos, one Cycles plate, one GLB). No frameworks, no map library and no tiles. **three.js 0.170.0** loads as an ES module through an import map: `three` → `https://cdn.jsdelivr.net/npm/three@0.170.0/build/three.module.js`, and `three/addons/` → `.../examples/jsm/` (GLTFLoader, `libs/meshopt_decoder.module.js`, RoomEnvironment). Everything 3D sits in one `<script type="module">` wrapped in try/catch, so any failure leaves the poster. Google Fonts:
  `https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..800;1,9..144,300..800&family=Manrope:wght@400..800&display=swap` (with preconnects to fonts.googleapis.com and fonts.gstatic.com). The font stacks fall back to Georgia and system-ui.
- Structure: `div.pre#pre` (oven-door preloader) → skip link → an empty hidden `<svg><defs id="sprite">` (filled by JS with the bread symbols) → sticky `header.hdr` → `main` with `section.hero#top`, `div.tk#ticker`, `#today`, `#shop`, `#box`, `#classes`, `#visit` → `footer.ftr` → `dialog#basket` → `div#toast`.
- JS builds everything from data arrays: `PRODUCTS` (8), `BAKES` (11 batches with `in`/`out` minutes), `BOX` (6), `TYPES` (5 class types) plus a generated `SESS` (sessions by date), and `PLACES` (6 map pins).
- `?t=HH:MM` in the URL forces demo mode at that time (useful for screenshots and demos).

## Tokens

- **Colour:** flour `#f5eee2` (page), flour-2 `#ece2d0` (tiles, bread-box band), paper `#fbf7f0` (cards, panels, dial face), crust `#2f1d12` (ink, solid buttons), crust-2 `#5e4331` (muted text, 7.8:1 on flour), crust-3 `#8a6a52` (decorative only), tomato `#c8391f` (accent fills; white text on it 5.1:1), tomato-2 `#a92d16` (accent text and italics), tomato-soft `#f2c9bc`, wheat `#e3b866`, rye `#1f130b` (footer), brick `#6e3b22` (oven, footer wordmark), line `rgba(47,29,18,.16)`, line-2 `.32`.
- **Bread gradients:** crust `#c98443 → #94501f → #6a3416`, light crust `#d9a05e → #a96a35 → #7d4a22`, rye `#70432a → #3a2013`, gold `#f0c06a → #c9812f → #9c5a22`. A 7px rotated halftone dot pattern (crust at 42%) shades the right side of every loaf.
- **Grain:** a 120px canvas noise tile generated at runtime, used as a fixed full-screen overlay at 7% opacity (no blend modes).
- **Type:** Fraunces (opsz 144 for display, weight 500, tracking −.025em; italics at weight 380 in tomato-2 for the second half of each heading). h1 `clamp(52px, 7vw, 108px)`/.94, h2 `clamp(36px, 5vw, 72px)`/.98, h3 `clamp(22px, 2vw, 28px)`. Manrope for everything else: 17px/1.6 body, 13px 700 uppercase eyebrows with .14em tracking. Nothing under 12px in HTML text (the dial numerals scale with the dial and are about 11px on a 390 phone).
- **Radii:** 10 / 18 / 28 / 99px. **Gutter:** `clamp(16px, 4vw, 56px)`. **Section padding:** `clamp(80px, 10vw, 152px)`. **Max width:** 1328px.
- **Easing:** `--ease: cubic-bezier(.2,.75,.2,1)` (appear), `--ease-io: cubic-bezier(.65,0,.35,1)` (moves). Buttons and chips are 48 / 40px tall and fully round.

## Layout & structure

1. **Header** (sticky, 72px, flour at 86% + 12px blur, hairline once scrolled): "Halm" in Fraunces 30 with a 9px tomato dot, five nav links, a live **oven chip** ("In the oven: Croissants, second tray · out 08:47") and a **Basket** pill with a tomato count bubble that bumps (scale 1.45) on every add. Under 860px the nav becomes a Menu disclosure (big Fraunces links).
2. **Hero** (2 columns, 1.04fr / .96fr). Left: eyebrow "Bakkerij & bakschool · Ghent", h1 "Come when / it's *still warm.*" (each line rises out of a mask), a lead, two CTAs (tomato "Shop today's bake", ghost "Book a class") and a three-fact strip (11 / 48 / 12). Right: `.oven` (aspect 864/1080, max 600px, radius 28, overflow hidden), built as four stacked layers:
   - **The set (a Blender Cycles plate):** `assets/plate.webp` (864×1080, `object-fit: cover`) is a render made in a hosted Blender scene. It shows a dark limewashed brick wall with a cast-iron clock bezel (empty paper face), an oiled oak bench with flour dust, a rumpled linen cloth, a ceramic jar of wooden spoons on the left, a stack of three rattan proofing baskets on the right, a warm spot from the upper right and an orange oven spill from the left. It uses AgX, Medium High Contrast. Graded in post (−12% saturation, sigmoidal contrast, a vignette and light gaussian grain). The Blender camera is a 40 mm lens on a 36 mm vertical sensor at (0, −1.15, 1.22) m, looking straight along +Y; the bench top is z 0.906 m; the bezel's centre is (0, 0.57, 1.60) with inner radius 0.347 m.
   - **The live loaf (three.js r170):** `canvas#loaf3d` over the plate renders `assets/loaf.glb` (a Meshy image-to-3D sourdough boule, 31 k tris, PBR, meshopt + 1024 px WebP textures, 0.95 MB) with the *same* camera: `PerspectiveCamera(48.46°)` at (0, 1.22, 1.15), so the loaf sits on the rendered linen. Scaled to 31 cm diameter, base on y 0.906. Lighting: RoomEnvironment PMREM at 0.28, a spot `#ffe6cc` (26, angle .62, penumbra .85, 1024² soft shadow) at (0.9, 2.2, 0.6), an oven point light `#ff8a4a` from the left, a low hemisphere fill, ACES Filmic (exposure 1.05). Contact comes from a ShadowMaterial plane (opacity .42) plus a radial-gradient blob. Steam is 22 soft sprites rising 26 cm over 3.2 s with a sway.
   - `img.poster` (`assets/plate-loaf.webp`, the plate with the loaf baked in) sits over the canvas and fades out (.8 s) once the GLB is on screen. It is the LCP image and the no-WebGL fallback. `div.glowov` is a screen-blended orange radial on the left edge whose opacity follows the oven (.15 idle, .9 while a batch bakes). A vignette and a 35% grain layer sit on top, and a small "Live 3D · turns with your cursor" pill sits bottom-right.
   - **Dial** `div.dial[role=slider]` sits *in the rendered bezel*: left 20.72%, width 58.56%, margin-top 2.53% (numbers projected from the Blender camera with `world_to_camera_view`). It is a container (`cqw` units) holding `svg` viewBox 600×600: a paper face r 292 at 97% with a soft inner ring; a wheat "shop open" band (07:00–15:00) at r 283; a tomato day-progress arc from 04:00 to now at r 283; 48 quarter-hour ticks (hours longer and heavier); numerals 05…15 at r 224, with "04·16" where the day starts and ends; the batch arcs on two lanes (r 190 / 164, stroke 18, round caps; a batch takes the inner lane if it would overlap the previous one); and a short hand from r 150 to 262 ending in a tomato knob. It deliberately never crosses the centre text.
   - **Centre** (HTML over the SVG, 48% wide): mode ("● Live in Ghent" / "Demo morning" / "Scrubbing the day"), the time in Fraunces at 16cqw, a "now" line and a "next" line ("Out at **08:47** · 5 min").
   - Under the oven: a polite live line ("Demo time 08:42. Drag the hand…", with a "Back to live time" link while scrubbing) and a three-swatch legend.
3. **01 Today's bake:** a section head (heading left, lead right), then `.sheet`, a paper ticket with a scalloped top edge (radial-gradient mask). Each of the 11 rows has: the out time (Fraunces 30) + "OUT"; a small loaf illustration, the name and the quantity · price; a status pill (Later today / Proofing / In the oven [tomato] / Still warm / On the shelf); a progress bar with a note ("3 min to go", "out 12 min ago"); a clock button (jumps the dial to that batch) and a "Put one aside" button (adds that product to the basket).
4. **02 Shop:** filter chips with counts (All 8, Loaves 4, Sweet 2, Savoury 1, Vegan 5, Whole grain 3, Gifts 1), then a 3-column grid. The featured "Halm boule" card spans 2 columns as a row (art left, body right). A card has: an art tile (flour-2 with a 74% wheat halftone disc behind the loaf SVG and a flat tomato offset shadow `drop-shadow(5px 6px 0 rgba(200,57,31,.22))`), a meta line, the name, a description, a live oven line ("● Next tray 11:15", tomato when in the oven or still warm), the price in Fraunces 24 + unit, and an **Add** button that turns into a − n + stepper. The voucher card's art is a tomato ticket with notches instead of bread.
5. **Basket** `dialog#basket` (modal side sheet, 460px, slides in 40px): lines with steppers, an empty state, the total, a pickup-slot select (today in half-hour slots after now, then tomorrow), name + email with inline errors, and "Reserve for pickup", which becomes a confirmation with an order number. The basket persists in `localStorage` (wrapped in try/catch).
6. **03 Bread box** (flour-2 band, 2 columns): Left panel: 6 rows with steppers (0–4 each, 8 total), then three radio segments: How often (weekly −12% / every 2 weeks −6%), Bake day (Tue / Fri / Sat), Getting it (pick up free / cargo bike +€ 3,50). Right: a wooden **crate** (striped gradient, "HALM · GENT" plate) with 8 slots in a 4×2 grid that fill with loaf illustrations in order (pop-in), then the receipt (bread, saving, delivery), "Per box" in Fraunces up to 56px that counts to the new value over 450ms, an approximate monthly figure and "Start my bread box". Under 2 items it shows a message instead of submitting. On success it shows the first delivery date (the next chosen weekday at least 2 days out).
7. **04 Bake school:** type chips (All, Sourdough, Croissant, Rye, Kids, Kerststol) filter and dim days. Left: month title + prev/next (December 2026 ↔ January 2027) and a Monday-first 7-column grid. Days with classes are buttons with coloured class bars (hatched when full). Others are plain numbers. Right: the selected day's sessions, each with: a colour edge, name, time · price, a blurb, one seat dot per seat (taken = filled, yours = tomato), "n of m seats left", a seats select (1…min(4, left)) + "Book · € 85,00", or "Join the waitlist" (toggle) when full.
8. **05 Visit** (crust band, cream text): the map (aspect 1200/720) + a list of places, then a three-column hours row (live "Open now / Closed right now" + next opening, shop hours with today highlighted, school hours) and "Get directions".
   - **Map SVG:** a block-texture ground; the Leie as a 78/62px double stroke with a dashed centre line and "de Leie" set twice on a `textPath`; a side canal; seven streets (28px casing under 22px cream); three bridges; a park with tree pattern; a cobbled market square; a dashed tram line; the bakery block in tomato with "HALM"; street labels in spaced Manrope caps; a compass and a 200m scale bar.
   - **Pins:** focusable `g[role=button]` with letter badges. The bakery pin is bigger, tomato, with a 2s pulse ring. Hover, focus or click on a pin or its list row highlights both, shows a paper tooltip (flipped below near the top edge) and draws a dotted tomato walking route that marches (dashoffset −28 per second).
9. **Footer** (rye): "The Thursday *crumb.*" newsletter form with validation, three link columns, a giant "HALM" + tomato dot wordmark in brick (`clamp(140px, 30vw, 440px)`) whose letters rise in with a 70ms stagger, and a bottom row stating that the bakery is fictional.

## Behaviour & interaction

- **Preloader: the oven doors.** Two full-height brick doors (50.2% each, 46px courses, brass handles) cover the page. In the middle, an arched oven window (`radial-gradient #ff9a4a → #c8391f → #2a120a`) holds the boule, which proofs from `scaleY(.55) scaleX(.9)` to 1 while a Fraunces counter runs 00 → 48 "hours proofing" (1300ms, ease-out cubic). It then waits for `document.fonts.ready` (600ms at most), pauses 250ms, fades the centre (350ms) and swings the doors open with `rotateY(∓104deg)` around their outer edges under `perspective:1600px` (1s, `cubic-bezier(.7,0,.2,1)`, dimming to brightness .55). The hero intro starts 250ms into the swing. A click or any key skips it. A CSS safety animation hides it after 6s even if JS dies. Under reduced motion it shows 48 for 500ms and fades (300ms).
- **Ticker:** a crust strip (60px; 50px on phones) right after the hero, in Fraunces 22 with wheat italics and tomato dots. Its text is generated from the oven clock: what is in the oven, the next tray out, what is still warm, seats left in Saturday's class, and the bread-box starting price. It is rebuilt every 5s only when the text changes. Four copies run right-to-left at 40px/s, wrapping by one lap width. It pauses under the mouse, off-screen, on hidden tabs and under reduced motion. An sr-only copy carries the text.
- **Cursor spring:** pointer position over the hero (fine pointers only) drives a spring (tension 90, friction 22, semi-implicit Euler) that the 3D loaf reads. The ticker and the spring share one rAF loop that does nothing while the tab is hidden or under reduced motion.
- **Map pan & zoom:** + / − / reset buttons (44px paper plates, bottom-right) tween the SVG `viewBox` around its centre (380ms, ease-out cubic, ×1.4 per step, clamped to 40–125% of the base view). Mouse-drag pans. Ctrl/⌘ + wheel zooms about the cursor. A plain wheel shows a "Hold Ctrl or ⌘ and scroll to zoom" pill for 1.2s and scrolls the page. Touch keeps native scrolling. Tooltips re-anchor after every change.
- **Clock maths:** minutes since midnight `m` → angle `m/2` degrees clockwise from 12 o'clock (so 04:00 = 120°, the "4" position). Pointer → minutes: `a = atan2(dx, −dy)`, `h = a/30`, `m = (h < 4 ? h + 12 : h) × 60`, clamped to 240…960. Arcs are SVG `A` paths. The large-arc flag is set when the span is over 180°.
- **Batch status at time t:** Later (t < in − 45), Proofing (to `in`), In the oven (to `out`, with progress), Still warm (to out + 60), On the shelf.
- **Live vs demo:** read `Europe/Brussels` time with `Intl.DateTimeFormat(...).formatToParts`. It is live when it isn't Monday and the time is between 04:00 and 16:00. Otherwise demo at 08:42, with a note giving the real Ghent time. It ticks every 1s only while the tab is visible and re-syncs on `visibilitychange`.
- **Intro:** the ticks fade in (14ms stagger), the numerals follow (50ms), and the arcs draw with `pathLength=1` dash animation (1s, 60ms stagger, from 300ms). The hand sweeps from 04:00 to now over 1.8s (ease-out quart) after 250ms. The h1 lines rise 108% → 0 (1s, second line +120ms), and the copy fades up 14px (.8s, 250/350/450ms delays). The intro starts as the preloader doors open.
- **Scrub:** pointer drag (pointer capture, a 260ms ease to the first point, then direct). Keys: ←/↓ −5 min, →/↑ +5 (Shift ±15), PageUp/PageDown ±60, Home 04:00, End 16:00, Escape back to live. `aria-valuetext` reads e.g. "08:42. Croissants, second tray in the oven. Next out: Croissants, second tray at 08:47".
- **Linking:** hovering an arc or a sheet row lifts that batch (its arcs go to stroke 26, the others to 28% opacity, the row gets a wheat wash) and the dial centre shows its times. The sheet's clock button sets the dial to 60% through that bake, scrolls to the hero and holds the highlight for 2.6s.
- **The loaf follows the clock** (`window.__halm.bake()` → the batch named in the dial centre):
  - *proofing:* the crust shader (`onBeforeCompile` after `map_fragment`) mixes toward raw dough `vec3(.46,.36,.24)×(.7+1.1·luma)` at 90%, and the loaf rises from scaleY .78 to .92 across the 45 min proof;
  - *in the oven:* the dough mix falls to 0 over the first 87% of the bake, roughness goes .95 → .75, and the oven light rises to 2.6;
  - *the moment a batch goes in:* an **oven spring**, a scaleY impulse on a spring (tension 420, friction 14);
  - *still warm:* the steam opacity scales with how fresh it is (up to .3 per puff).

  Scrubbing the dial replays all of this live.
- **Cursor:** the loaf turns 0.12 rad/s on its own and adds `spring.x × 0.9` rad yaw and `spring.y × 0.08` rad tilt from the hero's cursor spring (tension 90, friction 22). The renderer draws only while the hero is on screen and the tab is visible. Under reduced motion there is no idle spin, no steam drift and at most 2 fps.
- **Oven glow:** the `.glowov` overlay at opacity .15 with nothing baking and .9 while a batch is in the oven (1.2s transition).
- **FLIP filter:** cancel running animations; record rects; leaving cards fade + scale to .94 (180ms ease-in); then hide them, unhide entering cards, and translate each staying card from its old rect to its new one (620ms, `cubic-bezier(.65,0,.35,1)`). Entering cards rise 24px from scale .96 (520ms, 140ms + 40ms × index). A token cancels stale runs.
- **Steppers:** 0–20 in the basket, 0–4 per bread in the box with an 8-item crate cap (the + buttons disable, with a message). Focus moves to the stepper's + after "Add".
- **Validation:** name ≥ 2 characters, email `^[^\s@]+@[^\s@]+\.[^\s@]{2,}$`. Errors are set with `aria-invalid` + text in `aria-describedby` spans, and focus moves to the first bad field.
- **Seat data:** deterministic FNV hash of date + type gives taken seats (`min(cap, h % (cap + 3))`), so some sessions are full. Booking adds your seats in tomato and confirms inline. Dec 25, Dec 26 and Jan 1 have no classes, and kids' classes run on the Wednesdays of the Christmas holiday.
- **Reveals:** `[data-reveal]` fades up 24px (.8s) when 15% is visible, once.
- **Pausing:** steam, the pulses and the map pin pulse pause through an IntersectionObserver `.paused` class when their block is off screen.

## Responsive

- **1440:** as described. The hero fills the first screen, and the oven is about 550px wide.
- **≤1100:** the header oven chip hides.
- **≤980:** the shop goes to 2 columns (featured spans 2), sheet rows go to 2 lines (time | name + action, status below), the calendar stacks over the detail, the map stacks over the list, and the hours go to 2 columns.
- **≤900 / 768:** the hero is one column, with the oven centred (max 520px) under the copy.
- **≤860:** the Menu button replaces the nav, and section heads stack.
- **≤620 / 390:** the shop is 1 column (featured goes vertical); calendar class bars become 8px dots in 58px cells; the map crops to a square `viewBox 330 60 640 640` around the bakery and the tooltip hides (the list carries the info); the hours stack.
- **≤560:** the hero stage's inner layers scale ×1.24 around 50% 28%, so the dial reads larger (the loaf stays in frame). Under a 320px dial (container query) the "now" line hides. The fact strip hides, so the dial starts above the fold. Filter chips become a single swipe row with a right-edge fade. Sheet rows become time | name, with status + "Put one aside" side by side (the clock button hides). Both hero CTAs stretch.
- No horizontal scroll at 390, 768 or 1440 (body `overflow-x: clip`).

## Accessibility & reduced motion

- Semantic landmarks and a skip link, one h1, and a visible 2.5px tomato focus ring everywhere. All controls are native buttons, radios or selects, at least 44px.
- The dial is a `role="slider"` with value, min, max and a spoken `aria-valuetext`. The SVG drawings are `aria-hidden`. The sheet is a `role=list`. The basket uses a native modal `<dialog>` (focus trap, Escape). Filter chips and class chips use `aria-pressed`. Calendar day buttons carry full labels ("Saturday 5 December: Sourdough from scratch, 3 seats left") and move with arrow keys. Map pins are focusable with Enter/Space, mirrored by a real list of buttons.
- Live regions: the dial status line, the shop grid count, the basket count, the box receipt, the class detail and the toasts.
- Contrast: body text ≥ 7:1, muted ≥ 4.5:1, white on tomato 5.1:1, cream on crust ≥ 12:1.
- `prefers-reduced-motion: reduce`: no intro sweep (the hand is placed directly), no arc drawing, no steam, no pulses, no FLIP (the filter swaps instantly), no count-up, and all reveals shown.

## Fallbacks

- **No WebGL, a blocked CDN or a failed GLB:** the module's try/catch adds `.no3d` and the poster render (`plate-loaf.webp`, the plate with the loaf already in it) simply stays. The dial, statuses and every other block are plain HTML/SVG and keep working. If Google Fonts is blocked, Georgia and system-ui take over at the same sizes.
- `Intl` time-zone failure → the local clock. `localStorage` failure → the basket still works for the session. If the open time is outside the oven day → demo mode with an honest note.
- Every date, price, address and phone number is a placeholder, and the footer says the bakery is fictional.

## Assets

All paths are relative to `index.html`:
- `assets/plate.webp`: the Cycles counter plate, described above (77 KB).
- `assets/plate-loaf.webp`: the same plate with the 3D loaf rendered onto it. It is the poster and fallback.
- `assets/loaf.glb`: the Meshy boule, optimised with `gltf-transform optimize --compress meshopt --texture-compress webp --texture-size 1024` (0.95 MB).
- `assets/boule.webp`, `country.webp`, `rye.webp`, `spelt.webp`, `croissant.webp`, `cardamom.webp`, `focaccia.webp`: one product photo per bread, 820² (boule 1400 wide). All have the same dark-brown backdrop, warm side light from the left, worn wood and linen. All are graded the same way (−10% saturation, sigmoidal contrast 1.5, a 4% brown colorize) and get a 50% grain layer in CSS.
- `assets/school.webp`: proofing baskets, a scraper and dough on a floured oak bench (bake school).

The SVG bread symbols (`#sprite`, a seeded Park–Miller scatter, `seed = 7`) are still used for the small icons in the oven sheet, the basket, the bread-box crate and the preloader window.

## Make it yours

This prompt rebuilds one exact design. If everyone ships it unchanged, the sites will look alike. Before you paste it, change these lines so the result is yours. Each change is one edit to the prompt; the structure and the interactions stay intact.

1. **Brand and offer.** Swap Halm, Ghent and the eight products for your own business, city and menu. Keep 6–9 products with one featured (2-column) item so the grid stays balanced, and keep 8–12 batches so the dial rings stay readable.
2. **Re-theme the oven clock.** The dial over a working schedule is the signature; keep the arc lanes, the scrubbing hand and the linked statuses, but change what frames it and what the arcs mean: a coffee roaster's drum window with roast/cool arcs, a brewery's kettle porthole with mash/boil arcs, a pizza oven's mouth with 90-second bakes on a 1-hour face, a florist's cold-room door with delivery/arranging arcs, or a ramen counter with broth/noodle times. Change the day window (`DAY0`/`DAY1`) to your opening hours.
3. **Palette.** Replace flour, crust and tomato with your three brand colours (ground, ink, one accent) and recolour the bread gradients to match your product. Keep muted text ≥ 4.5:1 on the ground and white-on-accent ≥ 4.5:1 (darken the accent if needed).
4. **Type pairing.** Swap Fraunces + Manrope for another expressive serif with a variable italic (for example Newsreader, Gloock, or Young Serif with an italic partner) and a plain sans you haven't seen on your last three sites. Keep the "roman line / *italic accent*" heading pattern.
5. **The hero object and the set.** Replace `loaf.glb` with your own signature product: make a clean 3/4 product shot on light grey, run image-to-3D, and optimise to ≤ 1.5 MB. Re-render the plate with your own surface and wall (a marble café counter with a tiled wall, a steel brewhouse bench, a florist's zinc table). Keep the same camera numbers so the live model still lands on the surface, and re-project the bezel so the dial still sits in it. Reshoot the product photos with one lens, one light direction and one grade.
6. **Bread box → your subscription.** Rename the crate and its 8 slots to your own container (a coffee tin with 4 bags, a flower bucket with 6 stems, a wine case with 6 bottles), set your own min/max and discounts, and keep the live receipt and count-up.
7. **School and map.** Replace the class types, colours and dates with your own events, and redraw the map's water, streets, park and pins around your real neighbourhood (draw it, don't trace a real map).
8. **Copy.** Rewrite every headline and note in your own voice, and keep it concrete ("out at 08:47", "eight items is the most we can fit") rather than generic.

Tell your AI: *"Build exactly as specified, but with these changes: …"*, then list your edits.

---

## Reference implementation (use verbatim)

The complete working `index.html`. Every number in the spec above is in this file; if the two ever seem to differ, the code wins. Images and models referenced as `assets/...` can be downloaded from https://copytheprompt.design/demos/bakery-landing-page-oven-clock/assets/ or replaced with your own (see Make it yours).

````html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Halm — Sourdough Bakery & Bake School, Ghent</title>
<meta name="description" content="Halm is a sourdough bakery and bake school in Ghent. A live oven clock shows what is proofing, baking and still warm.">
<meta name="theme-color" content="#f5eee2">
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 16 16%22%3E%3Ccircle cx=%228%22 cy=%228%22 r=%227%22 fill=%22%23c8391f%22/%3E%3C/svg%3E">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..800;1,9..144,300..800&family=Manrope:wght@400..800&display=swap" rel="stylesheet">
<style>
:root{
  --flour:#f5eee2; --flour-2:#ece2d0; --flour-3:#e2d4bb; --paper:#fbf7f0;
  --crust:#2f1d12; --crust-2:#5e4331; --crust-3:#8a6a52;
  --line:rgba(47,29,18,.16); --line-2:rgba(47,29,18,.32);
  --tomato:#c8391f; --tomato-2:#a92d16; --tomato-soft:#f2c9bc;
  --wheat:#e3b866; --rye:#1f130b; --brick:#6e3b22;
  --water:#b8c8bc; --park:#cfd09f;
  --f-display:"Fraunces", "Iowan Old Style", Georgia, serif;
  --f-body:"Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease:cubic-bezier(.2,.75,.2,1); --ease-io:cubic-bezier(.65,0,.35,1);
  --r-s:10px; --r-m:18px; --r-l:28px;
  --gut:clamp(16px,4vw,56px);
  --sec:clamp(80px,10vw,152px);
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth;scroll-padding-top:84px}
body{margin:0;background:var(--flour);color:var(--crust);font:400 17px/1.6 var(--f-body);font-feature-settings:"tnum" 0;overflow-x:clip}
body::after{content:"";position:fixed;inset:0;pointer-events:none;z-index:200;background-image:var(--grain,none);opacity:.07}
img,svg{display:block;max-width:100%}
a{color:inherit}
button,input,select{font:inherit;color:inherit}
[hidden]{display:none!important}
.sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
:focus-visible{outline:2.5px solid var(--tomato);outline-offset:3px;border-radius:6px}
.wrap{max-width:1328px;margin-inline:auto;padding-inline:var(--gut)}
.skip{position:fixed;left:12px;top:-60px;z-index:300;background:var(--crust);color:var(--paper);padding:10px 16px;border-radius:99px;text-decoration:none;font-weight:700}
.skip:focus{top:12px}

/* type */
h1,h2,h3{font-family:var(--f-display);font-weight:500;letter-spacing:-.025em;margin:0;font-variation-settings:"opsz" 144}
h1{font-size:clamp(52px,7vw,108px);line-height:.94}
h2{font-size:clamp(36px,5vw,72px);line-height:.98}
h3{font-size:clamp(22px,2vw,28px);line-height:1.1;letter-spacing:-.015em;font-variation-settings:"opsz" 48}
em{font-style:italic;font-weight:400}
.it{font-style:italic;font-weight:380;color:var(--tomato-2)}
.eyebrow{font:700 13px/1.2 var(--f-body);letter-spacing:.14em;text-transform:uppercase;color:var(--crust-2);display:flex;align-items:center;gap:10px;margin:0 0 20px}
.eyebrow b{display:inline-grid;place-items:center;min-width:34px;height:26px;padding:0 8px;border:1.5px solid currentColor;border-radius:99px;font-weight:800;letter-spacing:.04em}
.lead{font-size:clamp(17px,1.35vw,20px);line-height:1.55;color:var(--crust-2);max-width:36em;margin:0}
.small{font-size:14px;line-height:1.5}
.num{font-variant-numeric:tabular-nums}

/* buttons */
.btn{--bg:var(--crust);--fg:var(--paper);display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:48px;padding:0 24px;border-radius:99px;border:1.5px solid var(--bg);background:var(--bg);color:var(--fg);font-weight:700;font-size:15px;text-decoration:none;cursor:pointer;transition:background .2s,color .2s,border-color .2s,transform .15s var(--ease);white-space:nowrap}
.btn:active{transform:scale(.97)}
.btn--tomato{--bg:var(--tomato);--fg:#fff}
.btn--ghost{background:transparent;color:var(--crust);border-color:var(--line-2)}
.btn[disabled]{opacity:.45;cursor:not-allowed}
@media (hover:hover) and (pointer:fine){
  .btn:hover{background:var(--fg);color:var(--bg)}
  .btn--tomato:hover{background:var(--tomato-2);color:#fff;border-color:var(--tomato-2)}
  .btn--ghost:hover{background:var(--crust);color:var(--paper);border-color:var(--crust)}
}
.chip{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 16px;border-radius:99px;border:1.5px solid var(--line-2);background:transparent;font-weight:700;font-size:14px;cursor:pointer;transition:background .2s,color .2s,border-color .2s}
.chip small{font-weight:600;opacity:.65;font-size:13px}
.chip[aria-pressed="true"]{background:var(--crust);color:var(--paper);border-color:var(--crust)}
@media (hover:hover) and (pointer:fine){.chip:not([aria-pressed="true"]):hover{border-color:var(--crust)}}
.dot{width:8px;height:8px;border-radius:50%;background:var(--tomato);display:inline-block;flex:none}
.dot--live{box-shadow:0 0 0 0 rgba(200,57,31,.5);animation:ping 1.8s infinite}
@keyframes ping{0%{box-shadow:0 0 0 0 rgba(200,57,31,.45)}80%,100%{box-shadow:0 0 0 9px rgba(200,57,31,0)}}

/* header */
.hdr{position:sticky;top:0;z-index:50;background:color-mix(in srgb,var(--flour) 86%,transparent);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-bottom:1px solid transparent;transition:border-color .3s}
.hdr.scrolled{border-bottom-color:var(--line)}
.hdr__in{display:flex;align-items:center;gap:24px;height:72px}
.logo{font:600 30px/1 var(--f-display);letter-spacing:-.04em;text-decoration:none;display:flex;align-items:baseline;gap:2px}
.logo i{width:9px;height:9px;border-radius:50%;background:var(--tomato);display:inline-block}
.nav{display:flex;gap:4px;margin-left:12px}
.nav a{padding:8px 12px;border-radius:99px;text-decoration:none;font-weight:600;font-size:15px}
@media (hover:hover) and (pointer:fine){.nav a:hover{background:var(--flour-2)}}
.ovenchip{margin-left:auto;display:flex;align-items:center;gap:10px;font-size:14px;font-weight:600;color:var(--crust-2);text-decoration:none;white-space:nowrap}
.ovenchip strong{color:var(--crust)}
.basketbtn{position:relative}
.basketbtn .count{display:inline-grid;place-items:center;min-width:24px;height:24px;padding:0 6px;border-radius:99px;background:var(--tomato);color:#fff;font-size:13px;font-weight:800}
.basketbtn.bump .count{animation:bump .5s var(--ease)}
@keyframes bump{30%{transform:scale(1.45)}}
.menubtn{display:none}
@media (max-width:1100px){.ovenchip{display:none}.nav{margin-left:auto}}
@media (max-width:860px){
  .nav{display:none;position:absolute;left:0;right:0;top:72px;flex-direction:column;gap:0;margin:0;padding:8px var(--gut) 20px;background:var(--flour);border-bottom:1px solid var(--line)}
  .nav.open{display:flex}
  .nav a{font:500 28px/1.2 var(--f-display);padding:12px 0;border-bottom:1px solid var(--line);border-radius:0}
  .menubtn{display:inline-flex;margin-left:auto}
  .hdr__in{gap:10px}
}
@media (max-width:400px){.basketbtn .lbl{display:none}.menubtn,.basketbtn{padding:0 16px}}

/* hero */
.hero{padding-block:clamp(28px,4vw,56px) clamp(56px,7vw,96px)}
.hero__grid{display:grid;grid-template-columns:minmax(0,1.04fr) minmax(0,.96fr);gap:clamp(32px,5vw,80px);align-items:center;min-height:calc(100svh - 72px - 80px)}
.hero h1 .ln{display:block;overflow:hidden;padding:0 .08em .12em;margin:0 -.08em -.12em}
.hero h1 .ln>span{display:block;transform:translateY(108%);transition:transform 1s var(--ease)}
.intro .hero h1 .ln>span{transform:none}
.intro .hero h1 .ln:nth-child(2)>span{transition-delay:.12s}
.hero .lead{margin-top:28px}
.hero__cta{display:flex;flex-wrap:wrap;gap:12px;margin-top:36px}
.facts{display:grid;grid-template-columns:repeat(3,auto);justify-content:start;gap:12px 36px;margin:48px 0 0;padding:24px 0 0;border-top:1px solid var(--line)}
.facts div{display:flex;flex-direction:column;gap:2px}
.facts dt{font-size:13px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--crust-2);order:2}
.facts dd{margin:0;font:500 clamp(26px,2.4vw,34px)/1 var(--f-display);letter-spacing:-.02em}
.fade{opacity:0;transform:translateY(14px);transition:opacity .8s var(--ease),transform .8s var(--ease)}
.intro .fade{opacity:1;transform:none}
.intro .fade.d1{transition-delay:.25s}.intro .fade.d2{transition-delay:.35s}.intro .fade.d3{transition-delay:.45s}

/* oven + dial */
.oven{position:relative;width:100%;max-width:600px;margin-inline:auto;aspect-ratio:864/1080;border-radius:var(--r-l);overflow:hidden;background:#1d130c;box-shadow:0 40px 80px -40px rgba(31,19,11,.6)}
.oven__in{position:absolute;inset:0;transform-origin:50% 28%}
.oven__in>img,.oven__in>canvas{position:absolute;inset:0;width:100%;height:100%;display:block}
@media (max-width:560px){.oven__in{transform:scale(1.24)}}
.oven .plate{object-fit:cover}
.oven .poster{object-fit:cover;transition:opacity .8s ease}
.oven.is3d .poster{opacity:0}
.oven .glowov{position:absolute;inset:0;z-index:1;pointer-events:none;background:radial-gradient(70% 55% at -8% 72%,rgba(255,120,50,.55),rgba(200,57,31,.18) 45%,transparent 70%);mix-blend-mode:screen;opacity:.2;transition:opacity 1.2s ease}
.oven__in::before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(120% 90% at 50% 45%,transparent 55%,rgba(20,12,6,.45));z-index:2}
.oven__in::after{content:"";position:absolute;inset:0;pointer-events:none;background:var(--grain,none);opacity:.35;z-index:2}
.oven .tag3d{position:absolute;right:14px;bottom:14px;z-index:4;font-size:12px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:rgba(251,247,240,.85);background:rgba(31,19,11,.55);padding:6px 10px;border-radius:99px;backdrop-filter:blur(6px)}
.dial{position:absolute;z-index:4;left:20.72%;width:58.56%;top:0;margin-top:2.53%;aspect-ratio:1;container-type:inline-size;touch-action:none;border-radius:50%}
.dial svg{width:100%;height:100%;overflow:visible;cursor:grab}
.dial.dragging svg{cursor:grabbing}
.dial:focus-visible{outline-offset:6px;border-radius:50%}
.dial__c{position:absolute;left:50%;top:50%;width:48%;transform:translate(-50%,-50%);text-align:center;pointer-events:none;display:flex;flex-direction:column;align-items:center;gap:1.4cqw}
.dial__mode{display:inline-flex;align-items:center;gap:6px;font-size:max(12px,3.3cqw);font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--crust-2)}
.dial__time{font:500 16cqw/1 var(--f-display);letter-spacing:-.04em;font-variant-numeric:tabular-nums;font-variation-settings:"opsz" 144}
.dial__now{font-size:max(12px,3.6cqw);line-height:1.35;font-weight:700;color:var(--crust)}
.dial__next{font-size:max(12px,3.4cqw);line-height:1.35;color:var(--crust-2);font-weight:600}
.dial__next b{color:var(--tomato-2)}
@container (max-width:320px){.dial__now{display:none}.dial__mode{letter-spacing:.04em}.dial__c{width:52%}}
.arc{fill:none;stroke-linecap:round;transition:stroke-width .25s var(--ease),opacity .25s}
.arc--proof{stroke:var(--wheat);opacity:.75}
.arc--oven{stroke:var(--tomato)}
.arc.hot{stroke-width:26}
.arcs.has-hot .arc:not(.hot){opacity:.28}
.tick{stroke:var(--crust)}
.numeral{font:600 22px var(--f-body);fill:var(--crust-2);text-anchor:middle;dominant-baseline:central}
.dial-draw .arc{stroke-dasharray:1 1;stroke-dashoffset:1;animation:draw 1s var(--ease) forwards}
@keyframes draw{to{stroke-dashoffset:0}}
.dial-draw .tick,.dial-draw .numeral{opacity:0;animation:tin .5s var(--ease) forwards}
@keyframes tin{to{opacity:1}}
.dialbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px 16px;margin-top:16px;font-size:14px;color:var(--crust-2);text-align:center;min-height:48px}
.dlegend{display:flex;justify-content:center;gap:18px;margin:4px 0 0;font-size:13px;font-weight:700;color:var(--crust-2)}.dlegend span{display:inline-flex;align-items:center;gap:6px}.dlegend i{width:18px;height:8px;border-radius:99px;display:inline-block}
.linkbtn{background:none;border:0;padding:8px 4px;font-weight:700;color:var(--tomato-2);text-decoration:underline;text-underline-offset:3px;cursor:pointer;font-size:14px}
.steam path{fill:none;stroke:var(--paper);stroke-width:3;stroke-linecap:round;opacity:0;animation:steam 3.6s ease-in-out infinite}
.steam path:nth-child(2){animation-delay:1.2s}.steam path:nth-child(3){animation-delay:2.4s}
@keyframes steam{0%{opacity:0;transform:translateY(10px)}35%{opacity:.55}100%{opacity:0;transform:translateY(-26px)}}
.paused .steam path,.paused .dot--live{animation-play-state:paused}
.glow{transition:opacity 1.2s ease}

@media (max-width:900px){
  .hero__grid{grid-template-columns:1fr;min-height:0}
  .oven{max-width:520px}
}
@media (max-width:560px){
  .facts{display:none}
  .hero .lead{margin-top:20px}.hero__cta{margin-top:24px}
  .facts dt{font-size:12px;letter-spacing:.04em}
  .hero__cta .btn{flex:1 1 auto}
}

/* sections */
section{scroll-margin-top:72px}
.sec{padding-block:var(--sec)}
.sechead{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr);gap:24px 64px;align-items:end;margin-bottom:clamp(36px,5vw,64px)}
.sechead .lead{justify-self:end}
@media (max-width:860px){.sechead{grid-template-columns:1fr}.sechead .lead{justify-self:start}}
[data-reveal]{opacity:0;transform:translateY(24px);transition:opacity .8s var(--ease),transform .8s var(--ease)}
[data-reveal].in{opacity:1;transform:none}

/* oven sheet */
.sheet{background:var(--paper);border-radius:var(--r-l);padding:clamp(8px,1.5vw,16px) clamp(16px,2.5vw,36px);box-shadow:0 1px 0 var(--line),0 30px 60px -40px rgba(47,29,18,.35);position:relative}
.sheet::before{content:"";position:absolute;left:0;right:0;top:-10px;height:12px;background:radial-gradient(circle at 10px 0,transparent 8px,var(--paper) 8.5px) 0 0/20px 12px repeat-x}
.sheet__row{display:grid;grid-template-columns:92px minmax(0,1fr) 150px 160px auto;gap:20px;align-items:center;padding:18px 0;border-bottom:1px dashed var(--line-2);transition:background .2s}
.sheet__row:last-child{border-bottom:0}
.sheet__row.hot{background:linear-gradient(90deg,transparent,rgba(227,184,102,.18) 12%,rgba(227,184,102,.18) 88%,transparent)}
.sheet__time{font:500 30px/1 var(--f-display);letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.sheet__time small{display:block;font:600 12px/1.4 var(--f-body);letter-spacing:.06em;text-transform:uppercase;color:var(--crust-2);margin-top:6px}
.sheet__name{display:flex;align-items:center;gap:16px;min-width:0}
.sheet__name svg{width:64px;height:52px;flex:none}
.sheet__name strong{display:block;font:500 21px/1.15 var(--f-display)}
.sheet__name span{font-size:14px;color:var(--crust-2)}
.status{display:inline-flex;align-items:center;gap:8px;padding:6px 12px;border-radius:99px;font-size:13px;font-weight:800;letter-spacing:.02em;background:var(--flour-2);color:var(--crust-2);white-space:nowrap}
.status::before{content:"";width:8px;height:8px;border-radius:50%;background:currentColor}
.status--proof{background:#f3e3c0;color:#7a5313}
.status--oven{background:var(--tomato);color:#fff}
.status--warm{background:var(--tomato-soft);color:var(--tomato-2)}
.status--shelf{background:var(--flour-2);color:var(--crust-2)}
.bar{height:6px;border-radius:99px;background:var(--flour-2);overflow:hidden}
.bar i{display:block;height:100%;width:0;background:var(--tomato);border-radius:inherit;transition:width .6s var(--ease)}
.sheet__act{display:flex;gap:8px;justify-content:flex-end}
.iconbtn{display:inline-grid;place-items:center;width:44px;height:44px;border-radius:50%;border:1.5px solid var(--line-2);background:transparent;cursor:pointer;transition:background .2s,border-color .2s}
@media (hover:hover) and (pointer:fine){.iconbtn:hover{border-color:var(--crust);background:var(--flour-2)}}
.iconbtn svg{width:20px;height:20px}
@media (max-width:980px){
  .sheet__row{grid-template-columns:72px minmax(0,1fr) auto;grid-template-areas:"t n a" "t s s";gap:10px 16px}
  .sheet__row>:nth-child(1){grid-area:t}.sheet__row>:nth-child(2){grid-area:n}.sheet__row>:nth-child(5){grid-area:a}
  .sheet__row>:nth-child(3){grid-area:s;display:flex;align-items:center;gap:12px}
  .sheet__row>:nth-child(4){display:none}
  .sheet__time{font-size:24px}
  .sheet__name svg{width:48px;height:40px}
}
@media (max-width:560px){
  .sheet__row{grid-template-columns:58px auto minmax(0,1fr);grid-template-areas:"t n n" "t s a";gap:10px 12px;padding:16px 0}
  .sheet__act{justify-content:flex-end}.sheet__act .iconbtn{display:none}
  .sheet__act .btn{padding:0 14px!important;font-size:14px}
  .sheet__name strong{font-size:19px}
}

/* shop */
.filters{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:32px}
@media (max-width:560px){.filters{flex-wrap:nowrap;overflow-x:auto;margin-inline:calc(var(--gut)*-1);padding:2px var(--gut) 8px;scrollbar-width:none;mask-image:linear-gradient(90deg,#000 85%,transparent)}.filters::-webkit-scrollbar{display:none}.chip{flex:none}}
.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(16px,2vw,28px)}
.card{background:var(--paper);border-radius:var(--r-l);overflow:hidden;display:flex;flex-direction:column;box-shadow:0 1px 0 var(--line);will-change:transform}
.card--feat{grid-column:span 2;flex-direction:row}
.card__art{position:relative;aspect-ratio:4/3;background:var(--flour-2);display:grid;place-items:center;overflow:hidden}
.card--feat .card__art{aspect-ratio:auto;flex:1.2;min-height:100%}
.card__art::before{content:"";position:absolute;width:74%;aspect-ratio:1;border-radius:50%;background:radial-gradient(circle,var(--wheat) 0 1.4px,transparent 1.8px) 0 0/9px 9px;opacity:.55}
.card__art .photo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform .9s var(--ease);filter:saturate(.92) contrast(1.03)}
.card__art:has(.photo)::before{display:none}
.card__art:has(.photo)::after{content:"";position:absolute;inset:0;background:var(--grain,none);opacity:.5;pointer-events:none}
@media (hover:hover) and (pointer:fine){.card:hover .card__art .photo{transform:scale(1.045)}}
.card__art svg{position:relative;width:70%;height:auto;filter:drop-shadow(5px 6px 0 rgba(200,57,31,.22));transition:transform .6s var(--ease)}
.card--feat .card__art svg{width:62%}
@media (hover:hover) and (pointer:fine){.card:hover .card__art svg{transform:translateY(-8px) rotate(-2deg)}}
.card__tag{position:absolute;left:16px;top:16px;font-size:12px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;background:var(--paper);padding:6px 10px;border-radius:99px}
.card__body{padding:22px 24px 24px;display:flex;flex-direction:column;gap:10px;flex:1}
.card--feat .card__body{flex:1;padding:clamp(24px,3vw,44px);justify-content:center}
.card--feat h3{font-size:clamp(30px,3.2vw,46px)}
.card__meta{font-size:12px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--crust-2)}
.card__desc{margin:0;color:var(--crust-2);font-size:15px;line-height:1.5}
.card__foot{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:auto;padding-top:14px;flex-wrap:wrap}
.price{font:500 24px/1 var(--f-display);letter-spacing:-.02em}
.price small{font:600 13px var(--f-body);color:var(--crust-2);margin-left:4px;letter-spacing:0}
.ovenline{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:700;color:var(--crust-2)}
.ovenline .dot{background:var(--crust-3)}
.ovenline.is-oven .dot,.ovenline.is-warm .dot{background:var(--tomato)}
.ovenline.is-oven,.ovenline.is-warm{color:var(--tomato-2)}
.stepper{display:inline-flex;align-items:center;border:1.5px solid var(--crust);border-radius:99px;height:48px}
.stepper button{width:44px;height:44px;border:0;background:none;border-radius:50%;cursor:pointer;font-size:20px;font-weight:700;display:grid;place-items:center}
.stepper button[disabled]{opacity:.3;cursor:not-allowed}
.stepper output{min-width:28px;text-align:center;font-weight:800;font-variant-numeric:tabular-nums}
@media (hover:hover) and (pointer:fine){.stepper button:not([disabled]):hover{background:var(--flour-2)}}
.voucher{position:relative;width:72%;aspect-ratio:1.6;background:var(--tomato);color:#fff;border-radius:14px;padding:7% 8%;display:flex;flex-direction:column;justify-content:space-between;transform:rotate(-4deg);box-shadow:6px 7px 0 rgba(47,29,18,.18);transition:transform .6s var(--ease)}
.voucher::before,.voucher::after{content:"";position:absolute;top:50%;width:22px;height:22px;border-radius:50%;background:var(--flour-2);transform:translateY(-50%)}
.voucher::before{left:-11px}.voucher::after{right:-11px}
.voucher b{font:500 clamp(22px,2.4vw,32px)/1 var(--f-display);letter-spacing:-.03em}
.voucher span{font-size:13px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}
@media (hover:hover) and (pointer:fine){.card:hover .voucher{transform:rotate(1deg) translateY(-6px)}}
.shopnote{margin-top:28px;font-size:14px;color:var(--crust-2)}
@media (max-width:980px){.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.card--feat{grid-column:span 2}}
@media (max-width:620px){.grid{grid-template-columns:1fr}.card--feat{grid-column:auto;flex-direction:column}.card--feat .card__art{aspect-ratio:4/3;flex:none}}

/* basket dialog */
dialog.sheetdlg{margin:0 0 0 auto;height:100dvh;max-height:100dvh;width:min(460px,100vw);max-width:100vw;border:0;padding:0;background:var(--paper);color:var(--crust);box-shadow:-30px 0 60px -30px rgba(47,29,18,.4)}
dialog.sheetdlg[open]{animation:slidein .45s var(--ease)}
dialog.sheetdlg::backdrop{background:rgba(31,19,11,.42);backdrop-filter:blur(2px)}
@keyframes slidein{from{transform:translateX(40px);opacity:0}}
.dlg{display:flex;flex-direction:column;height:100%}
.dlg__head{display:flex;align-items:center;justify-content:space-between;padding:20px 24px;border-bottom:1px solid var(--line)}
.dlg__head h2{font-size:32px}
.dlg__body{flex:1;overflow:auto;padding:8px 24px 24px}
.line{display:grid;grid-template-columns:56px minmax(0,1fr) auto;gap:14px;align-items:center;padding:16px 0;border-bottom:1px solid var(--line)}
.line svg{width:56px;height:46px}
.line strong{display:block;font:500 18px/1.2 var(--f-display)}
.line span{font-size:13px;color:var(--crust-2)}
.line .stepper{height:40px}.line .stepper button{width:36px;height:36px;font-size:18px}
.empty{padding:48px 0;text-align:center;color:var(--crust-2)}
.empty svg{width:120px;margin:0 auto 16px;opacity:.8}
.dlg__foot{padding:20px 24px 24px;border-top:1px solid var(--line);background:var(--flour)}
.total{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:16px}
.total b{font:500 30px/1 var(--f-display)}
.field{display:flex;flex-direction:column;gap:6px;margin-bottom:12px}
.field label{font-size:13px;font-weight:800;letter-spacing:.04em}
.field input,.field select{height:48px;padding:0 14px;border-radius:12px;border:1.5px solid var(--line-2);background:var(--paper)}
.field input:focus-visible,.field select:focus-visible{outline:2.5px solid var(--tomato);outline-offset:1px}
.field [aria-invalid="true"]{border-color:var(--tomato)}
.err{font-size:13px;font-weight:700;color:var(--tomato-2);min-height:0}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.success{padding:40px 0;text-align:center}
.success h3{font-size:34px;margin:12px 0}

/* bread box */
.box{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(24px,4vw,64px);align-items:start}
.panel{background:var(--paper);border-radius:var(--r-l);padding:clamp(20px,3vw,40px);box-shadow:0 1px 0 var(--line)}
.panel h3{margin-bottom:6px}
.boxitems{list-style:none;margin:16px 0 8px;padding:0}
.boxitems li{display:grid;grid-template-columns:56px minmax(0,1fr) auto;gap:14px;align-items:center;padding:12px 0;border-bottom:1px solid var(--line)}
.boxitems svg{width:56px;height:46px}
.boxitems strong{display:block;font:500 19px/1.2 var(--f-display)}
.boxitems span{font-size:13px;color:var(--crust-2)}
.boxitems .stepper{height:40px}.boxitems .stepper button{width:36px;height:36px;font-size:18px}
fieldset{border:0;margin:24px 0 0;padding:0;min-width:0}
legend{font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--crust-2);margin-bottom:10px;padding:0}
.seg{display:flex;flex-wrap:wrap;gap:8px}
.seg label{position:relative}
.seg input{position:absolute;opacity:0;inset:0;margin:0;cursor:pointer}
.seg span{display:inline-flex;flex-direction:column;justify-content:center;min-height:48px;padding:6px 18px;border:1.5px solid var(--line-2);border-radius:16px;font-weight:700;font-size:15px;line-height:1.2;transition:background .2s,color .2s,border-color .2s}
.seg span small{font-weight:600;font-size:12px;opacity:.75}
.seg input:checked+span{background:var(--crust);color:var(--paper);border-color:var(--crust)}
.seg input:focus-visible+span{outline:2.5px solid var(--tomato);outline-offset:3px}
.crate{position:relative;background:#b98450;border-radius:20px;padding:22px;box-shadow:inset 0 -10px 0 rgba(47,29,18,.18),0 30px 50px -30px rgba(47,29,18,.5);background-image:repeating-linear-gradient(0deg,rgba(47,29,18,.0) 0 22px,rgba(47,29,18,.14) 22px 24px),linear-gradient(#c38f5b,#a87443)}
.crate::before{content:"HALM · GENT";position:absolute;left:50%;bottom:-13px;transform:translateX(-50%);background:var(--crust);color:var(--wheat);font:800 12px/1 var(--f-body);letter-spacing:.24em;padding:8px 14px;border-radius:99px;white-space:nowrap}
.slots{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.slot{aspect-ratio:1;border-radius:14px;background:rgba(251,247,240,.88);display:grid;place-items:center;border:2px dashed rgba(47,29,18,.22)}
.slot.full{border-style:solid;border-color:transparent;background:var(--paper)}
.slot svg{width:84%;animation:pop .5s var(--ease)}
@keyframes pop{0%{transform:scale(.4) translateY(-20px);opacity:0}70%{transform:scale(1.06)}}
.receipt{margin-top:40px;font-variant-numeric:tabular-nums}
.receipt dl{margin:0}
.receipt .r{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px dashed var(--line-2);font-size:15px}
.receipt .r dt{color:var(--crust-2)}
.receipt .r dd{margin:0;font-weight:700}
.receipt .big{display:flex;justify-content:space-between;align-items:baseline;padding:18px 0 6px}
.receipt .big b{font:500 clamp(40px,4vw,56px)/1 var(--f-display);letter-spacing:-.03em}
.receipt .month{font-size:14px;color:var(--crust-2);text-align:right}
.boxmsg{font-size:14px;font-weight:700;color:var(--tomato-2);min-height:22px;margin:12px 0}
.boxdone{background:var(--crust);color:var(--paper);border-radius:var(--r-m);padding:20px 24px;margin-top:16px}
.boxdone strong{font:500 24px var(--f-display)}
@media (max-width:860px){.box{grid-template-columns:1fr}}
@media (max-width:420px){.slots{gap:8px}.crate{padding:14px}}

/* classes */
.cal{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,.75fr);gap:clamp(20px,3vw,48px);align-items:start}
.cal__head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}
.cal__head h3{font-size:clamp(26px,2.4vw,34px)}
.cal__nav{display:flex;gap:8px}
.wk{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.wk>div.h{font-size:12px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--crust-2);padding:4px 8px}
.day{min-height:96px;border-radius:14px;padding:8px;background:transparent;border:1.5px solid transparent;text-align:left;display:flex;flex-direction:column;gap:4px;font-weight:700;font-size:15px;color:var(--crust-3);min-width:0}
button.day{background:var(--paper);color:var(--crust);border-color:var(--line);cursor:pointer;transition:border-color .2s,background .2s,opacity .2s}
button.day[aria-pressed="true"]{border-color:var(--crust);background:var(--crust);color:var(--paper)}
button.day.dim{opacity:.35}
@media (hover:hover) and (pointer:fine){button.day:not([aria-pressed="true"]):hover{border-color:var(--crust)}}
.day .bars{display:flex;flex-direction:column;gap:3px;margin-top:auto}
.day .b{font-size:12px;font-weight:800;line-height:1;padding:4px 5px;border-radius:5px;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.day .b.full{background-image:repeating-linear-gradient(135deg,rgba(255,255,255,.25) 0 3px,transparent 3px 7px)}
.t-sd{background:#8e4a20}.t-cr{background:#c98a2c}.t-rye{background:#4a2a17}.t-kid{background:#5f6f34}.t-ks{background:var(--tomato)}
.legend{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:20px}
.legend .chip i{width:10px;height:10px;border-radius:3px;display:inline-block}
.sess{background:var(--paper);border-radius:var(--r-m);padding:20px;margin-bottom:12px;box-shadow:0 1px 0 var(--line);border-left:6px solid var(--c,#8e4a20)}
.sess h4{font:500 22px/1.15 var(--f-display);margin:0 0 4px}
.sess p{margin:0;font-size:14px;color:var(--crust-2)}
.seats{display:flex;flex-wrap:wrap;gap:5px;margin:14px 0 8px}
.seats i{width:16px;height:16px;border-radius:50%;border:1.5px solid var(--crust)}
.seats i.t{background:var(--crust)}
.seats i.mine{background:var(--tomato);border-color:var(--tomato)}
.sess__row{display:flex;flex-wrap:wrap;align-items:center;gap:12px;justify-content:space-between;margin-top:10px}
.sess__ok{font-size:14px;font-weight:700;color:#3f5a1c;margin-top:10px}
.detail h3{margin-bottom:16px}
.schoolfig{margin:0 0 24px;position:relative;border-radius:var(--r-m);overflow:hidden;aspect-ratio:16/10}
.schoolfig img{width:100%;height:100%;object-fit:cover;object-position:50% 70%;filter:saturate(.9)}
.schoolfig::after{content:"";position:absolute;inset:0;background:var(--grain,none);opacity:.5}
.schoolfig figcaption{position:absolute;left:12px;bottom:12px;z-index:1;background:rgba(31,19,11,.6);color:var(--paper);font-size:12px;font-weight:800;letter-spacing:.06em;padding:6px 10px;border-radius:99px;backdrop-filter:blur(6px)}
@media (max-width:980px){.cal{grid-template-columns:1fr}}
@media (max-width:620px){
  .day{min-height:58px;padding:6px 4px;font-size:14px;align-items:center}
  .day .bars{flex-direction:row;gap:3px;justify-content:center}
  .day .b{width:8px;height:8px;padding:0;border-radius:50%;font-size:0}
  .wk{gap:4px}.wk>div.h{padding:4px 0;text-align:center;font-size:12px;letter-spacing:.02em}
}

/* visit */
.visit{background:var(--crust);color:var(--paper)}
.visit .eyebrow,.visit .lead{color:rgba(251,247,240,.78)}
.visit .it{color:var(--wheat)}
.mapgrid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,.55fr);gap:clamp(20px,3vw,40px);align-items:start}
.map{width:100%;position:relative;border-radius:var(--r-l);overflow:hidden;background:#ece2cf;aspect-ratio:1200/720;color:var(--crust)}
.map svg{width:100%;height:100%}
.pin{cursor:pointer;outline:none}
.pin .halo{fill:var(--tomato);opacity:0}
.pin:focus-visible .ring,.pin.on .ring{stroke:var(--crust);stroke-width:4}
.pin.on .halo{opacity:.18}
.pin .pulse{fill:none;stroke:var(--tomato);stroke-width:3;transform-box:fill-box;transform-origin:center;animation:pulse 2s ease-out infinite}
@keyframes pulse{from{transform:scale(1);opacity:.9}to{transform:scale(2.3);opacity:0}}
.paused .pin .pulse{animation-play-state:paused}
.route{fill:none;stroke:var(--tomato);stroke-width:5;stroke-linecap:round;stroke-dasharray:2 12;opacity:0;transition:opacity .3s}
.route.on{opacity:1;animation:march 1s linear infinite}
@keyframes march{to{stroke-dashoffset:-28}}
.tip{position:absolute;z-index:3;width:240px;background:var(--paper);color:var(--crust);border-radius:14px;padding:14px 16px;box-shadow:0 20px 40px -16px rgba(31,19,11,.5);pointer-events:none;transform:translate(-50%,calc(-100% - 18px));transition:opacity .2s;font-size:14px;line-height:1.45}
.tip strong{display:block;font:500 19px/1.2 var(--f-display);margin-bottom:2px}
.tip::after{content:"";position:absolute;left:50%;bottom:-7px;width:14px;height:14px;background:inherit;transform:translateX(-50%) rotate(45deg);border-radius:2px}
.places{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.places button{width:100%;display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:12px;align-items:center;text-align:left;padding:12px 14px;border-radius:14px;border:1.5px solid rgba(251,247,240,.16);background:transparent;color:var(--paper);cursor:pointer;transition:background .2s,border-color .2s}
.places button.on,.places button:focus-visible{background:rgba(251,247,240,.1);border-color:rgba(251,247,240,.5)}
.places .ic{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:var(--paper);color:var(--crust);font-weight:800;font-size:14px}
.places .ic.tom{background:var(--tomato);color:#fff}
.places strong{display:block;font-weight:700;font-size:15px}
.places span{font-size:13px;color:rgba(251,247,240,.72)}
.places em{font-style:normal;font-size:13px;font-weight:800;color:var(--wheat);white-space:nowrap}
@media (hover:hover) and (pointer:fine){.places button:hover{background:rgba(251,247,240,.08)}}
.hours{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr);gap:clamp(16px,3vw,40px);margin-top:clamp(32px,4vw,56px);padding-top:32px;border-top:1px solid rgba(251,247,240,.18)}
.hours h3{font-size:24px;margin-bottom:12px}
.hours table{width:100%;border-collapse:collapse;font-size:15px;font-variant-numeric:tabular-nums}
.hours td{padding:7px 0;border-bottom:1px solid rgba(251,247,240,.12)}
.hours td:last-child{text-align:right}
.hours tr.today td{color:var(--wheat);font-weight:800}
.openstate{display:inline-flex;align-items:center;gap:10px;font:500 clamp(30px,3vw,42px)/1.05 var(--f-display);letter-spacing:-.02em;margin:0 0 10px}
.visit .btn--ghost{color:var(--paper);border-color:rgba(251,247,240,.4)}
@media (hover:hover) and (pointer:fine){.visit .btn--ghost:hover{background:var(--paper);color:var(--crust);border-color:var(--paper)}}
@media (max-width:980px){.mapgrid{grid-template-columns:1fr}.hours{grid-template-columns:1fr 1fr}.hours>div:first-child{grid-column:1/-1}}
@media (max-width:620px){.map{aspect-ratio:1}.hours{grid-template-columns:1fr}.tip{display:none}}

/* footer */
.ftr{background:var(--rye);color:var(--paper);padding:clamp(64px,8vw,112px) 0 32px;overflow:hidden}
.ftr__top{display:grid;grid-template-columns:minmax(0,1.2fr) repeat(3,minmax(0,.6fr));gap:32px}
.ftr h2{font-size:clamp(30px,3.4vw,48px);margin-bottom:16px}
.ftr h4{font-size:13px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:rgba(251,247,240,.62);margin:0 0 12px}
.ftr ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;font-size:15px}
.ftr a{text-decoration:none;color:rgba(251,247,240,.9)}
.ftr a:hover{text-decoration:underline;text-underline-offset:3px}
.news{display:flex;gap:8px;margin-top:8px;max-width:460px}
.news input{flex:1;min-width:0;height:52px;border-radius:99px;border:1.5px solid rgba(251,247,240,.3);background:transparent;color:var(--paper);padding:0 20px}
.news input::placeholder{color:rgba(251,247,240,.55)}
.news input[aria-invalid="true"]{border-color:#ff8a70}
.news .btn{min-height:52px}
.newsmsg{min-height:22px;font-size:14px;font-weight:700;margin-top:10px;color:var(--wheat)}
.newsmsg.bad{color:#ff9b84}
.mark{font:500 clamp(140px,30vw,440px)/.8 var(--f-display);letter-spacing:-.07em;color:var(--brick);margin:clamp(48px,6vw,80px) 0 0;display:flex;align-items:flex-end;user-select:none;font-variation-settings:"opsz" 144}
.mark span{display:inline-block;transform:translateY(30%);opacity:0;transition:transform 1s var(--ease),opacity 1s var(--ease)}
.mark.in span{transform:none;opacity:1}
.mark i{width:.14em;height:.14em;border-radius:50%;background:var(--tomato);display:inline-block;margin:0 0 .08em .04em;flex:none}
.ftr__bot{display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;font-size:13px;color:rgba(251,247,240,.62);border-top:1px solid rgba(251,247,240,.14);padding-top:20px;margin-top:24px}
@media (max-width:860px){.ftr__top{grid-template-columns:1fr 1fr}.ftr__top>div:first-child{grid-column:1/-1}}

/* toast */
.toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,20px);background:var(--crust);color:var(--paper);padding:12px 20px;border-radius:99px;font-weight:700;font-size:14px;opacity:0;pointer-events:none;transition:opacity .3s,transform .3s var(--ease);z-index:120;max-width:calc(100vw - 32px);text-align:center}
.toast.on{opacity:1;transform:translate(-50%,0)}

/* preloader: oven doors */
html.lock{overflow:hidden}
.pre{position:fixed;inset:0;z-index:400;perspective:1600px;pointer-events:auto;animation:preSafety .01s 6s forwards}
@keyframes preSafety{to{visibility:hidden}}
.pre.gone{display:none}
.pre.go,.pre.fade{pointer-events:none}
.door{position:absolute;top:0;bottom:0;width:50.2%;background:
  repeating-linear-gradient(0deg,transparent 0 46px,rgba(0,0,0,.22) 46px 49px),
  linear-gradient(180deg,#7a4226,#5a2f1a);transition:transform 1s cubic-bezier(.7,0,.2,1),filter 1s;box-shadow:inset 0 0 120px rgba(0,0,0,.45)}
.door::before{content:"";position:absolute;inset:0;background:repeating-linear-gradient(90deg,transparent 0 94px,rgba(0,0,0,.2) 94px 97px);-webkit-mask:repeating-linear-gradient(0deg,#000 0 49px,transparent 49px 98px);mask:repeating-linear-gradient(0deg,#000 0 49px,transparent 49px 98px)}
.door::after{content:"";position:absolute;top:76%;width:14px;height:120px;margin-top:-60px;border-radius:8px;background:linear-gradient(90deg,#3a2013,#b98450 40%,#3a2013);box-shadow:0 6px 16px rgba(0,0,0,.4)}
.door.l{left:0;transform-origin:0 50%}.door.l::after{right:28px}
.door.r{right:0;transform-origin:100% 50%}.door.r::after{left:28px}
.pre.go .door.l{transform:rotateY(-104deg);filter:brightness(.55)}
.pre.go .door.r{transform:rotateY(104deg);filter:brightness(.55)}
.pre__c{position:absolute;inset:0;display:grid;place-items:center;align-content:center;gap:18px;color:var(--paper);text-align:center;transition:opacity .35s;z-index:2}
.pre.go .pre__c,.pre.fade .pre__c{opacity:0}
.pre__win{width:min(280px,62vw);aspect-ratio:1.5;border-radius:140px 140px 18px 18px;background:radial-gradient(ellipse at 50% 100%,#ff9a4a 0%,#c8391f 40%,#2a120a 78%);border:10px solid #3a2013;display:grid;place-items:end center;overflow:hidden;box-shadow:0 0 0 2px rgba(255,255,255,.08),0 30px 60px rgba(0,0,0,.4)}
.pre__win svg{width:62%;transform-origin:50% 100%;transform:scaleY(.55) scaleX(.9);margin-bottom:6%}
.pre__n{font:500 clamp(56px,9vw,120px)/1 var(--f-display);letter-spacing:-.04em;font-variant-numeric:tabular-nums}
.pre__n small{font:700 14px var(--f-body);letter-spacing:.14em;text-transform:uppercase;margin-left:8px;opacity:.8}
.pre__l{font:700 13px var(--f-body);letter-spacing:.2em;text-transform:uppercase;opacity:.8}
.pre.fade{transition:opacity .3s;opacity:0}
/* ticker */
.tk{background:var(--crust);color:var(--paper);overflow:hidden;height:60px;display:flex;align-items:center;position:relative}
.tk__track{display:flex;white-space:nowrap;will-change:transform}
.tk__track span{font:500 22px/1 var(--f-display);letter-spacing:-.01em;padding-right:0}
.tk__track b{color:var(--wheat);font-weight:500;font-style:italic}
.tk__track i{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--tomato);margin:0 22px;vertical-align:middle}
@media (max-width:560px){.tk{height:50px}.tk__track span{font-size:18px}}
/* embers + tilt */
/* map controls */
.mapctl{position:absolute;right:12px;bottom:12px;display:flex;flex-direction:column;gap:6px;z-index:2}
.mapctl button{width:44px;height:44px;border-radius:12px;border:0;background:var(--paper);color:var(--crust);font:800 20px var(--f-body);cursor:pointer;box-shadow:0 6px 16px -6px rgba(31,19,11,.45)}
.mapctl button:hover{background:#fff}
.maphint{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:rgba(31,19,11,.85);color:var(--paper);padding:10px 16px;border-radius:99px;font-size:14px;font-weight:700;opacity:0;transition:opacity .25s;pointer-events:none;z-index:3;white-space:nowrap}
.maphint.on{opacity:1}
#mapSvg{cursor:grab;touch-action:pan-y}
#mapSvg.drag{cursor:grabbing}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;transition-delay:0s!important}
  .pin .pulse{display:none}
  .door{transition:none!important}
  .hero h1 .ln>span,.fade,[data-reveal],.mark span{transform:none!important;opacity:1!important}
}
</style>
</head>
<body>
<div class="pre" id="pre" aria-hidden="true"><div class="door l"></div><div class="door r"></div>
  <div class="pre__c"><div class="pre__win" id="preWin"><svg viewBox="0 0 200 160" aria-hidden="true"><use href="#b-boule"/></svg></div>
  <p class="pre__n"><span id="preN">00</span><small>hours proofing</small></p><p class="pre__l" id="preL">Halm · Ghent · oven at 250°</p></div></div>
<a class="skip" href="#main">Skip to content</a>
<svg width="0" height="0" style="position:absolute" aria-hidden="true" focusable="false"><defs id="sprite"></defs></svg>

<header class="hdr" id="hdr">
  <div class="wrap hdr__in">
    <a class="logo" href="#top" aria-label="Halm, home">Halm<i></i></a>
    <nav class="nav" id="nav" aria-label="Main">
      <a href="#today">Today's bake</a><a href="#shop">Shop</a><a href="#box">Bread box</a><a href="#classes">Bake school</a><a href="#visit">Visit</a>
    </nav>
    <a class="ovenchip" href="#today"><span class="dot dot--live" aria-hidden="true"></span><span id="hdrChip">Checking the oven…</span></a>
    <button class="btn btn--ghost menubtn" id="menuBtn" aria-expanded="false" aria-controls="nav">Menu</button>
    <button class="btn basketbtn" id="basketBtn" aria-haspopup="dialog"><span class="lbl">Basket</span><span class="count" id="basketCount" aria-label="0 items">0</span></button>
  </div>
</header>

<main id="main">
<section class="hero" id="top" aria-labelledby="h1">
  <div class="wrap hero__grid">
    <div>
      <p class="eyebrow fade">Bakkerij &amp; bakschool · Ghent</p>
      <h1 id="h1"><span class="ln"><span>Come when</span></span><span class="ln"><span>it’s <em class="it">still warm.</em></span></span></h1>
      <p class="lead fade d1">Halm bakes eleven batches a day in a brick deck oven off the Graanlei. The oven clock shows what is proofing, what is in, and what just came out, so you can time your walk.</p>
      <div class="hero__cta fade d2">
        <a class="btn btn--tomato" href="#shop">Shop today's bake</a>
        <a class="btn btn--ghost" href="#classes">Book a class</a>
      </div>
      <dl class="facts fade d3">
        <div><dt>Batches today</dt><dd class="num">11</dd></div>
        <div><dt>Hour ferment</dt><dd class="num">48</dd></div>
        <div><dt>Km to our mill</dt><dd class="num">12</dd></div>
      </dl>
    </div>
    <div class="fade d1" id="heroOven">
      <div class="oven">
        <div class="oven__in">
        <img class="plate" src="assets/plate.webp" alt="" width="864" height="1080" decoding="async" fetchpriority="high">
        <img class="poster" src="assets/plate-loaf.webp" alt="A crusty sourdough boule on a linen cloth on the oak bench, under the oven clock on the brick wall" width="864" height="1080" decoding="async">
        <canvas id="loaf3d" aria-hidden="true"></canvas>
        <div class="glowov" id="glow" aria-hidden="true"></div>
        
        <div class="dial" id="dial" role="slider" tabindex="0" aria-label="Oven clock: drag or use arrow keys to see the bake at another time" aria-valuemin="240" aria-valuemax="960" aria-valuenow="522" aria-valuetext="">
          <svg viewBox="0 0 600 600" id="dialSvg" aria-hidden="true" focusable="false"></svg>
          <div class="dial__c" aria-hidden="true">
            <span class="dial__mode" id="dialMode"><span class="dot dot--live"></span>Live in Ghent</span>
            <span class="dial__time" id="dialTime">08:42</span>
            <span class="dial__now" id="dialNow"></span>
            <span class="dial__next" id="dialNext"></span>
          </div>
        </div>
        </div>
        <span class="tag3d" aria-hidden="true">Live 3D · turns with your cursor</span>
      </div>
      <div class="dialbar" id="dialBar" aria-live="polite"></div>
      <p class="dlegend" aria-hidden="true"><span><i style="background:var(--wheat)"></i>Proofing</span><span><i style="background:var(--tomato)"></i>In the oven</span><span><i style="background:var(--wheat);opacity:.6;height:4px"></i>Shop open</span></p>
    </div>
  </div>
</section>

<div class="tk" id="ticker" aria-label="Live from the oven"><div class="tk__track" id="tkTrack" aria-hidden="true"></div><p class="sr" id="tkSr" aria-live="off"></p></div>

<section class="sec" id="today" aria-labelledby="todayH" style="padding-top:clamp(40px,5vw,72px)">
  <div class="wrap">
    <div class="sechead" data-reveal>
      <div><p class="eyebrow"><b>01</b>Today's bake</p><h2 id="todayH">The oven sheet, <em class="it">live.</em></h2></div>
      <p class="lead">Every tray we plan to bake today. Statuses follow the oven clock: proofing, in the oven, still warm, on the shelf. Put one aside and we'll keep it for you.</p>
    </div>
    <div class="sheet" data-reveal id="sheet" role="list" aria-label="Today's bake schedule"></div>
  </div>
</section>

<section class="sec" id="shop" aria-labelledby="shopH" style="padding-top:0">
  <div class="wrap">
    <div class="sechead" data-reveal>
      <div><p class="eyebrow"><b>02</b>Shop</p><h2 id="shopH">Off the shelf, <em class="it">into your bag.</em></h2></div>
      <p class="lead">Order before 21:00 and collect tomorrow, or pick a slot today. You pay at the counter.</p>
    </div>
    <div class="filters" role="group" aria-label="Filter breads" id="filters" data-reveal></div>
    <div class="grid" id="grid" aria-live="polite"></div>
    <p class="shopnote" id="shopNote"></p>
  </div>
</section>

<section class="sec" id="box" aria-labelledby="boxH" style="background:var(--flour-2)">
  <div class="wrap">
    <div class="sechead" data-reveal>
      <div><p class="eyebrow"><b>03</b>The bread box</p><h2 id="boxH">Build your <em class="it">weekly box.</em></h2></div>
      <p class="lead">Two to eight items, picked up or brought by cargo bike inside the ring. Subscribers save up to 12%. Skip or pause from your email, any week.</p>
    </div>
    <form class="box" id="boxForm" novalidate>
      <div class="panel" data-reveal>
        <h3>What goes in</h3>
        <p class="small" style="margin:0;color:var(--crust-2)"><span id="boxCount">0</span> of 8 slots filled</p>
        <ul class="boxitems" id="boxItems"></ul>
        <fieldset><legend>How often</legend>
          <div class="seg">
            <label><input type="radio" name="freq" value="weekly" checked><span>Every week<small>save 12%</small></span></label>
            <label><input type="radio" name="freq" value="fortnight"><span>Every 2 weeks<small>save 6%</small></span></label>
          </div>
        </fieldset>
        <fieldset><legend>Bake day</legend>
          <div class="seg">
            <label><input type="radio" name="day" value="2"><span>Tuesday</span></label>
            <label><input type="radio" name="day" value="5" checked><span>Friday</span></label>
            <label><input type="radio" name="day" value="6"><span>Saturday</span></label>
          </div>
        </fieldset>
        <fieldset><legend>Getting it</legend>
          <div class="seg">
            <label><input type="radio" name="get" value="pickup" checked><span>Pick up<small>free · from 07:00</small></span></label>
            <label><input type="radio" name="get" value="bike"><span>Cargo bike<small>+ € 3,50 · by 10:00</small></span></label>
          </div>
        </fieldset>
      </div>
      <div data-reveal>
        <div class="crate" aria-hidden="true"><div class="slots" id="slots"></div></div>
        <div class="receipt panel" aria-live="polite">
          <dl id="receipt"></dl>
          <div class="big"><span class="small" style="font-weight:800;letter-spacing:.08em;text-transform:uppercase">Per box</span><b id="perBox">€ 0,00</b></div>
          <p class="month" id="perMonth">Add at least two items to see your price.</p>
          <p class="boxmsg" id="boxMsg" role="status"></p>
          <button class="btn btn--tomato" type="submit" style="width:100%" id="boxSubmit">Start my bread box</button>
          <div id="boxDone"></div>
        </div>
      </div>
    </form>
  </div>
</section>

<section class="sec" id="classes" aria-labelledby="classH">
  <div class="wrap">
    <div class="sechead" data-reveal>
      <div><p class="eyebrow"><b>04</b>Bake school</p><h2 id="classH">Learn it at <em class="it">our bench.</em></h2></div>
      <p class="lead">Small groups at the big oak table behind the shop. Aprons, flour and a jar of our starter included. You leave with what you baked.</p>
    </div>
    <div class="legend" id="legend" role="group" aria-label="Filter classes" data-reveal></div>
    <div class="cal" data-reveal>
      <div>
        <div class="cal__head">
          <h3 id="calTitle" aria-live="polite">December 2026</h3>
          <div class="cal__nav">
            <button class="iconbtn" id="calPrev" aria-label="Previous month"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"><path d="M15 5l-7 7 7 7"/></svg></button>
            <button class="iconbtn" id="calNext" aria-label="Next month"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"><path d="M9 5l7 7-7 7"/></svg></button>
          </div>
        </div>
        <div class="wk" id="calGrid"></div>
      </div>
      <div><figure class="schoolfig"><img src="assets/school.webp" alt="Two proofing baskets, a dough scraper and dough on a floured oak bench in the bake school" loading="lazy" decoding="async" width="900" height="1078"><figcaption>The big oak bench, Saturday 08:55</figcaption></figure><div class="detail" id="calDetail" aria-live="polite"></div></div>
    </div>
  </div>
</section>

<section class="sec visit" id="visit" aria-labelledby="visitH">
  <div class="wrap">
    <div class="sechead" data-reveal>
      <div><p class="eyebrow"><b>05</b>Visit</p><h2 id="visitH">Find us <em class="it">by the water.</em></h2></div>
      <p class="lead">Four minutes from the tram, two bridges from the Saturday market. Hover the map or pick a way in.</p>
    </div>
    <div class="mapgrid" data-reveal>
      <div class="map" id="map">
        <svg id="mapSvg" viewBox="0 0 1200 720" role="img" aria-labelledby="mapT"><title id="mapT">Illustrated map of the streets around Halm bakery in Ghent</title></svg>
        <div class="tip" id="tip" style="opacity:0" aria-hidden="true"></div>
        <div class="mapctl"><button type="button" id="zIn" aria-label="Zoom in">+</button><button type="button" id="zOut" aria-label="Zoom out">−</button><button type="button" id="zReset" aria-label="Reset map view" style="font-size:14px">⟲</button></div>
        <div class="maphint" id="mapHint">Hold Ctrl or ⌘ and scroll to zoom</div>
      </div>
      <ul class="places" id="places" aria-label="Places near the bakery"></ul>
    </div>
    <div class="hours" data-reveal>
      <div>
        <p class="openstate" id="openState"><span class="dot dot--live"></span>Open now</p>
        <p class="lead" id="openNote" style="margin-bottom:20px">Closes at 15:00.</p>
        <a class="btn btn--tomato" href="https://www.openstreetmap.org/search?query=Ghent%20Belgium" target="_blank" rel="noopener">Get directions <span class="sr">(opens a map in a new tab)</span></a>
      </div>
      <div><h3>Shop</h3><table id="hoursTable"><caption class="sr">Shop opening hours</caption><tbody></tbody></table></div>
      <div><h3>Bake school</h3><table><caption class="sr">Bake school times</caption><tbody>
        <tr><td>Wednesday</td><td>18:30–21:30</td></tr><tr><td>Saturday</td><td>09:00–13:00</td></tr><tr><td>Sunday</td><td>08:00–14:00</td></tr><tr><td>Private groups</td><td>on request</td></tr></tbody></table></div>
    </div>
  </div>
</section>
</main>

<footer class="ftr">
  <div class="wrap">
    <div class="ftr__top">
      <div>
        <h2>The Thursday <em class="it" style="color:var(--wheat)">crumb.</em></h2>
        <p style="margin:0;color:rgba(251,247,240,.75)">One email a week: next week's specials and new class dates. No spam, ever.</p>
        <form class="news" id="newsForm" novalidate>
          <label class="sr" for="newsEmail">Email address</label>
          <input id="newsEmail" type="email" placeholder="you@example.com" autocomplete="email" aria-describedby="newsMsg">
          <button class="btn btn--tomato" type="submit">Subscribe</button>
        </form>
        <p class="newsmsg" id="newsMsg" role="status"></p>
      </div>
      <div><h4>Shop</h4><ul><li><a href="#today">Today's bake</a></li><li><a href="#shop">All breads</a></li><li><a href="#box">Bread box</a></li></ul></div>
      <div><h4>School</h4><ul><li><a href="#classes">Class calendar</a></li><li><a href="#shop">Gift vouchers</a></li><li><a href="#visit">Find us</a></li></ul></div>
      <div><h4>Say hello</h4><ul><li><a href="mailto:hallo@halm.example">hallo@halm.example</a></li><li>+32 9 000 00 00</li><li>Bakkersstraat 14, Gent</li></ul></div>
    </div>
    <p class="mark" id="mark" aria-hidden="true"></p>
    <div class="ftr__bot"><span>© 2026 Halm Bakkerij. A fictional bakery: all names, prices and dates are placeholders.</span><span>Baked with rye, wheat and spelt from the Leie valley.</span></div>
  </div>
</footer>

<dialog class="sheetdlg" id="basket" aria-labelledby="basketH">
  <div class="dlg">
    <div class="dlg__head"><h2 id="basketH">Basket</h2><button class="iconbtn" id="basketClose" aria-label="Close basket"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"><path d="M6 6l12 12M18 6L6 18"/></svg></button></div>
    <div class="dlg__body" id="basketBody"></div>
    <form class="dlg__foot" id="checkout" novalidate>
      <div class="total"><span style="font-weight:800">Total, paid at pickup</span><b id="basketTotal">€ 0,00</b></div>
      <div class="field"><label for="slot">Pickup slot</label><select id="slot"></select></div>
      <div class="row2">
        <div class="field"><label for="coName">Name</label><input id="coName" autocomplete="name" aria-describedby="coNameErr"><span class="err" id="coNameErr"></span></div>
        <div class="field"><label for="coEmail">Email</label><input id="coEmail" type="email" autocomplete="email" aria-describedby="coEmailErr"><span class="err" id="coEmailErr"></span></div>
      </div>
      <button class="btn btn--tomato" type="submit" style="width:100%" id="coSubmit">Reserve for pickup</button>
    </form>
  </div>
</dialog>
<div class="toast" id="toast" role="status" aria-live="polite"></div>

<script>
(()=>{
'use strict';
const $=(s,r=document)=>r.querySelector(s), $$=(s,r=document)=>[...r.querySelectorAll(s)];
const RM=matchMedia('(prefers-reduced-motion: reduce)');
const NS='http://www.w3.org/2000/svg';
const EUR=new Intl.NumberFormat('nl-BE',{style:'currency',currency:'EUR'});
const eur=v=>EUR.format(v).replace(/ /g,' ');
const pad=n=>String(n).padStart(2,'0');
const hhmm=m=>{m=Math.round(m);return pad(Math.floor(m/60)%24)+':'+pad(m%60)};
const el=(tag,attrs={},parent)=>{const e=document.createElementNS(NS,tag);for(const k in attrs)e.setAttribute(k,attrs[k]);if(parent)parent.appendChild(e);return e};
const store={get(k,d){try{const v=localStorage.getItem(k);return v?JSON.parse(v):d}catch(e){return d}},set(k,v){try{localStorage.setItem(k,JSON.stringify(v))}catch(e){}}};
let seed=7, pinned='halm', tt;const rnd=()=>{seed=(seed*16807)%2147483647;return (seed-1)/2147483646};

/* grain texture (one 120px tile) */
try{const c=document.createElement('canvas');c.width=c.height=120;const x=c.getContext('2d');const d=x.createImageData(120,120);for(let i=0;i<d.data.length;i+=4){const v=Math.random()<.5?0:47;d.data[i]=v;d.data[i+1]=v*.6;d.data[i+2]=v*.4;d.data[i+3]=Math.random()*90}x.putImageData(d,0,0);document.body.style.setProperty('--grain',`url(${c.toDataURL()})`)}catch(e){}

/* ---------- bread sprite (procedural SVG illustrations) ---------- */
const defs=$('#sprite');
defs.innerHTML=`
<linearGradient id="gCrust" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#c98443"/><stop offset=".6" stop-color="#94501f"/><stop offset="1" stop-color="#6a3416"/></linearGradient>
<linearGradient id="gCrustL" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#d9a05e"/><stop offset=".65" stop-color="#a96a35"/><stop offset="1" stop-color="#7d4a22"/></linearGradient>
<linearGradient id="gDark" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#70432a"/><stop offset="1" stop-color="#3a2013"/></linearGradient>
<linearGradient id="gGold" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#f0c06a"/><stop offset=".7" stop-color="#c9812f"/><stop offset="1" stop-color="#9c5a22"/></linearGradient>
<linearGradient id="gFoc" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#eec27a"/><stop offset="1" stop-color="#c58a3e"/></linearGradient>
<radialGradient id="gHi" cx=".35" cy=".3" r=".5"><stop offset="0" stop-color="#fff6e2" stop-opacity=".55"/><stop offset="1" stop-color="#fff6e2" stop-opacity="0"/></radialGradient>
<pattern id="ht" width="7" height="7" patternUnits="userSpaceOnUse" patternTransform="rotate(30)"><circle cx="3.5" cy="3.5" r="1.5" fill="#2f1d12" opacity=".42"/></pattern>
<pattern id="htF" width="6" height="6" patternUnits="userSpaceOnUse"><circle cx="3" cy="3" r="1.1" fill="#fffaf0" opacity=".7"/></pattern>`;
function sym(id,build){const s=el('symbol',{id,viewBox:'0 0 200 160'},defs);el('ellipse',{cx:100,cy:148,rx:80,ry:8,fill:'#2f1d12',opacity:.16},s);build(s);return s}
const flour=(g,n,box)=>{for(let i=0;i<n;i++)el('circle',{cx:box[0]+rnd()*box[2],cy:box[1]+rnd()*box[3],r:.8+rnd()*1.8,fill:'#fffaf0',opacity:.35+rnd()*.5},g)};
sym('b-boule',s=>{
  const P='M24 116C20 68 58 30 100 30c42 0 80 38 76 86-4 24-36 32-76 32S28 140 24 116Z';
  el('path',{d:P,fill:'url(#gCrust)'},s);
  el('path',{d:'M132 42c38 18 54 58 40 90-12 12-40 16-64 16 44-18 52-62 24-106Z',fill:'url(#ht)'},s);
  el('ellipse',{cx:78,cy:62,rx:44,ry:24,fill:'url(#gHi)'},s);
  el('path',{d:'M48 96C74 58 124 50 154 70',stroke:'#5a2b12',"stroke-width":5,fill:'none',"stroke-linecap":'round',opacity:.7},s);
  el('path',{d:'M50 90C76 54 122 46 152 64',stroke:'#f0d29b',"stroke-width":9,fill:'none',"stroke-linecap":'round'},s);
  el('path',{d:'M62 118c20 8 56 8 80 0',stroke:'#5a2b12',"stroke-width":2.5,fill:'none',"stroke-linecap":'round',opacity:.35},s);
  flour(s,26,[44,34,100,40]);
});
sym('b-country',s=>{
  const P='M14 112C14 76 58 54 104 54c46 0 84 24 82 58-2 26-40 36-86 36S14 138 14 112Z';
  el('path',{d:P,fill:'url(#gCrustL)'},s);
  el('path',{d:'M150 62c34 14 40 50 26 70-14 10-42 14-70 16 50-16 64-56 44-86Z',fill:'url(#ht)'},s);
  el('ellipse',{cx:84,cy:76,rx:52,ry:18,fill:'url(#gHi)'},s);
  el('path',{d:'M36 110C64 78 118 66 168 84',stroke:'#5a2b12',"stroke-width":5,fill:'none',"stroke-linecap":'round',opacity:.7},s);
  el('path',{d:'M38 104C66 72 118 60 166 78',stroke:'#f2d7a4',"stroke-width":10,fill:'none',"stroke-linecap":'round'},s);
  flour(s,22,[40,58,120,30]);
});
sym('b-rye',s=>{
  el('path',{d:'M28 74c0-20 12-26 30-26h84c18 0 30 6 30 26l-6 66c0 6-4 8-10 8H44c-6 0-10-2-10-8Z',fill:'url(#gDark)'},s);
  el('path',{d:'M150 52c18 4 22 14 22 24l-6 64c0 6-4 8-10 8h-30c30-10 34-50 24-96Z',fill:'url(#ht)'},s);
  el('path',{d:'M34 96h132',stroke:'#2a160b',"stroke-width":2,opacity:.5},s);
  el('ellipse',{cx:84,cy:62,rx:46,ry:12,fill:'url(#gHi)'},s);
  for(let i=0;i<34;i++){const x=40+rnd()*120,y=52+rnd()*36;el('ellipse',{cx:x,cy:y,rx:3.4,ry:1.6,fill:i%3?'#d8c79a':'#a8946a',transform:`rotate(${rnd()*180} ${x} ${y})`},s)}
  for(let i=0;i<4;i++)el('path',{d:`M${48+i*30} 104c4 10 2 22 6 34`,stroke:'#2a160b',"stroke-width":1.6,fill:'none',opacity:.45},s);
});
sym('b-spelt',s=>{
  el('path',{d:'M26 116C24 72 60 38 100 38s76 34 74 78c-2 22-34 32-74 32S28 138 26 116Z',fill:'url(#gCrustL)'},s);
  el('path',{d:'M134 50c34 18 48 54 36 84-12 10-38 14-62 14 42-18 50-60 26-98Z',fill:'url(#ht)'},s);
  for(let i=0;i<120;i++){const a=rnd()*Math.PI*2,r=Math.sqrt(rnd())*70,x=100+Math.cos(a)*r,y=92+Math.sin(a)*r*.7;if(y<44||y>142)continue;el('ellipse',{cx:x,cy:y,rx:2.6,ry:1.3,fill:['#f4e6c2','#3b2416','#e8d39a','#c9a66a'][i%4],transform:`rotate(${rnd()*180} ${x} ${y})`},s)}
  el('path',{d:'M58 70c26 10 60 10 86 0M100 46c-8 24-8 62 0 92',stroke:'#f6dfb0',"stroke-width":8,fill:'none',"stroke-linecap":'round'},s);
});
sym('b-croissant',s=>{
  const segs=[[-82,.5],[82,.5],[-56,.7],[56,.7],[-28,.88],[28,.88],[0,1]];
  segs.forEach(([a,k])=>{const r=a*Math.PI/180,cx=100+Math.sin(r)*66,cy=150-Math.cos(r)*70;const g=el('g',{transform:`translate(${cx.toFixed(1)} ${cy.toFixed(1)}) rotate(${a})`},s);
    el('ellipse',{cx:0,cy:0,rx:21*k,ry:34*k,fill:'url(#gGold)',stroke:'#8a4a1c',"stroke-width":2.2},g);
    el('path',{d:`M${-14*k} ${-8*k}q${14*k} ${8*k} ${28*k} 0M${-15*k} ${10*k}q${15*k} ${8*k} ${30*k} 0`,stroke:'#8a4a1c',"stroke-width":1.6,fill:'none',opacity:.55},g);
    el('ellipse',{cx:-6*k,cy:-14*k,rx:8*k,ry:12*k,fill:'url(#gHi)'},g);});
});
sym('b-cardamom',s=>{
  [[60,104,1],[140,104,1],[100,72,1.08]].forEach(([x,y,k])=>{const g=el('g',{transform:`translate(${x} ${y}) scale(${k})`},s);
    const d='M-26 4C-30-22 20-30 28-6c6 20-16 34-32 22C-18 8-8-8 6-4c10 4 6 16-2 16';
    el('path',{d,stroke:'#7a4317',"stroke-width":24,fill:'none',"stroke-linecap":'round'},g);
    el('path',{d,stroke:'url(#gGold)',"stroke-width":18,fill:'none',"stroke-linecap":'round'},g);
    el('path',{d:'M-20-6C-16-22 14-24 22-8',stroke:'#fff1c9',"stroke-width":4,fill:'none',"stroke-linecap":'round',opacity:.55},g);
    for(let i=0;i<14;i++)el('rect',{x:-24+rnd()*50,y:-24+rnd()*40,width:2.6,height:2.6,fill:i%4?'#fffaf0':'#5f6f34',opacity:.9,transform:`rotate(${rnd()*90})`},g)});
});
sym('b-focaccia',s=>{
  el('rect',{x:18,y:62,width:164,height:80,rx:18,fill:'#9c5a22'},s);
  el('rect',{x:18,y:56,width:164,height:78,rx:18,fill:'url(#gFoc)'},s);
  el('rect',{x:120,y:60,width:58,height:72,rx:14,fill:'url(#ht)'},s);
  for(let i=0;i<5;i++)for(let j=0;j<3;j++){const x=36+i*32+(j%2)*12+rnd()*5,y=72+j*22+rnd()*4;el('ellipse',{cx:x,cy:y,rx:5,ry:3.4,fill:'#a96a2a',opacity:.75},s)}
  [[52,80],[96,104],[138,78],[70,116],[154,112],[112,70]].forEach(([x,y])=>{el('circle',{cx:x,cy:y,r:8.5,fill:'#c8391f'},s);el('circle',{cx:x-1,cy:y-1,r:4.6,fill:'#e87a5d'},s)});
  for(let i=0;i<16;i++){const x=30+rnd()*140,y=64+rnd()*60,a=rnd()*180;el('path',{d:`M${x} ${y}l10 0`,stroke:'#55652c',"stroke-width":2.6,"stroke-linecap":'round',transform:`rotate(${a} ${x} ${y})`},s)}
  for(let i=0;i<18;i++)el('rect',{x:30+rnd()*140,y:62+rnd()*62,width:3,height:3,fill:'#fffaf0',opacity:.9},s);
});
sym('b-voucher',s=>{
  el('rect',{x:30,y:40,width:140,height:92,rx:12,fill:'#c8391f',transform:'rotate(-6 100 86)'},s);
  el('text',{x:100,y:96,"text-anchor":'middle',fill:'#fff',"font-family":'Fraunces,Georgia,serif',"font-size":30,transform:'rotate(-6 100 86)'},s).textContent='€65';
});
const art=(id,cls='')=>`<svg viewBox="0 0 200 160" class="${cls}" aria-hidden="true" focusable="false"><use href="#b-${id}"/></svg>`;

/* ---------- data ---------- */
const PRODUCTS=[
 {id:'boule',photo:'boule.webp',alt:'A dark, crackled sourdough boule with a curved ear, on rumpled linen',name:'Halm boule',desc:'Our house loaf. A 48-hour cold ferment, 82% hydration and an ear that crackles as it cools.',price:7.5,unit:'1 kg',tags:['loaves','vegan'],feat:true,meta:'House loaf · Vegan'},
 {id:'country',photo:'country.webp',alt:'A country batard cut in half on a wooden board, showing an open crumb',name:'Graanlei country',desc:'Batard with 20% whole wheat, stone-milled 12 km up the Leie.',price:6.2,unit:'800 g',tags:['loaves','vegan','whole'],meta:'Loaf · Whole grain'},
 {id:'rye',photo:'rye.webp',alt:'A dark seeded rye loaf, sliced on a worn board',name:'Rye 100',desc:'All-rye tin with sunflower seeds and a malty, almost cocoa crumb.',price:6.8,unit:'900 g',tags:['loaves','vegan','whole'],meta:'Loaf · Rye'},
 {id:'spelt',photo:'spelt.webp',alt:'A round spelt loaf rolled in seeds, scored with a cross, on a floured peel',name:'Spelt & seed',desc:'Wholegrain spelt rolled in sesame, flax and oats.',price:7.1,unit:'750 g',tags:['loaves','vegan','whole'],meta:'Loaf · Seeded'},
 {id:'croissant',photo:'croissant.webp',alt:'Two butter croissants on a linen napkin with flakes of pastry',name:'Butter croissant',desc:'Three days of lamination with Ardennes butter, 27 layers.',price:2.6,unit:'each',tags:['sweet'],meta:'Viennoiserie'},
 {id:'cardamom',photo:'cardamom.webp',alt:'Twisted cardamom knots with crushed cardamom on baking paper',name:'Cardamom knot',desc:'Swedish-style knot, fresh-cracked cardamom, pearl sugar.',price:3.4,unit:'each',tags:['sweet'],meta:'Sweet'},
 {id:'focaccia',photo:'focaccia.webp',alt:'Tomato and rosemary focaccia in a dark baking tray',name:'Tomato focaccia',desc:'Olive-oil slab with cherry tomato, rosemary and flaky salt.',price:4.9,unit:'slice',tags:['savoury','vegan'],meta:'Savoury · Vegan'},
 {id:'voucher',name:'Bake school voucher',desc:'Any class, any date, valid for a year. Sent as a printed card.',price:65,unit:'gift',tags:['gifts'],meta:'Gift'}
];
const P=Object.fromEntries(PRODUCTS.map(p=>[p.id,p]));
const FILTERS=[['all','All'],['loaves','Loaves'],['sweet','Sweet'],['savoury','Savoury'],['vegan','Vegan'],['whole','Whole grain'],['gifts','Gifts']];
const BAKES=[
 {id:'country',name:'Graanlei country',in:270,out:310,qty:'40 loaves'},
 {id:'croissant',name:'Butter croissants',in:300,out:322,qty:'60 pieces'},
 {id:'rye',name:'Rye 100 tins',in:330,out:390,qty:'24 tins'},
 {id:'cardamom',name:'Cardamom knots',in:395,out:417,qty:'48 knots'},
 {id:'spelt',name:'Spelt & seed',in:430,out:470,qty:'30 loaves'},
 {id:'croissant',name:'Croissants, second tray',in:505,out:527,qty:'48 pieces'},
 {id:'focaccia',name:'Tomato focaccia',in:570,out:595,qty:'12 slabs'},
 {id:'boule',name:'Halm boule',in:630,out:675,qty:'28 loaves'},
 {id:'cardamom',name:'Cardamom knots, lunch',in:700,out:722,qty:'36 knots'},
 {id:'focaccia',name:'Focaccia, afternoon slab',in:780,out:805,qty:'8 slabs'},
 {id:'country',name:'Afternoon country',in:840,out:880,qty:'24 loaves'}
];
BAKES.forEach((b,i)=>b.i=i);
const PROOF=45, WARM=60, DAY0=240, DAY1=960, DEMO=522;
function status(b,t){
  if(t<b.in-PROOF)return{k:'later',label:'Later today'};
  if(t<b.in)return{k:'proof',label:'Proofing'};
  if(t<b.out)return{k:'oven',label:'In the oven',p:(t-b.in)/(b.out-b.in)};
  if(t<b.out+WARM)return{k:'warm',label:'Still warm'};
  return{k:'shelf',label:'On the shelf'};
}

/* ---------- time ---------- */
function ghent(){
  try{const p=new Intl.DateTimeFormat('en-GB',{timeZone:'Europe/Brussels',hourCycle:'h23',weekday:'short',hour:'2-digit',minute:'2-digit',second:'2-digit'}).formatToParts(new Date());
    const g=t=>(p.find(x=>x.type===t)||{}).value;return{min:(+g('hour')%24)*60+ +g('minute')+ +g('second')/60,dow:g('weekday')}}
  catch(e){const d=new Date();return{min:d.getHours()*60+d.getMinutes(),dow:['Sun','Mon','Tue','Wed','Thu','Fri','Sat'][d.getDay()]}}
}
const S={t:DEMO,mode:'demo',hot:-1};
let FORCE=null;try{const q=new URLSearchParams(location.search).get('t');if(q&&/^\d{1,2}:\d{2}$/.test(q)){const[h,m]=q.split(':').map(Number);const v=h*60+m;if(v>=DAY0&&v<=DAY1)FORCE=v}}catch(e){}
function liveState(){const g=ghent();const ok=FORCE==null&&g.dow!=='Mon'&&g.min>=DAY0&&g.min<=DAY1;return{ok,g}}

/* ---------- dial ---------- */
const C=300, ang=m=>m/2, pol=(r,m)=>{const a=ang(m)*Math.PI/180;return[C+r*Math.sin(a),C-r*Math.cos(a)]};
function arcD(r,m1,m2){const[a,b]=pol(r,m1),[c,d]=pol(r,m2);return`M${a.toFixed(1)} ${b.toFixed(1)}A${r} ${r} 0 ${(m2-m1)/2>180?1:0} 1 ${c.toFixed(1)} ${d.toFixed(1)}`}
const dialSvg=$('#dialSvg'), dial=$('#dial');
let handG, dayArc, arcEls=[];
(function buildDial(){
  const s=dialSvg;
  el('circle',{cx:C,cy:C,r:292,fill:'#fbf7f0',opacity:.97},s);
  el('circle',{cx:C,cy:C,r:292,fill:'none',stroke:'#2f1d12',"stroke-width":10,opacity:.35},s);
  el('circle',{cx:C,cy:C,r:276,fill:'none',stroke:'#2f1d12',"stroke-width":1.2,opacity:.25},s);
  // shop hours band (07:00–15:00)
  el('path',{d:arcD(283,420,900),fill:'none',stroke:'#e3b866',"stroke-width":8,opacity:.6},s);
  dayArc=el('path',{d:arcD(283,240,241),fill:'none',stroke:'#c8391f',"stroke-width":8,"stroke-linecap":'round'},s);
  const tg=el('g',{},s);
  for(let q=0;q<48;q++){const m=240+q*15,h=q%4===0;const[x1,y1]=pol(h?248:258,m),[x2,y2]=pol(270,m);el('line',{x1,y1,x2,y2,class:'tick',"stroke-width":h?3.5:1.6,style:`animation-delay:${q*14}ms`},tg)}
  for(let h=4;h<16;h++){const[x,y]=pol(224,h*60);const t=el('text',{x,y,class:'numeral',style:`animation-delay:${(h-4)*50}ms`},tg);t.textContent=h===4?'04·16':pad(h);if(h===4)t.setAttribute('font-size','18')}
  const ag=el('g',{class:'arcs'},s);
  let lane=[0,0];
  BAKES.forEach((b,i)=>{const st=b.in-PROOF;const L=lane[0]<=st?0:1;lane[L]=b.out+4;const r=L?164:190;
    const g=el('g',{"data-i":i},ag);
    const p1=el('path',{d:arcD(r,st,b.in),class:'arc arc--proof',"stroke-width":18,pathLength:1,style:`animation-delay:${300+i*60}ms`},g);
    const p2=el('path',{d:arcD(r,b.in,b.out),class:'arc arc--oven',"stroke-width":18,pathLength:1,style:`animation-delay:${340+i*60}ms`},g);
    arcEls[i]=[p1,p2];
    g.addEventListener('pointerenter',()=>setHot(i));g.addEventListener('pointerleave',()=>setHot(-1));
  });
  handG=el('g',{},s);
  el('line',{x1:C,y1:C-150,x2:C,y2:C-262,stroke:'#2f1d12',"stroke-width":5,"stroke-linecap":'round'},handG);
  el('circle',{cx:C,cy:C-150,r:6,fill:'#2f1d12'},handG);
  el('circle',{cx:C,cy:C-262,r:9,fill:'#c8391f',stroke:'#fbf7f0',"stroke-width":3},handG);
  el('circle',{cx:C,cy:C,r:150,fill:'none',stroke:'#2f1d12',"stroke-width":1,opacity:.12,"stroke-dasharray":'2 6'},s);
})();
// cover the center so the hand does not run under the text
let handM=DAY0;
function drawHand(m){handM=m;handG.setAttribute('transform',`rotate(${ang(m).toFixed(2)} ${C} ${C})`);dayArc.setAttribute('d',arcD(283,DAY0,Math.max(DAY0+0.5,m)))}
let tween=null;
function animateHand(to,dur){cancelAnimationFrame(tween);if(RM.matches||dur<=0){drawHand(to);return}
  const from=handM,t0=performance.now();const step=now=>{const k=Math.min(1,(now-t0)/dur),e=1-Math.pow(1-k,4);drawHand(from+(to-from)*e);if(k<1)tween=requestAnimationFrame(step)};tween=requestAnimationFrame(step)}

function setHot(i){S.hot=i;const ag=$('.arcs',dialSvg);ag.classList.toggle('has-hot',i>=0);arcEls.forEach((a,j)=>a.forEach(p=>p.classList.toggle('hot',j===i)));$$('.sheet__row').forEach(r=>r.classList.toggle('hot',+r.dataset.i===i));renderCenter()}

/* center + everything time-driven */
function nextOut(t){return BAKES.find(b=>b.out>t)}
function inOven(t){return BAKES.filter(b=>t>=b.in&&t<b.out)}
function renderCenter(){
  const t=S.t;$('#dialTime').textContent=hhmm(t);
  const mode=$('#dialMode');
  mode.innerHTML=S.mode==='live'?'<span class="dot dot--live"></span>Live in Ghent':S.mode==='scrub'?'Scrubbing the day':'Demo morning';
  let now,next;
  if(S.hot>=0){const b=BAKES[S.hot],s=status(b,t);now=b.name;next=`${s.label} · in ${hhmm(b.in)}, out <b>${hhmm(b.out)}</b>`}
  else{const ov=inOven(t),n=nextOut(t);
    now=ov.length?`In the oven: ${ov.map(b=>b.name).join(' & ')}`:(n?`Next in: ${n.name}`:'Oven is resting');
    next=n?`Out at <b>${hhmm(n.out)}</b> · ${Math.max(1,Math.round(n.out-t))} min`:'Back tomorrow from 04:30';}
  $('#dialNow').textContent=now;$('#dialNext').innerHTML=next;
}
function renderTime(){
  const t=S.t;
  $('#glow').style.opacity=(.15+.75*Math.min(1,inOven(t).length)).toFixed(2);
  renderCenter();
  const n=nextOut(t),ov=inOven(t);
  dial.setAttribute('aria-valuenow',Math.round(t));
  dial.setAttribute('aria-valuetext',`${hhmm(t)}. ${ov.length?ov.map(b=>b.name).join(' and ')+' in the oven':'Nothing in the oven'}${n?'. Next out: '+n.name+' at '+hhmm(n.out):''}`);
  $('#hdrChip').innerHTML=n?`${ov.length?'In the oven':'Next'}: <strong>${n.name}</strong> · out ${hhmm(n.out)}`:'Oven resting · back at 04:30';
  // sheet
  $$('.sheet__row').forEach(r=>{const b=BAKES[+r.dataset.i],s=status(b,t);const st=$('.status',r);st.className='status status--'+s.k;st.textContent=s.label;
    $('.bar i',r).style.width=(s.k==='oven'?s.p*100:(s.k==='warm'||s.k==='shelf')?100:0)+'%';
    $('.sheet__left',r).textContent=s.k==='oven'?`${Math.ceil(b.out-t)} min to go`:s.k==='proof'?`in the oven at ${hhmm(b.in)}`:s.k==='later'?`proofing from ${hhmm(b.in-PROOF)}`:s.k==='warm'?`out ${Math.round(t-b.out)} min ago`:`baked at ${hhmm(b.out)}`});
  // product oven lines
  $$('.ovenline').forEach(o=>{const id=o.dataset.id;const bs=BAKES.filter(b=>b.id===id);if(!bs.length){o.innerHTML='<span class="dot"></span>Printed to order';return}
    const cur=bs.find(b=>status(b,t).k==='oven'),warm=bs.find(b=>status(b,t).k==='warm'),nx=bs.find(b=>b.in-PROOF>t||status(b,t).k==='proof');
    o.className='ovenline'+(cur?' is-oven':warm?' is-warm':'');
    o.innerHTML='<span class="dot"></span>'+(cur?`In the oven · out ${hhmm(cur.out)}`:warm?`Still warm · out at ${hhmm(warm.out)}`:nx?`Next tray ${hhmm(nx.out)}`:`Last baked ${hhmm(bs[bs.length-1].out)}`)});
  const bar=$('#dialBar');
  const lv=liveState();
  const want=S.mode==='live'?`Live Ghent time. Drag the hand to look ahead.`:S.mode==='scrub'?`Showing ${hhmm(t)}.`:FORCE!=null?`Demo time ${hhmm(FORCE)}. Drag the hand to look around the day.`:`We're closed right now (Ghent ${hhmm(lv.g.min)}${lv.g.dow==='Mon'?', Monday':''}), so this is a typical morning.`;
  const btn=S.mode==='scrub'?`<button class="linkbtn" id="backLive">${lv.ok?'Back to live time':'Back to the demo morning'}</button>`:'';
  const html=`<span>${want}</span>${btn}`;
  if(bar.dataset.h!==html){bar.innerHTML=html;bar.dataset.h=html;const bl=$('#backLive');if(bl)bl.onclick=()=>{goLive(true);dial.focus()}}
}
function goLive(anim){const lv=liveState();S.mode=lv.ok?'live':'demo';const to=lv.ok?lv.g.min:(FORCE??DEMO);S.t=to;animateHand(to,anim?700:0);renderTime()}
// scrub
function minFromEvent(e){const r=dialSvg.getBoundingClientRect();const x=e.clientX-(r.left+r.width/2),y=e.clientY-(r.top+r.height/2);let a=Math.atan2(x,-y)*180/Math.PI;if(a<0)a+=360;const h=a/30;return Math.min(DAY1,Math.max(DAY0,(h<4?h+12:h)*60))}
let dragging=false;
dialSvg.addEventListener('pointerdown',e=>{dragging=true;dial.classList.add('dragging');dialSvg.setPointerCapture(e.pointerId);S.mode='scrub';S.t=minFromEvent(e);animateHand(S.t,260);renderTime()});
dialSvg.addEventListener('pointermove',e=>{if(!dragging)return;S.t=minFromEvent(e);cancelAnimationFrame(tween);drawHand(S.t);renderTime()});
const endDrag=()=>{dragging=false;dial.classList.remove('dragging')};
dialSvg.addEventListener('pointerup',endDrag);dialSvg.addEventListener('pointercancel',endDrag);
dial.addEventListener('keydown',e=>{const k=e.key;let d=0;
  if(k==='ArrowRight'||k==='ArrowUp')d=e.shiftKey?15:5;else if(k==='ArrowLeft'||k==='ArrowDown')d=e.shiftKey?-15:-5;else if(k==='PageUp')d=60;else if(k==='PageDown')d=-60;
  else if(k==='Home'){d=DAY0-S.t}else if(k==='End'){d=DAY1-S.t}else if(k==='Escape'&&S.mode==='scrub'){goLive(true);e.preventDefault();return}else return;
  e.preventDefault();S.mode='scrub';S.t=Math.min(DAY1,Math.max(DAY0,Math.round((S.t+d)/ (Math.abs(d)>=5?5:1))*(Math.abs(d)>=5?5:1)));animateHand(S.t,180);renderTime()});

/* ---------- oven sheet ---------- */
(function buildSheet(){
  const sh=$('#sheet');
  sh.innerHTML=BAKES.map(b=>`<div class="sheet__row" role="listitem" data-i="${b.i}">
    <div class="sheet__time num">${hhmm(b.out)}<small>out</small></div>
    <div class="sheet__name">${art(b.id)}<div><strong>${b.name}</strong><span>${b.qty} · ${eur(P[b.id].price)} ${P[b.id].unit==='each'?'each':''}</span></div></div>
    <div><span class="status">…</span></div>
    <div><div class="bar"><i></i></div><span class="small sheet__left" style="color:var(--crust-2);display:block;margin-top:6px"></span></div>
    <div class="sheet__act">
      <button class="iconbtn" data-show="${b.i}" aria-label="Show ${b.name} on the oven clock"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2" stroke-linecap="round"/></svg></button>
      <button class="btn btn--ghost" data-add="${b.id}" style="min-height:44px;padding:0 16px">Put one aside<span class="sr"> : ${b.name}</span></button>
    </div></div>`).join('');
  // mobile: the 3rd column shows status + time-left
  sh.addEventListener('pointerover',e=>{const r=e.target.closest('.sheet__row');if(r&&matchMedia('(hover:hover)').matches)setHot(+r.dataset.i)});
  sh.addEventListener('pointerleave',()=>setHot(-1));
  sh.addEventListener('click',e=>{const sb=e.target.closest('[data-show]');if(sb){const b=BAKES[+sb.dataset.show];S.mode='scrub';S.t=b.in+(b.out-b.in)*.6;animateHand(S.t,900);setHot(b.i);renderTime();$('#top').scrollIntoView({behavior:RM.matches?'auto':'smooth'});setTimeout(()=>{setHot(-1)},2600);return}
    const ab=e.target.closest('[data-add]');if(ab){addToBasket(ab.dataset.add,1);toast(`${P[ab.dataset.add].name} put aside for you`)}});
})();

/* ---------- basket ---------- */
const basket=new Map(Object.entries(store.get('halm-basket',{})).filter(([k,v])=>P[k]&&v>0));
const bQty=id=>basket.get(id)||0;
function saveBasket(){store.set('halm-basket',Object.fromEntries(basket))}
function setQty(id,q){q=Math.max(0,Math.min(20,q));if(q)basket.set(id,q);else basket.delete(id);saveBasket();renderBasket();renderAdd(id)}
function addToBasket(id,n){setQty(id,bQty(id)+n);const b=$('#basketBtn');b.classList.remove('bump');void b.offsetWidth;b.classList.add('bump')}
function basketCount(){let n=0;basket.forEach(v=>n+=v);return n}
function basketTotal(){let s=0;basket.forEach((v,k)=>s+=v*P[k].price);return s}
function stepperHTML(id,q,label){return`<div class="stepper" role="group" aria-label="${label}"><button type="button" data-dec="${id}" aria-label="Remove one ${P[id].name}">−</button><output aria-live="polite">${q}</output><button type="button" data-inc="${id}" aria-label="Add one more ${P[id].name}" ${q>=20?'disabled':''}>+</button></div>`}
function renderBasket(){
  const n=basketCount();$('#basketCount').textContent=n;$('#basketCount').setAttribute('aria-label',n+(n===1?' item':' items'));
  const body=$('#basketBody');
  if(!n){body.innerHTML=`<div class="empty">${art('boule')}<p><strong>Your basket is empty.</strong><br>The oven isn't, though.</p><a class="btn btn--ghost" href="#shop" data-close>Browse the shelf</a></div>`;$('#checkout').hidden=true}
  else{$('#checkout').hidden=false;body.innerHTML=[...basket].map(([id,q])=>`<div class="line">${art(id)}<div><strong>${P[id].name}</strong><span>${eur(P[id].price)} · ${P[id].unit}</span></div>${stepperHTML(id,q,'Quantity of '+P[id].name)}</div>`).join('')}
  $('#basketTotal').textContent=eur(basketTotal());
}
function buildSlots(){const sel=$('#slot');const lv=liveState();const t=lv.ok?lv.g.min:-1;const opts=[];
  for(let m=420;m<=870;m+=30){if(t>=0&&m<t+30)continue;opts.push(`<option>Today, ${hhmm(m)}</option>`)}
  for(let m=420;m<=660;m+=60)opts.push(`<option>Tomorrow, ${hhmm(m)}</option>`);sel.innerHTML=opts.join('')}
const dlg=$('#basket');
$('#basketBtn').addEventListener('click',()=>{buildSlots();renderBasket();dlg.showModal()});
$('#basketClose').addEventListener('click',()=>dlg.close());
dlg.addEventListener('click',e=>{if(e.target===dlg)dlg.close();if(e.target.closest('[data-close]'))dlg.close()});
document.addEventListener('click',e=>{const i=e.target.closest('[data-inc]'),d=e.target.closest('[data-dec]');if(i)setQty(i.dataset.inc,bQty(i.dataset.inc)+1);if(d){const id=d.dataset.dec;setQty(id,bQty(id)-1);if(!bQty(id)){const c=$(`.card[data-id="${id}"] [data-addbtn]`);if(c&&!dlg.open)c.focus()}}});
const emailOk=v=>/^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(v);
function fieldErr(inp,msg){inp.setAttribute('aria-invalid',msg?'true':'false');$('#'+inp.id+'Err').textContent=msg}
$('#checkout').addEventListener('submit',e=>{e.preventDefault();const nm=$('#coName'),em=$('#coEmail');
  const a=nm.value.trim().length<2?'Please tell us your name.':'',b=!emailOk(em.value.trim())?'That email looks incomplete.':'';fieldErr(nm,a);fieldErr(em,b);
  if(a||b){(a?nm:em).focus();return}
  const slot=$('#slot').value,total=eur(basketTotal()),ref='H-'+(1000+Math.floor(Math.random()*9000));
  basket.clear();saveBasket();PRODUCTS.forEach(p=>renderAdd(p.id));renderBasket();$('#checkout').hidden=true;
  $('#basketBody').innerHTML=`<div class="success">${art('country')}<h3>See you at ${slot.split(', ')[1]}.</h3><p>Order <strong>${ref}</strong> · ${total}, paid at pickup.<br>A confirmation is on its way to ${em.value.trim().replace(/</g,'')}.</p><button class="btn" type="button" data-close>Done</button></div>`;
  nm.value='';em.value='';$('#basketClose').focus()});

/* ---------- shop ---------- */
const grid=$('#grid');
grid.innerHTML=PRODUCTS.map(p=>`<article class="card${p.feat?' card--feat':''}" data-id="${p.id}" data-tags="${p.tags.join(' ')}">
  <div class="card__art">${p.id==='voucher'?'<div class="voucher" aria-hidden="true"><span>Halm bakschool</span><b>Any class,<br>any date.</b><span>€ 65 · 1 year</span></div>':`<img class="photo" src="assets/${p.photo}" alt="${p.alt}" loading="lazy" decoding="async" width="820" height="820">`}${p.feat?'<span class="card__tag">House loaf</span>':''}</div>
  <div class="card__body"><span class="card__meta">${p.meta}</span><h3>${p.name}</h3><p class="card__desc">${p.desc}</p>
  <span class="ovenline" data-id="${p.id}"></span>
  <div class="card__foot"><span class="price num">${eur(p.price)}<small>${p.unit}</small></span><span class="addwrap" data-wrap="${p.id}"></span></div></div></article>`).join('');
function renderAdd(id){const w=$(`[data-wrap="${id}"]`);if(!w)return;const q=bQty(id);const had=w.querySelector('.stepper');
  if(q){if(had){$('output',w).textContent=q;$('[data-inc]',w).disabled=q>=20}else{w.innerHTML=stepperHTML(id,q,'Quantity of '+P[id].name);if(document.activeElement===document.body||document.activeElement?.dataset?.addbtn===id)$('[data-inc]',w).focus()}}
  else w.innerHTML=`<button class="btn" type="button" data-addbtn="${id}">Add<span class="sr"> ${P[id].name}</span></button>`}
grid.addEventListener('click',e=>{const b=e.target.closest('[data-addbtn]');if(b){const id=b.dataset.addbtn;addToBasket(id,1);const inc=$(`[data-wrap="${id}"] [data-inc]`);if(inc)inc.focus();toast(`${P[id].name} added · basket ${basketCount()}`)}});
PRODUCTS.forEach(p=>renderAdd(p.id));
// filters + FLIP
const fwrap=$('#filters');
fwrap.innerHTML=FILTERS.map(([k,l])=>`<button class="chip" data-f="${k}" aria-pressed="${k==='all'}">${l} <small>${k==='all'?PRODUCTS.length:PRODUCTS.filter(p=>p.tags.includes(k)).length}</small></button>`).join('');
let fToken=0;
function applyFilter(f){
  const tok=++fToken;const cards=$$('.card',grid);const match=c=>f==='all'||c.dataset.tags.split(' ').includes(f);
  cards.forEach(c=>c.getAnimations().forEach(a=>a.cancel()));
  const first=new Map(cards.filter(c=>!c.hidden).map(c=>[c,c.getBoundingClientRect()]));
  const leaving=cards.filter(c=>!c.hidden&&!match(c)),entering=cards.filter(c=>c.hidden&&match(c));
  const n=cards.filter(match).length;$('#shopNote').textContent=`Showing ${n} of ${cards.length}.`;
  if(RM.matches){cards.forEach(c=>c.hidden=!match(c));return}
  leaving.forEach(c=>c.animate([{opacity:1,transform:'scale(1)'},{opacity:0,transform:'scale(.94)'}],{duration:180,easing:'ease-in',fill:'forwards'}));
  setTimeout(()=>{if(tok!==fToken)return;
    leaving.forEach(c=>{c.hidden=true;c.getAnimations().forEach(a=>a.cancel())});entering.forEach(c=>c.hidden=false);
    cards.filter(c=>!c.hidden).forEach((c,i)=>{
      if(entering.includes(c)){c.animate([{opacity:0,transform:'translateY(24px) scale(.96)'},{opacity:1,transform:'none'}],{duration:520,delay:140+i*40,easing:'cubic-bezier(.2,.75,.2,1)',fill:'backwards'});return}
      const a=first.get(c),b=c.getBoundingClientRect();const dx=a.left-b.left,dy=a.top-b.top;if(!dx&&!dy)return;
      c.animate([{transform:`translate(${dx}px,${dy}px)`},{transform:'none'}],{duration:620,easing:'cubic-bezier(.65,0,.35,1)'})});
  },leaving.length?180:0);
}
fwrap.addEventListener('click',e=>{const b=e.target.closest('[data-f]');if(!b)return;$$('[data-f]',fwrap).forEach(x=>x.setAttribute('aria-pressed',x===b));applyFilter(b.dataset.f)});

/* ---------- bread box ---------- */
const BOX=[{id:'boule',name:'Halm boule',price:7.5,note:'1 kg'},{id:'country',name:'Graanlei country',price:6.2,note:'800 g'},{id:'rye',name:'Rye 100',price:6.8,note:'900 g tin'},{id:'spelt',name:'Spelt & seed',price:7.1,note:'750 g'},{id:'focaccia',name:'Focaccia slab',price:9.8,note:'whole slab, serves 4'},{id:'cardamom',name:'Cardamom knots',price:12,note:'bag of four'}];
const boxQ=Object.assign({boule:1,country:1,rye:0,spelt:0,focaccia:0,cardamom:1},store.get('halm-box',{}));
const MAX=8;
$('#boxItems').innerHTML=BOX.map(b=>`<li>${art(b.id)}<div><strong>${b.name}</strong><span>${eur(b.price)} · ${b.note}</span></div><div class="stepper" role="group" aria-label="${b.name} per box"><button type="button" data-bdec="${b.id}" aria-label="One less ${b.name}">−</button><output aria-live="polite" data-bq="${b.id}">0</output><button type="button" data-binc="${b.id}" aria-label="One more ${b.name}">+</button></div></li>`).join('');
const slotsEl=$('#slots');slotsEl.innerHTML=Array.from({length:MAX},()=>'<div class="slot"></div>').join('');
let lastFill=[];
function countTo(node,to){const from=parseFloat(node.dataset.v||0);node.dataset.v=to;if(RM.matches){node.textContent=eur(to);return}const t0=performance.now();const f=now=>{const k=Math.min(1,(now-t0)/450),e=1-Math.pow(1-k,3);node.textContent=eur(from+(to-from)*e);if(k<1)requestAnimationFrame(f)};requestAnimationFrame(f)}
function renderBox(){
  const tot=BOX.reduce((s,b)=>s+boxQ[b.id],0);$('#boxCount').textContent=tot;
  BOX.forEach(b=>{$(`[data-bq="${b.id}"]`).textContent=boxQ[b.id];$(`[data-bdec="${b.id}"]`).disabled=!boxQ[b.id];$(`[data-binc="${b.id}"]`).disabled=tot>=MAX||boxQ[b.id]>=4});
  const fill=[];BOX.forEach(b=>{for(let i=0;i<boxQ[b.id];i++)fill.push(b.id)});
  $$('.slot',slotsEl).forEach((s,i)=>{const id=fill[i];if(id===lastFill[i])return;s.classList.toggle('full',!!id);s.innerHTML=id?art(id):''});lastFill=fill;
  const fd=new FormData($('#boxForm'));const weekly=fd.get('freq')==='weekly',bike=fd.get('get')==='bike';
  const sub=BOX.reduce((s,b)=>s+boxQ[b.id]*b.price,0),disc=sub*(weekly?.12:.06),del=bike?3.5:0,per=sub-disc+del;
  $('#receipt').innerHTML=`<div class="r"><dt>Bread (${tot} item${tot===1?'':'s'})</dt><dd>${eur(sub)}</dd></div><div class="r"><dt>Subscriber saving (${weekly?'12':'6'}%)</dt><dd>− ${eur(disc)}</dd></div><div class="r"><dt>${bike?'Cargo bike delivery':'Pickup at the shop'}</dt><dd>${bike?eur(del):'free'}</dd></div>`;
  countTo($('#perBox'),tot>=2?per:0);
  $('#perMonth').textContent=tot>=2?`≈ ${eur(per*(weekly?52:26)/12)} a month · ${weekly?'every':'every other'} ${['','','Tuesday','','','Friday','Saturday'][+fd.get('day')]}`:'Add at least two items to see your price.';
  $('#boxSubmit').disabled=false;$('#boxSubmit').setAttribute('aria-disabled',tot<2);
  store.set('halm-box',boxQ);
}
$('#boxItems').addEventListener('click',e=>{const i=e.target.closest('[data-binc]'),d=e.target.closest('[data-bdec]');const tot=BOX.reduce((s,b)=>s+boxQ[b.id],0);
  if(i&&tot<MAX)boxQ[i.dataset.binc]=Math.min(4,boxQ[i.dataset.binc]+1);if(d)boxQ[d.dataset.bdec]=Math.max(0,boxQ[d.dataset.bdec]-1);
  $('#boxMsg').textContent=tot>=MAX&&i?'That fills the crate: eight items is the most we can fit.':'';renderBox()});
$('#boxForm').addEventListener('change',renderBox);
$('#boxForm').addEventListener('submit',e=>{e.preventDefault();const tot=BOX.reduce((s,b)=>s+boxQ[b.id],0);
  if(tot<2){$('#boxMsg').textContent='Add at least two items so the box is worth the trip.';return}
  const fd=new FormData(e.target);const dow=+fd.get('day');const d=new Date();d.setDate(d.getDate()+2);while(d.getDay()!==dow)d.setDate(d.getDate()+1);
  const when=d.toLocaleDateString('en-GB',{weekday:'long',day:'numeric',month:'long'});
  $('#boxMsg').textContent='';$('#boxDone').innerHTML=`<div class="boxdone" tabindex="-1"><strong>Box saved.</strong><p style="margin:6px 0 0">Your first box: ${when}, ${fd.get('get')==='bike'?'at your door by 10:00':'ready at the counter from 07:00'}. ${$('#perBox').textContent} per box, skip any week.</p></div>`;$('.boxdone').focus()});
renderBox();

/* ---------- classes calendar ---------- */
const TYPES={sd:{name:'Sourdough from scratch',short:'Sourdough',time:'09:00–13:00',price:85,cap:8,cls:'t-sd',col:'#8e4a20',blurb:'Feed a starter, mix, fold, shape and score. Take home a boule and starter.'},
 cr:{name:'Croissant lab',short:'Croissant',time:'08:00–14:00',price:110,cap:6,cls:'t-cr',col:'#c98a2c',blurb:'Laminate by hand, then bake croissants and pain au chocolat.'},
 rye:{name:'Rye night',short:'Rye',time:'18:30–21:30',price:65,cap:8,cls:'t-rye',col:'#4a2a17',blurb:'Dense, dark and sour. Three Nordic breads, a sourdough beer, cheese.'},
 kid:{name:'Kids: focaccia & pizza',short:'Kids',time:'14:00–16:00',price:35,cap:10,cls:'t-kid',col:'#5f6f34',blurb:'Ages 6–12. Dimple, top and bake. Parents get coffee.'},
 ks:{name:'Kerststol & stollen',short:'Kerststol',time:'14:30–17:30',price:70,cap:8,cls:'t-ks',col:'#c8391f',blurb:'The Flemish Christmas loaf with almond paste. Seasonal, two dates only.'}};
const hash=s=>{let h=2166136261;for(const c of s){h^=c.charCodeAt(0);h=Math.imul(h,16777619)}return h>>>0};
const SESS={};
for(let d=new Date(2026,11,1);d<=new Date(2027,0,31);d.setDate(d.getDate()+1)){
  const key=d.getFullYear()+'-'+pad(d.getMonth()+1)+'-'+pad(d.getDate()),w=d.getDay(),list=[];
  if(['2026-12-25','2026-12-26','2027-01-01'].includes(key))continue;
  if(w===3){list.push('rye');if(d.getMonth()===11&&d.getDate()>=23)list.push('kid')}
  if(w===6){list.push('sd');if(key==='2026-12-12'||key==='2026-12-19')list.push('ks')}
  if(w===0&&(d.getDate()<=7||(d.getDate()>14&&d.getDate()<=21)))list.push('cr');
  if(list.length)SESS[key]=list.map(t=>{const cap=TYPES[t].cap,h=hash(key+t);return{t,key,taken:Math.min(cap,h%(cap+3)),mine:0}})}
const cal={y:2026,m:11,sel:'2026-12-02',f:'all'};
const MONTHS=['January','February','March','April','May','June','July','August','September','October','November','December'];
$('#legend').innerHTML=`<button class="chip" data-t="all" aria-pressed="true">All classes</button>`+Object.entries(TYPES).map(([k,t])=>`<button class="chip" data-t="${k}" aria-pressed="false"><i class="${t.cls}" aria-hidden="true"></i>${t.short}</button>`).join('');
$('#legend').addEventListener('click',e=>{const b=e.target.closest('[data-t]');if(!b)return;cal.f=b.dataset.t;$$('[data-t]',$('#legend')).forEach(x=>x.setAttribute('aria-pressed',x===b));
  if(cal.f!=='all'&&!(SESS[cal.sel]||[]).some(s=>s.t===cal.f)){const k=Object.keys(SESS).find(k=>SESS[k].some(s=>s.t===cal.f));if(k){cal.sel=k;const[y,m]=k.split('-');cal.y=+y;cal.m=+m-1}}renderCal()});
function renderCal(){
  $('#calTitle').textContent=`${MONTHS[cal.m]} ${cal.y}`;
  $('#calPrev').disabled=cal.y===2026;$('#calNext').disabled=cal.y===2027;
  const first=new Date(cal.y,cal.m,1),off=(first.getDay()+6)%7,days=new Date(cal.y,cal.m+1,0).getDate();
  let h=['Mon','Tue','Wed','Thu','Fri','Sat','Sun'].map(d=>`<div class="h" aria-hidden="true">${d}</div>`).join('');
  for(let i=0;i<off;i++)h+='<div aria-hidden="true"></div>';
  for(let d=1;d<=days;d++){const key=`${cal.y}-${pad(cal.m+1)}-${pad(d)}`,ss=SESS[key];
    if(!ss){h+=`<div class="day" aria-hidden="true">${d}</div>`;continue}
    const dim=cal.f!=='all'&&!ss.some(s=>s.t===cal.f);
    const lbl=new Date(cal.y,cal.m,d).toLocaleDateString('en-GB',{weekday:'long',day:'numeric',month:'long'})+': '+ss.map(s=>`${TYPES[s.t].name}, ${TYPES[s.t].cap-s.taken-s.mine?TYPES[s.t].cap-s.taken-s.mine+' seats left':'full'}`).join('; ');
    h+=`<button class="day${dim?' dim':''}" data-day="${key}" aria-pressed="${key===cal.sel}" aria-label="${lbl}">${d}<span class="bars">${ss.map(s=>`<span class="b ${TYPES[s.t].cls}${TYPES[s.t].cap-s.taken-s.mine<=0?' full':''}">${TYPES[s.t].short}</span>`).join('')}</span></button>`}
  $('#calGrid').innerHTML=h;renderDetail();
}
function renderDetail(){const ss=SESS[cal.sel]||[];const [y,m,d]=cal.sel.split('-').map(Number);
  const title=new Date(y,m-1,d).toLocaleDateString('en-GB',{weekday:'long',day:'numeric',month:'long'});
  $('#calDetail').innerHTML=`<h3>${title}</h3>`+(ss.length?ss.map((s,i)=>{const T=TYPES[s.t],left=T.cap-s.taken-s.mine;const n=Math.min(left,4);
    return`<div class="sess" style="--c:${T.col}"><h4>${T.name}</h4><p>${T.time} · ${eur(T.price)} per seat</p><p style="margin-top:6px">${T.blurb}</p>
    <div class="seats" aria-hidden="true">${Array.from({length:T.cap},(_,j)=>`<i class="${j<s.taken?'t':j<s.taken+s.mine?'mine':''}"></i>`).join('')}</div>
    <p><strong>${left>0?`${left} of ${T.cap} seats left`:'Fully booked'}</strong></p>
    <div class="sess__row">${left>0?`<label class="small" style="display:flex;align-items:center;gap:8px;font-weight:700">Seats <select data-seats="${i}" style="height:44px;border-radius:10px;border:1.5px solid var(--line-2);background:var(--paper);padding:0 10px">${Array.from({length:n},(_,j)=>`<option>${j+1}</option>`).join('')}</select></label><button class="btn btn--tomato" data-book="${i}">Book · ${eur(T.price)}</button>`:`<button class="btn btn--ghost" data-wait="${i}" aria-pressed="${!!s.wait}">${s.wait?'On the waitlist ✓':'Join the waitlist'}</button>`}</div>
    ${s.ok?`<p class="sess__ok" role="status">${s.ok}</p>`:''}</div>`}).join(''):'<p>No classes this day.</p>')}
$('#calGrid').addEventListener('click',e=>{const b=e.target.closest('[data-day]');if(!b)return;cal.sel=b.dataset.day;$$('[data-day]').forEach(x=>x.setAttribute('aria-pressed',x===b));renderDetail()});
$('#calGrid').addEventListener('keydown',e=>{const b=e.target.closest('[data-day]');if(!b)return;const map={ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,ArrowDown:7};if(!(e.key in map))return;
  const btns=$$('[data-day]');const days=btns.map(x=>+x.dataset.day.slice(-2));const cur=+b.dataset.day.slice(-2);const step=map[e.key];let target=null;
  for(let d=cur+step;d>=1&&d<=31;d+=step){const i=days.indexOf(d);if(i>=0){target=btns[i];break}if(Math.abs(step)===7)continue}
  if(!target&&Math.abs(step)===7){const cands=btns.filter(x=>step>0?+x.dataset.day.slice(-2)>cur:+x.dataset.day.slice(-2)<cur);target=step>0?cands[0]:cands[cands.length-1]}
  if(target){e.preventDefault();target.focus()}});
$('#calDetail').addEventListener('click',e=>{const ss=SESS[cal.sel];const bk=e.target.closest('[data-book]'),wt=e.target.closest('[data-wait]');
  if(bk){const s=ss[+bk.dataset.book],n=+$(`[data-seats="${bk.dataset.book}"]`).value;s.mine+=n;s.ok=`Booked ${n} seat${n>1?'s':''}. A confirmation and the kit list are on their way.`;renderCal();toast(`${TYPES[s.t].name}: ${n} seat${n>1?'s':''} booked`);const ok=$('.sess__ok');if(ok)ok.scrollIntoView({block:'nearest'})}
  if(wt){const s=ss[+wt.dataset.wait];s.wait=!s.wait;s.ok=s.wait?'We will email you the moment a seat frees up.':'';renderDetail()}});
$('#calPrev').addEventListener('click',()=>{cal.y=2026;cal.m=11;renderCal()});
$('#calNext').addEventListener('click',()=>{cal.y=2027;cal.m=0;if(!cal.sel.startsWith('2027'))cal.sel='2027-01-03';renderCal()});
renderCal();

/* ---------- illustrated map ---------- */
const PLACES=[
 {id:'halm',x:640,y:378,ic:'H',tom:1,name:'Halm bakery & school',sub:'Bakkersstraat 14 · door on the corner',eta:'You are here'},
 {id:'tram',x:478,y:338,ic:'T',name:'Tram 1 · Meelbrug',sub:'Every 6 min from Sint-Pieters station',eta:'4 min walk',route:'M478 338C540 342 600 336 642 334L640 376'},
 {id:'market',x:452,y:244,ic:'M',name:'Saturday market',sub:'Meelmarkt, 07:00–13:00 · our stall: corner 3',eta:'6 min walk',route:'M452 244C470 290 470 330 520 338C580 342 620 336 642 334L640 376'},
 {id:'bike',x:732,y:424,ic:'B',name:'Bike racks',sub:'24 covered spots, cargo bikes welcome',eta:'1 min',route:'M732 424C700 420 660 418 640 410L640 380'},
 {id:'boat',x:868,y:612,ic:'W',name:'Leie water taxi',sub:'Summer only · Graanbrug landing',eta:'7 min walk',route:'M868 612C840 560 800 540 800 470C790 440 720 420 660 418L640 380'},
 {id:'mill',x:930,y:96,ic:'↗',name:'Molen ter Leie',sub:'Our stone mill, 12 km upriver. Tours on Sunday.',eta:'12 km'}
];
(function buildMap(){
  const s=$('#mapSvg');
  s.insertAdjacentHTML('beforeend',`<defs><pattern id="cob" width="10" height="10" patternUnits="userSpaceOnUse"><circle cx="5" cy="5" r="1.6" fill="#2f1d12" opacity=".14"/></pattern><pattern id="trees" width="34" height="30" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="8" fill="#b4b67c"/><circle cx="27" cy="24" r="6" fill="#a9ab70"/></pattern></defs>`);
  el('rect',{x:-200,y:-200,width:1600,height:1120,fill:'#e7d9bf'},s);
  // blocks texture
  for(let i=0;i<60;i++){const x=rnd()*1200,y=rnd()*720;el('rect',{x,y,width:30+rnd()*60,height:20+rnd()*40,rx:4,fill:'#dfcfb1',opacity:.7},s)}
  el('path',{d:'M860 180C900 170 1000 176 1010 200L1004 318C960 326 880 324 840 316Z',fill:'#cfd09f'},s);
  el('path',{d:'M860 180C900 170 1000 176 1010 200L1004 318C960 326 880 324 840 316Z',fill:'url(#trees)'},s);
  el('rect',{x:372,y:186,width:160,height:112,rx:8,fill:'#efe5d2'},s);el('rect',{x:372,y:186,width:160,height:112,rx:8,fill:'url(#cob)'},s);
  const water='M-40 612C200 560 340 470 520 500C700 530 820 650 1000 606C1100 582 1160 520 1240 500';
  el('path',{d:water,stroke:'#a9bcae',"stroke-width":78,fill:'none'},s);
  el('path',{d:water,stroke:'#b8c8bc',"stroke-width":62,fill:'none'},s);
  el('path',{d:water,stroke:'#cad7cc',"stroke-width":2,fill:'none',"stroke-dasharray":'18 22',id:'leie'},s);
  el('path',{d:'M520 500C500 400 470 300 440 -40',stroke:'#a9bcae',"stroke-width":30,fill:'none'},s);
  el('path',{d:'M520 500C500 400 470 300 440 -40',stroke:'#b8c8bc',"stroke-width":20,fill:'none'},s);
  const streets=[['M-20 330C260 320 520 350 760 330S1100 300 1220 310','Graanlei'],['M560 -20C570 150 600 300 610 640','Meelstraat'],['M300 -20C330 160 360 300 380 470',''],['M860 -20C840 160 820 300 790 560','Hooipoort'],['M-20 160C300 172 700 140 1220 170','Korenlei'],['M380 470C470 450 540 430 610 418C700 408 760 430 1220 420','Bakkersstraat'],['M1010 170C1018 260 1004 330 1012 420','']];
  const sg=el('g',{},s);
  streets.forEach(([d])=>el('path',{d,stroke:'#cdb994',"stroke-width":28,fill:'none',"stroke-linecap":'round'},sg));
  streets.forEach(([d],i)=>el('path',{d,stroke:'#f8f2e7',"stroke-width":22,fill:'none',"stroke-linecap":'round',id:'st'+i},sg));
  // bridges
  [[604,518,-8],[792,560,10],[506,462,70]].forEach(([x,y,a])=>{el('rect',{x:x-22,y:y-46,width:44,height:92,rx:6,fill:'#f8f2e7',stroke:'#a6906a',"stroke-width":3,transform:`rotate(${a} ${x} ${y})`},s)});
  // tram line
  el('path',{d:'M-20 330C260 320 520 350 760 330S1100 300 1220 310',stroke:'#2f1d12',"stroke-width":2.5,fill:'none',"stroke-dasharray":'10 8',opacity:.45},s);
  // the bakery building
  el('rect',{x:602,y:350,width:84,height:54,rx:6,fill:'#c8391f'},s);
  const lab=el('text',{x:644,y:383,"text-anchor":'middle',fill:'#fff',"font-family":'Manrope,sans-serif',"font-weight":800,"font-size":15,"letter-spacing":2},s);lab.textContent='HALM';
  // labels
  const L=(t,x,y,a=0,size=13,fill='#6b5442')=>{const e=el('text',{x,y,"text-anchor":'middle',fill,"font-family":'Manrope,sans-serif',"font-weight":800,"font-size":size,"letter-spacing":2.4,transform:`rotate(${a} ${x} ${y})`},s);e.textContent=t.toUpperCase()};
  L('Graanlei',200,326,-1);L('Korenlei',180,166,1);L('Bakkersstraat',930,424,0);L('Meelstraat',584,214,84);L('Hooipoort',846,96,-84);L('Meelmarkt',452,212,0,13,'#5e4331');L('Bleekpark',925,250,0,13,'#4f5a25');
  const lt=el('text',{"font-family":'Fraunces,Georgia,serif',"font-style":'italic',"font-size":30,fill:'#6f8a7a'},s);const tp=el('textPath',{href:'#leie',startOffset:'20%'},lt);tp.textContent='de Leie';
  const lt2=el('text',{"font-family":'Fraunces,Georgia,serif',"font-style":'italic',"font-size":30,fill:'#6f8a7a'},s);const tp2=el('textPath',{href:'#leie',startOffset:'78%'},lt2);tp2.textContent='de Leie';
  // compass + scale
  const cg=el('g',{transform:'translate(70 76)'},s);el('circle',{r:30,fill:'#fbf7f0',stroke:'#cdb994',"stroke-width":2},cg);el('path',{d:'M0-22L7 0H-7Z',fill:'#c8391f'},cg);el('path',{d:'M0 22L7 0H-7Z',fill:'#2f1d12'},cg);const nn=el('text',{y:-36,"text-anchor":'middle',"font-family":'Manrope',"font-weight":800,"font-size":13,fill:'#2f1d12'},cg);nn.textContent='N';
  const sc=el('g',{transform:'translate(48 676)'},s);el('rect',{width:120,height:8,fill:'#2f1d12'},sc);el('rect',{width:60,height:8,fill:'#fbf7f0',stroke:'#2f1d12',"stroke-width":1.5},sc);[[0,'0'],[60,'100'],[120,'200 m']].forEach(([x,t])=>{el('text',{x,y:-8,"text-anchor":x?'middle':'start',"font-family":'Manrope',"font-weight":800,"font-size":13,fill:'#2f1d12'},sc).textContent=t});
  // routes + pins
  const rg=el('g',{},s);PLACES.forEach(p=>{if(p.route)p.routeEl=el('path',{d:p.route,class:'route'},rg)});
  PLACES.forEach(p=>{const g=el('g',{class:'pin',tabindex:0,role:'button',"aria-label":`${p.name}. ${p.sub}. ${p.eta}`,transform:`translate(${p.x} ${p.y})`,"data-p":p.id},s);p.g=g;
    const big=p.tom?24:18;el('circle',{r:big+16,class:'halo'},g);
    if(p.tom)el('circle',{r:big,class:'pulse'},g);
    el('circle',{r:big,fill:p.tom?'#c8391f':'#fbf7f0',stroke:'#2f1d12',"stroke-width":2.5,class:'ring'},g);
    const t=el('text',{"text-anchor":'middle',"dominant-baseline":'central',"font-family":'Manrope,sans-serif',"font-weight":800,"font-size":p.tom?20:16,fill:p.tom?'#fff':'#2f1d12'},g);t.textContent=p.ic;
    g.addEventListener('pointerenter',()=>focusPlace(p.id));g.addEventListener('pointerleave',()=>focusPlace(null));
    g.addEventListener('focus',()=>focusPlace(p.id));g.addEventListener('blur',()=>focusPlace(null));
    g.addEventListener('click',()=>focusPlace(p.id,true));g.addEventListener('keydown',e=>{if(e.key==='Enter'||e.key===' '){e.preventDefault();focusPlace(p.id,true)}});
  });
  $('#places').innerHTML=PLACES.map(p=>`<li><button data-place="${p.id}"><span class="ic${p.tom?' tom':''}" aria-hidden="true">${p.ic}</span><span><strong>${p.name}</strong><span>${p.sub}</span></span><em>${p.eta}</em></button></li>`).join('');
  $('#places').addEventListener('pointerover',e=>{const b=e.target.closest('[data-place]');if(b)focusPlace(b.dataset.place)});
  $('#places').addEventListener('pointerleave',()=>focusPlace(pinned));
  $('#places').addEventListener('focusin',e=>{const b=e.target.closest('[data-place]');if(b)focusPlace(b.dataset.place)});
  $('#places').addEventListener('focusout',()=>focusPlace(pinned));
  $('#places').addEventListener('click',e=>{const b=e.target.closest('[data-place]');if(b)focusPlace(b.dataset.place,true)});
  const mq=matchMedia('(max-width:620px)');
  let base,V;const apply=()=>{s.setAttribute('viewBox',`${V.x.toFixed(1)} ${V.y.toFixed(1)} ${V.w.toFixed(1)} ${V.h.toFixed(1)}`);focusPlace(null)};
  const clampV=()=>{V.w=Math.min(base.w*1.25,Math.max(base.w*.4,V.w));V.h=V.w*base.h/base.w;V.x=Math.min(1260-V.w,Math.max(-60,V.x));V.y=Math.min(780-V.h,Math.max(-60,V.y))};
  const vb=()=>{base=mq.matches?{x:330,y:60,w:640,h:640}:{x:0,y:0,w:1200,h:720};V={...base};apply()};mq.addEventListener('change',vb);vb();
  let zt;const zoom=(k,cx,cy)=>{cx??=V.x+V.w/2;cy??=V.y+V.h/2;const nw=V.w*k,nh=nw*base.h/base.w;const target={x:cx-(cx-V.x)*k,y:cy-(cy-V.y)*k,w:nw,h:nh};
    if(RM.matches){V=target;clampV();apply();return}const from={...V},t0=performance.now();cancelAnimationFrame(zt);
    const st=now=>{const q=Math.min(1,(now-t0)/380),e=1-Math.pow(1-q,3);V={x:from.x+(target.x-from.x)*e,y:from.y+(target.y-from.y)*e,w:from.w+(target.w-from.w)*e,h:from.h+(target.h-from.h)*e};clampV();apply();if(q<1)zt=requestAnimationFrame(st)};zt=requestAnimationFrame(st)};
  $('#zIn').onclick=()=>zoom(1/1.4);$('#zOut').onclick=()=>zoom(1.4);$('#zReset').onclick=()=>{V={...base};apply()};
  const toUnits=(e)=>{const r=s.getBoundingClientRect();const sc=Math.max(V.w/r.width,V.h/r.height);return{x:V.x+(e.clientX-r.left)*sc-(r.width*sc-V.w)/2,y:V.y+(e.clientY-r.top)*sc-(r.height*sc-V.h)/2,sc}};
  let hintT;s.addEventListener('wheel',e=>{if(e.ctrlKey||e.metaKey){e.preventDefault();const u=toUnits(e);zoom(e.deltaY>0?1.15:1/1.15,u.x,u.y)}else{const h=$('#mapHint');h.classList.add('on');clearTimeout(hintT);hintT=setTimeout(()=>h.classList.remove('on'),1200)}},{passive:false});
  let pd=null;s.addEventListener('pointerdown',e=>{if(e.target.closest('.pin')||e.pointerType==='touch')return;pd={x:e.clientX,y:e.clientY,V:{...V},sc:toUnits(e).sc};s.setPointerCapture(e.pointerId);s.classList.add('drag')});
  s.addEventListener('pointermove',e=>{if(!pd)return;V.x=pd.V.x-(e.clientX-pd.x)*pd.sc;V.y=pd.V.y-(e.clientY-pd.y)*pd.sc;clampV();apply()});
  const up=()=>{pd=null;s.classList.remove('drag')};s.addEventListener('pointerup',up);s.addEventListener('pointercancel',up);
})();
function focusPlace(id,pin){if(pin)pinned=id;if(id==null)id=pinned;
  PLACES.forEach(p=>{p.g.classList.toggle('on',p.id===id);if(p.routeEl)p.routeEl.classList.toggle('on',p.id===id)});
  $$('[data-place]').forEach(b=>b.classList.toggle('on',b.dataset.place===id));
  const p=PLACES.find(x=>x.id===id),tip=$('#tip');if(!p){tip.style.opacity=0;return}
  const mr=$('#map').getBoundingClientRect(),r=p.g.querySelector('.ring').getBoundingClientRect();
  let x=r.left+r.width/2-mr.left,y=r.top-mr.top;const w=tip.offsetWidth||240;x=Math.max(w/2+8,Math.min(mr.width-w/2-8,x));
  tip.innerHTML=`<strong>${p.name}</strong>${p.sub}<br><b style="color:var(--tomato-2)">${p.eta}</b>`;
  const top=y<130;tip.style.left=x+'px';tip.style.top=(top?r.bottom-mr.top+18:y)+'px';tip.style.transform=top?'translate(-50%,0)':'translate(-50%,calc(-100% - 14px))';tip.style.opacity=1}
addEventListener('resize',()=>focusPlace(null),{passive:true});

/* ---------- hours & open state ---------- */
const HOURS=[['Monday',null,'School day · closed'],['Tuesday',[420,900]],['Wednesday',[420,900]],['Thursday',[420,900]],['Friday',[420,900]],['Saturday',[420,900]],['Sunday',[480,780]]];
const DOWS=['Mon','Tue','Wed','Thu','Fri','Sat','Sun'];
function renderOpen(){const g=ghent(),di=DOWS.indexOf(g.dow);
  $('#hoursTable tbody').innerHTML=HOURS.map(([d,h,n],i)=>`<tr class="${i===di?'today':''}"><td>${d}${i===di?' <span class="sr">(today)</span>':''}</td><td>${h?hhmm(h[0])+'–'+hhmm(h[1]):n}</td></tr>`).join('');
  const h=di>=0?HOURS[di][1]:null,open=h&&g.min>=h[0]&&g.min<h[1];
  $('#openState').innerHTML=`<span class="dot ${open?'dot--live':''}" style="${open?'':'background:var(--crust-3)'}"></span>${open?'Open now':'Closed right now'}`;
  let note;if(open)note=`Closes at ${hhmm(h[1])} Ghent time. ${nextOut(g.min)?'Next tray out at '+hhmm(nextOut(g.min).out)+'.':''}`;
  else{let j=di,first=true;for(let k=0;k<8;k++){const hh=HOURS[(j+7)%7][1];if(hh&&(!first||g.min<hh[0])){note=`Opens ${k===0?'today':k===1?'tomorrow':HOURS[(j+7)%7][0]} at ${hhmm(hh[0])}. It is ${hhmm(g.min)} in Ghent.`;break}first=false;j++}}
  $('#openNote').textContent=note}
renderOpen();

/* ---------- newsletter ---------- */
$('#newsForm').addEventListener('submit',e=>{e.preventDefault();const i=$('#newsEmail'),m=$('#newsMsg'),v=i.value.trim();
  if(!emailOk(v)){i.setAttribute('aria-invalid','true');m.className='newsmsg bad';m.textContent=v?'That email looks incomplete.':'Type your email first.';i.focus();return}
  i.setAttribute('aria-invalid','false');m.className='newsmsg';m.textContent='Lovely. The first crumb lands on Thursday.';i.value=''});

/* ---------- footer mark ---------- */
$('#mark').innerHTML='HALM'.split('').map((c,i)=>`<span style="transition-delay:${i*70}ms">${c}</span>`).join('')+'<i></i>';

/* ---------- header, menu, toast ---------- */
const hdr=$('#hdr');addEventListener('scroll',()=>hdr.classList.toggle('scrolled',scrollY>8),{passive:true});
const mb=$('#menuBtn'),nav=$('#nav');
mb.addEventListener('click',()=>{const o=nav.classList.toggle('open');mb.setAttribute('aria-expanded',o);mb.textContent=o?'Close':'Menu'});
nav.addEventListener('click',e=>{if(e.target.closest('a')){nav.classList.remove('open');mb.setAttribute('aria-expanded',false);mb.textContent='Menu'}});
document.addEventListener('keydown',e=>{if(e.key==='Escape'&&nav.classList.contains('open')){nav.classList.remove('open');mb.setAttribute('aria-expanded',false);mb.textContent='Menu';mb.focus()}});
function toast(msg){const t=$('#toast');t.textContent=msg;t.classList.add('on');clearTimeout(tt);tt=setTimeout(()=>t.classList.remove('on'),2200)}

/* ---------- reveals + off-screen pausing ---------- */
const io=new IntersectionObserver(es=>es.forEach(e=>{if(e.isIntersecting){e.target.classList.add('in');io.unobserve(e.target)}}),{threshold:.15});
$$('[data-reveal],#mark').forEach(n=>io.observe(n));
const po=new IntersectionObserver(es=>es.forEach(e=>e.target.classList.toggle('paused',!e.isIntersecting)));
po.observe($('#heroOven'));po.observe($('#map'));

/* ---------- ticker (live from the clock) ---------- */
const tkTrack=$('#tkTrack');let tkText='',tkX=0,tkLap=0,tkOn=true,tkHover=false;
function tickerText(){const t=S.t,ov=inOven(t),n=nextOut(t);const warm=BAKES.filter(b=>status(b,t).k==='warm');
  const sat=SESS['2026-12-05']&&SESS['2026-12-05'][0];const satLeft=sat?TYPES.sd.cap-sat.taken-sat.mine:0;
  return[ov.length?`In the oven: <b>${ov.map(b=>b.name).join(' & ')}</b>`:'Oven is between trays',
    n?`Next out <b>${hhmm(n.out)}</b>: ${n.name}`:'Back tomorrow at 04:30',
    warm.length?`Still warm: <b>${warm.map(b=>b.name).join(', ')}</b>`:'Ask for the heel, it is free',
    `Saturday sourdough class: <b>${satLeft?satLeft+' seats left':'waitlist open'}</b>`,`Bread box from <b>${eur(2*6.2*.88)}</b> a week`,'Rye, wheat and spelt from 12 km up the Leie'].map(x=>`<span>${x}<i></i></span>`).join('')}
function renderTicker(){const tx=tickerText();if(tx===tkText)return;tkText=tx;tkTrack.innerHTML=`<div style="display:flex">${tx}</div>`.repeat(4);tkLap=tkTrack.firstElementChild.offsetWidth;$('#tkSr').textContent=tkTrack.firstElementChild.textContent}
renderTicker();setInterval(()=>{if(!document.hidden)renderTicker()},5000);
$('#ticker').addEventListener('pointerenter',()=>tkHover=true);$('#ticker').addEventListener('pointerleave',()=>tkHover=false);
new IntersectionObserver(es=>{tkOn=es[0].isIntersecting}).observe($('#ticker'));

let heroOn=true;new IntersectionObserver(es=>{heroOn=es[0].isIntersecting}).observe($('#heroOven'));

/* ---------- cursor spring (tension 90, friction 22): drives the 3D loaf's turn ---------- */
const oven=$('.oven'),fine=matchMedia('(hover:hover) and (pointer:fine)');const sp={x:0,y:0,vx:0,vy:0,tx:0,ty:0};
$('#top').addEventListener('pointermove',e=>{if(!fine.matches)return;const r=oven.getBoundingClientRect();sp.tx=Math.max(-1,Math.min(1,(e.clientX-(r.left+r.width/2))/(r.width)));sp.ty=Math.max(-1,Math.min(1,(e.clientY-(r.top+r.height/2))/(r.height)))});
$('#top').addEventListener('pointerleave',()=>{sp.tx=sp.ty=0});
function stepSpring(dt){const s=Math.min(dt,32)/1000;for(const k of['x','y']){const f=-90*(sp[k]-sp['t'+k])-22*sp['v'+k];sp['v'+k]+=f*s;sp[k]+=sp['v'+k]*s}}

/* ---------- one rAF loop for all ambient motion (stops when hidden / off-screen / reduced) ---------- */
let last=performance.now();
function loop(now){const dt=Math.min(64,now-last);last=now;
  if(!document.hidden&&!RM.matches){
    if(tkOn&&!tkHover&&tkLap){tkX-=40*dt/1000;if(-tkX>=tkLap)tkX+=tkLap;tkTrack.style.transform=`translate3d(${tkX.toFixed(2)}px,0,0)`}
    if(heroOn)stepSpring(dt)}
  requestAnimationFrame(loop)}
requestAnimationFrame(loop);

/* ---------- bridge for the 3D module: what the boule on the bench should look like at S.t ---------- */
window.__halm={sp,reduced:()=>RM.matches,active:()=>heroOn&&!document.hidden,
  bake(){const t=S.t;const n=BAKES.find(b=>b.out>t);   // the batch named in the dial centre
    if(n&&t>=n.in)return{k:'oven',p:(t-n.in)/(n.out-n.in)};
    if(n&&t>=n.in-PROOF)return{k:'proof',p:(t-(n.in-PROOF))/PROOF};
    const wm=BAKES.find(b=>t>=b.out&&t<b.out+WARM);if(wm)return{k:'warm',p:1-(t-wm.out)/WARM};return{k:'shelf',p:0}}};

/* ---------- boot ---------- */
renderBasket();applyFilter('all');
const lv=liveState();S.mode=lv.ok?'live':'demo';S.t=lv.ok?lv.g.min:(FORCE??DEMO);
if(!RM.matches)dialSvg.classList.add('dial-draw');
drawHand(DAY0);renderTime();
function startIntro(){document.documentElement.classList.add('intro');document.body.classList.add('intro');setTimeout(()=>animateHand(S.t,1800),250)}
/* preloader: a boule proofs 0 → 48 h in the oven window, then the oven doors swing open */
(function pre(){const p=$('#pre'),root=document.documentElement;if(!p){startIntro();return}
  let done=false;const finish=()=>{if(done)return;done=true;
    if(RM.matches){p.classList.add('fade');setTimeout(()=>{p.classList.add('gone');root.classList.remove('lock')},300);startIntro();return}
    p.classList.add('go');root.classList.remove('lock');setTimeout(startIntro,250);setTimeout(()=>p.classList.add('gone'),1100)};
  root.classList.add('lock');p.addEventListener('click',finish);addEventListener('keydown',finish,{once:true});
  if(RM.matches){$('#preN').textContent='48';setTimeout(finish,500);return}
  const loaf=$('#preWin svg'),n=$('#preN'),t0=performance.now(),D=1300;
  const st=now=>{if(done)return;const k=Math.min(1,(now-t0)/D),e=1-Math.pow(1-k,3);n.textContent=pad(Math.round(e*48));loaf.style.transform=`scaleY(${(.55+.45*e).toFixed(3)}) scaleX(${(.9+.1*e).toFixed(3)})`;
    if(k<1)requestAnimationFrame(st);else{const fontsReady=document.fonts?Promise.race([document.fonts.ready,new Promise(r=>setTimeout(r,600))]):Promise.resolve();fontsReady.then(()=>setTimeout(finish,250))}};
  requestAnimationFrame(st)})();
setInterval(()=>{if(document.hidden)return;if(S.mode==='live'){const l=liveState();if(l.ok){S.t=l.g.min;drawHand(S.t)}else S.mode='demo'}renderTime()},1000);
setInterval(()=>{if(!document.hidden)renderOpen()},60000);
document.addEventListener('visibilitychange',()=>{if(!document.hidden&&S.mode==='live'){const l=liveState();if(l.ok){S.t=l.g.min;animateHand(S.t,400);renderTime()}}});
})();
</script>
<script type="importmap">{"imports":{"three":"https://cdn.jsdelivr.net/npm/three@0.170.0/build/three.module.js","three/addons/":"https://cdn.jsdelivr.net/npm/three@0.170.0/examples/jsm/"}}</script>
<script type="module">
/* Live 3D boule (Meshy GLB) composited into the Cycles plate. Same camera as the Blender render:
   40 mm lens on a 36 mm vertical sensor (48.46° vertical FOV), at (0, 1.22, 1.15) m looking straight ahead (-Z). */
const H=window.__halm, stage=document.querySelector('.oven'), cvs=document.getElementById('loaf3d');
try{
  const THREE=await import('three');
  const [{GLTFLoader},{MeshoptDecoder},{RoomEnvironment}]=await Promise.all([import('three/addons/loaders/GLTFLoader.js'),import('three/addons/libs/meshopt_decoder.module.js'),import('three/addons/environments/RoomEnvironment.js')]);
  const R=new THREE.WebGLRenderer({canvas:cvs,alpha:true,antialias:true,powerPreference:'low-power'});
  R.setPixelRatio(Math.min(2,devicePixelRatio||1));R.toneMapping=THREE.ACESFilmicToneMapping;R.toneMappingExposure=1.05;R.outputColorSpace=THREE.SRGBColorSpace;
  R.shadowMap.enabled=true;R.shadowMap.type=THREE.PCFSoftShadowMap;
  const scene=new THREE.Scene();const pm=new THREE.PMREMGenerator(R);scene.environment=pm.fromScene(new RoomEnvironment(),.04).texture;scene.environmentIntensity=.28;
  const cam=new THREE.PerspectiveCamera(48.46,864/1080,.05,20);cam.position.set(0,1.22,1.15);
  const key=new THREE.SpotLight(0xffe6cc,26,0,.62,.85,2);key.position.set(.9,2.2,.6);key.target.position.set(0,1.0,-.15);key.castShadow=true;key.shadow.mapSize.set(1024,1024);key.shadow.radius=6;key.shadow.bias=-.0004;scene.add(key,key.target);
  const oven=new THREE.PointLight(0xff8a4a,.6,0,2);oven.position.set(-1.1,.95,-.1);scene.add(oven);
  scene.add(new THREE.HemisphereLight(0xfff1de,0x2a160a,.25));
  const BENCH=.906;
  const sh=new THREE.Mesh(new THREE.PlaneGeometry(1.4,1.4),new THREE.ShadowMaterial({opacity:.42}));sh.rotation.x=-Math.PI/2;sh.position.y=BENCH;sh.receiveShadow=true;scene.add(sh);
  const bc=document.createElement('canvas');bc.width=bc.height=128;const bx=bc.getContext('2d');const gr=bx.createRadialGradient(64,64,0,64,64,64);gr.addColorStop(0,'rgba(20,10,4,.85)');gr.addColorStop(.55,'rgba(20,10,4,.35)');gr.addColorStop(1,'rgba(20,10,4,0)');bx.fillStyle=gr;bx.fillRect(0,0,128,128);
  const blob=new THREE.Mesh(new THREE.PlaneGeometry(.38,.3),new THREE.MeshBasicMaterial({map:new THREE.CanvasTexture(bc),transparent:true,depthWrite:false}));blob.rotation.x=-Math.PI/2;blob.position.set(0,BENCH+.001,0);scene.add(blob);
  // steam sprites
  const sc2=document.createElement('canvas');sc2.width=sc2.height=64;const sx=sc2.getContext('2d');const sg=sx.createRadialGradient(32,32,0,32,32,32);sg.addColorStop(0,'rgba(255,250,240,.9)');sg.addColorStop(1,'rgba(255,250,240,0)');sx.fillStyle=sg;sx.fillRect(0,0,64,64);
  const stex=new THREE.CanvasTexture(sc2);const puffs=[];
  for(let i=0;i<22;i++){const m=new THREE.Sprite(new THREE.SpriteMaterial({map:stex,transparent:true,depthWrite:false,opacity:0}));m.userData={ph:i/22,x:(Math.random()-.5)*.2,z:(Math.random()-.5)*.1,sw:Math.random()*6};scene.add(m);puffs.push(m)}
  const pivot=new THREE.Group();pivot.position.set(0,BENCH,0);scene.add(pivot);
  const loader=new GLTFLoader();loader.setMeshoptDecoder(MeshoptDecoder);
  const gltf=await loader.loadAsync('assets/loaf.glb');const model=gltf.scene;
  const box=new THREE.Box3().setFromObject(model),size=box.getSize(new THREE.Vector3()),ctr=box.getCenter(new THREE.Vector3());
  const k=.31/Math.max(size.x,size.z);model.scale.setScalar(k);model.position.set(-ctr.x*k,-box.min.y*k,-ctr.z*k);
  const uDough={value:0};const mats=[];model.traverse(o=>{if(o.isMesh){o.castShadow=true;o.receiveShadow=true;mats.push(o.material);o.material.envMapIntensity=.6;
    // proofing look: pull the baked crust texture toward raw, floury dough while keeping its detail
    o.material.onBeforeCompile=sh=>{sh.uniforms.uDough=uDough;sh.fragmentShader='uniform float uDough;\n'+sh.fragmentShader.replace('#include <map_fragment>','#include <map_fragment>\nfloat lum=dot(diffuseColor.rgb,vec3(.299,.587,.114));\ndiffuseColor.rgb=mix(diffuseColor.rgb,vec3(.46,.36,.24)*(.7+1.1*lum),uDough*.9);')}}});
  pivot.add(model);const H0=size.y*k;
    function resize(){const r=stage.getBoundingClientRect();R.setSize(r.width,r.height,false);cam.aspect=r.width/r.height;
    // the plate is object-fit:cover at 864/1080, so keep the vertical FOV and let width follow
    cam.updateProjectionMatrix()}
  new ResizeObserver(resize).observe(stage);resize();
  let yaw=-.5,spring={y:1,v:0},lastK='',last=performance.now(),acc=0;
  function frame(now){requestAnimationFrame(frame);const dt=Math.min(.05,(now-last)/1000);last=now;
    if(!H.active())return;const rm=H.reduced();if(rm){acc+=dt;if(acc<.5)return;acc=0}
    const b=H.bake();
    // bake look: proofing = pale dough that rises; oven = browning + oven spring; warm/shelf = baked
    const brown=b.k==='proof'?0:b.k==='oven'?Math.min(1,b.p*1.15):1;
    uDough.value=1-brown;mats.forEach(m=>{m.roughness=.95-.2*brown});
    const rise=b.k==='proof'?.78+.14*b.p:1;
    if(b.k==='oven'&&lastK==='proof'&&!rm)spring.v+=1.6;lastK=b.k;
    const f=-420*(spring.y-1)-14*spring.v;spring.v+=f*dt;spring.y+=spring.v*dt;
    pivot.scale.set(1,rise*spring.y,1);
    oven.intensity=b.k==='oven'?2.6:b.k==='warm'?1.1:.5;
    if(!rm)yaw+=dt*.12;pivot.rotation.y=yaw+H.sp.x*.9;pivot.rotation.x=H.sp.y*.08;
    const steam=b.k==='warm'?.3+.7*b.p:0;
    puffs.forEach(p=>{const u=p.userData;if(!rm)u.ph=(u.ph+dt/3.2)%1;const q=u.ph;p.position.set(u.x*(.5+q)+Math.sin(q*5+u.sw)*.03,BENCH+H0*.85+q*.26,u.z);const sc=.05+q*.2;p.scale.set(sc,sc,sc);p.material.opacity=Math.sin(q*Math.PI)*.3*steam});
    R.render(scene,cam)}
  requestAnimationFrame(frame);
  stage.classList.add('is3d');
}catch(e){stage.classList.add('no3d');console.warn('3D loaf unavailable, showing the rendered poster.',e&&e.message)}
</script>
</body>
</html>

````
