# Modern Ink (`modern-ink`)

> The site of a tea house in Longjing village, laid out as an unrolled handscroll: raw xuan paper, four ink paintings, vertical title strips and red only on the name seal, with words and paintings bleeding in like ink on damp paper.

This is a worked example: one concept, built for one fictional client. Study how its concept turned into decisions and borrow the craft. Do not ship its surface (palette, motifs, component looks) for a different client unless your own concept, drawn from that client's world, leads to the same place.

- Chinese name: 新中式水墨. 龙井村一间茶寮的网站，排成一卷展开的手卷：宣纸底，四幅水墨画，竖排题签，红色只用在名章上，字和画像墨落在湿宣纸上一样洇开。
- Category: Oriental. Tags: Ink wash, Calm, Vertical type, Serif, Light, Illustration, Texture, WebGL.
- Live page: [English](/en/sites/modern-ink/full/) · [Chinese](/sites/modern-ink/full/) · [viewer with desktop and mobile views](/en/sites/modern-ink/)
- Built with Astro, React, TypeScript and Tailwind CSS 4, plus Motion Primitives, Motion, Paper Shaders.

## Where the concept came from

From the tea house's own things: the landscape handscroll the keeper unrolls on the tea table, the hand-written labels on the tins and the 一井 name seal. The page is one handscroll, its frontispiece, painting and colophon parted by silk mounting strips, each passage opened by a vertical title strip; the tin labels and the seal are the real objects, while sittings, prices and directions are written the way a good website writes them.

## When it fits

Good for:
- Tea gardens, tea houses and teaware shops: a small yearly harvest, sold on its origin, solar terms and craft.
- Classical gardens, old towns and academies, and new-Chinese homestays: guests come for the quiet and the care.
- Studios and small classes in calligraphy, seal carving, guqin, inkmaking or papermaking.

Avoid when:
- Shops selling dozens or hundreds of SKUs: the vertical tin labels fit five or six items per screen.
- Export factories and B2B sales: ink and vertical type read as a cultural brand, not as specs and capacity.
- Streetwear and big sales campaigns: a page of ink and a touch of red cannot carry promotional volume.
- Clients with no place of their own to paint: a stock misty-mountain wash looks like a template at once.

Industry fit (1-5): Artisan 5, Attraction 4, Hotel & homestay 4, Restaurant 4, Farm produce 4, Tour guide 3, Creative brand 3, Education 2, Export factory 1.

## Adapting it to another client

Keep:
- One page-wide form taken from the client's own objects (here a handscroll), so sections, titles and whitespace all follow it: mounting strips between parts, titles written vertically, more empty paper than content.
- A minimal palette: one ground and one ink in a dense and a pale tone, which also does the buttons; the single accent belongs to the seal.
- One signature motion tied to the material (ink spreading into paper), on a page that already looks finished with motion off.
- Only one practical block copies the client’s own format (here the tin labels as price tags); sittings, booking and directions stay plain tables, a short form and one painted map.

Change:
- The handscroll, mounting strips, seal and tin labels belong to this tea house; for another client, find the layout in its own documents, objects and signs.
- Swap the xuan white and tea green for the client's own materials, and paint its own place and things instead of the same distant mountains everywhere.
- The ink bleed relies on type and paintings with strong dark-to-pale tones; a photo-led client needs an entrance drawn from its own material.

## Essentials

