Sitepeel
Sixty Cycle: the first screen of the finished site, a black record with a blue Sixty Cycle label and a steel plate with the Book the next cut button

Sixty Cycle

Studios & salons · Barbershop

A Brooklyn barbershop as a scroll film: a record is cut under a lamp, then the camera rises on a fresh fade under a cape.

Free to copy and download. No account needed.

About this prompt

Files, steps and what happens on the site

What happens on the site

Sixty Cycle, a barbershop in Brooklyn made as a black record with a blue label spinning under a lamp that follows the time in Brooklyn. Scroll and a cutter head drops and cuts the grooves, one clipper guard per band, from 2 down to 0 and nearly skin. You drag across the seam between two bands and it blends. The head lifts, a note in the run-out says look up, and the camera rises: the record is the top of a head under a cape. Book the next cut opens an appointment card two weeks out.

About this site

A one-page site for a fictional barbershop in Brooklyn, told as a single WebGL shot. Scrolling drops a cutting head onto a lacquer record, presses each sentence into the wax, scrubs between tracks, and lifts the camera until the record is the top of a head in a barber's cape with a paper neck strip that opens an appointment card.

  • Studios & salons
  • WebGL
  • Scroll film
  • Storytelling

What the prompt covers

  • Every scene of the film, with all of its copy
  • Type, colours and the brushed-steel plates
  • The record, head and cape drawn in WebGL
  • Scroll timing, the track bar and the hum
  • The appointment card and the still page
  • Setup, and how to show the finished site

How to use it

  1. Add the files

    Download the required files and unzip them in a new project folder.

  2. Paste the prompt

    Copy the prompt into your AI coding tool and let it build the site.

  3. Compare the result

    Open what your AI tool made next to the live preview of Sixty Cycle, and ask it to fix what differs.

What you get

This is a prompt plus the files it depends on. The prompt alone is not enough.

  • Prompt

    Markdown, 65 KB

    The full brief to give your AI coding tool.

    Download prompt
  • Required files

    ZIP, 231 KB

    The fonts, three.js and the film module (the shaders, the record that becomes a head and cape, hair and pressed words), with licence details. Put them in your project before you run the prompt.

    Download files

See the list of files

Good to know

  • Free to copy and download. No account needed.
  • Use it for your own sites and for client sites. Please don’t resell or share the prompt or its files as they are.
  • AI tools and models build differently, so the result can differ from the preview.
  • The names, projects and contact details are made up. Replace them with your own before you publish.

The prompt

Show the prompt1048 lines
# Build the Sixty Cycle website

You are working in an AI coding tool. Build this website in the current project from the specification below. It is a one-page site for a fictional barbershop in Brooklyn, New York, Sixty Cycle, which cuts skin fades, tapers, beard trims and razor shaves. The page is one continuous WebGL film driven by scroll (three.js). A black lacquer record with a blue label ("Sixty Cycle, Barbershop, Side A, Brooklyn, New York") lies under one lamp whose colour and angle come from the real time in Brooklyn. As you scroll, a cutting head drops onto the record and cuts a groove, and short sentences are pressed into the wax one block at a time, turning upright under the lamp as the disc turns: how a record lathe and a magnetic clipper are the same machine, and what each clipper guard number means. Past the last groove a hand-scratched note says "look up". The camera rises, and the record was the top of a client's head under a black barber's cape all along: hair grows, a neck duster sweeps the clippings, and the cape reads "Side B. Two weeks from now." A paper neck strip at the collar is the "Book the next cut" button and opens an appointment card. Over the film sit only three brushed-steel lathe plates (a nameplate on the first screen, a track bar, a Hum 60 switch). Type: Gloock (serif) and Tomorrow (sans).

Build everything yourself except the supporting files listed in section 2. Do not substitute a different stack, font, library or design system. Keep the copy exactly as written. Do not add analytics, trackers, external embeds, CDN links or any request to another domain.

