@brignano/design 0.3.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/DESIGN.md CHANGED
@@ -306,3 +306,69 @@ Hardcoded values silently survive a theme change. `life`'s status pills carried
306
306
  literal greys for months and would have stayed light grey in dark mode.
307
307
  `brignano.io` carried four literal violet hexes plus ~15 `violet-*` utilities,
308
308
  which is why changing the accent was a migration rather than a one-line edit.
309
+
310
+ ## 13. Product pages
311
+
312
+ A product's marketing page is one argument and one ask. `product-page.css` is its
313
+ structure; `previews/product-page.html` is the skeleton to copy. Import it after
314
+ the tokens, put `tier-marketing` on `<html>` and `pp` on `<body>` (or a wrapper).
315
+
316
+ ```css
317
+ @import '@brignano/design/tokens.css';
318
+ @import '@brignano/design/product-page.css';
319
+ ```
320
+
321
+ The order is fixed, because each band answers the question the last one raised:
322
+
323
+ 1. **Header** (`.pp-header`) — brand, two or three in-page links, the status, the
324
+ primary action. Sticky, on `--surface-sticky`.
325
+ 2. **Hero** (`.pp-hero`) — the status, a one-line **thesis** (`.pp-thesis`), a
326
+ subhead of one or two sentences, the primary action and one secondary, and a
327
+ **proof slot** (`.pp-media`). The proof is the product itself where it can be
328
+ (a live demo), else a real screenshot. Never stock imagery.
329
+ 3. **Story** (`ol.pp-story` of `.pp-chapter`) — three or four numbered chapters,
330
+ usually *the problem*, *how it works*, *who it's for*, *why now*. Each is a mono
331
+ label (`.pp-label`, numbered `01 /` by the list, so reordering renumbers), a
332
+ headline that is a sentence, a short body, and optionally `.pp-points` (two to
333
+ four ruled columns) or a `.pp-figure`.
334
+ 4. **Close** (`.pp-close`) — the primary action again, with the room a form needs
335
+ (`.pp-panel`).
336
+ 5. **Footer** (`.pp-footer`) — the brand and a line about it, a few links, then
337
+ the **legal line** (`.pp-legal`): `© {year} Anthony Brignano. All rights
338
+ reserved.` and, if the product has them, its Privacy and Terms links
339
+ (`<nav aria-label="Legal">`). Leave out a link whose page doesn't exist.
340
+
341
+ The year is the current year **at build time**. This package is CSS and HTML,
342
+ so the consuming site's build fills it in (a template value from
343
+ `new Date().getFullYear()`, or a bundler `define`). Never type it by hand, where
344
+ it goes stale every January, and never write it from client script, where it
345
+ flashes or is missing without JavaScript.
346
+
347
+ Rules:
348
+
349
+ - **One primary action per page.** `.pp-button` is that action, everywhere it
350
+ appears. Anything else is `.pp-button.is-secondary` or a link.
351
+ - **The status is a word with a dot** (`.pp-status`): "Pilot open", "In
352
+ development". `data-state="open"` takes `--success` (you can join now),
353
+ `"soon"` takes `--attention`; no attribute stays neutral. The word carries the
354
+ meaning on its own (§3, never colour alone).
355
+ - **Headlines are sentences.** Calm and declarative, no exclamation marks, no
356
+ claims the page can't back up.
357
+ - **Restraint carries the style.** Hairlines between chapters, whitespace, the
358
+ type scale. No gradients, no tinted section backgrounds, no decorative colour.
359
+
360
+ Every class starts with `.pp-`, so the file sits beside a site's own stylesheet.
361
+ A page can change `--pp-width` (default 1160px) and `--pp-gutter` on `.pp`.
362
+
363
+ Before a product page ships, check it:
364
+
365
+ - [ ] Bands in order: header, hero, story, close, footer.
366
+ - [ ] One primary action, the same everywhere it appears.
367
+ - [ ] A status word with a dot, in the header and the hero.
368
+ - [ ] A one-line thesis; every headline is a sentence.
369
+ - [ ] The proof slot is the product (a live demo) or a real screenshot.
370
+ - [ ] Three or four story chapters, numbered by the list.
371
+ - [ ] Has a copyright footer: `© {year} Anthony Brignano. All rights reserved.`,
372
+ the year filled in at build time, plus Privacy and Terms links for the
373
+ pages the product has.
374
+ - [ ] No hex outside `tokens.css` (`npm run check`).
package/README.md CHANGED
@@ -9,6 +9,7 @@ The shared design system for every brignano surface — `brignano.io`, `life`,
9
9
  | [`DECISIONS.md`](./DECISIONS.md) | Why the values are what they are. ADRs. |