- **Color.** Raw xuan #f3f1ea under a baked paper grain. Text and buttons use only dense ink #1d1c1a and pale ink #5e5c56: the primary button is ink with xuan lettering that lightens a step on hover, the secondary a 1px ink outline that fills on hover. Table rules are #cfcabd. Seal red #b2382c appears only on the 一井 name seal (header, hero, village map and colophon); the sold-out stamp, link hover and keyboard focus are all ink. Tea green #536c26 marks only harvest names and chosen seats.
- **Type.** Chinese titles in Noto Serif SC Variable, set vertically: the hero 明前龙井 at weight 600, 88–200px, 0.04em tracking; section titles are nouns (采制, 茶单, 茶席, 交通) at 500, 48–92px, 0.16em; each of the four craft steps is a single 44–68px Song character (采, 摊, 炒, 藏). Tin labels, map slips and the closing colophon are in LXGW WenKai; Chinese body text at 16–17px, 1.9 line height, 0.02em tracking. Latin display in Cormorant at 400 with -0.02em tracking, Latin text in EB Garamond at 17–18px with 1.6 line height. Digits inside vertical lines stand upright with text-combine-upright.
- **Layout.** The Chinese page reads right to left: each passage opens with its vertical title on the right, like the title strip of a handscroll, and the content unrolls leftwards; the English page runs left to right in horizontal lines. The hero is the frontispiece and the footer the colophon, each parted from the body by a silk strip 28–40px tall. Sections get 72–136px above and below. Every passage opens differently: the craft with a tea sprig and four large characters, the teas straight into a row of tin labels, the sessions with the tea-table painting beside a table of sittings, the directions with the village map beside a plain list. No numbered or micro labels; row rules appear only in the sessions and directions tables, and the rule above each tin label’s price is printed on the label itself. 4 columns on phones, 12 on desktop, 1440px max; buttons have square corners and the phone booking bar has one button.
- **Imagery.** A set of four ink paintings: misty Shifeng hills with rows of tea bushes in the hero, a single bud and leaf beside the craft steps, the long tea table under an open window with six glasses and a kettle on a charcoal stove for the sessions, and a bird's-eye painting of the village with label slips for the car park, the stone lane, the tea house and the well. Strong ink tones, no photographs, no color; each painting is stored as ink with alpha, so the paper grain shows through the wash.
- **Motion.** One big move: the four section titles and three paintings (the tea sprig, the tea table and the village) bleed in like ink on damp xuan paper as they scroll into view. Dense strokes arrive first and pale washes later, the front frays along the paper fibres and leaves a wet grey fringe that dries back, all within a second; the map slips appear once the village has dried. The hero title, hills and booking button are drawn finished at first paint, and running text never bleeds. Whatever scrolls in together shares one canvas, removed when the ink dries. Everything else is 0.2–0.35s colour and position transitions and the sliding highlight in the booking form. No hints; with reduced motion or without WebGL 2, the page is simply drawn finished.

## Common mistakes

- Turning ink wash into beige plus a brush font: the ground needs real paper grain, and the type stays a proper Song and Kai, never a calligraphy display face.
- Taking the seal red for the buttons: red buttons on paper are the most common AI palette. Buttons are ink or an ink outline, and red is only ever the seal; any more and it becomes a guochao poster.
- Rotating horizontal text 90° to fake vertical type: use writing-mode: vertical-rl with full-width punctuation, upright digits via text-combine-upright, and lines running right to left.
- Letting the ink bleed get in the way of reading: the hero title and booking button are readable and usable at first paint, and running text never bleeds; the bleed is for short titles and paintings, under a second each, played once. The real text and images sit under the canvas all along, there is only one canvas at a time and it goes when the ink dries; sections scrolled past finish at once, and with reduced motion nothing is hidden.
- Turning the scroll into paperwork: a vertical side note beside every title, steps numbered 壹 贰 叁, an “open now” status light. Titles are plain nouns, the four steps read in order from their large characters, and the hours are one line.

## Design tokens

| Token | Value | Role |
| --- | --- | --- |
| `--color-xuan` | `#f3f1ea` | Raw xuan paper ground, and text on ink buttons |
| `--color-silk` | `#e7e3d8` | Silk: mounting strips and tin labels |
| `--color-ink` | `#1d1c1a` | Dense ink: text, titles, buttons and the sold-out stamp |
| `--color-danmo` | `#5e5c56` | Pale ink: secondary text and table labels |
| `--color-wash` | `#cfcabd` | Supporting |
| `--color-seal` | `#b2382c` | Seal red: the 一井 name seal only |
| `--color-tea` | `#536c26` | Tea green: harvest names and chosen seats |

