mirror of
https://github.com/hanzoai/site.git
synced 2026-11-20 21:21:13 +00:00
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01P5YBdwj33XByFVTvu9bfci
80 lines
6.3 KiB
CSS
80 lines
6.3 KiB
CSS
/* Keynote: type, space and colour for Hanzo launch pages, on Hanzo's brand deck (docs/build-notes/MASTER.md section 3).
|
|
Owned by the Cloud 1 chat. Imported by every components/v2/Keynote*.jsx, so a page that uses one piece has them all.
|
|
How to use: put className="kn" on the page's <main>. No hues: only the deck's neutral ramp (taste.py checks it).
|
|
Inside .kn the site's --soft, --faint and --line resolve to deck values that pass 4.5:1 on white.
|
|
Scale has rhythm (James, 7 Nov): resting sizes follow live hanzo.ai (h1 52px, section headings 26px, figures 64px);
|
|
one big thing per screen (usually the product object), the rest medium and small. Something grows past its resting
|
|
size only while it is the moment. Never put a .kn-kick label directly above a headline; set it under, as a caption.
|
|
Hover rules live inside @media (hover: hover); every press answers with a .97 scale in 90 ms. */
|
|
.kn {
|
|
--ink: #0a0a0a; --soft: #525252; --faint: #737373; --line: rgba(0, 0, 0, .1);
|
|
--body: #525252; --quiet: #737373; --hair: rgba(0, 0, 0, .1);
|
|
--ac: #737373; --ac-text: #525252; --ac-ink: #fff;
|
|
--kn-r: 24px; --kn-rc: 16px; --kn-g: clamp(16px, 4vw, 32px); --kn-shadow: none;
|
|
--e-out: cubic-bezier(0, 0, .2, 1); --e-move: cubic-bezier(.4, 0, .2, 1); --e-in: cubic-bezier(.16, 1, .3, 1);
|
|
background: var(--x-raised); color: var(--ink); overflow-x: clip;
|
|
}
|
|
.kn [data-room='dark'], .kn .kn-obj.ink { --soft: #a3a3a3; --faint: rgba(255, 255, 255, .55); --line: rgba(255, 255, 255, .1); --body: #a3a3a3; --quiet: rgba(255, 255, 255, .55); --hair: rgba(255, 255, 255, .1); }
|
|
.kn-wrap { width: min(100% - 2 * var(--kn-g), 1152px); margin-inline: auto; }
|
|
.kn-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--kn-g); }
|
|
.kn-sec { padding: clamp(72px, 11vw, 188px) 0; position: relative; }
|
|
|
|
/* type: Book 497 for every heading, Air 220 for the largest figures */
|
|
.kn-display { margin: 0; font-size: 52px; font-weight: 497; line-height: 1.02; letter-spacing: -.035em; text-wrap: balance; }
|
|
.kn-display.md { font-size: 44px; }
|
|
.kn-display.sm { font-size: 32px; }
|
|
.kn-headline { margin: 0; font-size: 26px; font-weight: 497; line-height: 1.15; letter-spacing: -.02em; max-width: 22ch; text-wrap: balance; }
|
|
.kn-title { margin: 0; font-size: 21px; font-weight: 497; line-height: 1.2; letter-spacing: -.015em; text-wrap: balance; }
|
|
.kn-lede { margin: 0; font-size: 21px; line-height: 1.4; letter-spacing: -.01em; color: var(--body); max-width: 44ch; text-wrap: pretty; }
|
|
.kn-body { margin: 0; font-size: 16px; line-height: 1.6; color: var(--body); max-width: 66ch; text-wrap: pretty; }
|
|
.kn-body b, .kn-lede b { color: var(--ink); font-weight: 606; }
|
|
.kn-kick { margin: 0; font: 606 12px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--quiet); }
|
|
.kn-kick.ac { color: var(--ac-text); }
|
|
.kn-fig { font-feature-settings: 'tnum'; font-variant-numeric: tabular-nums; }
|
|
.kn-figure { font-size: 64px; font-weight: 220; line-height: 1; letter-spacing: -.04em; font-feature-settings: 'tnum'; font-variant-numeric: tabular-nums; }
|
|
.kn-ac { color: var(--ac-text); }
|
|
.kn-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
|
|
|
|
/* page-local buttons (pages should prefer the kit's <Cta>; this matches its look for the few page-local controls) */
|
|
.kn-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1px solid var(--hair); background: var(--x-raised); color: var(--ink); font: 497 16px/1 var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer; transition: border-color .15s var(--e-out), background-color .15s var(--e-out), transform .15s var(--e-out); }
|
|
.kn-btn.solid { background: var(--ink); border-color: var(--ink); color: var(--x-on-ink); }
|
|
@media (hover: hover) {
|
|
.kn-btn:hover { border-color: rgba(0, 0, 0, .3); background-color: light-dark(#f5f5f5, var(--muted)); }
|
|
.kn-btn.solid:hover { background-color: #262626; }
|
|
}
|
|
.kn-btn:active { transform: scale(.97); transition-duration: 90ms; }
|
|
.kn-btn:focus-visible { outline: 2px solid var(--focus, var(--ink)); outline-offset: 3px; }
|
|
.kn-hair { height: 1px; background: var(--hair); border: 0; margin: 0; }
|
|
|
|
/* a hero object: crisp product UI. Outlined (paper) or filled (black), never both, and no shadow: only floating
|
|
things (menus, dialogs, the ask bar) take a shadow. */
|
|
.kn-obj { border-radius: var(--kn-r); background: var(--x-raised); border: 1px solid var(--hair); overflow: hidden; }
|
|
.kn-obj.ink { background: #0a0a0a; border-color: transparent; color: #fafafa; }
|
|
|
|
@media (max-width: 899px) {
|
|
.kn-sec { padding: 72px 0; }
|
|
.kn-display { font-size: 40px; }
|
|
.kn-display.md { font-size: 32px; }
|
|
.kn-display.sm { font-size: 26px; }
|
|
.kn-lede { font-size: 20px; }
|
|
.kn-figure { font-size: 52px; }
|
|
.kn-kick { font-size: 12px; }
|
|
}
|
|
|
|
/* KeynoteLines: CSS only, so a hero title cuts in at first paint (translateY 105% to 0, 700 ms, 60 ms apart);
|
|
JS off (no html.js) shows every line in place */
|
|
.knl-in { display: block; }
|
|
.knl-row { display: block; overflow: hidden; padding: .02em 0 .12em; margin: -.02em 0 -.12em; }
|
|
.knl-t { display: inline-block; }
|
|
.js .knl:not(.in):not(.load) .knl-t { transform: translate3d(0, 105%, 0); }
|
|
.js .knl.in .knl-t { transition: transform .7s var(--e-in) calc(var(--knl-d, 0s) + var(--i, 0) * 60ms); }
|
|
.js .knl.load .knl-t { animation: knl-up .7s var(--e-in) both; animation-delay: calc(var(--knl-d, 0s) + var(--i, 0) * 60ms); }
|
|
@keyframes knl-up { from { transform: translate3d(0, 105%, 0); } to { transform: none; } }
|
|
|
|
/* the pause control every self-running demo carries (WCAG 2.2.2): in the flow, first in the DOM, never over content */
|
|
.kn-pause { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--hair); background: var(--x-raised); color: var(--ink); display: inline-grid; place-items: center; cursor: pointer; transition: background-color .15s var(--e-out), transform .15s var(--e-out); }
|
|
@media (hover: hover) { .kn-pause:hover { background-color: light-dark(#f5f5f5, var(--muted)); } }
|
|
.kn-pause:active { transform: scale(.97); transition-duration: 90ms; }
|
|
.kn-pause[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: var(--x-on-ink); }
|
|
.kn-pause:focus-visible { outline: 2px solid var(--focus, var(--ink)); outline-offset: 3px; }
|