10
10
  | [`tokens.css`](./tokens.css) | Single source of truth for colour, type, space, shape, motion. |
11
11
  | [`tokens.chart.css`](./tokens.chart.css) | Validated categorical palette for data viz. |
12
+ | [`product-page.css`](./product-page.css) | The structure of a product's marketing page: header, thesis hero, numbered story, closing ask. DESIGN.md §13; skeleton in `previews/product-page.html`. |
12
13
  | [`previews/`](./previews) | Live swatches. Open one in a browser to see the tokens render. |
13
14
 
14
15
  ## The shape of it
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@brignano/design",
3
- "version": "0.3.1",
4
- "description": "Shared design system for brignano surfaces — colour, type, space, shape, motion.",
3
+ "version": "0.5.0",
4
+ "description": "Shared design system for brignano surfaces \u2014 colour, type, space, shape, motion.",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -17,6 +17,7 @@
17
17
  "files": [
18
18
  "tokens.css",
19
19
  "tokens.chart.css",
20
+ "product-page.css",
20
21
  "tailwind.css",
21
22
  "DESIGN.md",
22
23
  "DECISIONS.md"
@@ -24,7 +25,8 @@
24
25
  "exports": {
25
26
  "./tokens.css": "./tokens.css",
26
27
  "./tokens.chart.css": "./tokens.chart.css",
27
- "./tailwind.css": "./tailwind.css"
28
+ "./tailwind.css": "./tailwind.css",
29
+ "./product-page.css": "./product-page.css"
28
30
  },
29
31
  "sideEffects": [
30
32
  "*.css"
@@ -0,0 +1,185 @@
1
+ /* product-page.css — the page structure for a product's marketing site.
2
+ *
3
+ * @import '@brignano/design/tokens.css';
4
+ * @import '@brignano/design/product-page.css';
5
+ * <html class="tier-marketing">
6
+ *
7
+ * One page, read top to bottom, that makes one argument and asks for one thing:
8
+ *
9
+ * .pp-header brand, a few in-page links, the status, the primary action
10
+ * .pp-hero status, a one-line thesis, a subhead, two actions, a proof slot
11
+ * .pp-story 3–4 numbered chapters: problem, how it works, who it's for, why now
12
+ * .pp-close the primary action again, with whatever it needs (a form)
13
+ * .pp-footer brand and links, then the legal line: © year, owner, and
14
+ * the product's Privacy and Terms links if it has them
15
+ *
16
+ * The skeleton is previews/product-page.html: copy it, keep the order, replace
17
+ * the words. Rules (DESIGN.md §13):
18
+ *
19
+ * - One primary action per page (.pp-button). Everything else is secondary.
20
+ * - The status is a word with a dot, never a coloured badge on its own.
21
+ * - The proof slot is the product itself where possible (a live demo), else a
22
+ * real screenshot. No stock imagery, no illustrations of people.
23
+ * - Chapters are numbered by the list, so reordering them renumbers them.
24
+ *
25
+ * Every class starts with .pp- so it can sit beside a site's own stylesheet.
26
+ * Colours are tokens only; widths are --pp-width / --pp-gutter, which a page
27
+ * may override on .pp. */
28
+
29
+ .pp {
30
+ --pp-width: 1160px;
31
+ --pp-gutter: var(--s5);
32
+ background: var(--bg);
33
+ color: var(--ink);
34
+ font: var(--text-base) / 1.6 var(--sans);
35
+ font-variant-numeric: tabular-nums;
36
+ -webkit-font-smoothing: antialiased;
37
+ }
38
+ /* On <body>, drop the browser's 8px margin so the sticky header and every band
39
+ run to the screen edges. On a wrapper, the body is the site's business. */
40
+ body.pp { margin: 0; }
41
+ @media (max-width: 560px) { .pp { --pp-gutter: var(--s4); } }
42
+
43
+ /* The content column every band lines up on. */
44
+ .pp-wrap { max-width: var(--pp-width); margin: 0 auto; padding: 0 var(--pp-gutter); }
45
+
46
+ /* ── Skip link ─────────────────────────────────────────────────────────── */
47
+ .pp-skip { position: absolute; left: var(--s4); top: -100px; z-index: 20; padding: var(--s2) var(--s3);
48
+ background: var(--card); color: var(--ink); border-radius: var(--radius-sm); box-shadow: var(--shadow-2); }
49
+ .pp-skip:focus { top: var(--s3); }
50
+
51
+ /* ── Header ────────────────────────────────────────────────────────────── */
52
+ .pp-header {
53
+ position: sticky; top: 0; z-index: 10;
54
+ background: var(--surface-sticky); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
55
+ border-bottom: 1px solid var(--line);
56
+ }
57
+ .pp-header > .pp-wrap { display: flex; align-items: center; gap: var(--s5); min-height: 64px; }
58
+ .pp-brand {
59
+ display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none;
60
+ font-weight: 600; font-size: var(--text-lg); letter-spacing: -0.01em;
61
+ }
62
+ .pp-brand img, .pp-brand svg { width: 26px; height: 26px; }
63
+ .pp-nav { display: flex; align-items: center; gap: var(--s5); margin-left: auto; }
64
+ .pp-nav a { color: var(--ink-soft); text-decoration: none; font-size: var(--text-sm); font-weight: 500; }
65
+ .pp-nav a:hover { color: var(--ink); }
66
+ .pp-header-actions { display: flex; align-items: center; gap: var(--s3); }
67
+ .pp-nav + .pp-header-actions { margin-left: 0; }
68
+ .pp-brand + .pp-header-actions { margin-left: auto; }
69
+ /* With the nav hidden, the actions go right. The selector repeats
70
+ .pp-nav + .pp-header-actions so it outranks the margin-left: 0 above. */
71
+ @media (max-width: 860px) { .pp-nav { display: none; } .pp-nav + .pp-header-actions { margin-left: auto; } }
72
+ @media (max-width: 480px) { .pp-header .pp-status { display: none; } }
73
+
74
+ /* ── Status ────────────────────────────────────────────────────────────
75
+ Where the product stands, as a word with a dot: "Pilot open", "In
76
+ development", "Closed beta". The dot takes a state hue only when the state
77
+ asks something of the reader (DESIGN.md §3): open = success (you can join),
78
+ soon = attention (it is coming, watch for it). Without data-state it stays
79
+ neutral. The word always carries the meaning on its own. */
80
+ .pp-status {
81
+ display: inline-flex; align-items: center; gap: var(--s2); white-space: nowrap;
82
+ font: 500 var(--text-xs) / 1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
83
+ color: var(--ink-soft); padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 999px;
84
+ }
85
+ .pp-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--slate); flex: none; }
86
+ .pp-status[data-state="open"]::before { background: var(--success); box-shadow: 0 0 0 3px var(--success-surface); }
87
+ .pp-status[data-state="soon"]::before { background: var(--attention); box-shadow: 0 0 0 3px var(--attention-surface); }
88
+
89
+ /* ── Buttons ───────────────────────────────────────────────────────────
90
+ .pp-button is the page's one primary action. .is-secondary is everything
91
+ else. Works on <a> and <button>. */
92
+ .pp-button {
93
+ display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); box-sizing: border-box;
94
+ font: 600 var(--text-base) / 1.2 var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer;
95
+ padding: 13px 22px; border-radius: 8px; border: 1px solid var(--i);
96
+ background: var(--i); color: var(--on-i);
97
+ transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
98
+ }
99
+ .pp-button:hover { background: var(--i-hover); border-color: var(--i-hover); color: var(--on-i); }
100
+ .pp-button:active { background: var(--i-pressed); border-color: var(--i-pressed); }
101
+ .pp-button.is-secondary { background: transparent; color: var(--ink); border-color: var(--line-control); font-weight: 500; }
102
+ .pp-button.is-secondary:hover { background: var(--surface-hover); color: var(--ink); }
103
+ .pp-button.is-secondary:active { background: var(--surface-active); }
104
+ .pp-button.is-small { font-size: var(--text-sm); padding: 8px 14px; }
105
+ .pp-button:focus-visible { outline: 2px solid var(--i-ink); outline-offset: 2px; }
106
+ .pp-button:disabled { background: var(--i-disabled-bg); border-color: transparent; color: var(--i-disabled-ink); cursor: not-allowed; }
107
+ /* The 44px touch target includes padding and border (border-box above), so
108
+ a small header button stays 44px tall rather than growing to 62px. */
109
+ @media (pointer: coarse) { .pp-button { min-height: 44px; } }
110
+
111
+ .pp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin: 0; }
112
+ .pp-note { margin: var(--s3) 0 0; font-size: var(--text-sm); color: var(--ink-soft); }
113
+
114
+ /* ── Hero ──────────────────────────────────────────────────────────────
115
+ Copy on the left, proof on the right; stacked below 960px with the copy
116
+ first. The thesis is one line of argument, not a tagline. */
117
+ .pp-hero { padding: var(--s8) 0 var(--s8); }
118
+ .pp-hero > .pp-wrap { display: grid; gap: var(--s7); align-items: center; grid-template-columns: minmax(0, 1fr); }
119
+ @media (min-width: 960px) { .pp-hero > .pp-wrap { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
120
+ .pp-hero .pp-status { margin-bottom: var(--s5); }
121
+ .pp-thesis {
122
+ font-size: var(--text-4xl); font-weight: 600; line-height: 1.04; letter-spacing: -0.035em;
123
+ margin: 0 0 var(--s4); max-width: 14ch; text-wrap: balance;
124
+ }
125
+ .pp-subhead { font-size: var(--text-lg); line-height: 1.5; color: var(--ink-soft); margin: 0 0 var(--s6); max-width: 40ch; }
126
+ .pp-media { margin: 0; min-width: 0; }
127
+
128
+ /* ── Story ─────────────────────────────────────────────────────────────
129
+ An <ol> of chapters. Each opens on a hairline with "01 / Label" in mono,
130
+ then a headline that is a sentence, then a short body and an optional
131
+ figure. Wide screens put the label in its own column. */
132
+ .pp-story { list-style: none; margin: 0; padding: 0; counter-reset: pp-chapter; }
133
+ .pp-chapter { counter-increment: pp-chapter; padding: var(--s8) 0; border-top: 1px solid var(--line); scroll-margin-top: 64px; }
134
+ .pp-chapter > .pp-wrap { display: grid; gap: var(--s4) var(--s7); grid-template-columns: minmax(0, 1fr); }
135
+ @media (min-width: 960px) {
136
+ .pp-chapter > .pp-wrap { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); }
137
+ .pp-chapter-body { grid-column: 2; }
138
+ }
139
+ .pp-label { margin: 0; padding-top: 0.4em; font: 500 var(--text-xs) / 1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
140
+ .pp-label::before { content: counter(pp-chapter, decimal-leading-zero) " / "; color: var(--ink); }
141
+ .pp-chapter h2 {
142
+ font-size: clamp(var(--text-xl), 1rem + 2vw, var(--text-3xl)); font-weight: 600; line-height: 1.15;
143
+ letter-spacing: -0.025em; margin: 0 0 var(--s4); max-width: 22ch; text-wrap: balance;
144
+ }
145
+ .pp-chapter-body > p { margin: 0 0 var(--s4); max-width: 62ch; color: var(--ink-soft); font-size: var(--text-lg); line-height: 1.55; }
146
+ .pp-chapter-body > p:last-child { margin-bottom: 0; }
147
+
148
+ /* Two to four short points under a chapter: a ruled column each. */
149
+ .pp-points { list-style: none; margin: var(--s6) 0 0; padding: 0; display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
150
+ .pp-points > li { border-top: 2px solid var(--ink); padding-top: var(--s3); }
151
+ .pp-points h3 { margin: 0 0 6px; font-size: var(--text-lg); font-weight: 600; letter-spacing: -0.01em; }
152
+ .pp-points p { margin: 0; color: var(--ink-soft); }
153
+
154
+ /* A chapter's figure: a terminal, a screenshot, a small mock of the product. */
155
+ .pp-figure { margin: var(--s6) 0 0; }
156
+ .pp-figure > img { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
157
+ .pp-figure figcaption { margin-top: var(--s2); font-size: var(--text-sm); color: var(--ink-soft); }
158
+ .pp-terminal { margin: 0; overflow-x: auto; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1);
159
+ padding: var(--s5); font: var(--text-sm) / 1.7 var(--mono); }
160
+ .pp-terminal code { font: inherit; }
161
+
162
+ /* ── Close ─────────────────────────────────────────────────────────────
163
+ The primary action once more, with the room a form needs. */
164
+ .pp-close { padding: var(--s8) 0 var(--s9); border-top: 1px solid var(--line); scroll-margin-top: 64px; }
165
+ .pp-close > .pp-wrap { display: grid; gap: var(--s6); grid-template-columns: minmax(0, 1fr); }
166
+ @media (min-width: 960px) { .pp-close > .pp-wrap { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
167
+ .pp-close h2 { font-size: clamp(var(--text-xl), 1rem + 2vw, var(--text-3xl)); font-weight: 600; line-height: 1.15; letter-spacing: -0.025em; margin: var(--s4) 0 var(--s3); text-wrap: balance; }
168
+ .pp-close .pp-subhead { margin-bottom: 0; }
169
+ .pp-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-2); padding: var(--s6); }
170
+ @media (max-width: 560px) { .pp-panel { padding: var(--s5) var(--s4); } }
171
+
172
+ /* ── Footer ────────────────────────────────────────────────────────────── */
173
+ .pp-footer { border-top: 1px solid var(--line); padding: var(--s6) 0 var(--s7); color: var(--ink-soft); font-size: var(--text-sm); }
174
+ .pp-footer > .pp-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s4) var(--s6); }
175
+ .pp-footer p { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
176
+ .pp-footer .pp-brand { font-size: var(--text-base); }
177
+ .pp-footer .pp-brand img, .pp-footer .pp-brand svg { width: 20px; height: 20px; }
178
+ .pp-footer nav { display: flex; flex-wrap: wrap; gap: var(--s4); }
179
+ .pp-footer nav a { color: var(--ink-soft); text-decoration: none; }
180
+ .pp-footer nav a:hover { color: var(--ink); }
181
+ /* The legal line: the copyright, then Privacy / Terms when the product has
182
+ them. Full width under the brand row, quieter than it. The year is filled in
183
+ by the site's build, never typed and never written by client script. */
184
+ .pp-legal { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s5); padding-top: var(--s4); border-top: 1px solid var(--line); font-size: var(--text-xs); }
185
+ .pp-legal small { font-size: inherit; }