mirror of
https://github.com/hanzoai/site.git
synced 2026-11-21 00:14:36 +00:00
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01P5YBdx19ukLv4B41yE4M3v
54 lines
3.6 KiB
CSS
54 lines
3.6 KiB
CSS
/* /desktop entrances (components/pages/desktop/enter.jsx). Starting states only under html.js; `.in` plays them once. */
|
|
|
|
/* 1. swing-door: the terminal swings in on a vertical hinge at its left edge */
|
|
.en-swing { perspective: 1400px; }
|
|
.en-swing > .en-door { transform-origin: 0 50%; transition: transform .9s cubic-bezier(.16, 1, .3, 1), opacity .4s cubic-bezier(0, 0, .2, 1); }
|
|
.js .en-swing:not(.in) > .en-door { transform: rotateY(-72deg); opacity: 0; }
|
|
|
|
/* 2. domino: the three rows stand up toward you and tip flat into place, one knocking the next */
|
|
.en-domino > li { transform-origin: 50% 100%; transition: transform .5s cubic-bezier(.55, 0, .7, .2), opacity .15s linear; transition-delay: calc(var(--i, 0) * 160ms); }
|
|
.en-domino { perspective: 900px; }
|
|
.js .en-domino:not(.in) > li { transform: rotateX(-88deg); opacity: 0; }
|
|
.en-domino.in > li { transition-timing-function: cubic-bezier(.55, 0, .7, .2), linear; }
|
|
|
|
/* 3. inertia-drag: the agent card arrives thrown from the right and coasts to a stop; then you can throw it yourself */
|
|
.en-throw { transition: transform 1.2s cubic-bezier(.05, .7, .1, 1), opacity .3s cubic-bezier(0, 0, .2, 1); }
|
|
.js .en-throw:not(.in) { transform: translate3d(70%, 0, 0) rotate(5deg); opacity: 0; }
|
|
.en-throw .dk-card { cursor: grab; touch-action: pan-y; }
|
|
.en-throw .dk-card:active { cursor: grabbing; }
|
|
|
|
/* 4. shrink-to-card: driven by scroll in enter.jsx (scale, corners, fill) */
|
|
.en-shrink { transform-origin: 50% 100%; will-change: transform; }
|
|
/* dark: the card the section shrinks into is Hanzo's muted dark surface, not the light grey */
|
|
html:not(.light) .en-shrink { background-color: transparent !important; isolation: isolate; }
|
|
html:not(.light) .en-shrink::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: #171717; opacity: var(--shrink-a, 0); pointer-events: none; }
|
|
|
|
/* 5. page-curl: a grey sheet over the section peels away from its bottom-right corner, its back showing as it folds */
|
|
.en-curl-host { position: relative; }
|
|
.en-curl { position: absolute; inset: 0; z-index: 3; pointer-events: none; display: none; }
|
|
.js .en-curl { display: block; }
|
|
.en-curl i { position: absolute; inset: 0; }
|
|
.en-curl-sheet { background: light-dark(#f5f5f5, #171717); clip-path: polygon(0 0, 100% 0, 100% 100%, 100% 100%, 0 100%); }
|
|
.en-curl-flap { background: linear-gradient(135deg, light-dark(#fafafa, #262626) 0%, light-dark(#e5e5e5, #171717) 70%, light-dark(#d4d4d4, #0f0f0f) 100%); clip-path: polygon(100% 100%, 100% 100%, 100% 100%); }
|
|
.en-curl-host.in .en-curl-sheet { animation: en-curl-sheet 1s cubic-bezier(.65, 0, .35, 1) forwards; }
|
|
.en-curl-host.in .en-curl-flap { animation: en-curl-flap 1s cubic-bezier(.65, 0, .35, 1) forwards; }
|
|
.en-curl-host.in .en-curl { animation: en-curl-done 0s linear 1s forwards; }
|
|
@keyframes en-curl-sheet {
|
|
0% { clip-path: polygon(0 0, 100% 0, 100% 100%, 100% 100%, 0 100%); }
|
|
55% { clip-path: polygon(0 0, 100% 0, 100% 0, 0 100%, 0 100%); }
|
|
100% { clip-path: polygon(0 0, 0 0, 0 0, 0 0, 0 0); }
|
|
}
|
|
@keyframes en-curl-flap {
|
|
0% { clip-path: polygon(100% 100%, 100% 100%, 100% 100%); }
|
|
25% { clip-path: polygon(100% 45%, 45% 100%, 58% 58%); }
|
|
55% { clip-path: polygon(100% 0, 0 100%, 34% 34%); }
|
|
100% { clip-path: polygon(0 0, 0 0, 0 0); }
|
|
}
|
|
@keyframes en-curl-done { to { visibility: hidden; } }
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.en-swing > .en-door, .en-domino > li, .en-throw { transition: none !important; transform: none !important; opacity: 1 !important; }
|
|
.en-curl { display: none !important; }
|
|
.en-shrink { transform: none !important; border-radius: 0 !important; background: none !important; }
|
|
}
|