Files

83 lines
5.8 KiB
CSS
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* v2 type, space and grid (docs/build-notes/MASTER.md section 3: Hanzo's scale has rhythm). Owner: Cloud 2 chat.
Usage: import '../../v2/v2scale.css' once in a page, then use the classes. Set --acc on the page's <main> for its one
accent. Resting sizes follow live hanzo.ai: h1 52 (40 on phones), statements 44/32, section headings 26, H3 21/17, lede 20, body 16,
captions 12 mono caps (never above an h1 or h2). Figures rest at 64 and only the page's moment grows past it.
Sections breathe 200–260px on desktop and 120px on phones; the wrap is 1440 with 24px gutters on a 12-column grid. */
.v2 { --acc: #525252; --ink: #0a0a0a; --soft: #525252; --faint: #525252; --line: rgba(0, 0, 0, .08); --card: #f5f5f7; --e: cubic-bezier(.16, 1, .3, 1); background: var(--x-raised); color: var(--ink); overflow-x: clip; }
.v2 h1, .v2 h2, .v2 h3, .v2 h4 { color: inherit; }
.v2 [hidden] { display: none !important; }
.v2-wrap { width: min(100% - 48px, 1440px); margin-inline: auto; }
.v2-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.v2-sec { padding: clamp(72px, 11vw, 188px) 0; position: relative; }
.v2-display { margin: 0; font-weight: 497; font-size: 52px; line-height: 1.04; letter-spacing: -.035em; text-wrap: balance; }
.v2-display.m { font-size: 44px; line-height: 1.06; }
.v2-display.s { font-size: 32px; line-height: 1.1; letter-spacing: -.03em; }
.v2-headline { margin: 0; font-weight: 497; font-size: 26px; line-height: 1.15; letter-spacing: -.025em; text-wrap: balance; max-width: 18ch; }
.v2-title { margin: 0; font-weight: 497; font-size: 21px; line-height: 1.2; letter-spacing: -.02em; text-wrap: balance; }
.v2-lede { margin: 0; font-size: 20px; line-height: 1.4; letter-spacing: -.01em; color: var(--soft); text-wrap: pretty; max-width: 44ch; }
.v2-body { margin: 0; font-size: 16px; line-height: 1.6; color: var(--soft); text-wrap: pretty; max-width: 66ch; }
.v2-fig { font-weight: 220; font-size: 64px; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.v2-kick { margin: 0; font: 500 12px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.v2-kick.acc { color: var(--acc); }
.v2-num { font-family: var(--sans); font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; letter-spacing: -.045em; }
/* line-masked title lines (LiftStage's Lines) */
.v2-line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.v2-line > span { display: block; }
.v2-cut { animation: v2-cut .7s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes v2-cut { from { transform: translate3d(0, 105%, 0); } }
/* a hero line or button arriving at first paint (CSS, so it never waits for JavaScript) */
.v2-in { animation: v2-in .5s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes v2-in { from { opacity: 0; transform: translate3d(0, 16px, 0); } }
/* buttons: one solid primary, one quiet secondary, 44px tall or more */
.v2-acts { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.v2-btn { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; min-height: 48px; padding: 0 24px; border-radius: 999px; font: 500 17px/1 var(--sans); letter-spacing: -.01em; text-decoration: none; color: var(--ink); background: transparent; border: 1px solid rgba(0, 0, 0, .14); cursor: pointer; transition: background .2s var(--e), color .2s var(--e), border-color .2s var(--e), transform .1s var(--e); }
.v2-btn.solid { background: var(--ink); color: var(--x-on-ink); border-color: var(--ink); }
.v2-btn svg { transition: transform .25s var(--e); }
.v2 button:not(:disabled):active, .v2-btn:active { transform: scale(.97); transition-duration: 90ms; }
@media (hover: hover) {
.v2-btn:hover { border-color: var(--ink); background: rgba(0, 0, 0, .04); }
.v2-btn.solid:hover { background: #262626; border-color: #262626; }
.v2-btn:hover svg { transform: translateX(3px); }
.v2 [role='tab']:not([aria-selected='true']):hover, .v2 [role='radio']:not([aria-checked='true']):hover, .v2 button[aria-pressed='false']:hover { background-color: rgba(128, 128, 128, .14); }
}
.v2-btn:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
.v2-link { color: var(--acc); text-decoration: none; font-weight: 500; }
@media (hover: hover) { .v2-link:hover { text-decoration: underline; text-underline-offset: 4px; } }
.v2-link:active { transform: translateY(1px); }
/* a live object and its pause control (components/v2/LivePause, WCAG 2.2.2) */
.lp-host { position: relative; }
/* hero objects and cards */
.v2-obj { border-radius: 28px; background: var(--x-raised); box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 40px 80px -32px rgba(0, 0, 0, .22), 0 0 0 1px rgba(0, 0, 0, .06); }
.v2-card { border-radius: 16px; background: var(--card); }
/* the dark room (at most one per page) */
.v2-dark { background: #000; color: #f5f5f7; --soft: #a3a3a3; --faint: #737373; --line: rgba(255, 255, 255, .12); --card: #161617; }
.v2-dark .v2-btn { color: #f5f5f7; border-color: rgba(255, 255, 255, .24); }
.v2-dark .v2-btn.solid { background: #f5f5f7; color: #000; border-color: #f5f5f7; }
@media (hover: hover) {
.v2-dark .v2-btn:hover { border-color: #f5f5f7; background: rgba(255, 255, 255, .08); }
.v2-dark .v2-btn.solid:hover { background: #e4e4e7; border-color: #e4e4e7; }
}
@media (max-width: 900px) {
.v2-wrap { width: min(100% - 32px, 1440px); }
.v2-grid { grid-template-columns: minmax(0, 1fr); row-gap: 40px; }
.v2-grid > * { grid-column: 1 / -1 !important; }
.v2-sec { padding: 72px 0; }
.v2-display { font-size: 40px; }
.v2-display.m { font-size: 32px; }
.v2-display.s { font-size: 26px; }
.v2-headline { font-size: 21px; }
.v2-lede { font-size: 17px; }
.v2-body { font-size: 16px; }
.v2-fig { font-size: 44px; }
}
@media (prefers-reduced-motion: reduce) {
.v2 *, .v2 *::before, .v2 *::after { transition-duration: 0s !important; animation: none !important; }
}