@keystone-sites/marketing-design-system 1.0.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.
Files changed (130) hide show
  1. package/AGENTS.md +163 -0
  2. package/README.md +85 -0
  3. package/assets/media/brand/ks-lockup.svg +13 -0
  4. package/assets/media/brand/ks-logomark.svg +4 -0
  5. package/assets/media/brand/ks-wordmark-inline.svg +13 -0
  6. package/assets/media/brand/ks-wordmark.svg +11 -0
  7. package/assets/media/fonts/gt-standard-standard-vf.woff2 +0 -0
  8. package/assets/media/fonts/pp-kyoto-variable-upright-vf.woff2 +0 -0
  9. package/base.css +111 -0
  10. package/css-vars.d.ts +10 -0
  11. package/grid/engine.css +368 -0
  12. package/grid/field-hash.ts +31 -0
  13. package/grid/field.tsx +48 -0
  14. package/grid/gates.cjs +34 -0
  15. package/grid/region.tsx +97 -0
  16. package/icons.tsx +1224 -0
  17. package/index.css +77 -0
  18. package/lib/autoplay-gate.ts +88 -0
  19. package/lib/focus-trap.ts +42 -0
  20. package/lib/grader.ts +131 -0
  21. package/lib/legal-data.ts +1 -0
  22. package/lib/legal.ts +41 -0
  23. package/lib/noise.tsx +114 -0
  24. package/lib/render-boundary.tsx +27 -0
  25. package/lib/scroll-lock.ts +25 -0
  26. package/lib/swipe.ts +124 -0
  27. package/lib/use-active-section.ts +43 -0
  28. package/lib/use-count-up.ts +26 -0
  29. package/lib/use-grader-search.ts +118 -0
  30. package/lib/use-video-carousel.ts +271 -0
  31. package/media.ts +558 -0
  32. package/package.json +201 -0
  33. package/primitives/button-inline.css +52 -0
  34. package/primitives/button-inline.tsx +38 -0
  35. package/primitives/buttons.css +449 -0
  36. package/primitives/buttons.tsx +263 -0
  37. package/primitives/case-study-button.css +71 -0
  38. package/primitives/case-study-button.tsx +28 -0
  39. package/primitives/case-study-card.css +318 -0
  40. package/primitives/case-study-card.tsx +116 -0
  41. package/primitives/closer-row.css +14 -0
  42. package/primitives/closer-row.tsx +22 -0
  43. package/primitives/cta-row.css +41 -0
  44. package/primitives/cta-row.tsx +39 -0
  45. package/primitives/disclosure.css +210 -0
  46. package/primitives/disclosure.tsx +144 -0
  47. package/primitives/faq-question.css +220 -0
  48. package/primitives/faq-question.tsx +55 -0
  49. package/primitives/field.css +225 -0
  50. package/primitives/field.tsx +266 -0
  51. package/primitives/footer-item.css +72 -0
  52. package/primitives/footer-item.tsx +42 -0
  53. package/primitives/grader-menu.tsx +84 -0
  54. package/primitives/grader.css +302 -0
  55. package/primitives/grader.tsx +284 -0
  56. package/primitives/modal.css +151 -0
  57. package/primitives/modal.tsx +90 -0
  58. package/primitives/notice.css +39 -0
  59. package/primitives/notice.tsx +56 -0
  60. package/primitives/persona-card.css +374 -0
  61. package/primitives/persona-card.tsx +74 -0
  62. package/primitives/picture.css +11 -0
  63. package/primitives/picture.tsx +41 -0
  64. package/primitives/plan-card.css +378 -0
  65. package/primitives/plan-card.tsx +91 -0
  66. package/primitives/prose.css +118 -0
  67. package/primitives/prose.tsx +170 -0
  68. package/primitives/ramps.css +84 -0
  69. package/primitives/slider.css +179 -0
  70. package/primitives/slider.tsx +69 -0
  71. package/primitives/slug.css +87 -0
  72. package/primitives/slug.tsx +37 -0
  73. package/primitives/status.css +298 -0
  74. package/primitives/status.tsx +222 -0
  75. package/primitives/strip.css +40 -0
  76. package/primitives/surface.css +78 -0
  77. package/primitives/surface.tsx +95 -0
  78. package/primitives/table.css +226 -0
  79. package/primitives/table.tsx +122 -0
  80. package/primitives/tabs.css +85 -0
  81. package/primitives/tabs.tsx +122 -0
  82. package/primitives/text.css +110 -0
  83. package/primitives/toc.css +65 -0
  84. package/primitives/toc.tsx +42 -0
  85. package/rules/design-system.md +154 -0
  86. package/rules/grid-and-layout.md +166 -0
  87. package/scripts/generate-exports.mjs +61 -0
  88. package/scripts/generate-type-css.mjs +130 -0
  89. package/sections/faq-island.tsx +102 -0
  90. package/sections/faq.css +213 -0
  91. package/sections/faq.tsx +46 -0
  92. package/sections/footer-nav.tsx +95 -0
  93. package/sections/footer-signature.css +183 -0
  94. package/sections/footer-signature.tsx +114 -0
  95. package/sections/footer.css +735 -0
  96. package/sections/footer.tsx +283 -0
  97. package/sections/gallery-overlay.css +213 -0
  98. package/sections/gallery-overlay.tsx +267 -0
  99. package/sections/landing-benefits.css +59 -0
  100. package/sections/landing-benefits.tsx +81 -0
  101. package/sections/landing-closer.css +23 -0
  102. package/sections/landing-closer.tsx +26 -0
  103. package/sections/landing-hero.css +80 -0
  104. package/sections/landing-hero.tsx +69 -0
  105. package/sections/landing-quote.css +19 -0
  106. package/sections/landing-quote.tsx +30 -0
  107. package/sections/landing-sample.ts +66 -0
  108. package/sections/landing.css +45 -0
  109. package/sections/landing.tsx +69 -0
  110. package/sections/load-orchestrator.tsx +43 -0
  111. package/sections/load.css +138 -0
  112. package/sections/nav-desktop.css +530 -0
  113. package/sections/nav-desktop.tsx +155 -0
  114. package/sections/nav-mobile.css +571 -0
  115. package/sections/nav-mobile.tsx +222 -0
  116. package/sections/nav.css +126 -0
  117. package/sections/nav.tsx +394 -0
  118. package/sections/site-chat-data.ts +16 -0
  119. package/sections/site-chat-open.tsx +25 -0
  120. package/sections/site-chat.tsx +67 -0
  121. package/site-links.ts +36 -0
  122. package/site.ts +2 -0
  123. package/themes/inverted.css +139 -0
  124. package/tokens/fonts.css +38 -0
  125. package/tokens/motion.css +125 -0
  126. package/tokens/primitives.css +163 -0
  127. package/tokens/semantic.css +153 -0
  128. package/tokens/type-styles.json +145 -0
  129. package/tokens/type.css +1548 -0
  130. package/widgets.css +78 -0