Semantic colors with shadcn/ui names, ready for `globals.css`:

```css
:root {
  --background: #f3f1ea;
  --foreground: #1d1c1a;
  --card: #e7e3d8;
  --card-foreground: #1d1c1a;
  --primary: #1d1c1a;
  --primary-foreground: #f3f1ea;
  --secondary: #536c26;
  --muted: #e7e3d8;
  --muted-foreground: #5e5c56;
  --border: #cfcabd;
  --ring: #1d1c1a;
}
```

Fonts. The stacks use Fontsource family names; with Google Fonts or `next/font`, drop the " Variable" suffix. Each npm package holds the CSS and its unicode-range sliced font files. The jsDelivr links are for prototypes only: Google Fonts is blocked in mainland China and jsDelivr is unreliable there, so a production site for mainland visitors bundles the packages, or copies each CSS file with its `files/` folder to its own server or object storage and links that. A Chinese family costs about 100 KB of render-blocking CSS per weight (31 KB gzipped, about 100 slices); browsers then download only the slices for the characters on the page, so link only the weights you use.

- `--font-serif`: "EB Garamond Variable", "Noto Serif SC Variable", "Songti SC", "STSong", serif
- `--font-song`: "Noto Serif SC Variable", "Songti SC", "STSong", serif
- `--font-display`: "Cormorant Variable", "Noto Serif SC Variable", "Songti SC", serif
- `--font-hand`: "LXGW WenKai", "Kaiti SC", "STKaiti", "KaiTi", serif
- Noto Serif SC Variable: `npm install @fontsource-variable/noto-serif-sc`, then `import '@fontsource-variable/noto-serif-sc'`. Plain-HTML prototype: `<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/noto-serif-sc@5.3.1/index.css">`
- Cormorant Variable: `npm install @fontsource-variable/cormorant`, then `import '@fontsource-variable/cormorant'`. Plain-HTML prototype: `<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/cormorant@5.3.0/index.css">`
- EB Garamond Variable: `npm install @fontsource-variable/eb-garamond`, then `import '@fontsource-variable/eb-garamond'`. Plain-HTML prototype: `<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/eb-garamond@5.3.0/index.css">`
- LXGW WenKai: `npm install lxgw-wenkai-webfont`, then `import 'lxgw-wenkai-webfont/lxgwwenkai-regular.css'`. Plain-HTML prototype: `<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/lxgw-wenkai-webfont@1.7.0/lxgwwenkai-regular.css">`

Easing:

- `--ease-settle`: `cubic-bezier(0.32, 0.72, 0, 1)`

Textures used in `styles.css`:

- [xuan.webp](/assets/modern-ink/xuan.webp)

All tokens: [tokens.css](/styles/modern-ink/tokens.css) · [tokens.json](/styles/modern-ink/tokens.json)

## Page structure

Screenshots are 1440 × 900 (desktop) and 390 × 844 (mobile) viewports, on the Chinese page unless marked English. Sections taller than the screen, such as pinned scroll chapters, are captured part-way through.

