I'll build this behavioral experiment with restraint and precision. Let me start by examining the project scaffold.
Let me look at the existing index.html and index.css to match the Tailwind v4 setup.
The scaffold is minimal with Tailwind v4. Now I'll set up the foundation: first index.html with fonts and title, then the design system CSS.
Now the design system — four colors, three typefaces, character-driven keyframes only, and reduced-motion safeguards.
Now the state machine — a clean reducer that models the whole experiment: untouched, violations, apology, patience, and endings.
Now the star of the show — the Duck component. A hand-tuned SVG with mood-driven expressions, pupil tracking, blinking, and attachable props.
Small fix for the unused import, then the supporting cast.
Now the supporting cast: the cardboard stand-in and the peeking eye.
Now the main App — orchestrating proximity physics, the state machine, sequences, and all ten stages. This is the core file, so I'll be thorough.
The App needs several refinements — I'll rewrite it with the finale report properly inside the hero, corrected prop conditions, the trust tap, scroll parallax, and the real duck at the page edge.
Now let me build to verify everything compiles.
Build passes. Now a careful self-review surfaced several behavioral bugs I need to fix:
- Finale ceremony replays after each permitted touch (phase change
finale → permitted retriggers the staged reveals)
- The cardboard cutout would retreat from the cursor — it's inanimate; it must not move
- Brow rotation origins are wrong with
transform-box: fill-box (px origins resolve against the small bbox)
- Ghost button padding conflict —
px-7 vs px-2 is unspecified winner
- The finale subline should be part of the staged ceremony, not instant
Now the finale ceremony replay guard and the staged subline:
Now fix the brow transform origins in Duck.tsx (they must be percentages of each brow's own bbox, inner ends):
Two more refinements — the duck should never blink while staring you down (it's more intense), then rebuild:
Build is green. Now a visual QA pass on the SVG geometry — I re-computed the curves and found the eye whites (r 14.5 at x 104/156) would graze the body outline. I'll widen the head dome and re-seat the eyes/brows so the face sits cleanly inside the silhouette, in both Duck and the cardboard stand-in.
Updating the happy-eye arcs to the new eye positions and syncing the cardboard duck's silhouette and printed face:
Now a full review of the final files to catch any leftover issues:
The Duck renders coherently, but I spotted a composition bug: the "NO" sign board (x144–222, y86–128) would cover the duck's right eye. Repositioning it to be held beside the face:
Now adding the finale duck entrance pop (it should return ceremonially, not just appear), then rebuild:
The build is green. Let me do one final verification of the complete interaction flow in the code:
Everything is verified and building cleanly. The experiment is complete.
DON'T TOUCH THE DUCK — delivered
A minimalist behavioral study built with React, Vite, and Tailwind, centered on one hand-tuned SVG duck and a strict four-color system: warm white #FAF6EF, near-black #1B1917, duck yellow #F8C332, warning red #E3462E. Typography pairs a tight grotesque (Inter Tight) with editorial serif italics (Instrument Serif) and lab-instrument mono (IBM Plex Mono). One viewport, one dominant element, total restraint.
The duck (src/components/Duck.tsx) is a fully articulated character: seven moods driven by brow tilts, lid squints, pupil tracking, and beak states — plus rare blinks, one-foot adjustments, guilty glances away, and a rule: it never blinks while staring at you.
The state machine (src/lib/experiment.ts) models the entire experiment as a pure reducer: untouched → proximity tiers → ten violation stages → the double apology flow (first accepted, second merely noted) → the confrontation, containment, disappearance, and finale — plus the secret patience path (relax at 20s, sit at 40s, thanks at 60s, voluntary approach at 90s, TRUST ACHIEVED at 120s) and restart.
The interactions (in src/App.tsx): a damped spring loop drives believable steps backward, watchfulness that sharpens after your first touch, denied-click escalation on the glass box with a loose base latch as the way in, a security duck that only speaks when approached, a cardboard stand-in that pointedly does not react, and the single permitted TOUCH DUCK joy-hop at the end. Scrolling finds three increasingly exasperated notes and a RETURN TO DUCK button; concluding unlocks the "One rule. One character." coda.
Accessibility runs throughout: full keyboard operation, visible red focus rings, an aria-live narrator describing every reaction, dynamic duck descriptions, large 46px targets, and a reduced-motion mode that trades movement for expression and text.
Files built: index.html, src/index.css, src/lib/experiment.ts, src/components/Duck.tsx, src/components/Cast.tsx, src/App.tsx