This prompt comes with a required pack: the fonts, three.js, and one supporting code module (the film's shaders and builders). It is not a text-only prompt. Results differ between AI tools and models. Follow the specification closely, but report honestly what you built and tested.

## 1. Stack and project setup

- Plain HTML, CSS and JavaScript. No framework, no build step, no npm packages, no TypeScript, no Tailwind. `js/first.js` is a classic script; `js/main.js`, `js/film.js` and `js/shop.js` are ES modules that import each other and three.js by relative path (`../vendor/three.module.min.js`). No import map.
- Every path is relative (`site.css`, `js/main.js`, `fonts/...`, `world.json`), so the site works from a domain root and from any sub-folder. Never write a leading-slash URL.
- No inline `<script>` code anywhere. The page must run under this Content Security Policy without violations: `default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; font-src 'self' data:; connect-src 'self' blob: data:`.
- Serve it over http (ES modules and the `world.json` fetch do not work from `file://`).

Target layout of the finished project:

```text
index.html          (section 4, written by you)
404.html            (section 4, written by you)
favicon.svg         (section 4, written by you)
site.css            (section 5, written by you)
world.json          (section 6, written by you)
js/first.js         (section 6, written by you)
js/shop.js          (section 6, written by you)
js/main.js          (section 6, written by you)
js/film.js          (from the required pack, supporting code)
vendor/             (from the required pack: three.js r170 and its licence)
fonts/              (from the required pack)
licenses/           (from the required pack)
```

To look at it, serve the folder with any static file server, for example `npx --yes http-server -p 8080 -c-1 .` or `python -m http.server 8080`, and open the address it prints.

## 2. Required files

Required pack, version 1:

- URL: https://sitepeel.dev/website-prompts/fade-street/assets-v1.zip
- SHA-256: `13a6032b7e4918581b78e8acd0e3fb09721f4f4e8402aab504b8299fa56990d5`
- Size: 236401 bytes

Download it with your tool's web fetch, `curl -fL -o assets-v1.zip <URL>`, or `Invoke-WebRequest`. If `assets-v1.zip` is already in the project root, use that copy. If you cannot download it, stop and ask the person to save the file into the project root, then continue. Check the SHA-256 (`shasum -a 256`, `sha256sum` or `certutil -hashfile assets-v1.zip SHA256`) and stop if it differs. Unzip it into the project root so that `fonts/`, `js/`, `vendor/` and `licenses/` sit next to `index.html`. Delete the zip afterwards. You may delete the pack's `README.md` and `SHA256SUMS.txt` once the hashes are checked.

Files in the pack (path, SHA-256):

| File | SHA-256 |
|---|---|
| `README.md` | `23b2664d77b00358bbad421b150c159bf82576839bf8bec806a26d6d173c260c` |
| `fonts/OFL-Gloock.txt` | `9d17885033a650f661782ab108ace264232e1acf11eaa0a85f273a2b8fd2cb95` |
| `fonts/OFL-Tomorrow.txt` | `2f396c9fd6aadd9c0951c06333e079f415a91f66a6e07682bd19b314135c8172` |
| `fonts/gloock-latin-400-normal.woff2` | `9389ada8d35754635432c5565f03e8e3ce0f37f529207356426d1d9983b1bc29` |
| `fonts/tomorrow-latin-400-normal.woff2` | `dac69cca61d2805962bbf7f6a8d49478bfd39b3d82298da13d1009128ceea804` |
| `fonts/tomorrow-latin-700-normal.woff2` | `2b0d3ea5ad10a30a8ecda4a39d601a5ce46382c715a9effff1118d8290024354` |
| `js/film.js` | `f8feacc703d3e11def4362ba7a47ce8d8db97f58a8e41ed29db540465a80109e` |
| `licenses/OFL-Gloock.txt` | `9d17885033a650f661782ab108ace264232e1acf11eaa0a85f273a2b8fd2cb95` |
| `licenses/OFL-Tomorrow.txt` | `2f396c9fd6aadd9c0951c06333e079f415a91f66a6e07682bd19b314135c8172` |
| `licenses/PROVENANCE.md` | `f88c352dd52a62664cd005121e71b7e3cee006b486a43d81bc8b52fe060890ad` |
| `licenses/THIRD-PARTY.md` | `9e10a675123d035577cb568204bb9c3264c6a3435ddd65d95da5c0f5afe8825b` |
| `licenses/THREE-LICENSE.txt` | `4c40a1ef62450b857c3b2aaf294936304cd552d965fbcd9d32d4c5bcf4ba4454` |
| `vendor/THREE-LICENSE.txt` | `4c40a1ef62450b857c3b2aaf294936304cd552d965fbcd9d32d4c5bcf4ba4454` |
| `vendor/three.module.min.js` | `08fd7545d13d2c7fb65ab691530a802dafefd638596501854f267d0fb13c39e7` |

What the supporting module is. Do not rewrite it; the look depends on its exact numbers (true millimetre scale: the record is 305 mm across, radius 152 mm; the label radius 50 mm).

`js/film.js` is an ES module. It imports three.js from `../vendor/three.module.min.js` and exports:

- `clamp01(x)`, `smooth(a, b, x)` (smoothstep from `a` to `b`), `DEG` (pi / 180).
- `brooklynNow()`: `{ h, doy, label }`, the hour (decimal) and day of year in `America/New_York`, and a label such as `2:30 PM`.
- `lampFor(h, doy)`: `{ col, pos, day }`, the one lamp: tungsten and low at night, whiter and higher by day, from the sun's elevation at 40.65 N.
- `SCENES`: the six scenes and their lengths in screens of scroll, `[['the-blank', 2], ['the-coil', 2], ['the-cut', 3.5], ['the-run-out', 2], ['the-ceiling', 4.5], ['side-b', 2]]` (16 in all). The array is mutable; `main.js` copies `scrollLength` from `world.json` into it.
- `BLOCKS` and `PLATE`: the ten blocks of pressed words (`where`, `coil`, `same`, `g2`, `g1`, `lever`, `g0`, `line`, `runout`, `scratch`), each with the film time `s` at which it holds under the lamp, the disc angle `th`, its radius, width, type size and face. `PLATE` is the same blocks sorted by `s`. The words come from the markup: block `id` reads the text of `[data-b="id"]`.
- `discRot(s)`: the disc's rotation at film time `s` (it turns each block upright under the lamp, holds, then turns to the next).
- `camAt(s, out)`: fills `out` with the camera `[posX, posY, posZ, targetX, targetY, targetZ, fov]` at film time `s` (Catmull-Rom between 19 keys; the camera never cuts).
- `buildDiscAtlas({ top, bottom, side, place })`: the printed label texture (two big Gloock lines, then the side line and the place line in Tomorrow, plus `33 1/3` and `60 Hz`).
- `buildBlock(id, block, blockText, narrow)`: one block of words as a height texture, `{ tex, rect, draw(extra) }`. `narrow` is `0` on wide screens, or the block width in millimetres on phones (`42`) and portrait tablets (`66`), which makes the blocks thinner, centred and slightly smaller. `draw(extra)` redraws the block with an extra small line under it (used for the live clock). The `scratch` block is the hand-drawn "look up" stroke path.
- `buildCapeAtlas(blockText)`: the cape lettering: the `head` line, `Side B.`, `Two weeks from now.` and the `addr` line.
- `litMat(color, roughness, U)`: a simple one-lamp material for the cutter head, ears and duster.
- `buildSwarf(U)`: `{ mesh, update(x, cut, t) }`, the curling thread the stylus peels from the lacquer.
- `buildDuster(U)`: the neck duster (a group, hidden until shown).
- `buildHair(count, clippings, U)`: the instanced hair strands on the head (a fade from long on the crown to skin at the sides) plus loose clippings on the cape, swept by `uBrush`.
- `DISC_VS`, `DISC_FS`: the shaders of the one surface that is the record, then the head, neck strip and cape (`uMorph` 0 to 1). `FLOOR_VS`, `FLOOR_FS`: the hex-tile floor lit by the lamp's pool.

The uniforms object `U` that these share is created in `main.js` (section 6) with exactly the names listed there.

## 3. Rights and honesty

- Gloock and Tomorrow are under the SIL Open Font License 1.1. Their licences are in the pack and must stay with the font files. Do not rename or modify them.
- three.js r170 is under the MIT licence (`licenses/THREE-LICENSE.txt` and `vendor/THREE-LICENSE.txt`). `js/film.js` was written for this project.
- There are no photographs or pictures: the record, head, cape, floor, cutter head and duster are drawn by the shaders in code. `favicon.svg` is drawn in section 4.
- Sixty Cycle is a made-up barbershop. Its hours and prices in `js/shop.js` are demo data. The appointment card books nothing, sends nothing and takes no payment, and it says so. No real customer, barber, review or hair-product brand appears. Before anyone publishes the site, the name, hours, prices and the booking link in `js/shop.js` should be replaced with a real shop's, and the `noindex` tag removed.

## 4. Page markup

Create `index.html` exactly as below. It holds the structure, every hook the scripts need and all of the copy. The words of the film are the `[data-b]` elements inside `<main id="film">`: the film reads them into textures, and in the film they are hidden visually but stay in the page for search engines and screen readers.

```html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Sixty Cycle Barbershop, Brooklyn NY</title>
<meta name="description" content="Sixty Cycle is a barbershop in Brooklyn, New York, for skin fades, tapers, beard trims and razor shaves, cut from the crown down one guard at a time.">
<meta name="robots" content="noindex">
<meta name="theme-color" content="#0B0A0D">
<link rel="icon" href="favicon.svg" type="image/svg+xml">
<link rel="preload" href="fonts/gloock-latin-400-normal.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="fonts/tomorrow-latin-700-normal.woff2" as="font" type="font/woff2" crossorigin>
<link rel="stylesheet" href="site.css">
<script src="js/first.js"></script>
</head>
<body>

<!-- First paint: the same disc the shader takes over, before anything has loaded. -->
<div id="first" aria-hidden="true">
  <div class="disc"><div class="label"><span class="l1">Sixty<br>Cycle</span><span class="l2">Barbershop &middot; Side A</span></div></div>
  <p class="clock" id="firstClock"></p>
</div>

<canvas id="gl" aria-hidden="true"></canvas>
<div id="track" aria-hidden="true"></div>

<!-- The lathe's nameplate: what the shop is and where, on the first screen. -->
<header id="plate" class="plate">
  <p class="plate__name">Sixty Cycle Barbershop <span>Brooklyn, New York</span></p>
  <p class="plate__line">A barbershop in Brooklyn for skin fades, tapers, beard trims and razor shaves, cut from the crown down one guard at a time.</p>
  <div class="plate__row">
    <button type="button" class="key" data-open-card>Book the next cut</button>
    <span class="plate__cue" aria-hidden="true">Scroll to drop the needle</span>
  </div>
</header>

<nav id="tracks" aria-label="Tracks">
  <p class="tracks__now" aria-live="polite"><span class="tracks__code">A1</span><span class="tracks__title">The blank spins up</span></p>
  <ol class="tracks__bar">
    <li><button type="button" data-go="0" aria-label="A1, The blank spins up"></button></li>
    <li><button type="button" data-go="1" aria-label="A2, The coil comes down"></button></li>
    <li><button type="button" data-go="2" aria-label="A3, One guard per track"></button></li>
    <li><button type="button" data-go="3" aria-label="A4, The run-out"></button></li>
    <li><button type="button" data-go="4" aria-label="A5, The ceiling lifts"></button></li>
    <li><button type="button" data-go="5" aria-label="B1, Side B"></button></li>
  </ol>
</nav>

<button id="hum" type="button" aria-pressed="false" aria-label="Play the sixty cycle hum">Hum 60</button>

<main id="film">
  <section data-scene="the-blank" data-code="A1" data-title="The blank spins up">
    <h1 data-b="title">Sixty Cycle</h1>
    <p data-b="side">Barbershop. Side A.</p>
    <p data-b="where">Sixty Cycle. A barbershop in Brooklyn, New York.</p>
    <p data-b="clock"><span class="live-clock">It is now</span> in Brooklyn. This is the light in the room.</p>
  </section>

  <section data-scene="the-coil" data-code="A2" data-title="The coil comes down">
    <p data-b="coil">A coil shaking a hard point against something soft. On a record lathe, the music drives it.</p>
    <p data-b="same">On a magnetic clipper, the wall does, sixty cycles a second in Brooklyn.</p>
  </section>

  <section data-scene="the-cut" data-code="A3" data-title="One guard per track">
    <p data-b="g2">2 on the guard is a quarter inch.</p>
    <p data-b="g1">1 is an eighth.</p>
    <p data-b="lever">The lever moves the blade half a guard.</p>
    <p data-b="g0">0 and closed is nearly skin.</p>
    <p data-b="line">Between any two of them is a line. Drag across it the way a barber's wrist does, up and out.</p>
  </section>

  <section data-scene="the-run-out" data-code="A4" data-title="The run-out">
    <p data-b="runout">Engineers scratch a note here, in the wax past the last groove, where almost nobody reads it. Ours says, look up.</p>
  </section>

  <section data-scene="the-ceiling" data-code="A5" data-title="The ceiling lifts">
    <p data-b="head">That was the top of somebody's head.</p>
  </section>

  <section data-scene="side-b" data-code="B1" data-title="Side B">
    <h2 data-b="sideb">Side B. Two weeks from now.</h2>
    <p data-b="addr">Sixty Cycle, Brooklyn, New York.</p>
    <button id="book" type="button" data-open-card>Book the next cut</button>
    <button id="again" type="button" class="key">Flip to Side A</button>
  </section>
</main>

<!-- The appointment card. A made-up shop: it books nothing and sends nothing. -->
<dialog id="card" class="card" aria-labelledby="cardTitle">
  <div class="card__in">
    <p class="card__kicker">Appointment card</p>
    <h2 id="cardTitle" class="card__title">Side B. <span id="cardDate">Two weeks from now</span></h2>
    <p class="card__lead">About two weeks is how long a fade takes to grow back a guard. Come in around then and we cut it again from the crown down.</p>
    <dl id="cardList" class="card__list"></dl>
    <p class="card__note">Sixty Cycle is a made-up barbershop for this demo. This card books nothing, sends nothing and takes no payment.</p>
    <div class="card__row">
      <a id="cardBook" class="key key--ink" href="#" hidden>Book online</a>
      <button id="cardClose" type="button" class="key">Close the card</button>
    </div>
  </div>
</dialog>

<script type="module" src="js/main.js"></script>
</body>
</html>
```

Create `404.html` exactly as below.

```html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Skipped groove: Sixty Cycle Barbershop</title>
<meta name="robots" content="noindex">
<link rel="icon" href="favicon.svg" type="image/svg+xml">
<link rel="stylesheet" href="site.css">
</head>
<body class="lost">
<main class="lost__in">
  <p class="lost__code">404</p>
  <h1>The needle skipped a groove.</h1>
  <p>There is nothing pressed at this address. The record starts again from the top.</p>
  <a class="key" href="./">Back to Side A</a>
</main>
</body>
</html>
```

Create `favicon.svg` exactly as below.

```html
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><circle cx="32" cy="32" r="31" fill="#0B0A0D"/><circle cx="32" cy="32" r="25" fill="none" stroke="#2a272f" stroke-width="2"/><circle cx="32" cy="32" r="19" fill="none" stroke="#2a272f" stroke-width="2"/><circle cx="32" cy="32" r="12" fill="#1C6FD0"/><circle cx="32" cy="32" r="2.2" fill="#0B0A0D"/></svg>
```

## 5. Styles

Create `site.css` exactly as below. It holds the fonts, the colour tokens (lacquer `#0B0A0D`, barbicide blue `#1C6FD0`, crepe `#E4E6DF`, filament `#E8A547`, ink `#17151b`), the first-paint disc, the brushed-steel plates, the key buttons, the neck strip, the appointment card, the phone and short-screen rules, the still page and the 404 page.

```css
@font-face{font-family:Gloock;font-weight:400;src:url(fonts/gloock-latin-400-normal.woff2) format('woff2');font-display:swap}
@font-face{font-family:Tomorrow;font-weight:400;src:url(fonts/tomorrow-latin-400-normal.woff2) format('woff2');font-display:swap}
@font-face{font-family:Tomorrow;font-weight:700;src:url(fonts/tomorrow-latin-700-normal.woff2) format('woff2');font-display:swap}

:root{
  --lacquer:#0B0A0D; --barbicide:#1C6FD0; --crepe:#E4E6DF; --filament:#E8A547; --scalp:#7B5339;
  --ink:#17151b; --groove:#6f6d68;
  --steel:linear-gradient(90deg,#8d8b86,#c7c5be 22%,#9a9892 48%,#d3d1ca 76%,#8b8983);
  --screw:radial-gradient(circle at 50% 50%,#5a5854 0 1.6px,#d9d7d0 2px 3px,#0000 3.4px);
  --sans:Tomorrow,'Arial Narrow',sans-serif; --serif:Gloock,Georgia,serif;
}
*{box-sizing:border-box}
html,body{margin:0;background:var(--lacquer);color:var(--crepe)}
body{font-family:var(--sans);overflow-x:clip}
button{font:inherit}
[hidden]{display:none!important}

/* First paint: a disc seen from the same raking angle the WebGL camera opens on. */
#first{position:fixed;inset:0;overflow:hidden;background:var(--lacquer);perspective:3000px;z-index:1}
#first.gone{display:none}
#first .disc{
  position:absolute;left:50%;top:48.7%;width:184vmax;height:184vmax;margin:-92vmax 0 0 -92vmax;border-radius:50%;
  transform:rotateX(62.8deg);
  background:
    radial-gradient(circle,#0000 0 17%,#0B0A0D 17.2%),
    repeating-radial-gradient(circle,#17151b 0 1px,#0a090c 1px 3px);
}
#first .label{
  position:absolute;left:50%;top:50%;width:33%;height:33%;margin:-16.5% 0 0 -16.5%;border-radius:50%;background:var(--barbicide);
  display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--crepe);
}
#first .l1{font:400 clamp(44px,9.1vmax,170px)/1.2 var(--serif);text-align:center}
#first .l2{font:700 clamp(13px,1.6vmax,28px)/1 var(--sans);letter-spacing:.14em;text-transform:uppercase;margin-top:1em}
#first .clock{position:absolute;left:0;right:0;top:9vh;margin:0;text-align:center;font:400 clamp(15px,1.4vmax,22px)/1.2 var(--sans);color:var(--crepe);opacity:.8}

#gl{position:fixed;inset:0;width:100%;height:100%;display:block;z-index:0}
#track{width:1px;height:1700vh}
.over-seam,.over-seam body{cursor:grab}

/* All copy lives here for search engines, screen readers and the still page. In the film the words are pressed in the wax. */
.film-on #film{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* ---------- Brushed steel: the lathe's plates (nameplate, track bar, hum switch) */
.plate,#tracks,#hum{
  color:var(--ink);background:var(--steel);border-radius:2px;box-shadow:inset 0 0 0 1px #5a5854,inset 0 1px 0 #e8e6df;
  text-shadow:0 1px 0 #ffffff59;
}

/* The key: a lacquer-black switch on the steel. */
.key{
  display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 18px;border:0;border-radius:2px;cursor:pointer;
  font:700 13px/1 var(--sans);letter-spacing:.12em;text-transform:uppercase;text-decoration:none;text-shadow:none;
  color:var(--crepe);background:var(--ink);box-shadow:inset 0 -2px 0 #000,0 1px 0 #ffffff66;
  transition:color .15s,background-color .15s,transform .1s;
}
.key:hover{color:var(--filament)}
.key:active{transform:translateY(1px)}
.key:focus-visible,#hum:focus-visible,#book:focus-visible,#tracks button:focus-visible{outline:2px solid var(--filament);outline-offset:3px}

/* ---------- The nameplate on the first screen */
.plate{
  position:fixed;left:28px;bottom:28px;z-index:3;width:min(560px,calc(100vw - 56px));margin:0;padding:16px 22px 18px;
  background-image:var(--screw),var(--screw),var(--screw),var(--screw),var(--steel);
  background-size:9px 9px,9px 9px,9px 9px,9px 9px,auto;
  background-position:6px 6px,calc(100% - 6px) 6px,6px calc(100% - 6px),calc(100% - 6px) calc(100% - 6px),0 0;
  background-repeat:no-repeat;will-change:opacity,transform;
}
.plate__name{margin:0;font:700 13px/1.3 var(--sans);letter-spacing:.14em;text-transform:uppercase}
.plate__name span{font-weight:400;margin-left:.7em;opacity:.78;white-space:nowrap}
.plate__line{margin:8px 0 14px;font:400 clamp(18px,1.6vw,23px)/1.24 var(--serif);text-wrap:pretty}
.plate__row{display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px}
.plate__cue{font:400 12px/1.2 var(--sans);letter-spacing:.12em;text-transform:uppercase;display:inline-flex;align-items:center;gap:8px}
.plate__cue::after{content:'';width:8px;height:8px;border:solid currentColor;border-width:0 2px 2px 0;transform:rotate(45deg);animation:cue 1.6s cubic-bezier(.5,0,.5,1) infinite}
@keyframes cue{0%,100%{transform:translateY(-3px) rotate(45deg);opacity:.4}50%{transform:translateY(2px) rotate(45deg);opacity:1}}
.js .plate>*{animation:rise .7s cubic-bezier(.2,.7,.2,1) both}
.js .plate>:nth-child(2){animation-delay:.12s}
.js .plate>:nth-child(3){animation-delay:.24s}
@keyframes rise{from{opacity:0;transform:translateY(12px)}}

/* ---------- Track bar: the side's tracks as grooves, the needle's place, a jump to any of them */
#tracks{position:fixed;left:18px;top:18px;z-index:3;width:min(330px,calc(100vw - 142px));padding:8px 12px 2px;display:none}
.film-on #tracks{display:block}
.tracks__now{margin:0;display:flex;gap:10px;align-items:baseline;white-space:nowrap;overflow:hidden;font:400 12px/1.3 var(--sans);letter-spacing:.1em;text-transform:uppercase}
.tracks__code{font-weight:700;letter-spacing:.14em}
.tracks__title{overflow:hidden;text-overflow:ellipsis}
#tracks.flip .tracks__now span{animation:flip .5s cubic-bezier(.2,.7,.2,1) both}
#tracks.flip .tracks__title{animation-delay:.06s}
@keyframes flip{from{opacity:0;transform:translateY(70%)}}
.tracks__bar{display:flex;gap:4px;list-style:none;margin:2px 0 0;padding:0}
.tracks__bar li{flex:var(--len,2) 1 0;min-width:0}
.tracks__bar button{position:relative;display:block;width:100%;height:24px;padding:0;border:0;background:none;cursor:pointer}
.tracks__bar button::before,.tracks__bar button::after{content:'';position:absolute;left:0;top:10px;height:4px;border-radius:1px}
.tracks__bar button::before{right:0;background:var(--groove);box-shadow:inset 0 1px 0 #3e3c39}
.tracks__bar button::after{width:calc(var(--p,0) * 100%);background:var(--ink)}
.tracks__bar button[aria-current]::before{top:9px;height:6px}
.tracks__bar button[aria-current]::after{top:9px;height:6px}
.tracks__bar button:hover::before{background:#4c4a46}

/* ---------- Hum switch */
#hum{
  position:fixed;right:18px;top:18px;z-index:3;min-width:64px;min-height:44px;padding:0 12px;border:0;cursor:pointer;
  font:700 13px/1 var(--sans);letter-spacing:.14em;text-transform:uppercase;display:none
}
#hum[aria-pressed=true]{color:#fff;background:linear-gradient(90deg,#33312e,#55524c 40%,#3d3a36);text-shadow:none}
#hum[aria-pressed=true]::before{content:'';display:inline-block;width:7px;height:7px;margin-right:8px;border-radius:50%;background:var(--filament);vertical-align:1px;animation:hum 1s ease-in-out infinite}
@keyframes hum{50%{opacity:.35}}
.film-on #hum{display:block}

/* ---------- The neck strip is the button: crepe paper, torn-ish ends, it unrolls at the collar */
.film-on #book{
  position:fixed;left:0;top:0;z-index:3;white-space:nowrap;clip-path:none;
  transform-origin:50% 50%;will-change:transform;opacity:0;pointer-events:none;
}
#book{
  display:inline-flex;align-items:center;justify-content:center;min-height:52px;padding:0 34px;border:0;cursor:pointer;
  font:700 clamp(15px,1.5vmax,20px)/1 var(--sans);letter-spacing:.12em;text-transform:uppercase;
  color:#1b1a1d;text-decoration:none;background-color:var(--crepe);
  background-image:repeating-linear-gradient(0deg,#0000 0 2px,#00000012 2px 3px);
  clip-path:polygon(0 8%,2% 0,98% 3%,100% 12%,99% 90%,97% 100%,3% 97%,0 88%);
}
#book:hover{background-color:#fff}
.film-on #again{position:fixed;left:0;top:0;z-index:3;opacity:0;visibility:hidden;color:var(--crepe);background:#0b0a0dcc;box-shadow:inset 0 0 0 1px #e4e6df55}
.film-on #again:hover{color:var(--filament)}

/* ---------- The appointment card */
.card{
  width:min(440px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;padding:0;border:0;color:var(--ink);background:transparent;
}
.card::backdrop{background:#050406c4}
.card__in{
  padding:26px 26px 22px;background-color:var(--crepe);
  background-image:repeating-linear-gradient(0deg,#0000 0 2px,#0000000d 2px 3px);
  clip-path:polygon(0 1.5%,3% 0,97% .8%,100% 2.4%,99.4% 98%,97% 100%,2% 99.2%,0 97.6%);
}
.card.in{animation:card .55s cubic-bezier(.2,.8,.2,1) both}
@keyframes card{from{opacity:0;transform:translateY(46px) rotate(-2.5deg)}}
.card__kicker{margin:0;font:700 12px/1 var(--sans);letter-spacing:.16em;text-transform:uppercase;color:var(--barbicide)}
.card__title{margin:12px 0 0;font:400 36px/1 var(--serif)}
.card__title span{display:block;margin-top:6px;font-size:24px}
.card__lead{margin:14px 0 18px;font:400 16px/1.45 var(--sans)}
.card__list{display:grid;grid-template-columns:auto 1fr;gap:0;margin:0 0 16px;border-top:2px solid var(--ink)}
.card__list dt,.card__list dd{margin:0;padding:9px 0;border-bottom:1px dashed #17151b59}
.card__list dt{font:700 12px/1.5 var(--sans);letter-spacing:.12em;text-transform:uppercase;padding-right:16px}
.card__list dd{font:400 18px/1.2 var(--serif);text-align:right}
.card__note{margin:0 0 18px;font:400 14px/1.45 var(--sans);color:#3d3a36}
.card__row{display:flex;flex-wrap:wrap;gap:10px}
.key--ink{color:var(--ink);background:transparent;box-shadow:inset 0 0 0 2px var(--ink)}

/* ---------- Phones and short screens */
@media (max-width:719px){
  .plate{left:12px;right:12px;bottom:12px;width:auto;padding:13px 16px 15px}
  .plate__name{font-size:11px}
  .plate__name span{display:block;margin:2px 0 0}
  .plate__line{font-size:17px;margin:6px 0 12px}
  #tracks{left:12px;top:12px;width:calc(100vw - 126px)}
  #hum{right:12px;top:12px}
  .card__title{font-size:30px}
}
@media (max-width:719px) and (max-height:700px){
  .card__in{padding:20px 20px 18px}
  .card__title{font-size:28px}
  .card__title span{font-size:21px}
  .card__lead{font-size:15px;margin:10px 0 12px}
  .card__list{margin-bottom:12px}
  .card__list dt,.card__list dd{padding:6px 0}
  .card__note{font-size:13px;margin-bottom:14px}
}
@media (max-width:359px){
  .plate__line{font-size:15.5px}
  .plate__cue{display:none}
  .tracks__title{font-size:11px}
}
@media (max-height:520px) and (min-width:560px){
  .plate{left:14px;bottom:12px;width:min(400px,calc(100vw - 28px));padding:10px 15px 12px}
  .plate__name{font-size:11px}
  .plate__line{font-size:15px;margin:4px 0 8px}
  .plate__cue{display:none}
  .plate .key{min-height:40px}
  #tracks{left:14px;top:12px}
  #hum{right:14px;top:12px}
  .card{width:min(760px,calc(100vw - 32px))}
  .card__in{display:grid;grid-template-columns:1fr 1fr;column-gap:26px;align-items:start;padding:18px 22px 16px;
    grid-template-areas:'k l' 't l' 'p l' 'n l' 'r l'}
  .card__kicker{grid-area:k}
  .card__title{grid-area:t;font-size:28px}
  .card__title span{font-size:20px}
  .card__lead{grid-area:p;font-size:14px;margin:8px 0 10px}
  .card__list{grid-area:l;margin:0}
  .card__list dt,.card__list dd{padding:7px 0}
  .card__note{grid-area:n;font-size:13px;margin:0 0 10px}
  .card__row{grid-area:r}
  .card .key{min-height:40px}
}

/* ---------- The still page: reduced motion or no WebGL. The same disc, flat, with the words on it. */
.still #first,.still #gl,.still #track,.still #hum,.still #tracks,.still #again{display:none}
.still .plate{position:relative;left:auto;bottom:auto;width:auto;max-width:760px;margin:clamp(16px,4vw,40px) 16px 0}
.still .plate>*,.still .plate__cue::after,.still .card.in{animation:none}
.still .plate__cue{display:none}
@media (min-width:792px){.still .plate{margin-left:auto;margin-right:auto}}
.still #film{max-width:760px;margin:0 auto;padding:clamp(20px,5vw,56px) 20px 96px}
.still #film section{position:relative;padding:36px 0 52px;border-bottom:1px solid #26232b}
.still #film section::before{
  content:attr(data-code) '\2003' attr(data-title);display:block;margin:0 0 20px;
  font:700 12px/1.2 var(--sans);letter-spacing:.16em;text-transform:uppercase;color:var(--filament)
}
.still #film section:first-child>h1::before{
  content:'';display:block;width:min(420px,100%);aspect-ratio:1;margin:0 auto 36px;border-radius:50%;
  background:
    radial-gradient(circle,var(--barbicide) 0 34%,#0000 34.3%),
    repeating-radial-gradient(circle,#1b1920 0 1px,#0a090c 1px 3px);
}
.still [data-b]{font-size:clamp(18px,2.4vw,24px);line-height:1.4;margin:0 0 .7em}
.still h1[data-b]{font:400 clamp(56px,13vw,120px)/1 var(--serif)}
.still h2[data-b]{font:400 clamp(36px,8vw,68px)/1.05 var(--serif)}
.still [data-b="same"],.still [data-b^="g"],.still [data-b="lever"],.still [data-b="head"]{font-family:var(--serif)}
.still #book{margin-top:12px}

/* ---------- 404 */
.lost{min-height:100vh;display:grid;place-items:center;padding:24px}
.lost__in{max-width:520px;text-align:center}
.lost__code{margin:0;font:700 13px/1 var(--sans);letter-spacing:.16em;color:var(--filament)}
.lost h1{margin:14px 0 12px;font:400 clamp(34px,7vw,56px)/1.05 var(--serif)}
.lost p{font-size:18px;line-height:1.45}
```

## 6. Page code and data

Create `js/first.js` exactly as below. It runs in the head before the first paint: it adds class `js`, chooses the still page (class `still`) when the visitor prefers reduced motion or the address has `?motion=reduce`, and writes the Brooklyn time into the first paint.

```js
// Runs in the head, before the first paint: chooses the film or the still page, and writes the Brooklyn time.
(function () {
  var root = document.documentElement;
  root.classList.add('js');
  var q = location.search;
  var reduce = /[?&]motion=reduce\b/.test(q) || (window.matchMedia && matchMedia('(prefers-reduced-motion: reduce)').matches);
  if (reduce) root.classList.add('still');
  document.addEventListener('DOMContentLoaded', function () {
    try {
      var t = new Intl.DateTimeFormat('en-US', { timeZone: 'America/New_York', hour: 'numeric', minute: '2-digit' }).format(new Date());
      var c = document.getElementById('firstClock');
      if (c) c.textContent = 'It is ' + t + ' in Brooklyn.';
      var els = document.querySelectorAll('.live-clock');
      for (var i = 0; i < els.length; i++) els[i].textContent = 'It is ' + t;
    } catch (e) {}
  });
})();
```

Create `js/shop.js` exactly as below. It holds the shop's facts (demo data).

```js
// The shop's facts. Sixty Cycle is a made-up barbershop: every value here is demo data.
// Put your own shop's real facts in before you publish. Anything left null simply does not appear.
export default {
  booking: null,   // full link to your booking page, e.g. "https://..."; the appointment card then shows a Book online link
  phone: null,     // e.g. "+17185550100"; shown as a Call link when there is no booking link
  hours: 'Tue to Sat, 9 am to 7 pm',
  closed: [0, 1],  // days the shop is shut (0 = Sunday); the card moves "two weeks from now" to the next open day
  prices: [['Skin fade', '$42'], ['Taper', '$36'], ['Beard line-up', '$18'], ['Razor shave', '$30']],
};
```

Create `world.json` exactly as below. It is the film's design record; `main.js` reads the scene lengths from it.

```json
{
  "logline": "A record is cut under one lamp in Brooklyn, and when the ceiling lifts away it was a fresh fade under a barber's cape the whole time.",
  "world": {
    "object": "One 12 inch black disc on a lathe, 305 mm across at true scale, which is also the top of a seated client in a cape.",
    "material": "Lacquer. It holds a mirror highlight, takes a cut as a clean V groove, and throws a curling thread of swarf. Under the morph the same surface becomes nylon cape and hair, keeping its one lamp highlight.",
    "light": "One lamp. Its colour and angle are computed from the actual time in Brooklyn using America/New_York and the sun's elevation at 40.65 N: tungsten and low at night, whiter and higher from the shop window by day. It only ever moves with the real clock.",
    "lens": "Looking down from the ceiling above the chair. Starts as a macro rake a few millimetres over the wax and rises until the whole person is in frame, the point of view of a lamp fixed above the chair.",
    "rules": [
      "The camera never cuts.",
      "There is one lamp and nothing else emits light.",
      "Every word in the film is pressed or scratched into a surface and is lit by the lamp; the only things over the scene are the lathe's steel plates and the paper neck strip.",
      "Words sit upright only when the disc has turned them under the lamp, and scroll turns the disc.",
      "Everything is modelled at true millimetre scale.",
      "The shop is made up: its hours and prices are demo data in js/shop.js, and nothing books or takes payment."
    ],
    "forbidden": [
      "Floating captions or panels over the scene",
      "A barber pole",
      "Gold on black",
      "Photographs of crossed-arm barbers",
      "Real reviews, real customers or real product brands",
      "A fade transition between scenes"
    ]
  },
  "palette": [
    {
      "name": "Lacquer",
      "hex": "#0B0A0D",
      "substance": "The cut lacquer of the disc, later the black nylon of the cape."
    },
    {
      "name": "Barbicide",
      "hex": "#1C6FD0",
      "substance": "The blue disinfectant in the jar of combs at every station, used as the record's label ink."
    },
    {
      "name": "Crepe",
      "hex": "#E4E6DF",
      "substance": "The paper neck strip wrapped around the collar, and the stamped lettering."
    },
    {
      "name": "Filament",
      "hex": "#E8A547",
      "substance": "The tungsten lamp above the chair, at night."
    },
    {
      "name": "Scalp",
      "hex": "#7B5339",
      "substance": "Bare skin at the bottom of the fade."
    }
  ],
  "type": {
    "display": "Gloock",
    "body": "Tomorrow",
    "existsAs": "Gloock is hot stamped into the wax and label as a height map that catches the lamp along its edges. Tomorrow is the compact lettering stamped on the lathe's engraved plates and the run-out notes. The scratched run-out message is drawn by hand as an irregular stroke path in code."
  },
  "imageTreatment": "There are no photographs in the film. Anything the shop adds later is cut into concentric groove lines, its tones carried by groove width, so that it belongs to the disc.",
  "seo": {
    "title": "Sixty Cycle Barbershop, Brooklyn NY",
    "description": "Sixty Cycle is a barbershop in Brooklyn, New York, for skin fades, tapers, beard trims and razor shaves, cut from the crown down one guard at a time."
  },
  "opening": {
    "firstPaint": "Static HTML with a lacquer black body, a CSS repeating radial gradient drawing grooves on a disc, SIXTY CYCLE in Gloock on the blue label, the Brooklyn time written by js/first.js, and the lathe's steel nameplate saying what the shop is and where.",
    "loader": "The lamp warms up. The filament colour rises from a dull red ember to its true colour for the current hour."
  },
  "ending": {
    "action": "Book the next cut. The paper neck strip is the button. It opens the appointment card: two weeks from today, moved to the next open day, with the shop's hours and prices from js/shop.js and a line saying the shop is made up and the card books nothing.",
    "payoff": "The label in the first shot reads SIDE A. The last thing pressed on the cape reads SIDE B, TWO WEEKS FROM NOW, and the hum fades to silence with the last of the scroll."
  },
  "scenes": [
    {
      "id": "the-blank",
      "title": "The blank spins up",
      "scrollLength": 2,
      "copy": "SIXTY CYCLE. Barbershop. Side A. Sixty Cycle. A barbershop in Brooklyn, New York. It is {live time} in Brooklyn. This is the light in the room."
    },
    {
      "id": "the-coil",
      "title": "The coil comes down",
      "scrollLength": 2,
      "copy": "A coil shaking a hard point against something soft. On a record lathe, the music drives it. On a magnetic clipper, the wall does, sixty cycles a second in Brooklyn."
    },
    {
      "id": "the-cut",
      "title": "One guard per track",
      "scrollLength": 3.5,
      "copy": "2 on the guard is a quarter inch. 1 is an eighth. The lever moves the blade half a guard. 0 and closed is nearly skin. Between any two of them is a line. Drag across it the way a barber's wrist does, up and out."
    },
    {
      "id": "the-run-out",
      "title": "The run-out",
      "scrollLength": 2,
      "copy": "Engineers scratch a note here, in the wax past the last groove, where almost nobody reads it. Ours says, look up."
    },
    {
      "id": "the-ceiling",
      "title": "The ceiling lifts",
      "scrollLength": 4.5,
      "peak": true,
      "copy": "That was the top of somebody's head."
    },
    {
      "id": "side-b",
      "title": "Side B",
      "scrollLength": 2,
      "copy": "Side B. Two weeks from now. Sixty Cycle, Brooklyn, New York. Book the next cut."
    }
  ]
}
```

Create `js/main.js` exactly as below. It builds the film from `js/film.js`, drives it with scroll, and runs the plates, the track bar, the hum, the neck strip and the appointment card.

```js
// Sixty Cycle: the page. Builds the film from js/film.js, drives it with scroll, and runs the plates,
// the track bar, the hum, the neck strip and the appointment card. The still page (reduced motion or no WebGL)
// uses the same markup with the words laid out as text.
import * as THREE from '../vendor/three.module.min.js';
import shop from './shop.js';
import {
  smooth, DEG, SCENES, BLOCKS, PLATE, discRot, camAt, brooklynNow, lampFor,
  buildDiscAtlas, buildBlock, buildCapeAtlas, litMat, buildSwarf, buildDuster, buildHair,
  DISC_VS, DISC_FS, FLOOR_VS, FLOOR_FS,
} from './film.js';

const root = document.documentElement;
const glCanvas = document.getElementById('gl');
const first = document.getElementById('first');
const plate = document.getElementById('plate');
const book = document.getElementById('book');
const again = document.getElementById('again');
const humBtn = document.getElementById('hum');
const tracks = document.getElementById('tracks');
const q = new URLSearchParams(location.search);

// Scroll position the film should land on for each track (film time s).
const TRACK_AT = [0, 2.65, 4.55, 8.35, 11.4, 16];

setupCard();
const still = root.classList.contains('still');

function goStill() { root.classList.add('still'); root.classList.remove('film-on'); first.classList.add('gone'); }

let renderer;
if (still) goStill();
else {
  try {
    renderer = new THREE.WebGLRenderer({ canvas: glCanvas, antialias: true, powerPreference: 'high-performance' });
  } catch (e) { goStill(); }
  if (renderer) boot().catch(err => { console.error(err); goStill(); });
}

// ---------------------------------------------------------------- the appointment card
function setupCard() {
  const card = document.getElementById('card');
  const list = document.getElementById('cardList');
  const add = (k, v) => { const dt = document.createElement('dt'), dd = document.createElement('dd'); dt.textContent = k; dd.textContent = v; list.append(dt, dd); };
  if (shop.hours) add('Hours', shop.hours);
  (shop.prices || []).forEach(([n, p]) => add(n, p));
  const link = document.getElementById('cardBook');
  if (shop.booking) { link.href = shop.booking; link.hidden = false; }
  else if (shop.phone) { link.href = 'tel:' + shop.phone; link.textContent = 'Call ' + shop.phone; link.hidden = false; }

  // Two weeks from today in Brooklyn, moved to the next open day.
  const dateEl = document.getElementById('cardDate');
  function nextCut() {
    const ymd = new Intl.DateTimeFormat('en-CA', { timeZone: 'America/New_York', year: 'numeric', month: '2-digit', day: '2-digit' }).format(new Date());
    const d = new Date(ymd + 'T12:00:00Z');
    d.setUTCDate(d.getUTCDate() + 14);
    const closed = shop.closed || [];
    for (let i = 0; i < 7 && closed.includes(d.getUTCDay()); i++) d.setUTCDate(d.getUTCDate() + 1);
    return new Intl.DateTimeFormat('en-US', { timeZone: 'UTC', weekday: 'long', month: 'long', day: 'numeric' }).format(d);
  }
  let opener = null;
  const open = e => {
    opener = e.currentTarget;
    dateEl.textContent = nextCut();
    if (typeof card.showModal === 'function') card.showModal(); else card.setAttribute('open', '');
    card.classList.remove('in'); void card.offsetWidth; card.classList.add('in');
  };
  const close = () => { if (card.open) card.close(); else card.removeAttribute('open'); };
  document.querySelectorAll('[data-open-card]').forEach(b => b.addEventListener('click', open));
  document.getElementById('cardClose').addEventListener('click', close);
  card.addEventListener('click', e => { if (e.target === card) close(); });
  card.addEventListener('close', () => { if (opener && opener.isConnected) opener.focus({ preventScroll: true }); });
}

// ---------------------------------------------------------------- film
async function boot() {
  try {
    await Promise.all([document.fonts.load('100px Gloock'), document.fonts.load('400 100px Tomorrow'), document.fonts.load('700 100px Tomorrow')]);
  } catch (e) { /* the canvas falls back to its fonts */ }

  const world = await fetch('world.json').then(r => r.json()).catch(() => null);
  if (world) world.scenes.forEach((sc, i) => { if (SCENES[i] && SCENES[i][0] === sc.id) SCENES[i][1] = sc.scrollLength; });
  const TOTAL = SCENES.reduce((a, b) => a + b[1], 0);
  const STARTS = SCENES.map((_, i) => SCENES.slice(0, i).reduce((a, b) => a + b[1], 0));

  const isPhone = innerWidth < 720;
  // Phones and portrait screens get thinner, centred blocks of words (width in mm) and a centred camera.
  const isNarrow = () => innerWidth < 720 || innerWidth / innerHeight < .85 ? (innerWidth < 600 ? 42 : 66) : 0;
  let narrow = isNarrow();
  const dbg = renderer.getContext().getExtension('WEBGL_debug_renderer_info');
  const gpuName = dbg ? renderer.getContext().getParameter(dbg.UNMASKED_RENDERER_WEBGL) : '';
  const software = /swiftshader|llvmpipe|software/i.test(gpuName);
  const STRANDS = software ? 26000 : isPhone ? 24000 : 70000;

  let dpr = Math.min(devicePixelRatio || 1, software ? 1 : 2);
  renderer.setPixelRatio(dpr);
  renderer.setSize(innerWidth, innerHeight, false);
  renderer.outputColorSpace = THREE.LinearSRGBColorSpace;
  renderer.toneMapping = THREE.NoToneMapping;
  renderer.setClearColor(0x050406, 1);

  const scene = new THREE.Scene();
  const camera = new THREE.PerspectiveCamera(32, innerWidth / innerHeight, 2, 5000);
  camera.up.set(0, .6, -.8).normalize();

  // Words
  const blockText = id => document.querySelector(`[data-b="${id}"]`).textContent.replace(/\s+/g, ' ').trim();
  const atlas = buildDiscAtlas({ top: 'Sixty', bottom: 'Cycle', side: 'BARBERSHOP  ·  SIDE A', place: 'BROOKLYN, NEW YORK' });
  const blockIds = new Map(Object.entries(BLOCKS).map(([k, v]) => [v, k]));
  const BUILT = PLATE.map(b => ({ b, blk: buildBlock(blockIds.get(b), b, blockText, narrow) }));
  const whereOf = () => BUILT.find(x => blockIds.get(x.b) === 'where').blk;
  const clockLine = () => 'It is ' + brooklynNow().label + ' in Brooklyn. This is the light in the room.';
  const capeAtlas = buildCapeAtlas(blockText);

  const U = {
    uMorph: { value: 0 }, uRot: { value: 0 }, uCut: { value: 152 }, uBlend: { value: 0 }, uHint: { value: 0 },
    uLamp: { value: new THREE.Vector3() }, uLampCol: { value: new THREE.Color() }, uDay: { value: 0 }, uWarm: { value: 0 },
    uAtlas: { value: atlas }, uCapeAtlas: { value: capeAtlas }, uTxA: { value: BUILT[0].blk.tex }, uTxB: { value: BUILT[0].blk.tex }, uRectA: { value: new THREE.Vector4() }, uRectB: { value: new THREE.Vector4() }, uThA: { value: 0 }, uThB: { value: 0 }, uPressA: { value: 1 }, uPressB: { value: 1 },
    uHead: { value: new THREE.Vector3(160, 30, 0) }, uHeadEnd: { value: new THREE.Vector3(500, 70, 0) }, uBrush: { value: 0 }, uCapeText: { value: 0 },
  };
  const setLamp = () => { const n = brooklynNow(); const l = lampFor(n.h, n.doy); U.uLamp.value.copy(l.pos); U.uLampCol.value.copy(l.col); U.uDay.value = l.day; };
  setLamp();
  whereOf().draw(clockLine());
  setInterval(() => { whereOf().draw(clockLine()); setLamp(); }, 30000);

  // ---- The disc / head / cape: one surface
  const rings = isPhone || software ? 300 : 460, segs = isPhone || software ? 360 : 720;
  const pos = new Float32Array((rings + 1) * (segs + 1) * 3), idx = new Uint32Array(rings * segs * 6);
  for (let i = 0, v = 0; i <= rings; i++) {
    const f = i / rings, r = 270 * Math.pow(f, 1.08);
    for (let j = 0; j <= segs; j++) { pos[v++] = r; pos[v++] = j / segs * Math.PI * 2; pos[v++] = 0; }
  }
  for (let i = 0, k = 0; i < rings; i++) for (let j = 0; j < segs; j++) {
    const a = i * (segs + 1) + j, b = a + segs + 1;
    idx[k++] = a; idx[k++] = b; idx[k++] = a + 1; idx[k++] = a + 1; idx[k++] = b; idx[k++] = b + 1;
  }
  const discGeo = new THREE.BufferGeometry();
  discGeo.setAttribute('position', new THREE.BufferAttribute(pos, 3));
  discGeo.setIndex(new THREE.BufferAttribute(idx, 1));
  const disc = new THREE.Mesh(discGeo, new THREE.ShaderMaterial({ uniforms: U, vertexShader: DISC_VS, fragmentShader: DISC_FS, side: THREE.DoubleSide }));
  disc.frustumCulled = false; scene.add(disc);

  // ---- Floor: small white hex tile lit only by the lamp
  const floor = new THREE.Mesh(new THREE.PlaneGeometry(6000, 6000).rotateX(-Math.PI / 2), new THREE.ShaderMaterial({ uniforms: U, vertexShader: FLOOR_VS, fragmentShader: FLOOR_FS }));
  floor.position.y = -560; floor.frustumCulled = false; scene.add(floor);

  // ---- Hair, ears
  const hair = buildHair(STRANDS, 1100, U); scene.add(hair);
  const earMat = litMat(new THREE.Color(.19, .10, .062), .95, U);
  const earGeo = new THREE.SphereGeometry(1, 24, 18);
  const ears = [-1, 1].map(sx => { const m = new THREE.Mesh(earGeo, earMat); m.position.set(sx * 73, 150, 6); scene.add(m); return m; });

  // ---- The cutter head on its carriage
  const metal = litMat(new THREE.Color(.24, .235, .22), .24, U), dark = litMat(new THREE.Color(.03, .03, .034), .3, U);
  const carriage = new THREE.Group();
  const ALPHA = 40 * DEG, cA = Math.cos(ALPHA), sA = Math.sin(ALPHA);
  carriage.rotation.y = -ALPHA;
  const part = (geo, mat, x, y, z) => { const m = new THREE.Mesh(geo, mat); m.position.set(x, y, z); carriage.add(m); return m; };
  part(new THREE.BoxGeometry(30, 22, 36), dark, 0, 26, 0);
  part(new THREE.BoxGeometry(22, 3, 26), metal, 0, 38.5, 0);
  part(new THREE.CylinderGeometry(5.5, 5.5, 16, 24), metal, -9, 10, 0);
  part(new THREE.CylinderGeometry(5.5, 5.5, 16, 24), metal, 9, 10, 0);
  part(new THREE.ConeGeometry(1.8, 8, 16).rotateX(Math.PI), metal, -9, -2, 0);
  part(new THREE.BoxGeometry(320, 7, 12), metal, 174, 30, 0);
  for (let i = -3; i <= 3; i++) part(new THREE.BoxGeometry(30, 3.6, 1.4), metal, 0, 18.5, i * 5);
  part(new THREE.BoxGeometry(26, 2.5, 8), dark, 0, 2.5, 0);
  scene.add(carriage);

  const swarf = buildSwarf(U); scene.add(swarf.mesh);
  const duster = buildDuster(U); scene.add(duster);

  requestAnimationFrame(() => requestAnimationFrame(() => first.classList.add('gone')));
  root.classList.add('film-on');
  document.body.appendChild(book);
  document.body.appendChild(again);
  book.addEventListener('focus', () => window.scrollTo(0, document.documentElement.scrollHeight));

  // ---- Input: dragging across the seam between two guards blends it
  let px = 0, py = 0, pxS = 0, pyS = 0, blend = 0, lastPX = null, lastPY = null, overSeam = false;
  const ray = new THREE.Raycaster(), floorPlane = new THREE.Plane(new THREE.Vector3(0, 1, 0), 0), hit = new THREE.Vector3();
  const seamWindow = s => s > 6.8 && s < 7.6 && blend < 1;
  function stroke(clientX, clientY) {
    px = clientX / innerWidth * 2 - 1; py = clientY / innerHeight * 2 - 1;
    overSeam = false;
    if (seamWindow(sSmooth)) {
      ray.setFromCamera({ x: px, y: -py }, camera);
      if (ray.ray.intersectPlane(floorPlane, hit)) {
        overSeam = Math.abs(Math.hypot(hit.x, hit.z) - 124) < 15;
        if (overSeam && lastPX !== null) blend = Math.min(1, blend + Math.hypot(clientX - lastPX, clientY - lastPY) * .0022);
      }
    }
    lastPX = clientX; lastPY = clientY;
  }
  addEventListener('pointermove', e => stroke(e.clientX, e.clientY), { passive: true });
  addEventListener('touchmove', e => { const t = e.touches[0]; if (t) stroke(t.clientX, t.clientY); }, { passive: true });

  // ---- Hum: a 60 cycle tone, off until asked for
  let AC, gain;
  humBtn.addEventListener('click', () => {
    const on = humBtn.getAttribute('aria-pressed') !== 'true';
    humBtn.setAttribute('aria-pressed', String(on));
    if (on && !AC) {
      AC = new (window.AudioContext || window.webkitAudioContext)();
      gain = AC.createGain(); gain.gain.value = 0; gain.connect(AC.destination);
      [[60, .5], [120, .3], [180, .12]].forEach(([f, v]) => { const o = AC.createOscillator(), g = AC.createGain(); o.frequency.value = f; g.gain.value = v; o.connect(g); g.connect(gain); o.start(); });
    }
    if (AC) (on ? AC.resume() : AC.suspend());
  });

  // ---- Scroll
  const track = document.getElementById('track');
  const sizeTrack = () => { track.style.height = (TOTAL * 100 + 100) + 'vh'; };
  sizeTrack();
  const maxScroll = () => Math.max(1, track.offsetHeight - innerHeight);
  const scrollS = () => (scrollY / maxScroll()) * TOTAL;
  const scrollToS = s => window.scrollTo({ top: Math.round(s / TOTAL * maxScroll()), behavior: 'instant' });
  let sSmooth = scrollS();

  // ---- Track bar: where the needle is, and a jump to any track (the film scrubs there)
  const codeEl = tracks.querySelector('.tracks__code'), titleEl = tracks.querySelector('.tracks__title');
  const trackBtns = [...tracks.querySelectorAll('[data-go]')];
  const sections = [...document.querySelectorAll('#film section')];
  trackBtns.forEach((b, i) => {
    b.parentElement.style.setProperty('--len', SCENES[i][1]);
    b.addEventListener('click', () => scrollToS(TRACK_AT[i]));
  });
  again.addEventListener('click', () => { scrollToS(0); humBtn.focus({ preventScroll: true }); });
  let shownTrack = -1;
  function updateTracks(s) {
    let i = 0; while (i < SCENES.length - 1 && s >= STARTS[i + 1]) i++;
    trackBtns.forEach((b, k) => b.style.setProperty('--p', Math.max(0, Math.min(1, (s - STARTS[k]) / SCENES[k][1])).toFixed(3)));
    if (i === shownTrack) return;
    shownTrack = i;
    codeEl.textContent = sections[i].dataset.code;
    titleEl.textContent = sections[i].dataset.title;
    trackBtns.forEach((b, k) => b.toggleAttribute('aria-current', k === i));
    tracks.classList.remove('flip'); void tracks.offsetWidth; tracks.classList.add('flip');
  }

  function rebuildWords() {
    BUILT.forEach(x => { x.blk.tex.dispose(); x.blk = buildBlock(blockIds.get(x.b), x.b, blockText, narrow); });
    whereOf().draw(clockLine());
  }
  addEventListener('resize', () => {
    renderer.setSize(innerWidth, innerHeight, false);
    camera.aspect = innerWidth / innerHeight;
    camera.updateProjectionMatrix();
    sizeTrack();
    if (isNarrow() !== narrow) { narrow = isNarrow(); rebuildWords(); }
  });

  // ---- Frame
  const cv = new Array(7);
  const v3 = new THREE.Vector3();
  let last = performance.now(), warm = 0, frames = 0, tAccum = 0;
  let visible = true;
  document.addEventListener('visibilitychange', () => { visible = !document.hidden; });
  // On portrait screens the disc would crop too hard, so the camera stands further back.
  const camDist = () => { const a = camera.aspect; return a < 1 ? 1 + (1 - a) * .9 : 1; };

  function frame(now) {
    requestAnimationFrame(frame);
    if (!visible) return;
    const raw = Math.min(.25, Math.max(0, (now - last) / 1000)), dt = Math.min(.05, raw); last = now;
    warm = Math.min(1, warm + dt / 1.1);
    U.uWarm.value = warm;

    // The film eases toward the scroll, at most 9 units a second, so a jump plays as a quick scrub of the record.
    const want = (scrollS() - sSmooth) * (1 - Math.exp(-raw * 9)), cap = 9 * raw;
    sSmooth += Math.max(-cap, Math.min(cap, want));
    const s = sSmooth;
    pxS += (px - pxS) * (1 - Math.exp(-dt * 5)); pyS += (py - pyS) * (1 - Math.exp(-dt * 5));

    // The two blocks in play: the one that just held, and the one turning in
    let bi = 0; while (bi < BUILT.length - 1 && s >= BUILT[bi + 1].b.s) bi++;
    const bA = BUILT[bi], bB = BUILT[Math.min(BUILT.length - 1, bi + 1)];
    U.uTxA.value = bA.blk.tex; U.uTxB.value = bB.blk.tex;
    U.uRectA.value.fromArray(bA.blk.rect); U.uRectB.value.fromArray(bB.blk.rect);
    U.uThA.value = bA.b.th * DEG; U.uThB.value = bB.b.th * DEG;
    const stamp = smooth(.15, .7, s);
    U.uPressA.value = bi === 0 ? stamp : 1;
    U.uPressB.value = bB === BUILT[0] ? stamp : smooth(bB.b.s - .42, bB.b.s - .14, s);

    // Disc, cutter head
    U.uRot.value = discRot(s);
    const contact = 152 - (Math.max(0, s - 2.65) / 6.2) * 96;
    const rCut = Math.max(56, Math.min(152, contact));
    U.uCut.value = s < 2.65 ? 170 : rCut;
    const descend = smooth(2.0, 2.65, s);
    const lifted = smooth(9.05, 10.4, s);
    const jitter = Math.sin(now * .376) * .35 * descend * (1 - lifted);
    const hover = (1 - descend) * Math.sin(now * .0011) * 3;
    const headY = THREE.MathUtils.lerp(92, 1, descend) + lifted * 300 + jitter + hover;
    const headX = (s < 2.65 ? THREE.MathUtils.lerp(240, 152, smooth(1.4, 2.65, s)) : rCut) + lifted * 420;
    carriage.position.set((headX + 9) * cA, headY, (headX + 9) * sA);
    U.uHead.value.set(headX * cA, headY, headX * sA);
    U.uHeadEnd.value.set((headX + 340) * cA, headY + 40, (headX + 340) * sA);
    swarf.update(headX, descend * (1 - smooth(8.8, 9.2, s)), now / 1000);

    // The seam: it glints while it can be dragged; drag blends it, scrolling past it finishes the job
    const win = smooth(6.75, 6.95, s) * (1 - smooth(7.45, 7.6, s)) * (1 - blend);
    U.uHint.value = win * (.5 + .5 * Math.sin(now * .0042));
    U.uBlend.value = Math.max(blend, smooth(7.5, 8.0, s));
    root.classList.toggle('over-seam', overSeam && seamWindow(s));

    // Morph: the record becomes the top of a head in a cape
    const m = smooth(9.55, 12.9, s);
    U.uMorph.value = m;
    U.uCapeText.value = smooth(12.95, 13.55, s);
    const earS = smooth(.62, .95, m);
    ears.forEach(e => { e.scale.set(8 * earS, 30 * earS, 17 * earS); e.visible = earS > .01; });
    hair.material.uniforms.uGrow.value = smooth(.5, .96, m);
    hair.visible = m > .5;
    U.uBrush.value = smooth(14.2, 15.2, s);
    duster.visible = s > 13.9 && s < 15.5;
    if (duster.visible) {
      const u = smooth(14.1, 15.3, s);
      duster.position.set(narrow ? -200 + 400 * u : -330 + 660 * u, 94 + Math.sin(u * Math.PI) * 30, 150);
      duster.rotation.z = -.35 + u * .7;
      duster.rotation.x = .95;
    }

    // Camera
    camAt(Math.min(TOTAL, s), cv);
    const d = camDist();
    if (narrow && s < 9.6) { cv[0] *= .12; cv[3] *= .12; cv[5] -= 34; cv[2] -= 34; }
    v3.set(cv[3], cv[4], cv[5]);
    const dEnd = d * (narrow ? 1 + .26 * smooth(13, 14.6, s) : 1);
    camera.position.set(v3.x + (cv[0] - v3.x) * dEnd, v3.y + (cv[1] - v3.y) * dEnd, v3.z + (cv[2] - v3.z) * dEnd);
    camera.fov = cv[6];
    camera.updateProjectionMatrix();
    // The lamp's view breathes a little, and the pointer leans it, more once there is a person to walk around
    const lean = 5 + smooth(12, 14, s) * 24;
    camera.position.x += (pxS * lean + Math.sin(now * .00041) * 1.6) * d;
    camera.position.z += (pyS * lean * .5 + Math.sin(now * .00029) * 1.1) * d;
    camera.lookAt(v3);

    // Hum follows the disc down to silence
    if (gain) gain.gain.setTargetAtTime(.22 * (1 - smooth(8.7, 9.5, s)) * descend, AC.currentTime, .1);

    placePlate(s);
    placeBook(s);
    updateTracks(s);

    renderer.render(scene, camera);

    // Adaptive resolution
    tAccum += dt; frames++;
    if (tAccum > 1.2 && !software) {
      const fps = frames / tAccum; frames = 0; tAccum = 0;
      if (fps < 42 && dpr > 1) { dpr = Math.max(1, dpr - .25); renderer.setPixelRatio(dpr); renderer.setSize(innerWidth, innerHeight, false); }
    }
  }

  // The lathe plate on the first screen sinks away as the needle drops, and comes back at the top.
  let plateShown = true;
  function placePlate(s) {
    const u = smooth(.2, .65, s);
    plate.style.opacity = (1 - u).toFixed(3);
    plate.style.transform = u > 0 ? `translateY(${(u * 28).toFixed(1)}px)` : '';
    const show = u < .98;
    if (show !== plateShown) { plateShown = show; plate.style.visibility = show ? '' : 'hidden'; }
  }

  // The neck strip, placed where the collar is; the flip button waits at the bottom of the screen.
  const stripP = new THREE.Vector3(0, 96, 84);
  function placeBook(s) {
    const u = smooth(14.9, 15.7, s);
    const off = u <= .005;
    book.style.opacity = off ? '0' : '1'; book.style.pointerEvents = off ? 'none' : 'auto';
    const ua = smooth(15.5, 15.95, s);
    again.style.opacity = ua.toFixed(3); again.style.visibility = ua > .02 ? 'visible' : 'hidden';
    if (off) return;
    v3.copy(stripP).project(camera);
    let x, y;
    if (narrow) {
      const stripW = Math.round(Math.min(innerWidth * .74, 340));
      book.style.width = stripW + 'px';
      x = Math.round((innerWidth - stripW) / 2);
      y = Math.round(Math.max(76, Math.min(innerHeight - 150, (1 - v3.y) / 2 * innerHeight - book.offsetHeight / 2)));
    } else {
      book.style.width = '';
      const w = book.offsetWidth, h = book.offsetHeight;
      x = Math.round((v3.x + 1) / 2 * innerWidth - w / 2);
      y = Math.round(Math.max(76, Math.min(innerHeight - 150, (1 - v3.y) / 2 * innerHeight - h / 2 + 20)));
    }
    book.style.transform = `translate(${x}px, ${y}px) scaleX(${u})`;
    again.style.transform = `translate(${Math.round(innerWidth / 2 - again.offsetWidth / 2)}px, ${innerHeight - again.offsetHeight - (innerHeight < 520 ? 12 : 24)}px)`;
  }

  requestAnimationFrame(frame);
}
```

## 7. What the film does, scene by scene

Film time `s` runs from 0 at the top of the page to 16 at the bottom (`scrollY / (track height - viewport height) * 16`; `#track` is `16 * 100 + 100` vh tall). The film eases toward the scroll position (rate 9 per second, at most 9 units of `s` per second), so a jump plays as a quick scrub of the record. All numbers below are already in `main.js` and `film.js`; this section is for checking the result.

1. **A1 The blank spins up** (`s` 0 to 2). First screen: the record seen from a low raking angle, the blue label "Sixty / Cycle / BARBERSHOP · SIDE A / BROOKLYN, NEW YORK" with 33 1/3 and 60 Hz, the lamp warming up over 1.1 s, the cutter head hovering off the edge. The steel nameplate bottom left (phones: across the bottom) says "Sixty Cycle Barbershop, Brooklyn, New York", "A barbershop in Brooklyn for skin fades, tapers, beard trims and razor shaves, cut from the crown down one guard at a time.", a "Book the next cut" key and "Scroll to drop the needle" with a bobbing chevron; its three rows rise in on load. Scrolling from `s` 0.2 to 0.65 sinks it away (opacity and 28 px down, then hidden); it comes back at the top. At `s` 1.05 "Sixty Cycle. A barbershop in Brooklyn, New York." is pressed in Gloock with "It is 2:30 PM in Brooklyn. This is the light in the room." under it (the live time, redrawn every 30 s).
2. **A2 The coil comes down** (2 to 4). The cutter head drops onto the record at `s` 2.65 and starts cutting: a bright fresh line at the point of cut, the swarf thread curling away, a faint jitter. "A coil shaking a hard point..." (Tomorrow) and "On a magnetic clipper, the wall does, sixty cycles a second in Brooklyn." (Gloock) turn upright in turn.
3. **A3 One guard per track** (4 to 7.5). The groove pitch changes in four bands (the guards): "2 on the guard is a quarter inch.", "1 is an eighth.", "The lever moves the blade half a guard.", "0 and closed is nearly skin.", then "Between any two of them is a line. Drag across it the way a barber's wrist does, up and out." From `s` 6.75 to 7.6 the seam between two bands glints (pulsing) and the cursor becomes a grab hand over it; dragging across it blends the bands; scrolling past 7.5 to 8 blends them anyway.
4. **A4 The run-out** (7.5 to 9.5). "Engineers scratch a note here, in the wax past the last groove, where almost nobody reads it. Ours says, look up." The head stops cutting near 9 and lifts away; the hand-scratched "look up" turns under the lamp.
5. **A5 The ceiling lifts** (9.5 to 14). The camera rises straight up; from `s` 9.55 to 12.9 the record bends into the top of a head (the label becomes skin at the crown), the neck strip and the black cape; ears appear; hair grows with a whorl at the crown and a fade to skin at the sides; the hex floor appears in the lamp's pool. From 12.95 the cape lettering presses in: "That was the top of somebody's head. Side B. Two weeks from now. Sixty Cycle, Brooklyn, New York." From 13.9 to 15.5 the neck duster sweeps across and the loose clippings go with it. The pointer leans the camera a little, more once the person is in frame; the view also drifts a tiny amount over time.
6. **B1 Side B** (14 to 16). The paper neck strip "Book the next cut" unrolls at the collar (scaleX from `s` 14.9 to 15.7) and opens the appointment card; "Flip to Side A" fades in at the bottom of the screen from 15.5 and takes the page back to the top (the film rewinds).

Plates and controls:

- **Track bar** (top left): the current track code and title (they flip in when the track changes), and six grooves sized by scene length that fill as the needle passes. Each groove is a button that jumps to its track (film times 0, 2.65, 4.55, 8.35, 11.4, 16).
- **Hum 60** (top right): off until pressed; then a 60 Hz tone with 120 and 180 Hz overtones whose volume follows the cutting (silent before the head drops and after the run-out). The switch goes dark with a pulsing filament dot while on.
- **Appointment card** (a modal `<dialog>`): opened by the nameplate key and the neck strip. "Appointment card", "Side B." and the date two weeks from today in Brooklyn, moved past the closed days in `shop.js` (for example "Thursday, December 3"), the lead line, the hours and prices from `shop.js`, the made-up-shop note and "Close the card". It slides up and straightens as it opens; Escape, the close key or a click on the backdrop closes it and focus returns to the key that opened it. A "Book online" link appears only when `shop.booking` (or a phone number) is set.
- **Layouts**: phones (under 720 px) and portrait screens (width / height under 0.85) get thinner, centred word blocks (42 mm on phones, 66 mm on portrait tablets) and a centred camera that stands further back; rotating the device re-lays the words. Short landscape screens get a smaller nameplate and a two-column appointment card.
- **Still page** (reduced motion, `?motion=reduce`, or no WebGL): no film. The nameplate sits at the top as a static plate, then every scene's words as text under its track code and title, a flat drawn disc above the title, the neck strip as an ordinary button that opens the same card.

## 8. Interactions to confirm by hand

1. First screen at 1440 x 900, 768 x 1024, 390 x 844, 320 x 640 and 844 x 390: the label, the nameplate with the plain line and the Book key, the track bar and Hum 60 are all on screen and nothing covers anything else.
2. Scroll slowly: the plate sinks away, the words press in and turn upright, the head drops and cuts, the track bar fills and its title flips.
3. At "Between any two of them is a line" drag across the glinting seam: the two bands blend.
4. Keep scrolling: "look up", the camera rises, the record becomes a head in a cape, the duster sweeps, the neck strip unrolls.
5. Press "Book the next cut": the card shows a date two weeks out, the hours and four prices, and the made-up-shop note; close it with Escape.
6. Press "Flip to Side A": the film rewinds to the first screen and the plate returns. Press the A3 groove: the film scrubs to the guard numbers.
7. Reload in the middle of the page: the film opens where you were (the plate stays hidden, the track bar shows the right track).
8. Open with `?motion=reduce`: the still page, with the card still working.

## 9. Verify, then show the result

Serve the folder (section 1) and open it. Check desktop near 1440 x 900, a tablet near 768 x 1024, phone widths near 390 and 320, and a landscape phone near 844 x 390: no horizontal overflow, no missing files, no console errors, no request to another domain. With a browser tool, check the interactions in section 8 with motion allowed (if your browser reports reduced motion you will see the still page; that is intended). If WebGL is unavailable or only a software renderer is present where you test, say so: the film then runs slowly or falls back to the still page.

Finish by telling the person the local address, what you built and tested, the tool and model you are, and anything missing or different. Do not call the result pixel-identical to the demo at https://sitepeel.dev/website-prompts/fade-street/preview/.

More website prompts