1. **Header** (`:is(body, main) > header`): [components/Header.astro](/sources/modern-ink/components/Header.astro.txt). Visible in the Hero screenshots
2. **Hero** (`#top`): [components/Hero.astro](/sources/modern-ink/components/Hero.astro.txt). Screenshots: [desktop](/shots/modern-ink/top-desktop.jpg) · [mobile](/shots/modern-ink/top-mobile.jpg) · [desktop, English](/shots/modern-ink/top-desktop-en.jpg) · [mobile, English](/shots/modern-ink/top-mobile-en.jpg)
3. **Craft** (`#craft`): [components/Craft.astro](/sources/modern-ink/components/Craft.astro.txt). Screenshots: [desktop](/shots/modern-ink/craft-desktop.jpg) · [mobile](/shots/modern-ink/craft-mobile.jpg) · [desktop, English](/shots/modern-ink/craft-desktop-en.jpg) · [mobile, English](/shots/modern-ink/craft-mobile-en.jpg)
4. **Teas** (`#teas`): [components/Teas.astro](/sources/modern-ink/components/Teas.astro.txt). Screenshots: [desktop](/shots/modern-ink/teas-desktop.jpg) · [mobile](/shots/modern-ink/teas-mobile.jpg) · [desktop, English](/shots/modern-ink/teas-desktop-en.jpg) · [mobile, English](/shots/modern-ink/teas-mobile-en.jpg)
5. **Sessions** (`#sessions`): [components/Sessions.astro](/sources/modern-ink/components/Sessions.astro.txt). Screenshots: [desktop](/shots/modern-ink/sessions-desktop.jpg) · [mobile](/shots/modern-ink/sessions-mobile.jpg) · [desktop, English](/shots/modern-ink/sessions-desktop-en.jpg) · [mobile, English](/shots/modern-ink/sessions-mobile-en.jpg)
6. **Visit** (`#visit`): [components/Visit.astro](/sources/modern-ink/components/Visit.astro.txt). Screenshots: [desktop](/shots/modern-ink/visit-desktop.jpg) · [mobile](/shots/modern-ink/visit-mobile.jpg) · [desktop, English](/shots/modern-ink/visit-desktop-en.jpg) · [mobile, English](/shots/modern-ink/visit-mobile-en.jpg)
7. **ActionBar** (`#action-bar`): [components/ActionBar.astro](/sources/modern-ink/components/ActionBar.astro.txt). Visible in the Visit screenshots
8. **Footer** (`:is(body, main) > footer`): [components/Footer.astro](/sources/modern-ink/components/Footer.astro.txt). Screenshots: [desktop](/shots/modern-ink/footer-desktop.jpg) · [mobile](/shots/modern-ink/footer-mobile.jpg) · [desktop, English](/shots/modern-ink/footer-desktop-en.jpg) · [mobile, English](/shots/modern-ink/footer-mobile-en.jpg)

## Key components

### Ink bleed

The signature ink bleed: when a data-bleed title or painting scrolls into view, a WebGL 2 canvas paints the same paper over it, then dissolves along an arrival map, dense strokes first and pale washes later, with domain-warped noise fraying the edge into paper fibres and a wet grey fringe, dry within a second. Whatever scrolls in together shares that one canvas, removed when the ink dries, and the first screen never bleeds. The same on touch and desktop, with no hover and no hint.

- Source: [ink-bleed.ts](/sources/modern-ink/ink-bleed.ts.txt)
- Also needs: [styles.css](/sources/modern-ink/styles.css.txt), [Site.astro](/sources/modern-ink/Site.astro.txt)

### Seal

The 一井 name seal cut in white relief, the only red on the page: an SVG mask carves the strokes, with a dot left in the well like its bucket, and feTurbulence gives the uneven paste and chipped edges. It sits at the end of the hero title and after the colophon.

- Source: [components/Seal.astro](/sources/modern-ink/components/Seal.astro.txt)
- Also needs: [components/SealDefs.astro](/sources/modern-ink/components/SealDefs.astro.txt)
- Appears in: Header (`header`), Hero (`top`), Visit (`visit`), Footer (`footer`)

### Tin-label tea list

The one practical block that copies a real object: the tea list grouped by harvest (pre-Qingming, pre-Grain Rain, summer), each grade a vertical tin label with its grade, name, picking date, price per liang and stock, and an ink sold-out stamp when gone. The title strip stands to the right of the labels; five labels fit side by side on a phone, and the English page keeps the labels in horizontal type.

- Source: [components/Teas.astro](/sources/modern-ink/components/Teas.astro.txt)
- Also needs: [i18n.ts](/sources/modern-ink/i18n.ts.txt)
- Appears in: Teas (`teas`)

### SessionBooking

Tea-session booking: pick a day, a sitting and the number of guests, the seating plan colors your seats tea green, and the total rolls with SlidingNumber. It ends in a ready booking message to copy into WeChat, or a call. Every control is a tap target of 44px or more.

