mirror of
https://github.com/hanzoai/site.git
synced 2026-11-20 21:21:13 +00:00
Part of hanzo-inc/app#445. - Launch (every model page): name, line, tags and ask rise in by CSS from the first paint; ready stops waiting for the poster after 2.5 s; each body child hydrates in its own Suspense boundary. - Opener: touch screens, Data Saver and reduced motion navigate plainly; a card picture not in hand within 400 ms navigates at once; a failed flight leaves no plane, veil or stopped scroll. - Mori viewport: mesh built on its first frame, 48 x 18 points on a phone or touch screen. - useLoop: Data Saver draws one still frame. - hanzo.css linked with its content hash, since the edge serves .css immutable. Testing: pnpm test 58/58, pnpm build + postbuild module test, cicd / test-amd64 pass; local export checked in headless Chrome at 375 px (words at first paint, plain tap navigation, no new console errors). Risk: low; hero entrance timing and the card transition on touch screens change, content does not. How to revert: revert this commit. Co-Authored-By: Claude Opus 5.5 <[email protected]>
181 lines
15 KiB
CSS
181 lines
15 KiB
CSS
/* Launch + Chapters (lv-): the model-launch grammar on Hanzo's deck (docs/build-notes/MASTER.md section 3). Scale has rhythm:
|
|
the model's name is the one big thing on arrival (up to 112px) and leaves as the film settles; the headline beside
|
|
the settled film rests at 44px, section headings at 26px, figures at 64px; ledes 20px, body 16-17px. Weights: Book
|
|
497 for headings, Air 220 for the largest figures. Deck greys only (#0a0a0a, #525252, #737373, #a3a3a3 on black);
|
|
colour only from Hanzo's films. Radii 24 on tiles and hero objects. Easing: ease-emphasis for arrivals, no springs.
|
|
Nothing above a headline; nothing floats over content. Entrance states hide only under html.js (JS off reads). */
|
|
.lv { --ease2: cubic-bezier(.16, 1, .3, 1); --ease-move: cubic-bezier(.4, 0, .2, 1); --ac: #0a0a0a; --ac-ink: #0a0a0a; --ac-soft: #f5f5f5; --ac-line: rgba(0, 0, 0, .14); }
|
|
.lv-body { overflow-x: clip; }
|
|
|
|
/* ---------- Stage ---------- */
|
|
.lv-stage { position: relative; height: calc(210svh - 60px); background: var(--x-raised); }
|
|
.lv-pin { position: sticky; top: var(--x-top, 60px); height: calc(100svh - 60px); min-height: 560px; overflow: hidden; }
|
|
.lv-film { position: absolute; inset: 0; background: #000; overflow: hidden; }
|
|
.lv-film-in { position: absolute; inset: 0; transform-origin: 50% 50%; }
|
|
.lv-film-in img, .lv-film-in video { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: var(--fpos, 50% 50%); background: #000; }
|
|
.lv-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .4), transparent 36%, transparent 55%, rgba(0, 0, 0, .6)); pointer-events: none; }
|
|
.lv-name { position: absolute; left: 0; right: 0; bottom: 0; padding-bottom: clamp(40px, 8vh, 96px); color: #f5f5f7; pointer-events: none; }
|
|
.lv-name .lv-name-h { margin: 0; color: #fff; font-size: clamp(3.5rem, 8vw, 7rem); font-weight: 497; letter-spacing: -.045em; line-height: .95; }
|
|
.lv-name-d { margin: 17px 0 17px; max-width: 30ch; font-size: clamp(1.0625rem, 1.4vw, 1.3125rem); line-height: 1.4; color: rgba(255, 255, 255, .92); text-wrap: balance; }
|
|
/* The name, its line, its tags and the ask rise in from the first paint, by CSS alone: they never wait for the page's
|
|
script or the poster. (They used to: on a phone that was seconds of bare film with no words, hanzo-inc/app#445.) */
|
|
.js .lv-name .x-line-in { animation: lv-rise 1.1s var(--ease2) .1s both; }
|
|
.js .lv-name-d, .js .lv-name-t, .js .lv-name-ask { animation: lv-in .5s var(--ease2) .34s both; }
|
|
.js .lv-name-t { animation-delay: .4s; } .js .lv-name-ask { animation-delay: .46s; }
|
|
@keyframes lv-rise { from { transform: translateY(105%); } }
|
|
@keyframes lv-in { from { opacity: 0; transform: translateY(16px); } }
|
|
@media (prefers-reduced-motion: reduce) { .js .lv-name .x-line-in, .js .lv-name-d, .js .lv-name-t, .js .lv-name-ask { animation: none; } }
|
|
.lv .lv-name .x-mtags span { font-size: 13px; padding: 6px 11px; }
|
|
.lv-name-ask { margin: 22px 0 0; pointer-events: auto; }
|
|
.lv-name[data-gone] .lv-name-ask { visibility: hidden; }
|
|
.lv-name-ask .x-btn { background: transparent; border-color: rgba(250, 250, 250, .6); color: #fafafa; }
|
|
@media (hover: hover) { .lv-name-ask .x-btn:hover { background: rgba(250, 250, 250, .12); border-color: #fafafa; } }
|
|
.lv-close { top: 20px; transition: background-color .15s cubic-bezier(0, 0, .2, 1), border-color .15s cubic-bezier(0, 0, .2, 1); }
|
|
@media (hover: hover) { .lv-close:hover { background: rgba(255, 255, 255, .3); border-color: rgba(255, 255, 255, .55); } }
|
|
/* figures: one leads, the rest sit at medium (MASTER 3.1: never everything big at once) */
|
|
.lv-stats > .x-stat:not(:first-child) .x-stat-v { font-size: 32px; font-weight: 400; letter-spacing: -.02em; }
|
|
.lv-pause { position: absolute; right: 24px; bottom: 24px; z-index: 3; }
|
|
|
|
/* JS off and reduced motion: the film stays a full-bleed poster with the name on it, and the headline, lede and asks read below it
|
|
(Chrome forces native controls onto a video without JS, so films hide and their posters stand in) */
|
|
html:not(.js) .lv video { display: none; }
|
|
html:not(.js) .lv-stage, html:not(.js) .lv-pin, .lv[data-calm] .lv-stage, .lv[data-calm] .lv-pin { height: auto; min-height: 0; position: relative; top: 0; overflow: visible; }
|
|
html:not(.js) .lv-film, .lv[data-calm] .lv-film { position: relative; height: calc(100svh - 60px); min-height: 560px; }
|
|
html:not(.js) .lv-name, .lv[data-calm] .lv-name { top: 0; height: calc(100svh - 60px); min-height: 560px; display: flex; flex-direction: column; justify-content: flex-end; }
|
|
html:not(.js) .lv-head, .lv[data-calm] .lv-head { position: relative; top: auto; bottom: auto; left: auto; right: auto; transform: none; width: min(100% - 48px, 760px); margin: 0 auto; padding: clamp(44px, 6vw, 72px) 0; }
|
|
html:not(.js) .lv-over, .lv[data-calm] .lv-over { display: none; }
|
|
html:not(.js) .lv-pause { display: none; }
|
|
|
|
/* an optional drawing over the settled film */
|
|
.lv-over { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s ease-out; }
|
|
.lv-over[data-on] { opacity: 1; transition: opacity 1.2s var(--ease2) .3s; }
|
|
.lv-over svg { position: absolute; inset: 0; width: 100%; height: 100%; }
|
|
|
|
/* the page's headline, beside the settled film (pages place it with their own headClass) */
|
|
.lv-head { position: absolute; top: 50%; left: max(24px, calc((100% - var(--wrap)) / 2)); width: min(44%, 560px); transform: translateY(-50%); pointer-events: none; }
|
|
.lv-head[data-on] { pointer-events: auto; }
|
|
.js .lv-head > * { opacity: 0; transform: translateY(18px); transition: opacity .5s var(--ease2), transform .7s var(--ease2); }
|
|
.js .lv-head[data-on] > * { opacity: 1; transform: none; }
|
|
.lv-head[data-on] > :nth-child(2) { transition-delay: .18s; } .lv-head[data-on] > :nth-child(3) { transition-delay: .24s; } .lv-head[data-on] > :nth-child(4) { transition-delay: .3s; }
|
|
.js .lv-head .lv-lines { opacity: 1; transform: none; }
|
|
.lv-lines { margin: 0; font-size: clamp(2.25rem, 3.4vw, 2.75rem); font-weight: 497; letter-spacing: -.03em; line-height: 1.05; color: var(--ink); text-wrap: balance; }
|
|
.lv-lines .lv-ln + .lv-ln { color: light-dark(#737373, var(--text-tertiary)); }
|
|
.lv-ln { display: block; overflow: hidden; padding: .02em 0 .1em; margin-bottom: -.08em; }
|
|
.lv-ln > span { display: block; }
|
|
.js .lv-ln > span { transform: translateY(105%); transition: transform .7s var(--ease2); transition-delay: calc(var(--i, 0) * 60ms); }
|
|
.js [data-on] > .lv-lines .lv-ln > span, .js .lv-lines[data-on] .lv-ln > span { transform: none; }
|
|
.lv-lede { margin: 17px 0 0; max-width: 40ch; font-size: clamp(1.0625rem, 1.4vw, 1.3125rem); line-height: 1.45; color: light-dark(#525252, var(--muted-foreground)); text-wrap: pretty; }
|
|
.lv-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10.5px 17px; margin-top: 27px; }
|
|
.lv-acts .x-arrow { min-height: 44px; }
|
|
/* Hanzo's own path line ("Hanzo / Enso") sits under the actions, never above a headline */
|
|
.lv-crumb { margin: 27px 0 0; font: 606 12px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: light-dark(#737373, var(--text-tertiary)); }
|
|
.lv-crumb a { color: inherit; text-decoration: none; }
|
|
.lv-crumb span + span::before { content: '·'; margin: 0 .7em; color: light-dark(#737373, var(--text-tertiary)); }
|
|
|
|
/* ---------- sections ---------- */
|
|
.lv-sec { position: relative; padding: clamp(72px, 11vw, 188px) 0; }
|
|
.lv-sh { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 17px 27px; align-items: end; margin-bottom: clamp(44px, 5vw, 72px); }
|
|
.lv-sh > :first-child { grid-column: 1 / 9; }
|
|
.lv-sh > :nth-child(2) { grid-column: 9 / 14; }
|
|
.lv-h { margin: 0; font-size: 26px; font-weight: 497; letter-spacing: -.02em; line-height: 1.2; color: var(--ink); text-wrap: balance; max-width: 26ch; }
|
|
.lv-p { margin: 0; font-size: 16px; line-height: 1.6; color: light-dark(#525252, var(--muted-foreground)); max-width: 62ch; text-wrap: pretty; }
|
|
/* a label that belongs to a headline sits beside or under it */
|
|
.lv-side { margin: 0; font: 606 12px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: light-dark(#737373, var(--text-tertiary)); }
|
|
.lv-side a { color: inherit; text-underline-offset: 4px; }
|
|
@media (hover: hover) { .lv-side a:hover { color: var(--ink); } }
|
|
|
|
/* hero figures (kit Stat): a number is a hero */
|
|
.lv-stats { display: grid; grid-template-columns: repeat(var(--c, 3), minmax(0, 1fr)); border-top: 1px solid rgba(0, 0, 0, .1); }
|
|
.lv-stats > .x-stat { display: flex; flex-direction: column; gap: 10.5px; padding: 27px 27px 6.5px 0; }
|
|
.lv-stats > .x-stat + .x-stat { padding-left: 27px; border-left: 1px solid rgba(0, 0, 0, .1); }
|
|
.lv-stats .x-stat-v { display: block; font-size: clamp(2.75rem, 4.4vw, 4rem); font-weight: 220; letter-spacing: -.04em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|
.lv-stats .x-stat-l { font-size: 16px; font-weight: 606; color: var(--ink); }
|
|
.lv-stats .x-stat-n { font-size: 14px; line-height: 1.45; color: light-dark(#525252, var(--muted-foreground)); }
|
|
|
|
/* the one dark room (a demo lives here) */
|
|
.lv-room { background: #000; color: #fafafa; }
|
|
/* a black room enters as a rounded card inside the gutters and opens to full width as it is reached (deck rooms) */
|
|
@supports (animation-timeline: view()) {
|
|
@media (prefers-reduced-motion: no-preference) {
|
|
.lv-room { animation: lv-room linear both; animation-timeline: view(); animation-range: entry 0% entry 80%; }
|
|
@keyframes lv-room { from { clip-path: inset(0 clamp(16px, 4vw, 32px) round 24px); } to { clip-path: inset(0 0 round 0); } }
|
|
}
|
|
}
|
|
|
|
/* ---------- Chapters ---------- */
|
|
.lv-ch { position: relative; }
|
|
.lv-ch[data-live] { height: calc(var(--n) * 92svh + 8svh); }
|
|
.lv-ch-pin { padding: clamp(96px, 10vw, 160px) 0; }
|
|
.lv-ch[data-live] .lv-ch-pin { position: sticky; top: var(--x-top, 60px); height: calc(100svh - 60px); padding: 0; display: flex; align-items: center; }
|
|
.lv-ch-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: center; }
|
|
.lv-ch-words { grid-column: 1 / 6; position: relative; }
|
|
.lv-ch-stack { grid-column: 6 / 13; position: relative; }
|
|
.lv-ch.flip .lv-ch-words { grid-column: 8 / 13; grid-row: 1; }
|
|
.lv-ch.flip .lv-ch-stack { grid-column: 1 / 8; grid-row: 1; }
|
|
.lv-ch[data-live] .lv-ch-words { height: min(calc(100svh - 60px - 112px), 760px); display: flex; flex-direction: column; gap: 24px; }
|
|
.lv-ch[data-live] .lv-ch-texts { position: relative; flex: 1; }
|
|
.lv-ch-top { flex: none; grid-column: 1 / -1; }
|
|
.lv-ch-top > * { margin: 0; }
|
|
.lv-ch[data-live] .lv-ch-stack { height: min(calc(100svh - 60px - 112px), 760px); border-radius: 24px; overflow: hidden; background: #000; }
|
|
.lv-ch[data-live] .lv-ch-t { position: absolute; left: 0; right: 0; top: 50%; opacity: 0; transform: translateY(calc(-50% - 20px)); transition: opacity .22s ease-out, transform .3s ease-out; pointer-events: none; }
|
|
.lv-ch[data-live] .lv-ch-t[data-on] { opacity: 1; transform: translateY(-50%); transition: opacity .4s var(--ease2) .12s, transform .5s var(--ease2) .12s; pointer-events: auto; }
|
|
.lv-ch[data-live] .lv-ch-t .lv-ln > span { transform: translateY(105%); transition: transform .25s ease-out; }
|
|
.lv-ch[data-live] .lv-ch-t[data-on] .lv-ln > span { transform: none; transition: transform .7s var(--ease2) .12s; }
|
|
.js .lv-ch-t .lv-ln > span { transform: none; }
|
|
.lv-ch-h { margin: 0; font-size: clamp(2rem, 3.2vw, 2.75rem); font-weight: 497; letter-spacing: -.03em; line-height: 1.08; color: var(--ink); text-wrap: balance; }
|
|
.lv-ch-b { margin-top: 17px; font-size: 16px; line-height: 1.6; color: light-dark(#525252, var(--muted-foreground)); max-width: 44ch; }
|
|
.lv-ch-b p { margin: 0; }
|
|
.lv-ch-b p + p, .lv-ch-b > * + * { margin-top: 16px; }
|
|
.lv-ch-art { position: relative; }
|
|
.lv-ch-art img, .lv-ch-art video { object-position: var(--fpos, 50% 50%); }
|
|
.lv-ch[data-live] .lv-ch-art { position: absolute; inset: 0; }
|
|
.lv-ch-art-in { position: absolute; inset: 0; }
|
|
.lv-ch:not([data-live]) .lv-ch-words, .lv-ch:not([data-live]) .lv-ch-stack, .lv-ch:not([data-live]) .lv-ch-texts { display: contents; }
|
|
.lv-ch:not([data-live]) .lv-ch-grid { row-gap: 96px; }
|
|
.lv-ch:not([data-live]) .lv-ch-t { grid-column: 1 / 6; grid-row: calc(var(--o) + 1); }
|
|
.lv-ch:not([data-live]) .lv-ch-art { grid-column: 6 / 13; grid-row: calc(var(--o) + 1); aspect-ratio: 4 / 3; border-radius: 24px; overflow: hidden; background: #000; }
|
|
.lv-ch.flip:not([data-live]) .lv-ch-t { grid-column: 8 / 13; }
|
|
.lv-ch.flip:not([data-live]) .lv-ch-art { grid-column: 1 / 8; }
|
|
.lv-ch-rail { position: relative; flex: none; display: grid; gap: 2px; padding-left: 18px; }
|
|
.lv-ch-bar { position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; background: var(--ink); transform-origin: 50% 0; border-radius: 2px; }
|
|
.lv-ch-rail::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; background: rgba(0, 0, 0, .1); border-radius: 2px; }
|
|
.lv-ch-rail button { display: flex; align-items: center; gap: 10.5px; min-height: 30px; padding: 0; border: 0; background: none; font: 606 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: light-dark(#737373, var(--text-tertiary)); cursor: pointer; text-align: left; transition: color .15s cubic-bezier(0, 0, .2, 1), transform .09s; }
|
|
.lv-ch-rail button[aria-current] { color: var(--ink); }
|
|
.lv-ch-rail button:active { transform: scale(.97); }
|
|
@media (hover: hover) { .lv-ch-rail button:hover { color: var(--ink); } }
|
|
|
|
@media (max-width: 900px) {
|
|
/* phones: nothing pins; the film settles by itself a moment after arrival */
|
|
.lv-stage { height: calc(100svh - 60px); min-height: 600px; }
|
|
.lv-pin { position: relative; top: 0; height: 100%; min-height: 0; }
|
|
.lv-name { padding-bottom: 48px; }
|
|
.lv-name .lv-name-h { font-size: clamp(2.75rem, 14vw, 3.25rem); }
|
|
.lv-pause { right: 16px; bottom: 16px; }
|
|
.lv-head { top: auto; bottom: 28px; left: 20px; right: 20px; width: auto; transform: none; }
|
|
.lv-lines { font-size: 32px; }
|
|
.lv-lede { margin-top: 10.5px; font-size: 16px; }
|
|
.lv-acts { margin-top: 20px; gap: 10px 16px; }
|
|
.lv-crumb { margin-top: 17px; }
|
|
.lv-sec { padding: 72px 0; }
|
|
.lv-sh { grid-template-columns: 1fr; gap: 20px; }
|
|
.lv-sh > :first-child, .lv-sh > :nth-child(2) { grid-column: 1; }
|
|
|
|
.lv-stats { grid-template-columns: 1fr; }
|
|
.lv-stats > .x-stat, .lv-stats > .x-stat + .x-stat { padding: 28px 0; border-left: 0; }
|
|
.lv-stats > .x-stat + .x-stat { border-top: 1px solid rgba(0, 0, 0, .1); }
|
|
.lv-stats .x-stat-v { font-size: 44px; }
|
|
.lv-stats > .x-stat:not(:first-child) .x-stat-v { font-size: 26px; }
|
|
/* chapters become a vertical story: picture, then words */
|
|
.lv-ch-pin { padding: 72px 0; }
|
|
.lv-ch-grid, .lv-ch:not([data-live]) .lv-ch-grid { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
|
|
.lv-ch-words, .lv-ch-stack, .lv-ch-texts { display: contents; }
|
|
.lv-ch-art, .lv-ch:not([data-live]) .lv-ch-art { order: calc(var(--o) * 2); aspect-ratio: 4 / 3.4; border-radius: 24px; overflow: hidden; background: #000; margin-top: 72px; }
|
|
.lv-ch-art:first-child { margin-top: 0; }
|
|
.lv-ch-t { order: calc(var(--o) * 2 + 1); padding-top: 27px; }
|
|
.lv-ch-h { font-size: 26px; }
|
|
.lv-ch-b { margin-top: 10.5px; font-size: 16px; }
|
|
}
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.js .lv-head > *, .js .lv-ln > span, .js .lv-name-d, .js .lv-name-t, .js .lv-name-ask { transition: none; opacity: 1; transform: none; }
|
|
}
|