@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,267 @@
1
+ "use client";
2
+
3
+ import { useEffect, useLayoutEffect, useRef, useState, type ReactNode } from "react";
4
+ import { createPortal } from "react-dom";
5
+ import { trapModalTab } from "../lib/focus-trap";
6
+ import { lockScroll } from "../lib/scroll-lock";
7
+ import {
8
+ IconChevronLeftSm,
9
+ IconChevronRightSm,
10
+ IconDesktopView,
11
+ IconGalleryClose,
12
+ IconMobileView,
13
+ IconTabletView,
14
+ } from "../icons";
15
+
16
+ export interface GalleryViewerSite {
17
+ /** Label used in the rail and iframe title. */
18
+ name: string;
19
+ url: string;
20
+ }
21
+
22
+ type ViewMode = "desktop" | "tablet" | "mobile";
23
+ type Phase = "closed" | "open" | "closing";
24
+
25
+ const RS_GATE = 470;
26
+ const RT_GATE = 665;
27
+
28
+ const VIEW_MODES: Array<{ id: ViewMode; label: string; Icon: typeof IconDesktopView }> = [
29
+ { id: "desktop", label: "Desktop view", Icon: IconDesktopView },
30
+ { id: "tablet", label: "Tablet view", Icon: IconTabletView },
31
+ { id: "mobile", label: "Mobile view", Icon: IconMobileView },
32
+ ];
33
+
34
+ export function GalleryOverlay({
35
+ sites,
36
+ openSite,
37
+ aside,
38
+ }: {
39
+ sites: GalleryViewerSite[];
40
+ /** 1-based site index from `?gallery=` (e.g. /gallery → first site). */
41
+ openSite?: number;
42
+ /** Optional companion panel beside the stage, such as feedback on the shown site. */
43
+ aside?: ReactNode;
44
+ }) {
45
+ const portalTarget = typeof document === "undefined" ? null : document.body;
46
+ const initialSite =
47
+ openSite !== undefined ? Math.max(1, Math.min(sites.length || 1, openSite || 1)) : null;
48
+ const [phase, setPhase] = useState<Phase>(initialSite ? "open" : "closed");
49
+ const [s, setS] = useState(initialSite ?? 1);
50
+ const [v, setV] = useState<ViewMode>("desktop");
51
+ const rootRef = useRef<HTMLDivElement>(null);
52
+ const stageRef = useRef<HTMLDivElement>(null);
53
+ const openerRef = useRef<HTMLElement | null>(null);
54
+ const mounted = phase !== "closed";
55
+
56
+ useEffect(() => {
57
+ const onClick = (e: MouseEvent) => {
58
+ const target = e.target instanceof Element ? e.target : null;
59
+ const trigger = target?.closest<HTMLElement>('[data-action="open-gallery"]');
60
+ if (!trigger) return;
61
+ // A thumbnail provides its site; a section CTA falls back to its published index.
62
+ const read =
63
+ trigger.dataset.gallerySite ?? trigger.closest<HTMLElement>("[data-k]")?.dataset.k;
64
+ const next = read ? parseInt(read, 10) : 1;
65
+ openerRef.current = trigger;
66
+ setS(Number.isFinite(next) ? Math.max(1, Math.min(sites.length, next)) : 1);
67
+ const w = document.documentElement.clientWidth;
68
+ setV(w < RS_GATE ? "mobile" : w < RT_GATE ? "tablet" : "desktop");
69
+ setPhase("open");
70
+ };
71
+ document.addEventListener("click", onClick);
72
+ return () => document.removeEventListener("click", onClick);
73
+ }, [sites.length]);
74
+
75
+ /* Drop ?gallery= after the deep-linked open so refresh stays closed. */
76
+ useEffect(() => {
77
+ if (!initialSite) return;
78
+ const params = new URLSearchParams(window.location.search);
79
+ if (!params.has("gallery")) return;
80
+ params.delete("gallery");
81
+ const query = params.toString();
82
+ window.history.replaceState(
83
+ null,
84
+ "",
85
+ `${window.location.pathname}${query ? `?${query}` : ""}${window.location.hash}`,
86
+ );
87
+ }, [initialSite]);
88
+
89
+ useEffect(() => {
90
+ if (!mounted) return;
91
+ const unlock = lockScroll();
92
+ rootRef.current?.focus({ preventScroll: true });
93
+ return unlock;
94
+ }, [mounted]);
95
+
96
+ /* Recompute iframe placement when the viewer or mode changes. */
97
+ useLayoutEffect(() => {
98
+ if (!mounted) return;
99
+ const root = rootRef.current;
100
+ const stage = stageRef.current;
101
+ if (!root || !stage) return;
102
+ const layout = () => {
103
+ const w = stage.clientWidth;
104
+ const availH = stage.clientHeight;
105
+ const cs = getComputedStyle(root);
106
+ const gvRef = (name: string) => parseFloat(cs.getPropertyValue(name));
107
+ const ref =
108
+ v === "mobile"
109
+ ? gvRef("--gv-ref-mobile")
110
+ : v === "tablet"
111
+ ? gvRef("--gv-ref-tablet")
112
+ : w >= RT_GATE
113
+ ? w
114
+ : gvRef("--gv-ref-desktop");
115
+ let x = 0;
116
+ let y = 0;
117
+ const boxW = ref;
118
+ let boxH = availH;
119
+ let scale = 1;
120
+ if (ref > w) {
121
+ // Lay out at the reference width, then scale to fit.
122
+ scale = w / ref;
123
+ boxH = availH / scale;
124
+ } else if (v === "mobile") {
125
+ // Keep a true mobile viewport width and clamp only its height.
126
+ boxH = Math.min(gvRef("--gv-mobile-float-h"), availH);
127
+ x = (w - boxW) / 2;
128
+ y = (availH - boxH) / 2;
129
+ } else {
130
+ x = (w - ref) / 2;
131
+ }
132
+ stage.style.setProperty("--gv-embed-x", `${x}px`);
133
+ stage.style.setProperty("--gv-embed-y", `${y}px`);
134
+ stage.style.setProperty("--gv-embed-w", `${boxW}px`);
135
+ stage.style.setProperty("--gv-embed-h", `${boxH}px`);
136
+ stage.style.setProperty("--gv-embed-scale", `${scale}`);
137
+ };
138
+ const ro = new ResizeObserver(layout);
139
+ ro.observe(root);
140
+ layout();
141
+ return () => ro.disconnect();
142
+ }, [mounted, v]);
143
+
144
+ const close = () => {
145
+ openerRef.current?.focus({ preventScroll: true });
146
+ openerRef.current = null;
147
+ const root = rootRef.current;
148
+ // A zero-duration fade never emits the animation event used to unmount.
149
+ if (root && !parseFloat(getComputedStyle(root).animationDuration)) {
150
+ setPhase("closed");
151
+ return;
152
+ }
153
+ setPhase("closing");
154
+ };
155
+
156
+ const page = (d: 1 | -1) => {
157
+ const next = Math.max(1, Math.min(sites.length, s + d));
158
+ setS(next);
159
+ // Keep focus in the dialog when the active pager button becomes disabled.
160
+ if (next === 1 || next === sites.length) {
161
+ const active = document.activeElement;
162
+ if (active instanceof HTMLElement && active.closest(".gv-pager")) {
163
+ rootRef.current?.focus({ preventScroll: true });
164
+ }
165
+ }
166
+ };
167
+
168
+ const onKeyDown = (e: React.KeyboardEvent) => {
169
+ if (e.key === "Escape") {
170
+ close();
171
+ } else if (e.key === "ArrowLeft") {
172
+ e.preventDefault();
173
+ page(-1);
174
+ } else if (e.key === "ArrowRight") {
175
+ e.preventDefault();
176
+ page(1);
177
+ } else if (rootRef.current) {
178
+ trapModalTab(e, rootRef.current);
179
+ }
180
+ };
181
+
182
+ const site = sites[s - 1];
183
+ if (!portalTarget || !mounted || !site) return null;
184
+
185
+ return createPortal(
186
+ <div
187
+ ref={rootRef}
188
+ className="gv"
189
+ role="dialog"
190
+ aria-modal="true"
191
+ aria-label={`${site.name} — live website`}
192
+ tabIndex={-1}
193
+ data-closing={phase === "closing" || undefined}
194
+ data-aside={aside ? "" : undefined}
195
+ onKeyDown={onKeyDown}
196
+ onAnimationEnd={(e) => {
197
+ if (phase === "closing" && e.target === e.currentTarget) setPhase("closed");
198
+ }}
199
+ >
200
+ <div className="gv-rail">
201
+ <span className="gv-logo" aria-hidden="true">
202
+ <i className="gv-mark" />
203
+ </span>
204
+ <i className="gv-divider" aria-hidden="true" />
205
+ <span className="type type-fixed ts-text-sm-medium gv-label">Keystone Gallery</span>
206
+ <div className="gv-east">
207
+ <span className="type type-fixed ts-text-sm-light gv-name">{site.name}</span>
208
+ {sites.length > 1 && (
209
+ <div className="gv-pager">
210
+ <button
211
+ type="button"
212
+ className="gv-btn"
213
+ aria-label="Previous gallery item"
214
+ disabled={s === 1}
215
+ onClick={() => page(-1)}
216
+ >
217
+ <IconChevronLeftSm />
218
+ </button>
219
+ <button
220
+ type="button"
221
+ className="gv-btn"
222
+ aria-label="Next site"
223
+ disabled={s === sites.length}
224
+ onClick={() => page(1)}
225
+ >
226
+ <IconChevronRightSm />
227
+ </button>
228
+ </div>
229
+ )}
230
+ <div className="gv-switch" role="radiogroup" aria-label="Preview viewport">
231
+ {VIEW_MODES.map(({ id, label, Icon }) => (
232
+ <button
233
+ key={id}
234
+ type="button"
235
+ role="radio"
236
+ className="gv-btn"
237
+ aria-checked={v === id}
238
+ aria-label={label}
239
+ onClick={() => setV(id)}
240
+ >
241
+ <Icon />
242
+ </button>
243
+ ))}
244
+ </div>
245
+ <button type="button" className="gv-btn" aria-label="Close gallery" onClick={close}>
246
+ <IconGalleryClose />
247
+ </button>
248
+ </div>
249
+ </div>
250
+ <div className="gv-body">
251
+ <div className="gv-stage" ref={stageRef}>
252
+ {/* Replacing the keyed iframe avoids adding each preview to session history. */}
253
+ <iframe
254
+ key={s}
255
+ className="gv-embed"
256
+ src={site.url}
257
+ title={`${site.name} — live website`}
258
+ sandbox="allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"
259
+ referrerPolicy="strict-origin-when-cross-origin"
260
+ />
261
+ </div>
262
+ {aside && <aside className="gv-aside">{aside}</aside>}
263
+ </div>
264
+ </div>,
265
+ portalTarget,
266
+ );
267
+ }
@@ -0,0 +1,59 @@
1
+ /* Seated cards: the list bleeds back out to the 12 columns; cells are
2
+ line-inclusive (k·t + 1px) and overlap by the shared pixel. Heights
3
+ are minimums — a cell grows with its copy. */
4
+
5
+ .ld-cards {
6
+ list-style: none;
7
+ margin: var(--t) calc(var(--t) * -1) 0;
8
+ padding: 0;
9
+ display: flex;
10
+ flex-direction: column;
11
+ }
12
+ .ld-card {
13
+ box-sizing: border-box;
14
+ border: 1px solid var(--color-border-000);
15
+ min-height: calc(var(--t) * 3 + 1px);
16
+ padding: var(--space-3xl);
17
+ display: flex;
18
+ flex-direction: column;
19
+ align-items: flex-start;
20
+ }
21
+ .ld-card + .ld-card {
22
+ margin-top: -1px;
23
+ }
24
+ .ld-card-icon {
25
+ display: block;
26
+ color: var(--color-text-100);
27
+ }
28
+ .ld-card-title {
29
+ margin: 0;
30
+ color: var(--color-text-100);
31
+ }
32
+ .ld-card-icon + .ld-card-title {
33
+ margin-top: var(--space-xl);
34
+ }
35
+ /* Card copy: text-md-light 16/22 → text-lg-light 18/26. */
36
+ .ld-card-copy {
37
+ margin: var(--space-md) 0 0;
38
+ color: var(--color-text-300);
39
+ --fs-rd2: var(--ts-text-lg-light-fs);
40
+ --lh-rd2: var(--ts-text-lg-light-lh);
41
+ }
42
+ @container (--rt) {
43
+ .ld-cards {
44
+ flex-direction: row;
45
+ align-items: stretch;
46
+ }
47
+ .ld-card {
48
+ width: calc(var(--t) * 4 + 1px);
49
+ padding: calc(var(--t) / 2);
50
+ }
51
+ .ld-card + .ld-card {
52
+ margin-top: 0;
53
+ margin-left: -1px;
54
+ }
55
+ .ld-card-copy {
56
+ --font: var(--ts-text-lg-light-font);
57
+ --opsz: var(--ts-text-lg-light-opsz);
58
+ }
59
+ }
@@ -0,0 +1,81 @@
1
+ /** Landing benefits: eyebrow, h2, and seated cards — the cards are the
2
+ * grid. Part of the landing kit — see pages/landing.tsx. */
3
+
4
+ import type { ComponentType } from "react";
5
+ import {
6
+ IconAiChat,
7
+ IconMaps,
8
+ IconReception,
9
+ IconReviews,
10
+ IconSearch,
11
+ IconSparkle,
12
+ IconWebsite,
13
+ } from "../icons";
14
+ import { CloserRow } from "../primitives/closer-row";
15
+ import { Slug } from "../primitives/slug";
16
+
17
+ /** Icons a card may lead with; the map keeps ReactNodes out of data. */
18
+ export type LandingIcon =
19
+ "website" | "search" | "maps" | "reviews" | "reception" | "aiChat" | "sparkle";
20
+
21
+ export interface LandingBenefit {
22
+ id: string;
23
+ icon?: LandingIcon;
24
+ title: string;
25
+ copy: string;
26
+ }
27
+
28
+ export interface LandingBenefitsData {
29
+ eyebrow: string;
30
+ title: string;
31
+ /** Three reads best; the cells seat on the lattice at any count. */
32
+ items: readonly LandingBenefit[];
33
+ }
34
+
35
+ /** The icon each name renders; the design page reads this map too. */
36
+ export const LANDING_ICONS: Record<LandingIcon, ComponentType<{ size?: number }>> = {
37
+ website: IconWebsite,
38
+ search: IconSearch,
39
+ maps: IconMaps,
40
+ reviews: IconReviews,
41
+ reception: IconReception,
42
+ aiChat: IconAiChat,
43
+ sparkle: IconSparkle,
44
+ };
45
+
46
+ function BenefitIcon({ name }: { name: LandingIcon }) {
47
+ const Icon = LANDING_ICONS[name];
48
+ return (
49
+ <span className="ld-card-icon" aria-hidden="true">
50
+ <Icon />
51
+ </span>
52
+ );
53
+ }
54
+
55
+ /* Lattice: seated — stacked 12-wide cells below rt, three 4-column
56
+ * cells from rt, bordered line-inclusively so neighbours share one
57
+ * hairline; then the flow closer. */
58
+ export function LandingBenefitsSection({ data }: { data: LandingBenefitsData }) {
59
+ return (
60
+ <section
61
+ className="sec ld-sec ld-benefits"
62
+ aria-label={data.eyebrow}
63
+ data-landmark="ld-benefits"
64
+ >
65
+ <header className="ld-head" data-landmark="head">
66
+ <Slug>{data.eyebrow}</Slug>
67
+ <h2 className="type ts-display-serif-xs-extralight ramp-h2 ld-h2">{data.title}</h2>
68
+ </header>
69
+ <ul className="ld-cards" data-landmark="cards">
70
+ {data.items.map((item) => (
71
+ <li key={item.id} className="ld-card">
72
+ {item.icon && <BenefitIcon name={item.icon} />}
73
+ <h3 className="type ts-text-lg-medium ld-card-title">{item.title}</h3>
74
+ <p className="type ts-text-md-light ld-card-copy">{item.copy}</p>
75
+ </li>
76
+ ))}
77
+ </ul>
78
+ <CloserRow />
79
+ </section>
80
+ );
81
+ }
@@ -0,0 +1,23 @@
1
+ /* Content-sized flow frame: head, one line of copy, the CTA row, then
2
+ two ticks of air before the footer. */
3
+
4
+ .ld-close {
5
+ padding-bottom: calc(var(--t) * 2);
6
+ }
7
+ .ld-close-copy {
8
+ margin-top: var(--space-2xl);
9
+ max-width: calc(var(--t) * 10);
10
+ }
11
+ .ld-close-cta {
12
+ margin-top: var(--space-4xl);
13
+ }
14
+ @container (--rt) {
15
+ .ld-close-copy {
16
+ max-width: calc(var(--t) * 6);
17
+ }
18
+ }
19
+ @container (--rd1) {
20
+ .ld-close-cta {
21
+ margin-top: var(--space-5xl);
22
+ }
23
+ }
@@ -0,0 +1,26 @@
1
+ /** Landing closer: eyebrow, h2, one line of copy, the CTA row. The
2
+ * footer's own lattice follows. Part of the landing kit — see
3
+ * pages/landing.tsx. */
4
+
5
+ import { CtaRow, type CtaLink } from "../primitives/cta-row";
6
+ import { Slug } from "../primitives/slug";
7
+
8
+ export interface LandingCloserData {
9
+ eyebrow: string;
10
+ title: string;
11
+ copy: string;
12
+ cta: CtaLink;
13
+ }
14
+
15
+ export function LandingCloserSection({ data }: { data: LandingCloserData }) {
16
+ return (
17
+ <section className="sec ld-sec ld-close" aria-label={data.eyebrow} data-landmark="ld-close">
18
+ <header className="ld-head" data-landmark="head">
19
+ <Slug>{data.eyebrow}</Slug>
20
+ <h2 className="type ts-display-serif-xs-extralight ramp-h2 ld-h2">{data.title}</h2>
21
+ </header>
22
+ <p className="type ts-text-md-light ramp-body ld-close-copy">{data.copy}</p>
23
+ <CtaRow cta={data.cta} className="ld-close-cta" />
24
+ </section>
25
+ );
26
+ }
@@ -0,0 +1,80 @@
1
+ /* Content-sized flow frame: head, then the seated media frame. The
2
+ frame's exposed bottom row is the section's painted closer; the next
3
+ section's 1t padding-top completes the seam. */
4
+
5
+ .ld-hero-head {
6
+ display: flex;
7
+ flex-direction: column;
8
+ align-items: flex-start;
9
+ padding-top: calc(var(--t) * 2.5);
10
+ }
11
+ .ld-hero-h1 {
12
+ margin-top: var(--space-lg);
13
+ max-width: calc(var(--t) * 10);
14
+ }
15
+ .ld-hero-sub {
16
+ margin-top: var(--space-2xl);
17
+ max-width: calc(var(--t) * 10);
18
+ }
19
+ .ld-hero-cta {
20
+ margin-top: var(--space-4xl);
21
+ }
22
+ @container (--rt) {
23
+ .ld-hero-h1 {
24
+ max-width: calc(var(--t) * 8);
25
+ }
26
+ .ld-hero-sub {
27
+ max-width: calc(var(--t) * 6);
28
+ }
29
+ }
30
+ @container (--rd1) {
31
+ .ld-hero-head {
32
+ padding-top: calc(var(--t) * 1.5);
33
+ }
34
+ .ld-hero-h1 {
35
+ margin-top: var(--space-3xl);
36
+ max-width: calc(var(--t) * 7);
37
+ }
38
+ .ld-hero-cta {
39
+ margin-top: var(--space-5xl);
40
+ }
41
+ }
42
+
43
+ /* The shared entrance rule consumes these delays (hero.css). */
44
+ .ld-hero .slug {
45
+ --_d: var(--hx-d-h1a);
46
+ }
47
+ .ld-hero-h1 {
48
+ --_d: var(--hx-d-h1b);
49
+ }
50
+ .ld-hero-sub {
51
+ --_d: var(--hx-d-sub1);
52
+ }
53
+ .ld-hero-cta {
54
+ --_d: var(--hx-d-cta);
55
+ }
56
+ .ld-hero-media {
57
+ --_d: var(--hx-d-rect);
58
+ }
59
+
60
+ /* The figure hosts its own exposure frame, so it is the local
61
+ positioning context; the bottom padding keeps the frame's exposed row
62
+ inside the section. Slab 6t through rt, 5t from rd. */
63
+ .ld-hero-media {
64
+ position: relative;
65
+ width: 100%;
66
+ margin: 0;
67
+ margin-top: var(--t);
68
+ padding-bottom: var(--t);
69
+ }
70
+ .ld-hero-frame {
71
+ position: relative;
72
+ height: calc(var(--t) * 6);
73
+ overflow: clip;
74
+ background: var(--color-bg-300);
75
+ }
76
+ @container (--rd1) {
77
+ .ld-hero-frame {
78
+ height: calc(var(--t) * 5);
79
+ }
80
+ }
@@ -0,0 +1,69 @@
1
+ /** Landing hero: eyebrow, h1, subhead, and the CTA row rising in
2
+ * sequence, then a seated media frame (the company-hero idiom). Part of
3
+ * the landing kit — see pages/landing.tsx. */
4
+
5
+ import { GridRegion, type GridBand } from "../grid/region";
6
+ import type { PictureSet } from "../media";
7
+ import { CtaRow, type CtaLink } from "../primitives/cta-row";
8
+ import { Picture } from "../primitives/picture";
9
+ import { Slug } from "../primitives/slug";
10
+
11
+ export interface LandingHeroData {
12
+ eyebrow: string;
13
+ title: string;
14
+ subhead: string;
15
+ cta: CtaLink;
16
+ /** Ambient photography for the seated media frame under the copy. */
17
+ picture: PictureSet;
18
+ }
19
+
20
+ const BANDS: GridBand[] = ["rm", "rs", "rt", "rd1", "rd2"];
21
+
22
+ /* Lattice: the copy sits in unpainted air; the media frame is seated —
23
+ * a 12-column field one tick under the slab's top edge, 6 rows through
24
+ * rt and 5 from rd, with a 10-column row on the slab's edge from rt.
25
+ * The frame's exposed bottom row is the section's painted closer. */
26
+ const MEDIA_FRAME: Record<GridBand, { gx: number; gy: number; gw: number; gh?: number }[]> = {
27
+ rm: [{ gx: 0, gy: 1, gw: 12, gh: 6 }],
28
+ rs: [{ gx: 0, gy: 1, gw: 12, gh: 6 }],
29
+ rt: [
30
+ { gx: 1, gy: 0, gw: 10 },
31
+ { gx: 0, gy: 1, gw: 12, gh: 6 },
32
+ ],
33
+ rd1: [
34
+ { gx: 1, gy: 0, gw: 10 },
35
+ { gx: 0, gy: 1, gw: 12, gh: 5 },
36
+ ],
37
+ rd2: [
38
+ { gx: 1, gy: 0, gw: 10 },
39
+ { gx: 0, gy: 1, gw: 12, gh: 5 },
40
+ ],
41
+ };
42
+
43
+ export function LandingHeroSection({ data }: { data: LandingHeroData }) {
44
+ return (
45
+ <section className="sec ld-sec ld-hero" aria-label={data.eyebrow} data-landmark="ld-hero">
46
+ <header className="ld-hero-head" data-landmark="head">
47
+ <Slug className="hx-rise">{data.eyebrow}</Slug>
48
+ <h1 className="type ts-display-serif-sm-plus-thin ramp-h1 ld-hero-h1 hx-rise">
49
+ {data.title}
50
+ </h1>
51
+ <p className="type ts-text-md-light ramp-body ld-hero-sub hx-rise">{data.subhead}</p>
52
+ <CtaRow cta={data.cta} className="ld-hero-cta hx-rise" />
53
+ </header>
54
+
55
+ <figure className="ld-hero-media hx-rise" data-landmark="media">
56
+ <div className="gx ld-bleed" aria-hidden="true">
57
+ {BANDS.map((band) =>
58
+ MEDIA_FRAME[band].map((r, i) => (
59
+ <GridRegion key={`${band}-m${i}`} band={band} {...r} />
60
+ )),
61
+ )}
62
+ </div>
63
+ <div className="ld-hero-frame">
64
+ <Picture set={data.picture} priority />
65
+ </div>
66
+ </figure>
67
+ </section>
68
+ );
69
+ }
@@ -0,0 +1,19 @@
1
+ /* Unpainted air: the quote holds its measure, the attribution sits a
2
+ material step below. */
3
+
4
+ .ld-quote-fig {
5
+ margin: var(--space-2xl) 0 0;
6
+ }
7
+ .ld-quote-body {
8
+ margin: 0;
9
+ max-width: calc(var(--t) * 10);
10
+ }
11
+ .ld-quote-attrib {
12
+ margin: var(--space-xl) 0 0;
13
+ color: var(--color-text-400);
14
+ }
15
+ @container (--rt) {
16
+ .ld-quote-body {
17
+ max-width: calc(var(--t) * 8);
18
+ }
19
+ }
@@ -0,0 +1,30 @@
1
+ /** Landing quote: eyebrow, a hanging blockquote, attribution, closer.
2
+ * Part of the landing kit — see pages/landing.tsx. */
3
+
4
+ import { CloserRow } from "../primitives/closer-row";
5
+ import { Slug } from "../primitives/slug";
6
+
7
+ export interface LandingQuoteData {
8
+ eyebrow: string;
9
+ /** Written with its own curly quotes; the first hangs into the margin. */
10
+ quote: string;
11
+ attribution: string;
12
+ }
13
+
14
+ /* Lattice: unpainted air, then the flow closer. */
15
+ export function LandingQuoteSection({ data }: { data: LandingQuoteData }) {
16
+ return (
17
+ <section className="sec ld-sec ld-quote" aria-label={data.eyebrow} data-landmark="ld-quote">
18
+ <Slug>{data.eyebrow}</Slug>
19
+ <figure className="ld-quote-fig">
20
+ <blockquote className="type ts-display-serif-2xs-plus-extralight ramp-quote ld-quote-body">
21
+ {data.quote}
22
+ </blockquote>
23
+ <figcaption className="type ts-text-md-light ld-quote-attrib">
24
+ {data.attribution}
25
+ </figcaption>
26
+ </figure>
27
+ <CloserRow />
28
+ </section>
29
+ );
30
+ }