@@ -0,0 +1,74 @@
1
+ /** persona-card (1150:25363 set): an art-directed image with the
2
+ * persona's title, then the plan chip, price, and story; the tag hangs
3
+ * under the card. The mount sets `--pcard-size` (sm · md · lg) and
4
+ * `--pcard-u` per band; `size` pins one design for the catalog. */
5
+
6
+ import { PERSONA_TIERS, personaSrc, type PersonaId } from "../media";
7
+
8
+ export type PersonaHue = "pink" | "teal" | "blue" | "purple";
9
+
10
+ export interface PersonaContent {
11
+ id: PersonaId;
12
+ hue: PersonaHue;
13
+ title: string;
14
+ /** The plan chip, "On Starter" … "Custom". */
15
+ plan: string;
16
+ price: string;
17
+ story: string;
18
+ tagLabel: string;
19
+ }
20
+
21
+ interface PersonaCardProps {
22
+ persona: PersonaContent;
23
+ state?: "active" | "inactive";
24
+ /** Optional fixed design size; section mounts leave this unset. */
25
+ size?: "sm" | "md" | "lg";
26
+ }
27
+
28
+ export function PersonaCard({ persona, state = "active", size }: PersonaCardProps) {
29
+ return (
30
+ <article
31
+ className="pcard"
32
+ data-persona={persona.id}
33
+ data-hue={persona.hue}
34
+ data-state={state}
35
+ data-size={size}
36
+ >
37
+ <div className="pcard-box">
38
+ <div className="pcard-image">
39
+ <picture>
40
+ {PERSONA_TIERS.filter((t) => t.media !== null).map((t) => (
41
+ <source
42
+ key={t.cut}
43
+ media={t.media ?? undefined}
44
+ srcSet={personaSrc(persona.id, t.cut)}
45
+ />
46
+ ))}
47
+ <img
48
+ src={personaSrc(persona.id, "xs")}
49
+ width={PERSONA_TIERS[PERSONA_TIERS.length - 1].width}
50
+ height={PERSONA_TIERS[PERSONA_TIERS.length - 1].height}
51
+ alt=""
52
+ loading="lazy"
53
+ decoding="async"
54
+ />
55
+ </picture>
56
+ <h3 className="type pcard-title">{persona.title}</h3>
57
+ </div>
58
+ <div className="pcard-cost">
59
+ <p className="pcard-row">
60
+ <span className="type pcard-plan">{persona.plan}</span>
61
+ <span className="type pcard-price">{persona.price}</span>
62
+ </p>
63
+ <p className="type pcard-story">{persona.story}</p>
64
+ </div>
65
+ <span className="type pcard-tag">{persona.tagLabel}</span>
66
+ </div>
67
+ <button
68
+ type="button"
69
+ className="pcard-overlay"
70
+ aria-label={`Show the ${persona.tagLabel} example`}
71
+ />
72
+ </article>
73
+ );
74
+ }
@@ -0,0 +1,11 @@
1
+ /* A picture fills the box its owner gives it and cover-crops. */
2
+
3
+ .pic,
4
+ .pic img {
5
+ display: block;
6
+ width: 100%;
7
+ height: 100%;
8
+ }
9
+ .pic img {
10
+ object-fit: cover;
11
+ }
@@ -0,0 +1,41 @@
1
+ /** Art-directed `<picture>` over a `PictureSet` from media.ts: one
2
+ * media-gated `<source>` per tier, the un-gated tier as the `<img>`
3
+ * fallback, intrinsic `width`/`height` on every candidate so layout is
4
+ * primed before the bytes arrive. The owner's CSS sizes and crops it
5
+ * (`.pic` fills its box with `object-fit: cover`). */
6
+
7
+ import type { PictureSet } from "../media";
8
+
9
+ interface PictureProps {
10
+ set: PictureSet;
11
+ className?: string;
12
+ /** First-view candidates load eagerly at high priority; the rest lazily. */
13
+ priority?: boolean;
14
+ }
15
+
16
+ export function Picture({ set, className, priority = false }: PictureProps) {
17
+ const sources = set.tiers.filter((tier) => tier.media !== null);
18
+ const fallback = set.tiers.find((tier) => tier.media === null) ?? set.tiers[set.tiers.length - 1];
19
+ return (
20
+ <picture className={className ? `pic ${className}` : "pic"}>
21
+ {sources.map((tier) => (
22
+ <source
23
+ key={tier.src}
24
+ media={tier.media ?? undefined}
25
+ srcSet={tier.src}
26
+ width={tier.width}
27
+ height={tier.height}
28
+ />
29
+ ))}
30
+ <img
31
+ src={fallback.src}
32
+ width={fallback.width}
33
+ height={fallback.height}
34
+ alt={set.alt}
35
+ decoding="async"
36
+ loading={priority ? "eager" : "lazy"}
37
+ fetchPriority={priority ? "high" : undefined}
38
+ />
39
+ </picture>
40
+ );
41
+ }
@@ -0,0 +1,378 @@
1
+ /* pricing-card-2 (1127:14286 set). Three designs — sm 352 (1170:34293),
2
+ md 640 (1170:32407), lg 373 (1129:17795) — selected by `--plan-size`,
3
+ which the mount declares per band or `data-size` pins. Interiors are
4
+ designed px scaled by `--_u`, the mount's unit, so a compressed band
5
+ zooms the card whole; type pins `--fs-px` to the same unit with flat
6
+ anchors, since the size keyword, not the band, picks the step. The hue
7
+ table at the end is keyed by `data-plan`. */
8
+
9
+ .plan {
10
+ --_u: var(--plan-u, 1px);
11
+ position: relative;
12
+ display: flex;
13
+ flex-direction: column;
14
+ box-sizing: border-box;
15
+ background: var(--color-bg-100);
16
+ border: 1px solid var(--color-border-000);
17
+ /* The drawn stroke sits inside the designed pad (Figma strokes take no
18
+ layout space), so the pad gives up the border's pixel. */
19
+ padding: calc(var(--_u) * var(--_pad) - 1px);
20
+ --_pad: 16;
21
+ --btn-size: md;
22
+ }
23
+ /* A pinned card takes its frame's width; a style query reads the
24
+ ancestor, so the lg card also restates its own pad. */
25
+ .plan[data-size="sm"] { --plan-size: sm; --_w: 352; }
26
+ .plan[data-size="md"] { --plan-size: md; --_w: 640; }
27
+ .plan[data-size="lg"] { --plan-size: lg; --_w: 373.33; --_pad: 12; }
28
+ .plan[data-size] {
29
+ width: calc(var(--_u) * var(--_w));
30
+ }
31
+
32
+ /* The box paints the band and body; the popular plan's hard shadow
33
+ belongs to it, and the tag hangs from its edges beneath both. */
34
+ .plan-box {
35
+ position: relative;
36
+ isolation: isolate;
37
+ flex: 1;
38
+ display: flex;
39
+ flex-direction: column;
40
+ }
41
+ .plan[data-plan="growth"] .plan-box {
42
+ box-shadow: var(--shadow-hard-square);
43
+ }
44
+
45
+ /* ---- band ---- */
46
+
47
+ .plan-band {
48
+ display: flex;
49
+ align-items: center;
50
+ justify-content: space-between;
51
+ box-sizing: border-box;
52
+ min-height: calc(var(--_u) * var(--_band-h));
53
+ padding-inline: calc(var(--_u) * var(--_band-px));
54
+ background: var(--_band-bg);
55
+ border: 1px solid var(--_band-line);
56
+ --_band-h: 80;
57
+ --_band-px: 16;
58
+ }
59
+ .plan-name {
60
+ margin: var(--space-none);
61
+ color: var(--_ink);
62
+ white-space: nowrap;
63
+ --font: var(--ts-display-serif-xs-extralight-font);
64
+ --ls: var(--ts-display-serif-xs-extralight-ls);
65
+ --fs-rm: var(--ts-display-serif-xs-extralight-fs);
66
+ --fs-rd2: var(--fs-rm);
67
+ --lh-rm: var(--ts-display-serif-xs-extralight-lh);
68
+ --lh-rd2: var(--lh-rm);
69
+ }
70
+
71
+ /* Nine bordered cells; each cell draws its own line, as the design
72
+ does, so interior lines are two pixels. Cells 4 and 8 are circles. */
73
+ .plan-motif {
74
+ flex: none;
75
+ display: grid;
76
+ grid-template-columns: repeat(3, 1fr);
77
+ grid-template-rows: repeat(3, 1fr);
78
+ width: calc(var(--_u) * var(--_motif));
79
+ height: calc(var(--_u) * var(--_motif));
80
+ --_motif: 48;
81
+ }
82
+ .plan-motif i {
83
+ display: block;
84
+ box-sizing: border-box;
85
+ border: 1px solid var(--_motif-line);
86
+ }
87
+ .plan-motif i:nth-child(4),
88
+ .plan-motif i:nth-child(8) {
89
+ border-radius: var(--radius-full);
90
+ }
91
+ .plan[data-plan="starter"] .plan-motif i:nth-child(7),
92
+ .plan[data-plan="growth"] .plan-motif i:nth-child(2),
93
+ .plan[data-plan="growth"] .plan-motif i:nth-child(3),
94
+ .plan[data-plan="growth"] .plan-motif i:nth-child(6),
95
+ .plan[data-plan="growth"] .plan-motif i:nth-child(7),
96
+ .plan[data-plan="scale"] .plan-motif i:not(:nth-child(4)):not(:nth-child(8)) {
97
+ background: var(--_motif-fill);
98
+ }
99
+
100
+ /* ---- body ---- */
101
+
102
+ .plan-body {
103
+ flex: 1;
104
+ display: flex;
105
+ flex-direction: column;
106
+ box-sizing: border-box;
107
+ background: var(--color-bg-000);
108
+ border: 1px solid var(--color-border-000);
109
+ border-top: 0;
110
+ }
111
+
112
+ .plan-offer {
113
+ display: flex;
114
+ flex-direction: column;
115
+ box-sizing: border-box;
116
+ padding: calc(var(--_u) * 20) calc(var(--_u) * var(--_offer-px)) calc(var(--_u) * var(--_offer-pb));
117
+ --_offer-px: 20;
118
+ --_offer-pb: 0;
119
+ }
120
+ .plan-desc {
121
+ margin: var(--space-none);
122
+ color: var(--color-text-400);
123
+ max-width: var(--_desc-w, none);
124
+ --font: var(--ts-text-md-light-font);
125
+ --ls: var(--ts-text-md-light-ls);
126
+ --opsz: var(--ts-text-md-light-opsz);
127
+ --fs-rm: var(--ts-text-md-light-fs);
128
+ --fs-rd2: var(--fs-rm);
129
+ --lh-rm: var(--ts-text-md-light-lh);
130
+ --lh-rd2: var(--lh-rm);
131
+ }
132
+ .plan-price {
133
+ display: flex;
134
+ align-items: baseline;
135
+ gap: calc(var(--_u) * 4);
136
+ margin: calc(var(--_u) * var(--_price-mt)) 0 0;
137
+ white-space: nowrap;
138
+ --_price-mt: 16;
139
+ }
140
+ .plan-amount {
141
+ color: var(--_ink);
142
+ --font: var(--ts-text-2xl-light-font);
143
+ --ls: var(--ts-text-2xl-light-ls);
144
+ --opsz: var(--ts-text-2xl-light-opsz);
145
+ --fs-rm: var(--ts-text-2xl-light-fs);
146
+ --fs-rd2: var(--fs-rm);
147
+ --lh-rm: var(--ts-text-2xl-light-lh);
148
+ --lh-rd2: var(--lh-rm);
149
+ }
150
+ .plan-per {
151
+ color: var(--color-text-400);
152
+ --font: var(--ts-text-sm-light-font);
153
+ --ls: var(--ts-text-sm-light-ls);
154
+ --opsz: var(--ts-text-sm-light-opsz);
155
+ --fs-rm: var(--ts-text-sm-light-fs);
156
+ --fs-rd2: var(--fs-rm);
157
+ --lh-rm: var(--ts-text-sm-light-lh);
158
+ --lh-rd2: var(--lh-rm);
159
+ }
160
+ /* The CTA fills the offer's width; the button's own size is material. */
161
+ .plan-cta {
162
+ display: flex;
163
+ margin-top: calc(var(--_u) * var(--_cta-mt));
164
+ --_cta-mt: 20;
165
+ }
166
+ .plan-cta .btn-fill,
167
+ .plan-cta .btn-body {
168
+ width: 100%;
169
+ }
170
+
171
+ .plan-list {
172
+ display: flex;
173
+ flex-direction: column;
174
+ box-sizing: border-box;
175
+ padding:
176
+ calc(var(--_u) * var(--_list-pt))
177
+ calc(var(--_u) * var(--_list-pr))
178
+ calc(var(--_u) * 24)
179
+ calc(var(--_u) * var(--_list-pl));
180
+ --_list-pt: 20;
181
+ --_list-pr: 20;
182
+ --_list-pl: 20;
183
+ }
184
+ .plan-lead {
185
+ margin: 0 0 calc(var(--_u) * var(--_lead-gap));
186
+ color: var(--color-text-400);
187
+ white-space: nowrap;
188
+ --_lead-gap: 20;
189
+ --font: var(--ts-text-xs-regular-font);
190
+ --ls: var(--ts-text-xs-regular-ls);
191
+ --opsz: var(--ts-text-xs-regular-opsz);
192
+ --fs-rm: var(--ts-text-xs-regular-fs);
193
+ --fs-rd2: var(--fs-rm);
194
+ --lh-rm: var(--ts-text-xs-regular-lh);
195
+ --lh-rd2: var(--lh-rm);
196
+ }
197
+ .plan-items {
198
+ list-style: none;
199
+ margin: var(--space-none);
200
+ padding: var(--space-none);
201
+ display: flex;
202
+ flex-direction: column;
203
+ gap: calc(var(--_u) * var(--_items-gap));
204
+ --_items-gap: 12;
205
+ }
206
+ .plan-item {
207
+ display: flex;
208
+ align-items: flex-start;
209
+ gap: calc(var(--_u) * 8);
210
+ }
211
+ .plan-check {
212
+ flex: none;
213
+ width: calc(var(--_u) * 18);
214
+ height: calc(var(--_u) * 18);
215
+ /* Checks take the plan ink: text/200, teal/700, blue/700. */
216
+ color: var(--_ink);
217
+ }
218
+ .plan-item-text {
219
+ color: var(--color-text-200);
220
+ --font: var(--ts-text-sm-light-font);
221
+ --ls: var(--ts-text-sm-light-ls);
222
+ --opsz: var(--ts-text-sm-light-opsz);
223
+ --fs-rm: var(--ts-text-sm-light-fs);
224
+ --fs-rd2: var(--fs-rm);
225
+ --lh-rm: var(--ts-text-sm-light-lh);
226
+ --lh-rd2: var(--lh-rm);
227
+ }
228
+
229
+ /* The tag hangs from the box's bottom edge (sm, lg) or the band's (md),
230
+ behind the box so only its overhang shows; its 4/8 padding sits the
231
+ label two pixels high, as drawn. */
232
+ .plan-tag {
233
+ position: absolute;
234
+ z-index: -1;
235
+ top: var(--_tag-top);
236
+ right: calc(var(--_u) * var(--_tag-right));
237
+ display: inline-flex;
238
+ align-items: center;
239
+ box-sizing: border-box;
240
+ height: calc(var(--_u) * 32);
241
+ padding: 0 calc(var(--_u) * 12) calc(var(--_u) * 4);
242
+ background: var(--_tag-bg);
243
+ color: var(--color-base-white);
244
+ border-radius: 0 0 calc(var(--_u) * 6) calc(var(--_u) * 6);
245
+ white-space: nowrap;
246
+ --_tag-top: 100%;
247
+ --_tag-right: 16;
248
+ --font: var(--ts-text-xs-medium-font);
249
+ --ls: var(--ts-text-xs-medium-ls);
250
+ --opsz: var(--ts-text-xs-medium-opsz);
251
+ --fs-rm: var(--ts-text-xs-medium-fs);
252
+ --fs-rd2: var(--fs-rm);
253
+ --lh-rm: var(--ts-text-xs-medium-lh);
254
+ --lh-rd2: var(--lh-rm);
255
+ }
256
+
257
+ /* Every text inside rides the card's unit. */
258
+ .plan .type {
259
+ --fs-px: calc(var(--_u) * var(--fs-band));
260
+ --lh-px: calc(var(--_u) * var(--lh-band));
261
+ }
262
+
263
+ /* ---- md (1170:32407) ---- */
264
+
265
+ @container style(--plan-size: md) {
266
+ .plan-band {
267
+ --_band-h: 88;
268
+ --_band-px: 20;
269
+ }
270
+ .plan-name {
271
+ --font: var(--ts-display-serif-xs-plus-extralight-font);
272
+ --ls: var(--ts-display-serif-xs-plus-extralight-ls);
273
+ --fs-rm: var(--ts-display-serif-xs-plus-extralight-fs);
274
+ --lh-rm: var(--ts-display-serif-xs-plus-extralight-lh);
275
+ }
276
+ .plan-offer {
277
+ --_offer-pb: 24;
278
+ }
279
+ .plan-desc {
280
+ --_desc-w: calc(var(--_u) * 282);
281
+ --font: var(--ts-text-lg-light-font);
282
+ --ls: var(--ts-text-lg-light-ls);
283
+ --opsz: var(--ts-text-lg-light-opsz);
284
+ --fs-rm: var(--ts-text-lg-light-fs);
285
+ --lh-rm: var(--ts-text-lg-light-lh);
286
+ }
287
+ .plan-price {
288
+ --_price-mt: 12;
289
+ }
290
+ .plan-cta {
291
+ --_cta-mt: 16;
292
+ --btn-size: lg;
293
+ }
294
+ .plan-list {
295
+ border-top: 1px solid var(--color-border-000);
296
+ --_list-pr: 80;
297
+ }
298
+ .plan-lead {
299
+ --_lead-gap: 16;
300
+ }
301
+ .plan-tag {
302
+ --_tag-top: calc(var(--_u) * 88);
303
+ --_tag-right: 20;
304
+ }
305
+ }
306
+
307
+ /* ---- lg (1129:17795) ---- */
308
+
309
+ @container style(--plan-size: lg) {
310
+ .plan {
311
+ --_pad: 12;
312
+ }
313
+ .plan-band {
314
+ --_band-h: 100;
315
+ --_band-px: 20;
316
+ }
317
+ .plan-name {
318
+ --font: var(--ts-display-serif-sm-extralight-font);
319
+ --ls: var(--ts-display-serif-sm-extralight-ls);
320
+ --fs-rm: var(--ts-display-serif-sm-extralight-fs);
321
+ --lh-rm: var(--ts-display-serif-sm-extralight-lh);
322
+ }
323
+ .plan-motif {
324
+ --_motif: 64;
325
+ }
326
+ .plan-offer {
327
+ --_offer-px: 24;
328
+ --_offer-pb: 32;
329
+ }
330
+ .plan-desc {
331
+ --font: var(--ts-text-lg-light-font);
332
+ --ls: var(--ts-text-lg-light-ls);
333
+ --opsz: var(--ts-text-lg-light-opsz);
334
+ --fs-rm: var(--ts-text-lg-light-fs);
335
+ --lh-rm: var(--ts-text-lg-light-lh);
336
+ }
337
+ .plan-cta {
338
+ --_cta-mt: 24;
339
+ --btn-size: lg;
340
+ }
341
+ .plan-list {
342
+ border-top: 1px solid var(--color-border-000);
343
+ --_list-pt: 24;
344
+ --_list-pr: 24;
345
+ --_list-pl: 24;
346
+ }
347
+ .plan-lead {
348
+ --_lead-gap: 16;
349
+ }
350
+ .plan-items {
351
+ --_items-gap: 16;
352
+ }
353
+ }
354
+
355
+ /* ---- hue table (data-plan) ---- */
356
+
357
+ .plan[data-plan="starter"] {
358
+ --_band-bg: var(--color-bg-200);
359
+ --_band-line: var(--color-border-000);
360
+ --_ink: var(--color-text-200);
361
+ --_motif-line: var(--color-border-100);
362
+ --_motif-fill: var(--color-bg-300);
363
+ }
364
+ .plan[data-plan="growth"] {
365
+ --_band-bg: var(--color-teal-250);
366
+ --_band-line: var(--color-teal-300);
367
+ --_ink: var(--color-teal-700);
368
+ --_motif-line: var(--color-teal-400);
369
+ --_motif-fill: var(--color-teal-300);
370
+ --_tag-bg: var(--color-teal-400);
371
+ }
372
+ .plan[data-plan="scale"] {
373
+ --_band-bg: var(--color-blue-150);
374
+ --_band-line: var(--color-blue-200);
375
+ --_ink: var(--color-blue-700);
376
+ --_motif-line: var(--color-blue-250);
377
+ --_motif-fill: var(--color-blue-200);
378
+ }
@@ -0,0 +1,91 @@
1
+ /** pricing-card-2 (1127:14286 set): band with name and motif, offer
2
+ * with description, price and CTA, then the included list. The mount
3
+ * sets `--plan-size` (sm · md · lg) and `--plan-u` per band; `size`
4
+ * pins one design for the catalog. */
5
+
6
+ import { IconCheck } from "../icons";
7
+
8
+ export type PlanId = "starter" | "growth" | "scale";
9
+
10
+ export interface Plan {
11
+ id: PlanId;
12
+ name: string;
13
+ description: string;
14
+ /** Monthly amount as designed, with the currency mark. */
15
+ amount: string;
16
+ cta: { label: string; href: string; external?: boolean };
17
+ /** Shown above the list when the plan builds on another. */
18
+ lead?: string;
19
+ items: string[];
20
+ /** Hanging tag under the card; only the popular plan has one. */
21
+ tag?: string;
22
+ }
23
+
24
+ export const PER_MONTH = "/month";
25
+ import { ButtonFill } from "./buttons";
26
+
27
+ type PlanCardSize = "sm" | "md" | "lg";
28
+
29
+ interface PlanCardProps {
30
+ plan: Plan;
31
+ /** Optional fixed design size; section mounts leave this unset. */
32
+ size?: PlanCardSize;
33
+ }
34
+
35
+ /** 3 × 3 cells (pricing-card-motif-2, 1127:15960); the plan's CSS
36
+ * table names which cells fill. Cells 4 and 8 are circles in every plan. */
37
+ const MOTIF_CELLS = [1, 2, 3, 4, 5, 6, 7, 8, 9] as const;
38
+
39
+ const CHROME: Record<Plan["id"], "gray" | "teal" | "blue"> = {
40
+ starter: "gray",
41
+ growth: "teal",
42
+ scale: "blue",
43
+ };
44
+
45
+ export function PlanCard({ plan, size }: PlanCardProps) {
46
+ return (
47
+ <article className="plan" data-plan={plan.id} data-size={size}>
48
+ <div className="plan-box">
49
+ <header className="plan-band">
50
+ <h3 className="type plan-name">{plan.name}</h3>
51
+ <span className="plan-motif" aria-hidden="true">
52
+ {MOTIF_CELLS.map((n) => (
53
+ <i key={n} />
54
+ ))}
55
+ </span>
56
+ </header>
57
+ <div className="plan-body">
58
+ <div className="plan-offer">
59
+ <p className="type plan-desc">{plan.description}</p>
60
+ <p className="plan-price">
61
+ <span className="type plan-amount">{plan.amount}</span>
62
+ <span className="type plan-per">{PER_MONTH}</span>
63
+ </p>
64
+ <div className="plan-cta">
65
+ <ButtonFill
66
+ size="inherit"
67
+ chrome={CHROME[plan.id]}
68
+ href={plan.cta.href}
69
+ external={plan.cta.external}
70
+ >
71
+ {plan.cta.label}
72
+ </ButtonFill>
73
+ </div>
74
+ </div>
75
+ <div className="plan-list">
76
+ {plan.lead && <p className="type plan-lead">{plan.lead}</p>}
77
+ <ul className="plan-items">
78
+ {plan.items.map((item) => (
79
+ <li key={item} className="plan-item">
80
+ <IconCheck className="plan-check" />
81
+ <span className="type plan-item-text">{item}</span>
82
+ </li>
83
+ ))}
84
+ </ul>
85
+ </div>
86
+ </div>
87
+ {plan.tag && <span className="type plan-tag">{plan.tag}</span>}
88
+ </div>
89
+ </article>
90
+ );
91
+ }
@@ -0,0 +1,118 @@
1
+ /* The prose kit: colour and casing for the text roles a product surface
2
+ is written in. Family, weight, size, tracking, and optical size come
3
+ from the element's `type ts-…` classes (primitives/text.css); nothing
4
+ here sets a font. */
5
+
6
+ .eyebrow {
7
+ margin: var(--space-none);
8
+ --ls: 0.08em;
9
+ --case: uppercase;
10
+ color: var(--color-text-400);
11
+ }
12
+ .eyebrow[data-tone="teal"] {
13
+ color: var(--color-teal-300);
14
+ }
15
+
16
+ /* Copy: three sizes, two weights, tinted by tone. */
17
+ .copy {
18
+ margin: var(--space-none);
19
+ color: var(--color-text-300);
20
+ }
21
+ .copy[data-size="xs"] {
22
+ color: var(--color-text-400);
23
+ }
24
+ .copy[data-size="md"] {
25
+ color: var(--color-text-200);
26
+ }
27
+ .copy[data-weight="medium"] {
28
+ color: var(--color-text-100);
29
+ }
30
+ .copy[data-size="xs"][data-weight="medium"] {
31
+ color: var(--color-text-200);
32
+ }
33
+ .copy[data-tone="poor"] {
34
+ color: var(--color-danger-200);
35
+ }
36
+ .copy[data-tone="teal"] {
37
+ color: var(--color-teal-300);
38
+ }
39
+ .copy[data-clip] {
40
+ overflow: hidden;
41
+ text-overflow: ellipsis;
42
+ white-space: nowrap;
43
+ }
44
+ .copy[data-clip="2"] {
45
+ display: -webkit-box;
46
+ -webkit-box-orient: vertical;
47
+ -webkit-line-clamp: 2;
48
+ white-space: normal;
49
+ }
50
+ .copy-num {
51
+ font-variant-numeric: tabular-nums;
52
+ }
53
+ /* The same clips as classes, for text that is not copy (a URL, a label). */
54
+ .copy-clip {
55
+ overflow: hidden;
56
+ text-overflow: ellipsis;
57
+ white-space: nowrap;
58
+ }
59
+ .copy-clip-2 {
60
+ display: -webkit-box;
61
+ -webkit-box-orient: vertical;
62
+ -webkit-line-clamp: 2;
63
+ overflow: hidden;
64
+ }
65
+ .copy-break {
66
+ word-break: break-all;
67
+ }
68
+
69
+ /* Title: a serif head inside a sheet. */
70
+ .copy-title {
71
+ margin: var(--space-none);
72
+ color: var(--color-text-100);
73
+ }
74
+
75
+ /* Figure: a large tabular number; a hue takes the status ramp's dot. */
76
+ .figure {
77
+ margin: var(--space-none);
78
+ font-variant-numeric: tabular-nums;
79
+ color: var(--color-text-100);
80
+ }
81
+ .figure[data-hue] {
82
+ color: var(--_dot);
83
+ }
84
+
85
+ /* Section head inside a page body. */
86
+ .sec-title {
87
+ margin: var(--space-none);
88
+ color: var(--color-text-100);
89
+ }
90
+ .sec-sub {
91
+ margin: var(--space-xs) 0 0;
92
+ color: var(--color-text-400);
93
+ }
94
+
95
+ /* Dot list: short lines marked with a teal dot. */
96
+ .dot-list {
97
+ display: flex;
98
+ flex-direction: column;
99
+ gap: var(--space-sm);
100
+ margin: var(--space-none);
101
+ padding: var(--space-none);
102
+ list-style: none;
103
+ }
104
+ .dot-list > li {
105
+ position: relative;
106
+ padding-left: var(--space-xl);
107
+ color: var(--color-text-200);
108
+ }
109
+ .dot-list > li::before {
110
+ content: "";
111
+ position: absolute;
112
+ left: 2px;
113
+ top: 0.55em;
114
+ width: 6px;
115
+ height: 6px;
116
+ border-radius: var(--radius-full);
117
+ background: var(--color-teal-400);
118
+ }