@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.
- package/AGENTS.md +163 -0
- package/README.md +85 -0
- package/assets/media/brand/ks-lockup.svg +13 -0
- package/assets/media/brand/ks-logomark.svg +4 -0
- package/assets/media/brand/ks-wordmark-inline.svg +13 -0
- package/assets/media/brand/ks-wordmark.svg +11 -0
- package/assets/media/fonts/gt-standard-standard-vf.woff2 +0 -0
- package/assets/media/fonts/pp-kyoto-variable-upright-vf.woff2 +0 -0
- package/base.css +111 -0
- package/css-vars.d.ts +10 -0
- package/grid/engine.css +368 -0
- package/grid/field-hash.ts +31 -0
- package/grid/field.tsx +48 -0
- package/grid/gates.cjs +34 -0
- package/grid/region.tsx +97 -0
- package/icons.tsx +1224 -0
- package/index.css +77 -0
- package/lib/autoplay-gate.ts +88 -0
- package/lib/focus-trap.ts +42 -0
- package/lib/grader.ts +131 -0
- package/lib/legal-data.ts +1 -0
- package/lib/legal.ts +41 -0
- package/lib/noise.tsx +114 -0
- package/lib/render-boundary.tsx +27 -0
- package/lib/scroll-lock.ts +25 -0
- package/lib/swipe.ts +124 -0
- package/lib/use-active-section.ts +43 -0
- package/lib/use-count-up.ts +26 -0
- package/lib/use-grader-search.ts +118 -0
- package/lib/use-video-carousel.ts +271 -0
- package/media.ts +558 -0
- package/package.json +201 -0
- package/primitives/button-inline.css +52 -0
- package/primitives/button-inline.tsx +38 -0
- package/primitives/buttons.css +449 -0
- package/primitives/buttons.tsx +263 -0
- package/primitives/case-study-button.css +71 -0
- package/primitives/case-study-button.tsx +28 -0
- package/primitives/case-study-card.css +318 -0
- package/primitives/case-study-card.tsx +116 -0
- package/primitives/closer-row.css +14 -0
- package/primitives/closer-row.tsx +22 -0
- package/primitives/cta-row.css +41 -0
- package/primitives/cta-row.tsx +39 -0
- package/primitives/disclosure.css +210 -0
- package/primitives/disclosure.tsx +144 -0
- package/primitives/faq-question.css +220 -0
- package/primitives/faq-question.tsx +55 -0
- package/primitives/field.css +225 -0
- package/primitives/field.tsx +266 -0
- package/primitives/footer-item.css +72 -0
- package/primitives/footer-item.tsx +42 -0
- package/primitives/grader-menu.tsx +84 -0
- package/primitives/grader.css +302 -0
- package/primitives/grader.tsx +284 -0
- package/primitives/modal.css +151 -0
- package/primitives/modal.tsx +90 -0
- package/primitives/notice.css +39 -0
- package/primitives/notice.tsx +56 -0
- package/primitives/persona-card.css +374 -0
- package/primitives/persona-card.tsx +74 -0
- package/primitives/picture.css +11 -0
- package/primitives/picture.tsx +41 -0
- package/primitives/plan-card.css +378 -0
- package/primitives/plan-card.tsx +91 -0
- package/primitives/prose.css +118 -0
- package/primitives/prose.tsx +170 -0
- package/primitives/ramps.css +84 -0
- package/primitives/slider.css +179 -0
- package/primitives/slider.tsx +69 -0
- package/primitives/slug.css +87 -0
- package/primitives/slug.tsx +37 -0
- package/primitives/status.css +298 -0
- package/primitives/status.tsx +222 -0
- package/primitives/strip.css +40 -0
- package/primitives/surface.css +78 -0
- package/primitives/surface.tsx +95 -0
- package/primitives/table.css +226 -0
- package/primitives/table.tsx +122 -0
- package/primitives/tabs.css +85 -0
- package/primitives/tabs.tsx +122 -0
- package/primitives/text.css +110 -0
- package/primitives/toc.css +65 -0
- package/primitives/toc.tsx +42 -0
- package/rules/design-system.md +154 -0
- package/rules/grid-and-layout.md +166 -0
- package/scripts/generate-exports.mjs +61 -0
- package/scripts/generate-type-css.mjs +130 -0
- package/sections/faq-island.tsx +102 -0
- package/sections/faq.css +213 -0
- package/sections/faq.tsx +46 -0
- package/sections/footer-nav.tsx +95 -0
- package/sections/footer-signature.css +183 -0
- package/sections/footer-signature.tsx +114 -0
- package/sections/footer.css +735 -0
- package/sections/footer.tsx +283 -0
- package/sections/gallery-overlay.css +213 -0
- package/sections/gallery-overlay.tsx +267 -0
- package/sections/landing-benefits.css +59 -0
- package/sections/landing-benefits.tsx +81 -0
- package/sections/landing-closer.css +23 -0
- package/sections/landing-closer.tsx +26 -0
- package/sections/landing-hero.css +80 -0
- package/sections/landing-hero.tsx +69 -0
- package/sections/landing-quote.css +19 -0
- package/sections/landing-quote.tsx +30 -0
- package/sections/landing-sample.ts +66 -0
- package/sections/landing.css +45 -0
- package/sections/landing.tsx +69 -0
- package/sections/load-orchestrator.tsx +43 -0
- package/sections/load.css +138 -0
- package/sections/nav-desktop.css +530 -0
- package/sections/nav-desktop.tsx +155 -0
- package/sections/nav-mobile.css +571 -0
- package/sections/nav-mobile.tsx +222 -0
- package/sections/nav.css +126 -0
- package/sections/nav.tsx +394 -0
- package/sections/site-chat-data.ts +16 -0
- package/sections/site-chat-open.tsx +25 -0
- package/sections/site-chat.tsx +67 -0
- package/site-links.ts +36 -0
- package/site.ts +2 -0
- package/themes/inverted.css +139 -0
- package/tokens/fonts.css +38 -0
- package/tokens/motion.css +125 -0
- package/tokens/primitives.css +163 -0
- package/tokens/semantic.css +153 -0
- package/tokens/type-styles.json +145 -0
- package/tokens/type.css +1548 -0
- package/widgets.css +78 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/* A pseudo extends the visual row to a 44px hit target. */
|
|
2
|
+
|
|
3
|
+
.csb {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: var(--space-lg);
|
|
7
|
+
position: relative;
|
|
8
|
+
white-space: nowrap;
|
|
9
|
+
color: var(--color-text-300);
|
|
10
|
+
text-decoration: underline;
|
|
11
|
+
text-decoration-style: solid;
|
|
12
|
+
text-decoration-color: var(--color-bg-500);
|
|
13
|
+
text-decoration-thickness: 5%;
|
|
14
|
+
/* Offset the underline below the baseline. */
|
|
15
|
+
text-underline-offset: 18%;
|
|
16
|
+
text-decoration-skip-ink: auto;
|
|
17
|
+
/* on the resting rule so mouse-out reverses on the same curve */
|
|
18
|
+
transition: color var(--motion-hover-duration) var(--motion-hover-ease);
|
|
19
|
+
}
|
|
20
|
+
.csb[data-size="lg"] {
|
|
21
|
+
--font: var(--ts-text-lg-light-font);
|
|
22
|
+
--ls: var(--ts-text-lg-light-ls);
|
|
23
|
+
--opsz: var(--ts-text-lg-light-opsz);
|
|
24
|
+
}
|
|
25
|
+
.csb[data-size="sm"] {
|
|
26
|
+
--font: var(--ts-text-md-light-font);
|
|
27
|
+
--ls: var(--ts-text-md-light-ls);
|
|
28
|
+
--opsz: var(--ts-text-md-light-opsz);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* Extend the hit area without changing row geometry. */
|
|
32
|
+
.csb::before {
|
|
33
|
+
content: "";
|
|
34
|
+
position: absolute;
|
|
35
|
+
inset: -9px 0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.csb-glyph {
|
|
39
|
+
display: inline-flex;
|
|
40
|
+
flex: none;
|
|
41
|
+
color: var(--color-text-500);
|
|
42
|
+
/* on the resting rule so mouse-out reverses on the same curve */
|
|
43
|
+
position: relative;
|
|
44
|
+
left: 0;
|
|
45
|
+
transition: left var(--motion-hover-duration) var(--motion-hover-ease);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@media (hover: hover) {
|
|
49
|
+
.csb:hover {
|
|
50
|
+
color: var(--color-text-100);
|
|
51
|
+
}
|
|
52
|
+
.csb:hover .csb-glyph {
|
|
53
|
+
left: var(--btn-inline-advance);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
.csb[data-state="hover"] {
|
|
57
|
+
color: var(--color-text-100);
|
|
58
|
+
}
|
|
59
|
+
.csb[data-state="hover"] .csb-glyph {
|
|
60
|
+
left: var(--btn-inline-advance);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.csb:focus-visible,
|
|
64
|
+
.csb[data-state="focus"] {
|
|
65
|
+
outline: none;
|
|
66
|
+
background: var(--color-bg-300);
|
|
67
|
+
color: var(--color-text-100);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* reduced motion: state-to-state — the dressed state still applies
|
|
71
|
+
while hovered, the transitions are off */
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** Opens the live site in a new tab without opener access. */
|
|
2
|
+
|
|
3
|
+
import { IconArrowRight } from "../icons";
|
|
4
|
+
import { EXTERNAL_LINK } from "../site-links";
|
|
5
|
+
|
|
6
|
+
interface CaseStudyButtonProps {
|
|
7
|
+
label: string;
|
|
8
|
+
href: string;
|
|
9
|
+
size?: "lg" | "sm";
|
|
10
|
+
forceState?: "hover" | "focus";
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function CaseStudyButton({ label, href, size = "lg", forceState }: CaseStudyButtonProps) {
|
|
14
|
+
return (
|
|
15
|
+
<a
|
|
16
|
+
className="type type-fixed csb"
|
|
17
|
+
href={href}
|
|
18
|
+
{...EXTERNAL_LINK}
|
|
19
|
+
data-size={size}
|
|
20
|
+
data-state={forceState}
|
|
21
|
+
>
|
|
22
|
+
<span className="csb-label">{label}</span>
|
|
23
|
+
<span className="csb-glyph">
|
|
24
|
+
<IconArrowRight size={size === "lg" ? 24 : 20} />
|
|
25
|
+
</span>
|
|
26
|
+
</a>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
/* Interior values scale from --csc-u. Overlapping one-pixel borders
|
|
2
|
+
keep shared seams crisp, and the overlay is the sole interaction. */
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
.csc {
|
|
6
|
+
--csc-border-dur: 350ms;
|
|
7
|
+
--csc-border-out-dur: 250ms;
|
|
8
|
+
--_u: var(--csc-u, 1px);
|
|
9
|
+
position: relative;
|
|
10
|
+
isolation: isolate;
|
|
11
|
+
/* Stacked layout: the image frame is a fixed row and the profile row
|
|
12
|
+
absorbs the card's remaining height, so long copy grows the card
|
|
13
|
+
instead of colliding. Section mounts restate the template for row
|
|
14
|
+
layouts. */
|
|
15
|
+
display: grid;
|
|
16
|
+
grid-template-columns: minmax(0, 1fr);
|
|
17
|
+
grid-template-rows: var(--csc-img-h) minmax(0, auto);
|
|
18
|
+
/* The resting side owns the shadow's exit duration. */
|
|
19
|
+
box-shadow: var(--shadow-hard-square-0);
|
|
20
|
+
transition: box-shadow var(--motion-card-shadow-out-dur) var(--motion-drawer-ease);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* The named link overlays both boxes. */
|
|
24
|
+
.csc-link {
|
|
25
|
+
position: absolute;
|
|
26
|
+
inset: 0;
|
|
27
|
+
z-index: 3;
|
|
28
|
+
}
|
|
29
|
+
.csc-link:focus-visible {
|
|
30
|
+
/* the dressing below is the visible focus style */
|
|
31
|
+
outline: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Card hover and link focus share the same dressing. */
|
|
35
|
+
@media (hover: hover) {
|
|
36
|
+
.csc:hover {
|
|
37
|
+
box-shadow: var(--shadow-hard-square);
|
|
38
|
+
transition-duration: var(--motion-card-shadow-dur);
|
|
39
|
+
}
|
|
40
|
+
/* Both box hairlines darken on one clock. */
|
|
41
|
+
.csc:hover .csc-profile,
|
|
42
|
+
.csc:hover .csc-img {
|
|
43
|
+
border-color: var(--color-border-200);
|
|
44
|
+
transition-duration: var(--csc-border-dur);
|
|
45
|
+
}
|
|
46
|
+
.csc:hover .btn-inline {
|
|
47
|
+
color: var(--color-text-100);
|
|
48
|
+
}
|
|
49
|
+
.csc:hover .btn-inline-glyph {
|
|
50
|
+
left: var(--btn-inline-advance);
|
|
51
|
+
}
|
|
52
|
+
/* the subtle image zoom, on the shadow's in clock, decelerating on
|
|
53
|
+
the grammar's ease-out */
|
|
54
|
+
.csc:hover .csc-img img {
|
|
55
|
+
top: calc(-1 * var(--csc-img-zoom));
|
|
56
|
+
left: calc(-1 * var(--csc-img-zoom));
|
|
57
|
+
width: calc(100% + 2 * var(--csc-img-zoom));
|
|
58
|
+
height: calc(100% + 2 * var(--csc-img-zoom));
|
|
59
|
+
transition-duration: var(--motion-card-shadow-dur);
|
|
60
|
+
transition-timing-function: var(--motion-drawer-ease);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
.csc:has(.csc-link:focus-visible),
|
|
64
|
+
.csc[data-state="hover"] {
|
|
65
|
+
box-shadow: var(--shadow-hard-square);
|
|
66
|
+
transition-duration: var(--motion-card-shadow-dur);
|
|
67
|
+
}
|
|
68
|
+
.csc:has(.csc-link:focus-visible) .csc-profile,
|
|
69
|
+
.csc:has(.csc-link:focus-visible) .csc-img,
|
|
70
|
+
.csc[data-state="hover"] .csc-profile,
|
|
71
|
+
.csc[data-state="hover"] .csc-img {
|
|
72
|
+
border-color: var(--color-border-200);
|
|
73
|
+
transition-duration: var(--csc-border-dur);
|
|
74
|
+
}
|
|
75
|
+
.csc:has(.csc-link:focus-visible) .btn-inline,
|
|
76
|
+
.csc[data-state="hover"] .btn-inline {
|
|
77
|
+
color: var(--color-text-100);
|
|
78
|
+
}
|
|
79
|
+
.csc:has(.csc-link:focus-visible) .btn-inline-glyph,
|
|
80
|
+
.csc[data-state="hover"] .btn-inline-glyph {
|
|
81
|
+
left: var(--btn-inline-advance);
|
|
82
|
+
}
|
|
83
|
+
.csc:has(.csc-link:focus-visible) .csc-img img,
|
|
84
|
+
.csc[data-state="hover"] .csc-img img {
|
|
85
|
+
top: calc(-1 * var(--csc-img-zoom));
|
|
86
|
+
left: calc(-1 * var(--csc-img-zoom));
|
|
87
|
+
width: calc(100% + 2 * var(--csc-img-zoom));
|
|
88
|
+
height: calc(100% + 2 * var(--csc-img-zoom));
|
|
89
|
+
transition-duration: var(--motion-card-shadow-dur);
|
|
90
|
+
transition-timing-function: var(--motion-drawer-ease);
|
|
91
|
+
}
|
|
92
|
+
/* Keyboard focus adds the CTA wash as a visible card signal. */
|
|
93
|
+
.csc:has(.csc-link:focus-visible) .btn-inline {
|
|
94
|
+
background: var(--color-bg-300);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* ---------------- the site image ---------------- */
|
|
98
|
+
|
|
99
|
+
/* Both boxes extend one pixel past their grid area so adjacent borders
|
|
100
|
+
share a lattice seam; the image paints above the profile's top edge. */
|
|
101
|
+
.csc-img {
|
|
102
|
+
position: relative;
|
|
103
|
+
grid-area: 1 / 1;
|
|
104
|
+
z-index: 2;
|
|
105
|
+
width: calc(100% + 1px);
|
|
106
|
+
height: calc(100% + 1px);
|
|
107
|
+
/* The border overlaps adjacent seams; the frame clips hover zoom. */
|
|
108
|
+
border: 1px solid var(--color-border-000);
|
|
109
|
+
overflow: hidden;
|
|
110
|
+
transition: border-color var(--csc-border-out-dur) var(--motion-drawer-ease);
|
|
111
|
+
}
|
|
112
|
+
.csc-img picture {
|
|
113
|
+
position: absolute;
|
|
114
|
+
inset: 0;
|
|
115
|
+
}
|
|
116
|
+
/* Paint the zoom through dimensions to avoid transform re-rasterization.
|
|
117
|
+
Explicit dimensions also override the replaced element's intrinsic size. */
|
|
118
|
+
.csc-img img {
|
|
119
|
+
display: block;
|
|
120
|
+
position: absolute;
|
|
121
|
+
top: 0;
|
|
122
|
+
left: 0;
|
|
123
|
+
width: 100%;
|
|
124
|
+
height: 100%;
|
|
125
|
+
/* the base reset clamps images at max-width 100% — the zoom must
|
|
126
|
+
grow past it; the frame clips, so nothing escapes */
|
|
127
|
+
max-width: none;
|
|
128
|
+
object-fit: cover;
|
|
129
|
+
transition:
|
|
130
|
+
top var(--motion-card-shadow-out-dur) var(--motion-drawer-ease),
|
|
131
|
+
left var(--motion-card-shadow-out-dur) var(--motion-drawer-ease),
|
|
132
|
+
width var(--motion-card-shadow-out-dur) var(--motion-drawer-ease),
|
|
133
|
+
height var(--motion-card-shadow-out-dur) var(--motion-drawer-ease);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* ---------------- the profile card ---------------- */
|
|
137
|
+
|
|
138
|
+
.csc-profile {
|
|
139
|
+
position: relative;
|
|
140
|
+
grid-area: 2 / 1;
|
|
141
|
+
z-index: 1;
|
|
142
|
+
width: calc(100% + 1px);
|
|
143
|
+
height: calc(100% + 1px);
|
|
144
|
+
display: flex;
|
|
145
|
+
flex-direction: column;
|
|
146
|
+
/* Place lede at top and stats/CTA at bottom. */
|
|
147
|
+
justify-content: space-between;
|
|
148
|
+
background: var(--color-bg-000);
|
|
149
|
+
border: 1px solid var(--color-border-000);
|
|
150
|
+
/* The resting side owns the border's exit duration. */
|
|
151
|
+
transition: border-color var(--csc-border-out-dur) var(--motion-drawer-ease);
|
|
152
|
+
padding:
|
|
153
|
+
calc(var(--_u) * var(--csc-pt, 16))
|
|
154
|
+
calc(var(--_u) * var(--csc-px, 16))
|
|
155
|
+
calc(var(--_u) * var(--csc-pb, 16));
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.csc-category {
|
|
159
|
+
margin: 0;
|
|
160
|
+
color: var(--color-text-400);
|
|
161
|
+
--font: var(--csc-cat-f, var(--ts-text-xs-light-font));
|
|
162
|
+
--fs-rm: var(--csc-cat-fs-rm, var(--ts-text-xs-light-fs));
|
|
163
|
+
--fs-rs: var(--csc-cat-fs-rs, var(--fs-rm));
|
|
164
|
+
--fs-rt: var(--csc-cat-fs-rt, var(--fs-rs));
|
|
165
|
+
--fs-rd1: var(--csc-cat-fs-rd1, var(--fs-rt));
|
|
166
|
+
--fs-rd2: var(--csc-cat-fs-rd2, var(--fs-rd1));
|
|
167
|
+
--lh-rm: var(--csc-cat-lh-rm, var(--ts-text-xs-light-lh));
|
|
168
|
+
--lh-rs: var(--csc-cat-lh-rs, var(--lh-rm));
|
|
169
|
+
--lh-rt: var(--csc-cat-lh-rt, var(--lh-rs));
|
|
170
|
+
--lh-rd1: var(--csc-cat-lh-rd1, var(--lh-rt));
|
|
171
|
+
--lh-rd2: var(--csc-cat-lh-rd2, var(--lh-rd1));
|
|
172
|
+
--ls: var(--csc-cat-ls, var(--ts-text-xs-light-ls));
|
|
173
|
+
--opsz: var(--csc-cat-opsz, var(--ts-text-xs-light-opsz));
|
|
174
|
+
--fs-px: calc(var(--_u) * var(--fs-band));
|
|
175
|
+
--lh-px: calc(var(--_u) * var(--lh-band));
|
|
176
|
+
}
|
|
177
|
+
.csc-title {
|
|
178
|
+
margin: calc(var(--_u) * var(--csc-cat-gap, 6)) 0 0;
|
|
179
|
+
color: var(--color-text-100);
|
|
180
|
+
--font: var(--csc-title-f, var(--ts-display-serif-xs-light-font));
|
|
181
|
+
--fs-rm: var(--csc-title-fs-rm, var(--ts-display-serif-xs-light-fs));
|
|
182
|
+
--fs-rs: var(--csc-title-fs-rs, var(--fs-rm));
|
|
183
|
+
--fs-rt: var(--csc-title-fs-rt, var(--fs-rs));
|
|
184
|
+
--fs-rd1: var(--csc-title-fs-rd1, var(--fs-rt));
|
|
185
|
+
--fs-rd2: var(--csc-title-fs-rd2, var(--fs-rd1));
|
|
186
|
+
--lh-rm: var(--csc-title-lh-rm, var(--ts-display-serif-xs-light-lh));
|
|
187
|
+
--lh-rs: var(--csc-title-lh-rs, var(--lh-rm));
|
|
188
|
+
--lh-rt: var(--csc-title-lh-rt, var(--lh-rs));
|
|
189
|
+
--lh-rd1: var(--csc-title-lh-rd1, var(--lh-rt));
|
|
190
|
+
--lh-rd2: var(--csc-title-lh-rd2, var(--lh-rd1));
|
|
191
|
+
--ls: var(--csc-title-ls, var(--ts-display-serif-xs-light-ls));
|
|
192
|
+
--fs-px: calc(var(--_u) * var(--fs-band));
|
|
193
|
+
--lh-px: calc(var(--_u) * var(--lh-band));
|
|
194
|
+
}
|
|
195
|
+
.csc-desc {
|
|
196
|
+
margin: calc(var(--_u) * var(--csc-title-gap, 12)) 0 0;
|
|
197
|
+
color: var(--color-text-300);
|
|
198
|
+
--font: var(--csc-desc-f, var(--ts-text-md-light-font));
|
|
199
|
+
--fs-rm: var(--csc-desc-fs-rm, var(--ts-text-md-light-fs));
|
|
200
|
+
--fs-rs: var(--csc-desc-fs-rs, var(--fs-rm));
|
|
201
|
+
--fs-rt: var(--csc-desc-fs-rt, var(--fs-rs));
|
|
202
|
+
--fs-rd1: var(--csc-desc-fs-rd1, var(--fs-rt));
|
|
203
|
+
--fs-rd2: var(--csc-desc-fs-rd2, var(--fs-rd1));
|
|
204
|
+
--lh-rm: var(--csc-desc-lh-rm, var(--ts-text-md-light-lh));
|
|
205
|
+
--lh-rs: var(--csc-desc-lh-rs, var(--lh-rm));
|
|
206
|
+
--lh-rt: var(--csc-desc-lh-rt, var(--lh-rs));
|
|
207
|
+
--lh-rd1: var(--csc-desc-lh-rd1, var(--lh-rt));
|
|
208
|
+
--lh-rd2: var(--csc-desc-lh-rd2, var(--lh-rd1));
|
|
209
|
+
--ls: var(--csc-desc-ls, var(--ts-text-md-light-ls));
|
|
210
|
+
--opsz: var(--csc-desc-opsz, var(--ts-text-md-light-opsz));
|
|
211
|
+
--fs-px: calc(var(--_u) * var(--fs-band));
|
|
212
|
+
--lh-px: calc(var(--_u) * var(--lh-band));
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/* ---------------- the stats block ---------------- */
|
|
216
|
+
|
|
217
|
+
.csc-slug {
|
|
218
|
+
margin: 0;
|
|
219
|
+
color: var(--color-text-400);
|
|
220
|
+
--font: var(--csc-sslug-f, var(--ts-text-xs-light-font));
|
|
221
|
+
--fs-rm: var(--csc-sslug-fs-rm, var(--ts-text-xs-light-fs));
|
|
222
|
+
--fs-rs: var(--csc-sslug-fs-rs, var(--fs-rm));
|
|
223
|
+
--fs-rt: var(--csc-sslug-fs-rt, var(--fs-rs));
|
|
224
|
+
--fs-rd1: var(--csc-sslug-fs-rd1, var(--fs-rt));
|
|
225
|
+
--fs-rd2: var(--csc-sslug-fs-rd2, var(--fs-rd1));
|
|
226
|
+
--lh-rm: var(--csc-sslug-lh-rm, var(--ts-text-xs-light-lh));
|
|
227
|
+
--lh-rs: var(--csc-sslug-lh-rs, var(--lh-rm));
|
|
228
|
+
--lh-rt: var(--csc-sslug-lh-rt, var(--lh-rs));
|
|
229
|
+
--lh-rd1: var(--csc-sslug-lh-rd1, var(--lh-rt));
|
|
230
|
+
--lh-rd2: var(--csc-sslug-lh-rd2, var(--lh-rd1));
|
|
231
|
+
--ls: var(--csc-sslug-ls, var(--ts-text-xs-light-ls));
|
|
232
|
+
--opsz: var(--csc-sslug-opsz, var(--ts-text-xs-light-opsz));
|
|
233
|
+
--fs-px: calc(var(--_u) * var(--fs-band));
|
|
234
|
+
--lh-px: calc(var(--_u) * var(--lh-band));
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/* three equal cells on a 16 gap with 1px border/000 full-height
|
|
238
|
+
dividers between (gap 16 + line 1 + gap 16 = the 33 column gap;
|
|
239
|
+
the divider paints 17 back from each following cell) */
|
|
240
|
+
.csc-stats {
|
|
241
|
+
margin: calc(var(--_u) * var(--csc-slug-gap, 6)) 0 0;
|
|
242
|
+
display: grid;
|
|
243
|
+
grid-template-columns: repeat(3, 1fr);
|
|
244
|
+
column-gap: calc(var(--_u) * 33);
|
|
245
|
+
}
|
|
246
|
+
.csc-stat {
|
|
247
|
+
position: relative;
|
|
248
|
+
display: flex;
|
|
249
|
+
/* Keep valid dl order while rendering the value above its label. */
|
|
250
|
+
flex-direction: column-reverse;
|
|
251
|
+
justify-content: flex-end;
|
|
252
|
+
gap: calc(var(--_u) * var(--csc-num-gap, 4));
|
|
253
|
+
}
|
|
254
|
+
.csc-stat + .csc-stat::before {
|
|
255
|
+
content: "";
|
|
256
|
+
position: absolute;
|
|
257
|
+
left: calc(var(--_u) * -17);
|
|
258
|
+
top: 0;
|
|
259
|
+
bottom: 0;
|
|
260
|
+
width: 1px;
|
|
261
|
+
background: var(--color-border-000);
|
|
262
|
+
}
|
|
263
|
+
.csc-stat-value {
|
|
264
|
+
margin: 0;
|
|
265
|
+
display: flex;
|
|
266
|
+
align-items: center;
|
|
267
|
+
color: var(--color-text-300);
|
|
268
|
+
--font: var(--csc-num-f, var(--ts-text-2xl-light-font));
|
|
269
|
+
--fs-rm: var(--csc-num-fs-rm, var(--ts-text-2xl-light-fs));
|
|
270
|
+
--fs-rs: var(--csc-num-fs-rs, var(--fs-rm));
|
|
271
|
+
--fs-rt: var(--csc-num-fs-rt, var(--fs-rs));
|
|
272
|
+
--fs-rd1: var(--csc-num-fs-rd1, var(--fs-rt));
|
|
273
|
+
--fs-rd2: var(--csc-num-fs-rd2, var(--fs-rd1));
|
|
274
|
+
--lh-rm: var(--csc-num-lh-rm, var(--ts-text-2xl-light-lh));
|
|
275
|
+
--lh-rs: var(--csc-num-lh-rs, var(--lh-rm));
|
|
276
|
+
--lh-rt: var(--csc-num-lh-rt, var(--lh-rs));
|
|
277
|
+
--lh-rd1: var(--csc-num-lh-rd1, var(--lh-rt));
|
|
278
|
+
--lh-rd2: var(--csc-num-lh-rd2, var(--lh-rd1));
|
|
279
|
+
--ls: var(--csc-num-ls, var(--ts-text-2xl-light-ls));
|
|
280
|
+
--opsz: var(--csc-num-opsz, var(--ts-text-2xl-light-opsz));
|
|
281
|
+
--fs-px: calc(var(--_u) * var(--fs-band));
|
|
282
|
+
--lh-px: calc(var(--_u) * var(--lh-band));
|
|
283
|
+
}
|
|
284
|
+
/* The star follows the numeral; labels wrap naturally in narrow cells. */
|
|
285
|
+
.csc-star {
|
|
286
|
+
display: inline-flex;
|
|
287
|
+
flex: none;
|
|
288
|
+
margin-left: calc(var(--_u) * 4);
|
|
289
|
+
color: var(--color-text-500);
|
|
290
|
+
}
|
|
291
|
+
.csc-stat-label {
|
|
292
|
+
/* Min-content preserves the intended per-word label wrap. */
|
|
293
|
+
width: min-content;
|
|
294
|
+
color: var(--color-text-400);
|
|
295
|
+
--font: var(--csc-label-f, var(--ts-text-xs-light-font));
|
|
296
|
+
--fs-rm: var(--csc-label-fs-rm, var(--ts-text-xs-light-fs));
|
|
297
|
+
--fs-rs: var(--csc-label-fs-rs, var(--fs-rm));
|
|
298
|
+
--fs-rt: var(--csc-label-fs-rt, var(--fs-rs));
|
|
299
|
+
--fs-rd1: var(--csc-label-fs-rd1, var(--fs-rt));
|
|
300
|
+
--fs-rd2: var(--csc-label-fs-rd2, var(--fs-rd1));
|
|
301
|
+
--lh-rm: var(--csc-label-lh-rm, var(--ts-text-xs-light-lh));
|
|
302
|
+
--lh-rs: var(--csc-label-lh-rs, var(--lh-rm));
|
|
303
|
+
--lh-rt: var(--csc-label-lh-rt, var(--lh-rs));
|
|
304
|
+
--lh-rd1: var(--csc-label-lh-rd1, var(--lh-rt));
|
|
305
|
+
--lh-rd2: var(--csc-label-lh-rd2, var(--lh-rd1));
|
|
306
|
+
--ls: var(--csc-label-ls, var(--ts-text-xs-light-ls));
|
|
307
|
+
--opsz: var(--csc-label-opsz, var(--ts-text-xs-light-opsz));
|
|
308
|
+
--fs-px: calc(var(--_u) * var(--fs-band));
|
|
309
|
+
--lh-px: calc(var(--_u) * var(--lh-band));
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.csc-cta {
|
|
313
|
+
margin-top: calc(var(--_u) * var(--csc-cta-gap, 20));
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/* reduced motion: the hover dressing swaps state-to-state (last in
|
|
317
|
+
the file — the base rules' transition shorthands must not outrank
|
|
318
|
+
the kill by order) */
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/** Cards inherit responsive geometry from their section. The inline CTA
|
|
2
|
+
* is presentational so the overlay remains the only tab stop. */
|
|
3
|
+
|
|
4
|
+
import { CASE_STUDY_TIERS, caseStudySrc } from "../media";
|
|
5
|
+
import type { CaseStudySiteId } from "../media";
|
|
6
|
+
|
|
7
|
+
export interface CaseStudyStat {
|
|
8
|
+
value: string;
|
|
9
|
+
label: string;
|
|
10
|
+
/** Adds the star glyph after a rating. */
|
|
11
|
+
star?: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface CaseStudySummary {
|
|
15
|
+
/** Media-registry key. */
|
|
16
|
+
site: CaseStudySiteId;
|
|
17
|
+
/** Route slug for the case-study page. */
|
|
18
|
+
slug: string;
|
|
19
|
+
/** The customer name — each card's <h2>. */
|
|
20
|
+
name: string;
|
|
21
|
+
category: string;
|
|
22
|
+
description: string;
|
|
23
|
+
statSlug: string;
|
|
24
|
+
stats: [CaseStudyStat, CaseStudyStat, CaseStudyStat];
|
|
25
|
+
/** Meaningful alt text for the customer website image. */
|
|
26
|
+
alt: string;
|
|
27
|
+
}
|
|
28
|
+
import { IconStar } from "../icons";
|
|
29
|
+
import { ButtonInline } from "./button-inline";
|
|
30
|
+
|
|
31
|
+
interface CaseStudyCardProps {
|
|
32
|
+
study: CaseStudySummary;
|
|
33
|
+
/** Loads the image eagerly. */
|
|
34
|
+
eager?: boolean;
|
|
35
|
+
/** Flips alternating image rows; centered layouts ignore it. */
|
|
36
|
+
flip?: boolean;
|
|
37
|
+
/** Applies the section entrance class. */
|
|
38
|
+
rise?: boolean;
|
|
39
|
+
/** Renders hover dressing statically. */
|
|
40
|
+
forceState?: "hover";
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function CaseStudyCard({
|
|
44
|
+
study,
|
|
45
|
+
eager = false,
|
|
46
|
+
flip = false,
|
|
47
|
+
rise = false,
|
|
48
|
+
forceState,
|
|
49
|
+
}: CaseStudyCardProps) {
|
|
50
|
+
const fallback = CASE_STUDY_TIERS[CASE_STUDY_TIERS.length - 1];
|
|
51
|
+
return (
|
|
52
|
+
<article
|
|
53
|
+
className={rise ? "csc hx-rise" : "csc"}
|
|
54
|
+
data-flip={flip || undefined}
|
|
55
|
+
data-state={forceState}
|
|
56
|
+
data-landmark="card"
|
|
57
|
+
>
|
|
58
|
+
<div className="csc-img">
|
|
59
|
+
<picture>
|
|
60
|
+
{CASE_STUDY_TIERS.filter((t) => t.media !== null).map((t) => (
|
|
61
|
+
<source
|
|
62
|
+
key={t.cut}
|
|
63
|
+
media={t.media ?? undefined}
|
|
64
|
+
srcSet={caseStudySrc(study.site, t.cut)}
|
|
65
|
+
width={t.width}
|
|
66
|
+
height={t.height}
|
|
67
|
+
/>
|
|
68
|
+
))}
|
|
69
|
+
<img
|
|
70
|
+
src={caseStudySrc(study.site, fallback.cut)}
|
|
71
|
+
width={fallback.width}
|
|
72
|
+
height={fallback.height}
|
|
73
|
+
alt={study.alt}
|
|
74
|
+
loading={eager ? "eager" : "lazy"}
|
|
75
|
+
decoding="async"
|
|
76
|
+
/>
|
|
77
|
+
</picture>
|
|
78
|
+
</div>
|
|
79
|
+
<div className="csc-profile">
|
|
80
|
+
<div className="csc-lede">
|
|
81
|
+
<p className="type csc-category">{study.category}</p>
|
|
82
|
+
<h2 className="type csc-title">{study.name}</h2>
|
|
83
|
+
<p className="type csc-desc">{study.description}</p>
|
|
84
|
+
</div>
|
|
85
|
+
<div className="csc-foot">
|
|
86
|
+
<p className="type csc-slug">{study.statSlug}</p>
|
|
87
|
+
<dl className="csc-stats">
|
|
88
|
+
{study.stats.map((stat) => (
|
|
89
|
+
<div key={stat.label} className="csc-stat">
|
|
90
|
+
<dt className="type csc-stat-label">{stat.label}</dt>
|
|
91
|
+
<dd className="type csc-stat-value">
|
|
92
|
+
{stat.value}
|
|
93
|
+
{stat.star && (
|
|
94
|
+
<span className="csc-star" aria-hidden="true">
|
|
95
|
+
<IconStar />
|
|
96
|
+
</span>
|
|
97
|
+
)}
|
|
98
|
+
</dd>
|
|
99
|
+
</div>
|
|
100
|
+
))}
|
|
101
|
+
</dl>
|
|
102
|
+
{/* The overlay link owns interaction and the accessible name. */}
|
|
103
|
+
<div className="csc-cta" aria-hidden="true">
|
|
104
|
+
<ButtonInline>View Case Study</ButtonInline>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
{/* Last-child overlay spans both boxes. */}
|
|
109
|
+
<a
|
|
110
|
+
className="csc-link"
|
|
111
|
+
href={`/case-studies/${study.slug}`}
|
|
112
|
+
aria-label={`View the ${study.name} case study`}
|
|
113
|
+
/>
|
|
114
|
+
</article>
|
|
115
|
+
);
|
|
116
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* One tick tall, one tick below the content; the overlay escapes the
|
|
2
|
+
owning section's 1t inline padding to span all 12 columns. */
|
|
3
|
+
|
|
4
|
+
.closer-row {
|
|
5
|
+
position: relative;
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: var(--t);
|
|
8
|
+
margin-top: var(--t);
|
|
9
|
+
}
|
|
10
|
+
.closer-row-bleed {
|
|
11
|
+
inset: 0 auto auto calc(var(--t) * -1);
|
|
12
|
+
width: calc(var(--t) * 12);
|
|
13
|
+
height: 100%;
|
|
14
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** Flow closer (the faq-gaprow idiom): one painted row of 12 cells, one
|
|
2
|
+
* tick below a content-sized section's last content. The page rhythm
|
|
3
|
+
* reads [content] → 1t → [row] → 1t (the next section's padding-top) →
|
|
4
|
+
* [content], so the grid is perceptual, carried by these rows, not by
|
|
5
|
+
* whole-tick section budgets. Mount it last inside a `.sec` that pads
|
|
6
|
+
* 1t inline; the row bleeds back out to the full 12 columns. */
|
|
7
|
+
|
|
8
|
+
import { GridRegion, type GridBand } from "../grid/region";
|
|
9
|
+
|
|
10
|
+
const BANDS: GridBand[] = ["rm", "rs", "rt", "rd1", "rd2"];
|
|
11
|
+
|
|
12
|
+
export function CloserRow() {
|
|
13
|
+
return (
|
|
14
|
+
<div className="closer-row" aria-hidden="true">
|
|
15
|
+
<div className="gx closer-row-bleed">
|
|
16
|
+
{BANDS.map((band) => (
|
|
17
|
+
<GridRegion key={band} band={band} gx={0} gy={0} gw={12} />
|
|
18
|
+
))}
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/* Button size per band: md rm/rs · lg rt/rd1 · xl rd2 (the
|
|
2
|
+
case-study-cta idiom). The question label is hidden at the
|
|
3
|
+
narrowest band and grows with the body ramp. */
|
|
4
|
+
|
|
5
|
+
.cta-row {
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
--btn-size: md;
|
|
9
|
+
}
|
|
10
|
+
.cta-row > * + * {
|
|
11
|
+
margin-left: var(--space-3xl);
|
|
12
|
+
}
|
|
13
|
+
.cta-row-q {
|
|
14
|
+
display: none;
|
|
15
|
+
color: var(--color-text-400);
|
|
16
|
+
}
|
|
17
|
+
@container (--rs) {
|
|
18
|
+
.cta-row-q {
|
|
19
|
+
display: inline;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
@container (--rt) {
|
|
23
|
+
.cta-row {
|
|
24
|
+
--btn-size: lg;
|
|
25
|
+
}
|
|
26
|
+
.cta-row-q {
|
|
27
|
+
--font: var(--ts-text-lg-light-font);
|
|
28
|
+
--ls: var(--ts-text-lg-light-ls);
|
|
29
|
+
--opsz: var(--ts-text-lg-light-opsz);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
@container (--rd2) {
|
|
33
|
+
.cta-row {
|
|
34
|
+
--btn-size: xl;
|
|
35
|
+
}
|
|
36
|
+
.cta-row-q {
|
|
37
|
+
--font: var(--ts-text-xl-light-font);
|
|
38
|
+
--ls: var(--ts-text-xl-light-ls);
|
|
39
|
+
--opsz: var(--ts-text-xl-light-opsz);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** The site's CTA row: one fill button, then the chat prompt from rs
|
|
2
|
+
* ("Got a question?" and a ghost button that opens the site chat). The
|
|
3
|
+
* row sets `--btn-size` per band — md · lg from rt · xl from rd2 — so
|
|
4
|
+
* both controls size together; a mount that wants another scale
|
|
5
|
+
* restates the keyword on `.cta-row`. */
|
|
6
|
+
|
|
7
|
+
import { IconChat } from "../icons";
|
|
8
|
+
import { ButtonFill, ButtonGhost } from "./buttons";
|
|
9
|
+
|
|
10
|
+
export interface CtaLink {
|
|
11
|
+
label: string;
|
|
12
|
+
href: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface CtaRowProps {
|
|
16
|
+
cta: CtaLink;
|
|
17
|
+
question?: string;
|
|
18
|
+
chatLabel?: string;
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function CtaRow({
|
|
23
|
+
cta,
|
|
24
|
+
question = "Got a question?",
|
|
25
|
+
chatLabel = "Talk to us",
|
|
26
|
+
className,
|
|
27
|
+
}: CtaRowProps) {
|
|
28
|
+
return (
|
|
29
|
+
<div className={className ? `cta-row ${className}` : "cta-row"} data-landmark="cta">
|
|
30
|
+
<ButtonFill size="inherit" href={cta.href}>
|
|
31
|
+
{cta.label}
|
|
32
|
+
</ButtonFill>
|
|
33
|
+
<span className="type type-fixed ts-text-md-light cta-row-q">{question}</span>
|
|
34
|
+
<ButtonGhost size="inherit" color="brown" icon={<IconChat />} action="open-chat">
|
|
35
|
+
{chatLabel}
|
|
36
|
+
</ButtonGhost>
|
|
37
|
+
</div>
|
|
38
|
+
);
|
|
39
|
+
}
|