@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,151 @@
|
|
|
1
|
+
/* Modal: a centred sheet over a dimmed ground. The sheet is a lifted
|
|
2
|
+
surface; the close control sits in its top-right corner. */
|
|
3
|
+
|
|
4
|
+
/* Designed constants for this file. */
|
|
5
|
+
:root {
|
|
6
|
+
--z-portal: 9999;
|
|
7
|
+
--modal-close: 32px;
|
|
8
|
+
--modal-mark: 44px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.modal {
|
|
12
|
+
position: fixed;
|
|
13
|
+
inset: 0;
|
|
14
|
+
z-index: var(--z-portal);
|
|
15
|
+
display: grid;
|
|
16
|
+
place-items: center;
|
|
17
|
+
padding: var(--space-2xl);
|
|
18
|
+
/* The sheet mounts outside .page; restate the tick and line so
|
|
19
|
+
cell-sized primitives (notices) keep their geometry inside it. */
|
|
20
|
+
--t: min(calc(100cqw / 12), 112px);
|
|
21
|
+
--line: var(--color-border-000);
|
|
22
|
+
}
|
|
23
|
+
.modal-backdrop {
|
|
24
|
+
appearance: none;
|
|
25
|
+
position: absolute;
|
|
26
|
+
inset: 0;
|
|
27
|
+
border: 0;
|
|
28
|
+
padding: 0;
|
|
29
|
+
background: var(--color-alpha-white-60);
|
|
30
|
+
cursor: default;
|
|
31
|
+
animation: modal-dim var(--motion-rise-duration) var(--motion-drawer-ease) both;
|
|
32
|
+
}
|
|
33
|
+
.modal-sheet {
|
|
34
|
+
position: relative;
|
|
35
|
+
box-sizing: border-box;
|
|
36
|
+
width: 100%;
|
|
37
|
+
max-width: 28rem;
|
|
38
|
+
max-height: calc(100dvh - var(--space-2xl) * 2);
|
|
39
|
+
overflow-y: auto;
|
|
40
|
+
padding: var(--space-3xl);
|
|
41
|
+
border: 1px solid var(--color-border-050);
|
|
42
|
+
border-radius: var(--radius-3xl);
|
|
43
|
+
background: var(--color-bg-200);
|
|
44
|
+
color: var(--color-text-200);
|
|
45
|
+
box-shadow: var(--shadow-hard-round);
|
|
46
|
+
outline: none;
|
|
47
|
+
animation: modal-pop var(--motion-rise-duration) var(--motion-drawer-ease) both;
|
|
48
|
+
}
|
|
49
|
+
.modal-sheet[data-size="md"] {
|
|
50
|
+
max-width: 36rem;
|
|
51
|
+
}
|
|
52
|
+
.modal-sheet[data-size="lg"] {
|
|
53
|
+
max-width: 64rem;
|
|
54
|
+
padding: var(--space-2xl);
|
|
55
|
+
}
|
|
56
|
+
@container (--rt) {
|
|
57
|
+
.modal-sheet[data-size="lg"] {
|
|
58
|
+
padding: var(--space-3xl);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
.modal-close {
|
|
62
|
+
appearance: none;
|
|
63
|
+
position: absolute;
|
|
64
|
+
top: var(--space-lg);
|
|
65
|
+
right: var(--space-lg);
|
|
66
|
+
display: grid;
|
|
67
|
+
place-items: center;
|
|
68
|
+
width: var(--modal-close);
|
|
69
|
+
height: var(--modal-close);
|
|
70
|
+
border: 1px solid var(--color-border-100);
|
|
71
|
+
border-radius: var(--radius-full);
|
|
72
|
+
background: transparent;
|
|
73
|
+
color: var(--color-text-400);
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
transition:
|
|
76
|
+
background var(--motion-hover-duration) var(--motion-hover-ease),
|
|
77
|
+
color var(--motion-hover-duration) var(--motion-hover-ease);
|
|
78
|
+
}
|
|
79
|
+
@media (hover: hover) {
|
|
80
|
+
.modal-close:hover {
|
|
81
|
+
background: var(--color-bg-300);
|
|
82
|
+
color: var(--color-text-100);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
.modal-close:focus-visible {
|
|
86
|
+
outline: none;
|
|
87
|
+
box-shadow: 0 0 0 var(--ring-w) var(--color-border-200);
|
|
88
|
+
}
|
|
89
|
+
.modal-close svg {
|
|
90
|
+
width: 14px;
|
|
91
|
+
height: 14px;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* Body helpers. */
|
|
95
|
+
.modal-mark {
|
|
96
|
+
display: grid;
|
|
97
|
+
place-items: center;
|
|
98
|
+
width: var(--modal-mark);
|
|
99
|
+
height: var(--modal-mark);
|
|
100
|
+
border-radius: var(--radius-full);
|
|
101
|
+
background: color-mix(in srgb, var(--color-teal-300) 15%, transparent);
|
|
102
|
+
color: var(--color-teal-300);
|
|
103
|
+
}
|
|
104
|
+
.modal-mark svg {
|
|
105
|
+
width: 20px;
|
|
106
|
+
height: 20px;
|
|
107
|
+
}
|
|
108
|
+
.modal-title {
|
|
109
|
+
margin: var(--space-lg) 0 0;
|
|
110
|
+
color: var(--color-text-100);
|
|
111
|
+
}
|
|
112
|
+
.modal-actions {
|
|
113
|
+
display: flex;
|
|
114
|
+
flex-direction: column;
|
|
115
|
+
align-items: stretch;
|
|
116
|
+
gap: var(--space-md);
|
|
117
|
+
margin-top: var(--space-2xl);
|
|
118
|
+
}
|
|
119
|
+
.modal-actions .btn-fill,
|
|
120
|
+
.modal-actions .btn-ghost {
|
|
121
|
+
justify-content: center;
|
|
122
|
+
}
|
|
123
|
+
.modal-legal {
|
|
124
|
+
margin: var(--space-lg) 0 0;
|
|
125
|
+
color: var(--color-text-500);
|
|
126
|
+
text-align: center;
|
|
127
|
+
}
|
|
128
|
+
.modal-legal a {
|
|
129
|
+
color: inherit;
|
|
130
|
+
text-decoration: underline;
|
|
131
|
+
text-underline-offset: 2px;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@keyframes modal-dim {
|
|
135
|
+
from {
|
|
136
|
+
opacity: 0;
|
|
137
|
+
}
|
|
138
|
+
to {
|
|
139
|
+
opacity: 1;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
@keyframes modal-pop {
|
|
143
|
+
from {
|
|
144
|
+
opacity: 0;
|
|
145
|
+
transform: translateY(8px) scale(0.98);
|
|
146
|
+
}
|
|
147
|
+
to {
|
|
148
|
+
opacity: 1;
|
|
149
|
+
transform: none;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
/** Modal: a centred sheet over a dimmed ground. Locks page scroll, traps
|
|
4
|
+
* Tab, closes on Escape and on the backdrop, and returns focus to the
|
|
5
|
+
* element that opened it. Renders into the body so grid geometry stays
|
|
6
|
+
* untouched. Styles live in modal.css. */
|
|
7
|
+
|
|
8
|
+
import { useEffect, useRef, type ReactNode } from "react";
|
|
9
|
+
import { createPortal } from "react-dom";
|
|
10
|
+
import { IconGalleryClose } from "../icons";
|
|
11
|
+
import { trapModalTab } from "../lib/focus-trap";
|
|
12
|
+
import { lockScroll } from "../lib/scroll-lock";
|
|
13
|
+
|
|
14
|
+
interface ModalProps {
|
|
15
|
+
/** Names the dialog for assistive technology. */
|
|
16
|
+
label: string;
|
|
17
|
+
onClose: () => void;
|
|
18
|
+
/** Sheet width: sm for prompts, md for forms, lg for records. */
|
|
19
|
+
size?: "sm" | "md" | "lg";
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function Modal({ label, onClose, size = "sm", children }: ModalProps) {
|
|
24
|
+
const sheetRef = useRef<HTMLDivElement>(null);
|
|
25
|
+
const openerRef = useRef<Element | null>(null);
|
|
26
|
+
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
openerRef.current = document.activeElement;
|
|
29
|
+
const unlock = lockScroll();
|
|
30
|
+
const sheet = sheetRef.current;
|
|
31
|
+
const first = sheet?.querySelector<HTMLElement>("button, [href], input, textarea, select");
|
|
32
|
+
(first ?? sheet)?.focus();
|
|
33
|
+
return () => {
|
|
34
|
+
unlock();
|
|
35
|
+
if (openerRef.current instanceof HTMLElement) openerRef.current.focus();
|
|
36
|
+
};
|
|
37
|
+
}, []);
|
|
38
|
+
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
const onKey = (event: KeyboardEvent) => {
|
|
41
|
+
if (event.key === "Escape") {
|
|
42
|
+
event.preventDefault();
|
|
43
|
+
onClose();
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if (sheetRef.current) trapModalTab(event, sheetRef.current);
|
|
47
|
+
};
|
|
48
|
+
document.addEventListener("keydown", onKey);
|
|
49
|
+
return () => document.removeEventListener("keydown", onKey);
|
|
50
|
+
}, [onClose]);
|
|
51
|
+
|
|
52
|
+
return createPortal(
|
|
53
|
+
<div className="modal">
|
|
54
|
+
<button type="button" className="modal-backdrop" aria-label="Close" onClick={onClose} />
|
|
55
|
+
<div
|
|
56
|
+
ref={sheetRef}
|
|
57
|
+
className="modal-sheet"
|
|
58
|
+
data-size={size}
|
|
59
|
+
role="dialog"
|
|
60
|
+
aria-modal="true"
|
|
61
|
+
aria-label={label}
|
|
62
|
+
tabIndex={-1}
|
|
63
|
+
>
|
|
64
|
+
<button type="button" className="modal-close" aria-label="Close" onClick={onClose}>
|
|
65
|
+
<IconGalleryClose />
|
|
66
|
+
</button>
|
|
67
|
+
{children}
|
|
68
|
+
</div>
|
|
69
|
+
</div>,
|
|
70
|
+
document.body,
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** Body helpers: a round icon mark, the title beneath it, stacked
|
|
75
|
+
* actions, and the small print. */
|
|
76
|
+
export function ModalMark({ children }: { children: ReactNode }) {
|
|
77
|
+
return <div className="modal-mark">{children}</div>;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function ModalTitle({ children }: { children: ReactNode }) {
|
|
81
|
+
return <h2 className="type type-fixed ts-display-serif-xs-regular modal-title">{children}</h2>;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function ModalActions({ children }: { children: ReactNode }) {
|
|
85
|
+
return <div className="modal-actions">{children}</div>;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function ModalLegal({ children }: { children: ReactNode }) {
|
|
89
|
+
return <p className="type type-fixed ts-text-2xs-light modal-legal">{children}</p>;
|
|
90
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/* Notice: a centred loading, empty or error block. It fills its cell and
|
|
2
|
+
holds a 6t minimum so tab bodies keep their height while they wait. */
|
|
3
|
+
|
|
4
|
+
.notice {
|
|
5
|
+
display: grid;
|
|
6
|
+
place-items: center;
|
|
7
|
+
min-height: calc(var(--t) * 6);
|
|
8
|
+
padding: calc(var(--t) * 0.5);
|
|
9
|
+
text-align: center;
|
|
10
|
+
}
|
|
11
|
+
.notice-inner {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
align-items: center;
|
|
15
|
+
gap: var(--space-lg);
|
|
16
|
+
max-width: 28rem;
|
|
17
|
+
}
|
|
18
|
+
.notice-title {
|
|
19
|
+
margin: 0;
|
|
20
|
+
color: var(--color-text-100);
|
|
21
|
+
}
|
|
22
|
+
.notice-wait {
|
|
23
|
+
display: inline-flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
gap: var(--space-md);
|
|
26
|
+
margin: 0;
|
|
27
|
+
color: var(--color-text-400);
|
|
28
|
+
}
|
|
29
|
+
.notice-action {
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-wrap: wrap;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
gap: var(--space-md);
|
|
34
|
+
margin-top: var(--space-xs);
|
|
35
|
+
}
|
|
36
|
+
.notice-field {
|
|
37
|
+
width: 100%;
|
|
38
|
+
max-width: 24rem;
|
|
39
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/** Notice: a centred loading, empty, or error block that fills its
|
|
2
|
+
* cell. Styles live in notice.css. */
|
|
3
|
+
|
|
4
|
+
import type { ReactNode } from "react";
|
|
5
|
+
import { Copy } from "./prose";
|
|
6
|
+
import { Spinner } from "./status";
|
|
7
|
+
|
|
8
|
+
interface NoticeProps {
|
|
9
|
+
heading?: string;
|
|
10
|
+
body?: ReactNode;
|
|
11
|
+
action?: ReactNode;
|
|
12
|
+
/** A waiting state: body only, with a spinner. */
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
/** Draws the notice on a raised sheet. */
|
|
15
|
+
framed?: boolean;
|
|
16
|
+
/** Error copy tints the body red. */
|
|
17
|
+
tone?: "neutral" | "poor";
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function Notice({ heading, body, action, loading, framed, tone = "neutral" }: NoticeProps) {
|
|
21
|
+
const inner = (
|
|
22
|
+
<div className="notice-inner" data-tone={tone}>
|
|
23
|
+
{loading ? (
|
|
24
|
+
<p className="type type-fixed ts-text-md-light notice-wait">
|
|
25
|
+
<Spinner />
|
|
26
|
+
<span>{body}</span>
|
|
27
|
+
</p>
|
|
28
|
+
) : (
|
|
29
|
+
<>
|
|
30
|
+
{heading ? (
|
|
31
|
+
<h3 className="type type-fixed ts-display-serif-xs-regular notice-title">{heading}</h3>
|
|
32
|
+
) : null}
|
|
33
|
+
{body ? (
|
|
34
|
+
typeof body === "string" ? (
|
|
35
|
+
<Copy tone={tone === "poor" ? "poor" : undefined}>{body}</Copy>
|
|
36
|
+
) : (
|
|
37
|
+
body
|
|
38
|
+
)
|
|
39
|
+
) : null}
|
|
40
|
+
{action ? <div className="notice-action">{action}</div> : null}
|
|
41
|
+
</>
|
|
42
|
+
)}
|
|
43
|
+
</div>
|
|
44
|
+
);
|
|
45
|
+
return (
|
|
46
|
+
<div className="notice" data-framed={framed || undefined} role={loading ? "status" : undefined}>
|
|
47
|
+
{framed ? (
|
|
48
|
+
<div className="surface" data-pad="lg">
|
|
49
|
+
{inner}
|
|
50
|
+
</div>
|
|
51
|
+
) : (
|
|
52
|
+
inner
|
|
53
|
+
)}
|
|
54
|
+
</div>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
/* persona-card (1150:25363 set). Three designs — sm 304 (1170:33708),
|
|
2
|
+
md 320 (1170:32814), lg 560 (1150:25363) — selected by `--pcard-size`,
|
|
3
|
+
which the mount declares per band or `data-size` pins. Interiors are
|
|
4
|
+
designed px scaled by `--_u`, the mount's unit; type pins `--fs-px` to
|
|
5
|
+
the same unit with flat anchors, since the size keyword picks the
|
|
6
|
+
step. The hue table is keyed by `data-hue`; `data-state="inactive"`
|
|
7
|
+
is the ghosted card beside the active one. */
|
|
8
|
+
|
|
9
|
+
.pcard {
|
|
10
|
+
/* Inactive cost fill (persona-card inactive variant). */
|
|
11
|
+
--pcard-cost-muted: rgba(234, 232, 224, 0.5);
|
|
12
|
+
/* 10% multiply washes over the active image, per hue. */
|
|
13
|
+
--pcard-wash-pink: rgba(122, 9, 9, 0.1);
|
|
14
|
+
--pcard-wash-teal: rgba(136, 90, 15, 0.1);
|
|
15
|
+
--pcard-wash-blue: rgba(14, 83, 70, 0.1);
|
|
16
|
+
--pcard-wash-purple: rgba(136, 90, 15, 0.1);
|
|
17
|
+
--_u: var(--pcard-u, 1px);
|
|
18
|
+
position: relative;
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
align-items: stretch;
|
|
22
|
+
}
|
|
23
|
+
.pcard[data-size="sm"] { --pcard-size: sm; --_w: 304; }
|
|
24
|
+
.pcard[data-size="md"] { --pcard-size: md; --_w: 320; }
|
|
25
|
+
.pcard[data-size="lg"] { --pcard-size: lg; --_w: 560; }
|
|
26
|
+
.pcard[data-size] {
|
|
27
|
+
width: calc(var(--_u) * var(--_w));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* Designed card height is a floor; a longer story grows the card. */
|
|
31
|
+
.pcard-box {
|
|
32
|
+
position: relative;
|
|
33
|
+
flex: 1;
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
min-height: calc(var(--_u) * var(--_h));
|
|
37
|
+
--_h: 406;
|
|
38
|
+
}
|
|
39
|
+
/* A pseudo keeps the active shadow above the hanging tag. */
|
|
40
|
+
.pcard-box::after {
|
|
41
|
+
content: "";
|
|
42
|
+
position: absolute;
|
|
43
|
+
inset: 0;
|
|
44
|
+
z-index: 1;
|
|
45
|
+
pointer-events: none;
|
|
46
|
+
}
|
|
47
|
+
.pcard[data-state="active"] .pcard-box::after {
|
|
48
|
+
box-shadow: var(--shadow-hard-square);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* ---- image ---- */
|
|
52
|
+
|
|
53
|
+
.pcard-image {
|
|
54
|
+
position: relative;
|
|
55
|
+
flex: none;
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-direction: column;
|
|
58
|
+
justify-content: flex-end;
|
|
59
|
+
box-sizing: border-box;
|
|
60
|
+
height: calc(var(--_u) * var(--_img-h));
|
|
61
|
+
padding: calc(var(--_u) * var(--_img-p));
|
|
62
|
+
--_img-h: 176;
|
|
63
|
+
--_img-p: 16;
|
|
64
|
+
}
|
|
65
|
+
.pcard-image picture {
|
|
66
|
+
position: absolute;
|
|
67
|
+
inset: 0;
|
|
68
|
+
}
|
|
69
|
+
.pcard-image img {
|
|
70
|
+
display: block;
|
|
71
|
+
width: 100%;
|
|
72
|
+
height: 100%;
|
|
73
|
+
object-fit: cover;
|
|
74
|
+
}
|
|
75
|
+
/* The hue wash multiplies over the active image only. */
|
|
76
|
+
.pcard-image::after {
|
|
77
|
+
content: "";
|
|
78
|
+
position: absolute;
|
|
79
|
+
inset: 0;
|
|
80
|
+
background: var(--_wash);
|
|
81
|
+
mix-blend-mode: multiply;
|
|
82
|
+
pointer-events: none;
|
|
83
|
+
}
|
|
84
|
+
.pcard[data-state="inactive"] .pcard-image::after {
|
|
85
|
+
background: none;
|
|
86
|
+
}
|
|
87
|
+
.pcard[data-state="inactive"] .pcard-image img {
|
|
88
|
+
opacity: var(--motion-ghost-opacity);
|
|
89
|
+
mix-blend-mode: luminosity;
|
|
90
|
+
}
|
|
91
|
+
.pcard-title {
|
|
92
|
+
position: relative;
|
|
93
|
+
z-index: 1;
|
|
94
|
+
margin: var(--space-none);
|
|
95
|
+
color: var(--color-bg-000);
|
|
96
|
+
max-width: calc(var(--_u) * var(--_title-w));
|
|
97
|
+
--_title-w: 232;
|
|
98
|
+
--font: var(--ts-text-md-medium-font);
|
|
99
|
+
--ls: var(--ts-text-md-medium-ls);
|
|
100
|
+
--opsz: var(--ts-text-md-medium-opsz);
|
|
101
|
+
--fs-rm: var(--ts-text-md-medium-fs);
|
|
102
|
+
--fs-rd2: var(--fs-rm);
|
|
103
|
+
--lh-rm: var(--ts-text-md-medium-lh);
|
|
104
|
+
--lh-rd2: var(--lh-rm);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* ---- cost ---- */
|
|
108
|
+
|
|
109
|
+
.pcard-cost {
|
|
110
|
+
flex: 1;
|
|
111
|
+
display: flex;
|
|
112
|
+
flex-direction: column;
|
|
113
|
+
gap: calc(var(--_u) * var(--_cost-gap));
|
|
114
|
+
box-sizing: border-box;
|
|
115
|
+
background: var(--color-bg-000);
|
|
116
|
+
padding:
|
|
117
|
+
calc(var(--_u) * var(--_cost-pt))
|
|
118
|
+
calc(var(--_u) * var(--_cost-px))
|
|
119
|
+
calc(var(--_u) * var(--_cost-pb));
|
|
120
|
+
--_cost-gap: 16;
|
|
121
|
+
--_cost-pt: 16;
|
|
122
|
+
--_cost-px: 16;
|
|
123
|
+
--_cost-pb: 20;
|
|
124
|
+
}
|
|
125
|
+
.pcard[data-state="inactive"] .pcard-cost {
|
|
126
|
+
background: var(--pcard-cost-muted);
|
|
127
|
+
}
|
|
128
|
+
.pcard-row {
|
|
129
|
+
display: flex;
|
|
130
|
+
align-items: center;
|
|
131
|
+
justify-content: space-between;
|
|
132
|
+
gap: calc(var(--_u) * 8);
|
|
133
|
+
margin: var(--space-none);
|
|
134
|
+
}
|
|
135
|
+
/* The plan chip: rest and inactive fills come from the hue table. */
|
|
136
|
+
.pcard-plan {
|
|
137
|
+
display: inline-flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
box-sizing: border-box;
|
|
140
|
+
background: var(--_chip-bg);
|
|
141
|
+
color: var(--_chip-ink);
|
|
142
|
+
border-radius: calc(var(--_u) * var(--_chip-r));
|
|
143
|
+
padding:
|
|
144
|
+
calc(var(--_u) * var(--_chip-pt))
|
|
145
|
+
calc(var(--_u) * var(--_chip-px))
|
|
146
|
+
calc(var(--_u) * var(--_chip-pb));
|
|
147
|
+
white-space: nowrap;
|
|
148
|
+
--_chip-r: 6;
|
|
149
|
+
--_chip-pt: 2;
|
|
150
|
+
--_chip-px: 8;
|
|
151
|
+
--_chip-pb: 4;
|
|
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
|
+
.pcard-price {
|
|
161
|
+
color: var(--_price-ink);
|
|
162
|
+
white-space: nowrap;
|
|
163
|
+
--font: var(--ts-text-xl-light-font);
|
|
164
|
+
--ls: var(--ts-text-xl-light-ls);
|
|
165
|
+
--opsz: var(--ts-text-xl-light-opsz);
|
|
166
|
+
--fs-rm: var(--ts-text-xl-light-fs);
|
|
167
|
+
--fs-rd2: var(--fs-rm);
|
|
168
|
+
--lh-rm: var(--ts-text-xl-light-lh);
|
|
169
|
+
--lh-rd2: var(--lh-rm);
|
|
170
|
+
}
|
|
171
|
+
.pcard-story {
|
|
172
|
+
margin: var(--space-none);
|
|
173
|
+
color: var(--color-text-400);
|
|
174
|
+
--font: var(--ts-text-sm-light-font);
|
|
175
|
+
--ls: var(--ts-text-sm-light-ls);
|
|
176
|
+
--opsz: var(--ts-text-sm-light-opsz);
|
|
177
|
+
--fs-rm: var(--ts-text-sm-light-fs);
|
|
178
|
+
--fs-rd2: var(--fs-rm);
|
|
179
|
+
--lh-rm: var(--ts-text-sm-light-lh);
|
|
180
|
+
--lh-rd2: var(--lh-rm);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/* The fixed-height tag hangs under the box at its right edge, out of
|
|
184
|
+
flow so the box alone sets the card's height. */
|
|
185
|
+
.pcard-tag {
|
|
186
|
+
position: absolute;
|
|
187
|
+
top: 100%;
|
|
188
|
+
right: calc(var(--_u) * var(--_tag-right));
|
|
189
|
+
display: inline-flex;
|
|
190
|
+
align-items: center;
|
|
191
|
+
box-sizing: border-box;
|
|
192
|
+
height: calc(var(--_u) * var(--_tag-h));
|
|
193
|
+
padding: 0 calc(var(--_u) * var(--_tag-px)) calc(var(--_u) * 2);
|
|
194
|
+
background: var(--_tag-bg);
|
|
195
|
+
color: var(--_tag-ink, var(--color-base-white));
|
|
196
|
+
border-radius: 0 0 calc(var(--_u) * 6) calc(var(--_u) * 6);
|
|
197
|
+
white-space: nowrap;
|
|
198
|
+
--_tag-right: 16;
|
|
199
|
+
--_tag-h: 24;
|
|
200
|
+
--_tag-px: 8;
|
|
201
|
+
--font: var(--ts-text-2xs-medium-font);
|
|
202
|
+
--ls: var(--ts-text-2xs-medium-ls);
|
|
203
|
+
--opsz: var(--ts-text-2xs-medium-opsz);
|
|
204
|
+
--fs-rm: var(--ts-text-2xs-medium-fs);
|
|
205
|
+
--fs-rd2: var(--fs-rm);
|
|
206
|
+
--lh-rm: var(--ts-text-2xs-medium-lh);
|
|
207
|
+
--lh-rd2: var(--lh-rm);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/* Every text inside rides the card's unit. */
|
|
211
|
+
.pcard .type {
|
|
212
|
+
--fs-px: calc(var(--_u) * var(--fs-band));
|
|
213
|
+
--lh-px: calc(var(--_u) * var(--lh-band));
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/* Inactive cards expose a whole-card button overlay. */
|
|
217
|
+
.pcard-overlay {
|
|
218
|
+
position: absolute;
|
|
219
|
+
inset: 0;
|
|
220
|
+
z-index: 2;
|
|
221
|
+
margin: 0;
|
|
222
|
+
padding: 0;
|
|
223
|
+
border: 0;
|
|
224
|
+
background: none;
|
|
225
|
+
cursor: pointer;
|
|
226
|
+
}
|
|
227
|
+
.pcard[data-state="active"] .pcard-overlay {
|
|
228
|
+
display: none;
|
|
229
|
+
}
|
|
230
|
+
.pcard-overlay:focus-visible {
|
|
231
|
+
outline: none;
|
|
232
|
+
box-shadow: 0 0 0 var(--ring-w) var(--color-border-200);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/* ---- md (1170:32814) ---- */
|
|
236
|
+
|
|
237
|
+
@container style(--pcard-size: md) {
|
|
238
|
+
.pcard-box {
|
|
239
|
+
--_h: 408;
|
|
240
|
+
}
|
|
241
|
+
.pcard-image {
|
|
242
|
+
--_img-h: 192;
|
|
243
|
+
}
|
|
244
|
+
.pcard-title {
|
|
245
|
+
--_title-w: 240;
|
|
246
|
+
--font: var(--ts-text-lg-medium-font);
|
|
247
|
+
--ls: var(--ts-text-lg-medium-ls);
|
|
248
|
+
--opsz: var(--ts-text-lg-medium-opsz);
|
|
249
|
+
--fs-rm: var(--ts-text-lg-medium-fs);
|
|
250
|
+
--lh-rm: var(--ts-text-lg-medium-lh);
|
|
251
|
+
}
|
|
252
|
+
.pcard-cost {
|
|
253
|
+
--_cost-px: 20;
|
|
254
|
+
}
|
|
255
|
+
.pcard-plan {
|
|
256
|
+
--_chip-r: 4;
|
|
257
|
+
}
|
|
258
|
+
.pcard-price {
|
|
259
|
+
--font: var(--ts-text-2xl-light-font);
|
|
260
|
+
--ls: var(--ts-text-2xl-light-ls);
|
|
261
|
+
--opsz: var(--ts-text-2xl-light-opsz);
|
|
262
|
+
--fs-rm: var(--ts-text-2xl-light-fs);
|
|
263
|
+
--lh-rm: var(--ts-text-2xl-light-lh);
|
|
264
|
+
}
|
|
265
|
+
.pcard-tag {
|
|
266
|
+
--_tag-right: 24;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/* ---- lg (1150:25363) ---- */
|
|
271
|
+
|
|
272
|
+
@container style(--pcard-size: lg) {
|
|
273
|
+
.pcard-box {
|
|
274
|
+
--_h: 480;
|
|
275
|
+
}
|
|
276
|
+
.pcard-image {
|
|
277
|
+
--_img-h: 224;
|
|
278
|
+
--_img-p: 24;
|
|
279
|
+
}
|
|
280
|
+
.pcard-title {
|
|
281
|
+
--_title-w: 312;
|
|
282
|
+
--font: var(--ts-text-2xl-medium-font);
|
|
283
|
+
--ls: var(--ts-text-2xl-medium-ls);
|
|
284
|
+
--opsz: var(--ts-text-2xl-medium-opsz);
|
|
285
|
+
--fs-rm: var(--ts-text-2xl-medium-fs);
|
|
286
|
+
--lh-rm: var(--ts-text-2xl-medium-lh);
|
|
287
|
+
}
|
|
288
|
+
.pcard-cost {
|
|
289
|
+
--_cost-gap: 24;
|
|
290
|
+
--_cost-pt: 24;
|
|
291
|
+
--_cost-px: 32;
|
|
292
|
+
--_cost-pb: 32;
|
|
293
|
+
}
|
|
294
|
+
.pcard-plan {
|
|
295
|
+
--_chip-r: 6;
|
|
296
|
+
--_chip-pt: 4;
|
|
297
|
+
--_chip-px: 12;
|
|
298
|
+
--_chip-pb: 6;
|
|
299
|
+
--font: var(--ts-text-lg-light-font);
|
|
300
|
+
--ls: var(--ts-text-lg-light-ls);
|
|
301
|
+
--opsz: var(--ts-text-lg-light-opsz);
|
|
302
|
+
--fs-rm: var(--ts-text-lg-light-fs);
|
|
303
|
+
--lh-rm: var(--ts-text-lg-light-lh);
|
|
304
|
+
}
|
|
305
|
+
.pcard-price {
|
|
306
|
+
--font: var(--ts-display-sans-sm-light-font);
|
|
307
|
+
--ls: var(--ts-display-sans-sm-light-ls);
|
|
308
|
+
--opsz: var(--ts-display-sans-sm-light-opsz);
|
|
309
|
+
--fs-rm: var(--ts-display-sans-sm-light-fs);
|
|
310
|
+
--lh-rm: var(--ts-display-sans-sm-light-lh);
|
|
311
|
+
}
|
|
312
|
+
.pcard-story {
|
|
313
|
+
--font: var(--ts-text-lg-light-font);
|
|
314
|
+
--ls: var(--ts-text-lg-light-ls);
|
|
315
|
+
--opsz: var(--ts-text-lg-light-opsz);
|
|
316
|
+
--fs-rm: var(--ts-text-lg-light-fs);
|
|
317
|
+
--lh-rm: var(--ts-text-lg-light-lh);
|
|
318
|
+
}
|
|
319
|
+
.pcard-tag {
|
|
320
|
+
--_tag-right: 32;
|
|
321
|
+
--_tag-h: 32;
|
|
322
|
+
--_tag-px: 12;
|
|
323
|
+
padding-bottom: calc(var(--_u) * 4);
|
|
324
|
+
--font: var(--ts-text-xs-semibold-font);
|
|
325
|
+
--ls: var(--ts-text-xs-semibold-ls);
|
|
326
|
+
--opsz: var(--ts-text-xs-semibold-opsz);
|
|
327
|
+
--fs-rm: var(--ts-text-xs-semibold-fs);
|
|
328
|
+
--lh-rm: var(--ts-text-xs-semibold-lh);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/* ---- hue table (data-hue) ---- */
|
|
333
|
+
|
|
334
|
+
/* The Starter persona's chip is the neutral pair (1150:25363). */
|
|
335
|
+
.pcard[data-hue="pink"] {
|
|
336
|
+
--_wash: var(--pcard-wash-pink);
|
|
337
|
+
--_chip-bg: var(--color-bg-200);
|
|
338
|
+
--_chip-ink: var(--color-text-300);
|
|
339
|
+
--_price-ink: var(--color-pink-400);
|
|
340
|
+
--_tag-bg: var(--color-pink-400);
|
|
341
|
+
}
|
|
342
|
+
.pcard[data-hue="teal"] {
|
|
343
|
+
--_wash: var(--pcard-wash-teal);
|
|
344
|
+
--_chip-bg: var(--color-teal-200);
|
|
345
|
+
--_chip-ink: var(--color-teal-700);
|
|
346
|
+
--_price-ink: var(--color-teal-450);
|
|
347
|
+
--_tag-bg: var(--color-teal-400);
|
|
348
|
+
}
|
|
349
|
+
.pcard[data-hue="blue"] {
|
|
350
|
+
--_wash: var(--pcard-wash-blue);
|
|
351
|
+
--_chip-bg: var(--color-blue-200);
|
|
352
|
+
--_chip-ink: var(--color-blue-600);
|
|
353
|
+
--_price-ink: var(--color-blue-400);
|
|
354
|
+
--_tag-bg: var(--color-blue-400);
|
|
355
|
+
}
|
|
356
|
+
.pcard[data-hue="purple"] {
|
|
357
|
+
--_wash: var(--pcard-wash-purple);
|
|
358
|
+
--_chip-bg: var(--color-purple-200);
|
|
359
|
+
--_chip-ink: var(--color-purple-700);
|
|
360
|
+
--_price-ink: var(--color-purple-400);
|
|
361
|
+
--_tag-bg: var(--color-purple-400);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/* Inactive dressing outranks the hue table by order. */
|
|
365
|
+
.pcard[data-state="inactive"] {
|
|
366
|
+
--_chip-bg: var(--color-bg-300);
|
|
367
|
+
--_chip-ink: var(--color-text-600);
|
|
368
|
+
--_price-ink: var(--color-bg-500);
|
|
369
|
+
--_tag-bg: var(--color-bg-300);
|
|
370
|
+
--_tag-ink: var(--color-bg-600);
|
|
371
|
+
}
|
|
372
|
+
.pcard[data-state="inactive"] .pcard-story {
|
|
373
|
+
color: var(--color-bg-600);
|
|
374
|
+
}
|