- Source: [components/SessionBooking.tsx](/sources/modern-ink/components/SessionBooking.tsx.txt) (Motion Primitives)
- Also needs: [schedule.ts](/sources/modern-ink/schedule.ts.txt), [clipboard.ts](/sources/modern-ink/clipboard.ts.txt)
- Built on Motion Primitives `animated-background` ([components/ui/animated-background.tsx](/sources/modern-ink/components/ui/animated-background.tsx.txt), restyled): `npx shadcn@latest add https://motion-primitives.com/c/animated-background.json`
- Built on Motion Primitives `sliding-number` ([components/ui/sliding-number.tsx](/sources/modern-ink/components/ui/sliding-number.tsx.txt), restyled): `npx shadcn@latest add https://motion-primitives.com/c/sliding-number.json`
- Appears in: Sessions (`sessions`)

### Painted village map

Label slips on an ink painting of the village mark the car park, the stone lane, the tea house, the well, the tea garden and the way to West Lake, appearing once the painting’s ink has dried. Beside it, a plain list for car, bus, on foot and hours, then the address with copy-address and call buttons.

- Source: [components/Visit.astro](/sources/modern-ink/components/Visit.astro.txt)
- Also needs: [page.ts](/sources/modern-ink/page.ts.txt)
- Appears in: Visit (`visit`)

### Xuan paper grain

Paper Shaders PaperTexture baked into one seamless 512px WebP on the html element, so no shader runs for it at load. The ink-bleed canvas paints the same tile, so the paper never changes as the ink arrives.

- Source: [styles.css](/sources/modern-ink/styles.css.txt) (Paper Shaders)

## Dependencies

`npm install motion react-use-measure`

## Source files

Read only what you need:

- [Site.astro](/sources/modern-ink/Site.astro.txt): the whole page, with fonts, sections and scripts
- [styles.css](/sources/modern-ink/styles.css.txt): tokens and component classes
- [i18n.ts](/sources/modern-ink/i18n.ts.txt): all copy, in Chinese and English
- [meta.ts](/sources/modern-ink/meta.ts.txt): this guide as data
- [components/Header.astro](/sources/modern-ink/components/Header.astro.txt): section
- [components/Hero.astro](/sources/modern-ink/components/Hero.astro.txt): section
- [components/Craft.astro](/sources/modern-ink/components/Craft.astro.txt): section
- [components/Teas.astro](/sources/modern-ink/components/Teas.astro.txt): section
- [components/Sessions.astro](/sources/modern-ink/components/Sessions.astro.txt): section
- [components/Visit.astro](/sources/modern-ink/components/Visit.astro.txt): section
- [components/ActionBar.astro](/sources/modern-ink/components/ActionBar.astro.txt): section
- [components/Footer.astro](/sources/modern-ink/components/Footer.astro.txt): section
- [clipboard.ts](/sources/modern-ink/clipboard.ts.txt)
- [components/Seal.astro](/sources/modern-ink/components/Seal.astro.txt)
- [components/SealDefs.astro](/sources/modern-ink/components/SealDefs.astro.txt)
- [components/SessionBooking.tsx](/sources/modern-ink/components/SessionBooking.tsx.txt)
- [ink-bleed.ts](/sources/modern-ink/ink-bleed.ts.txt)
- [page.ts](/sources/modern-ink/page.ts.txt)
- [schedule.ts](/sources/modern-ink/schedule.ts.txt)
- [type.ts](/sources/modern-ink/type.ts.txt)
- [components/ui/animated-background.tsx](/sources/modern-ink/components/ui/animated-background.tsx.txt): Motion Primitives `animated-background`, restyled
- [components/ui/sliding-number.tsx](/sources/modern-ink/components/ui/sliding-number.tsx.txt): Motion Primitives `sliding-number`, restyled

Everything in one file: [/sources/modern-ink.txt](/sources/modern-ink.txt) (about 29K tokens).

Before building, read the [design guide](/guide.md): the process and rules that apply to every site.
