mirror of
https://github.com/hanzoai/site.git
synced 2026-11-21 01:07:08 +00:00
darkcheck 32 -> 0; lightcheck 0 diffs at 1470 and 375; copycheck missing 0; check.mjs clean light and dark. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01P5YBdycWh75FpA2M9CWJ5d
58 lines
5.3 KiB
CSS
58 lines
5.3 KiB
CSS
/* /iam entrances (docs/MOTION-MAP.md row `/iam`): shutter, accordion, noise-dissolve, spiral-in, magnet-gather, in that
|
|
order down the page. Each runs once when its section gets [data-in] (useEnter). The hidden starting states apply only
|
|
with scripts on and motion allowed, so JS off and reduced motion show every section at rest. Deck greys, transforms,
|
|
opacity and clip-path only. Prefix ia-. */
|
|
.ia [data-entrance] { position: relative; }
|
|
.ia [data-entrance='spiral-in'], .ia [data-entrance='magnet-gather'] { overflow-x: clip; }
|
|
.ia-dc { font-variant-numeric: tabular-nums; }
|
|
.ia-dc-t { display: inline-block; white-space: pre; }
|
|
|
|
@media (prefers-reduced-motion: no-preference) {
|
|
/* 1 shutter: bars close from the top and the bottom, then open on the rail */
|
|
html.js .ia [data-entrance='shutter']::before,
|
|
html.js .ia [data-entrance='shutter']::after { content: ''; position: absolute; left: 0; right: 0; height: 50.5%; z-index: 4; background: #0a0a0a; pointer-events: none; transform: scaleY(0); }
|
|
html.js .ia [data-entrance='shutter']::before { top: 0; transform-origin: 50% 0; }
|
|
html.js .ia [data-entrance='shutter']::after { bottom: 0; transform-origin: 50% 100%; }
|
|
html.js .ia [data-entrance='shutter']:not([data-in]) > * { opacity: 0; }
|
|
html.js .ia [data-entrance='shutter'][data-in]::before,
|
|
html.js .ia [data-entrance='shutter'][data-in]::after { animation: ia-shut 1000ms cubic-bezier(.4, 0, .2, 1) both; }
|
|
html.js .ia [data-entrance='shutter'][data-in] > * { animation: ia-shut-c 1000ms linear both; }
|
|
|
|
/* 2 accordion: the room's parts unfold one after another from their top edges */
|
|
html.js .ia [data-entrance='accordion'] .ia-fold { transform-origin: 50% 0; }
|
|
html.js .ia [data-entrance='accordion']:not([data-in]) .ia-fold { opacity: 0; clip-path: inset(0 0 100% 0); transform: scaleY(.6); }
|
|
html.js .ia [data-entrance='accordion'][data-in] .ia-fold { animation: ia-acc 500ms cubic-bezier(.16, 1, .3, 1) var(--ia-fd, 0ms) both; }
|
|
|
|
/* 3 noise-dissolve: Paste and ship comes out of a grey grain that thins away */
|
|
html.js .ia [data-entrance='noise-dissolve']::after { content: ''; position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0;
|
|
background: var(--x-sunk) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
|
|
html.js .ia [data-entrance='noise-dissolve']:not([data-in])::after { opacity: 1; }
|
|
html.js .ia [data-entrance='noise-dissolve']:not([data-in]) > * { opacity: 0; }
|
|
html.js .ia [data-entrance='noise-dissolve'][data-in]::after { animation: ia-grain 800ms steps(8, end) both; }
|
|
html.js .ia [data-entrance='noise-dissolve'][data-in] > * { animation: ia-fade 600ms cubic-bezier(0, 0, .2, 1) 120ms both; }
|
|
|
|
/* 4 spiral-in: the close's words and its token come in on a curve from the edges to their places */
|
|
html.js .ia [data-entrance='spiral-in']:not([data-in]) .ia-sp { opacity: 0; }
|
|
html.js .ia [data-entrance='spiral-in'][data-in] .ia-sp-l { animation: ia-spiral-l 1000ms cubic-bezier(.16, 1, .3, 1) both; }
|
|
html.js .ia [data-entrance='spiral-in'][data-in] .ia-sp-r { animation: ia-spiral-r 1000ms cubic-bezier(.16, 1, .3, 1) 120ms both; }
|
|
|
|
/* 5 magnet-gather: the related rows start scattered and are pulled into their line */
|
|
html.js .ia [data-entrance='magnet-gather'] li:nth-child(1) { --dx: -18vw; --dy: 40px; --dr: -4deg; }
|
|
html.js .ia [data-entrance='magnet-gather'] li:nth-child(2) { --dx: 22vw; --dy: -30px; --dr: 3deg; }
|
|
html.js .ia [data-entrance='magnet-gather'] li:nth-child(3) { --dx: -10vw; --dy: 60px; --dr: 5deg; }
|
|
html.js .ia [data-entrance='magnet-gather'] .v2-kick { --dx: 8vw; --dy: -24px; --dr: -2deg; }
|
|
html.js .ia [data-entrance='magnet-gather']:not([data-in]) :is(li, .v2-kick) { opacity: 0; }
|
|
html.js .ia [data-entrance='magnet-gather'][data-in] :is(li, .v2-kick) { animation: ia-gather 700ms cubic-bezier(.16, 1, .3, 1) both; }
|
|
html.js .ia [data-entrance='magnet-gather'][data-in] li:nth-child(2) { animation-delay: 60ms; }
|
|
html.js .ia [data-entrance='magnet-gather'][data-in] li:nth-child(3) { animation-delay: 120ms; }
|
|
}
|
|
|
|
@keyframes ia-shut { 0% { transform: scaleY(0); } 45%, 55% { transform: scaleY(1); } 100% { transform: scaleY(0); } }
|
|
@keyframes ia-shut-c { 0%, 50% { opacity: 0; } 51%, 100% { opacity: 1; } }
|
|
@keyframes ia-acc { from { opacity: 0; clip-path: inset(0 0 100% 0); transform: scaleY(.6); } to { opacity: 1; clip-path: inset(0 0 0 0); transform: none; } }
|
|
@keyframes ia-grain { from { opacity: 1; } to { opacity: 0; } }
|
|
@keyframes ia-fade { from { opacity: 0; } to { opacity: 1; } }
|
|
@keyframes ia-spiral-l { from { opacity: 0; transform: rotate(-150deg) translateX(-32vw) rotate(150deg) scale(.7); } 50% { opacity: 1; } to { opacity: 1; transform: rotate(0deg) translateX(0) rotate(0deg) scale(1); } }
|
|
@keyframes ia-spiral-r { from { opacity: 0; transform: rotate(150deg) translateX(32vw) rotate(-150deg) scale(.7); } 50% { opacity: 1; } to { opacity: 1; transform: rotate(0deg) translateX(0) rotate(0deg) scale(1); } }
|
|
@keyframes ia-gather { from { opacity: 0; transform: translate(var(--dx, 0), var(--dy, 0)) rotate(var(--dr, 0deg)); } 60% { opacity: 1; } to { opacity: 1; transform: none; } }
|