mirror of
https://github.com/hanzoai/site.git
synced 2026-11-21 01:07:08 +00:00
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01P5YBdwnSSVASfNEEi92hQ4
57 lines
4.6 KiB
CSS
57 lines
4.6 KiB
CSS
/* /philosophy entrances (enter.js). Five ways in, one per section, in page order; each ends in the plain final state.
|
|
Start states only with JS (html.js) and only when motion is welcome. Deck easing; no springs. */
|
|
|
|
.xph-type { position: relative; display: inline-block; }
|
|
.xph-type-t { display: inline-block; }
|
|
.xph-type::after { content: ''; position: absolute; top: .12em; bottom: .08em; left: 100%; width: 2px; margin-left: 3px; background: currentColor; opacity: 0; pointer-events: none; }
|
|
.xph-ven-l { display: block; }
|
|
.xph-fold { perspective: 1600px; }
|
|
.xph-ring[data-enter]::before { content: ''; position: absolute; inset: -6%; border-radius: 50%; background: light-dark(#f5f5f5, var(--muted)); z-index: -1; }
|
|
.xph-ring[data-enter] { isolation: isolate; }
|
|
|
|
@media (prefers-reduced-motion: no-preference) {
|
|
/* 1. typewriter: "Five operating laws" types itself out behind a caret (steps per letter), the caret blinks twice and goes */
|
|
.js [data-enter='type']:not([data-in]) .xph-type-t { clip-path: inset(0 100% 0 0); }
|
|
.js [data-enter='type'][data-in]:not([data-done]) .xph-type-t { animation: xph-type .95s steps(19, end) .1s both; }
|
|
.js [data-enter='type'][data-in]:not([data-done]) .xph-type::after { animation: xph-caret .95s steps(19, end) .1s both, xph-blink 1.6s steps(2, jump-none) 1.05s both; }
|
|
@keyframes xph-type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
|
|
@keyframes xph-caret { from { left: 0; opacity: 1; } to { left: 100%; opacity: 1; } }
|
|
@keyframes xph-blink { 0%, 24% { opacity: 1; } 25%, 49% { opacity: 0; } 50%, 74% { opacity: 1; } 75%, 100% { opacity: 0; } }
|
|
.js [data-enter='type'] .xph-cap, .js [data-enter='type'] .xph-laws-hint { transition: opacity .4s cubic-bezier(0, 0, .2, 1) .9s; }
|
|
.js [data-enter='type']:not([data-in]) .xph-cap, .js [data-enter='type']:not([data-in]) .xph-laws-hint { opacity: 0; }
|
|
|
|
/* 2. venetian-type: the premise's two lines slide in from alternating sides */
|
|
.js [data-enter='ven'] .xph-ven-l { transition: transform .9s cubic-bezier(.16, 1, .3, 1), opacity .6s cubic-bezier(0, 0, .2, 1); }
|
|
.js [data-enter='ven'] .xph-ven-l + .xph-ven-l { transition-delay: .12s; }
|
|
.js [data-enter='ven']:not([data-in]) .xph-ven-l { opacity: 0; transform: translate3d(-14%, 0, 0); }
|
|
.js [data-enter='ven']:not([data-in]) .xph-ven-l + .xph-ven-l { transform: translate3d(14%, 0, 0); }
|
|
|
|
/* 3. fold-out: the chosen view of the 64 unfolds like paper from a hinge at its top edge */
|
|
.js [data-enter='fold']:not([data-in]) > [role='tabpanel'] { opacity: 0; transform: rotateX(-72deg); }
|
|
.js [data-enter='fold'] > [role='tabpanel'] { transform-origin: 50% 0; }
|
|
.js [data-enter='fold'][data-in]:not([data-done]) > [role='tabpanel'] { animation: xph-fold 1s cubic-bezier(.2, .8, .2, 1) backwards; }
|
|
@keyframes xph-fold { from { opacity: 0; transform: rotateX(-72deg); } 40% { opacity: 1; } to { opacity: 1; transform: none; } }
|
|
|
|
/* 4. invert-flash: the method ring arrives inverted (a black disc, white lines), flicks once and holds normal */
|
|
.js .xph-ring[data-enter]:not([data-in]) { opacity: 0; }
|
|
.js .xph-ring[data-enter][data-in]:not([data-done]) { animation: xph-invert .75s linear both; }
|
|
@keyframes xph-invert { 0% { opacity: 1; filter: invert(1); } 26% { filter: invert(1); } 38% { filter: invert(0); } 50% { filter: invert(.9); } 62%, 100% { opacity: 1; filter: invert(0); } }
|
|
|
|
/* 5. side-carousel: the stack rows ride in from the right as one strip, a row behind the next, and snap into place */
|
|
.js [data-enter='carousel'] > li { transition: transform .8s cubic-bezier(.16, 1, .3, 1), opacity .5s cubic-bezier(0, 0, .2, 1); }
|
|
.js [data-enter='carousel']:not([data-in]) > li { opacity: 0; transform: translate3d(36vw, 0, 0); }
|
|
.js [data-enter='carousel'] > li:nth-child(2) { transition-delay: 60ms; }
|
|
.js [data-enter='carousel'] > li:nth-child(3) { transition-delay: 120ms; }
|
|
.js [data-enter='carousel'] > li:nth-child(4) { transition-delay: 180ms; }
|
|
.js [data-enter='carousel'] > li:nth-child(5) { transition-delay: 240ms; }
|
|
.js [data-enter='carousel'] > li:nth-child(6) { transition-delay: 300ms; }
|
|
.js [data-enter='carousel'] > li:nth-child(7) { transition-delay: 360ms; }
|
|
.js [data-enter='carousel'] > li:nth-child(8) { transition-delay: 420ms; }
|
|
.js [data-enter='carousel'][data-done] > li { transition-delay: 0s; }
|
|
|
|
/* 4b. invert-flash on the explorer: the chosen pattern arrives inverted (black panel, white lines), flicks once and
|
|
holds normal, just after the explorer has unfolded */
|
|
.js .xph-ex-d[data-enter]:not([data-in]) .xph-det { opacity: 0; }
|
|
.js .xph-ex-d[data-enter][data-in]:not([data-done]) .xph-det { animation: xph-invert .75s linear .55s both; }
|
|
}
|