mirror of
https://github.com/hanzoai/site.git
synced 2026-11-21 00:14:36 +00:00
treasury: same --soft/--faint dark override. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01P5YBdxX2mH7piDf4NGrmPi
58 lines
4.4 KiB
CSS
58 lines
4.4 KiB
CSS
/* /ui motion (ux-): the magnetic grid and five page-local entrances. Every entrance state is scoped to html.js and
|
|
lifted under reduced motion, so the server HTML, JS off and reduced motion all show the final state. */
|
|
|
|
/* ---- signature: magnet-grid ---- */
|
|
.ux-sig { padding: 0 0 clamp(27px, 4vw, 72px); }
|
|
.ux-grid { display: grid; gap: 10px; touch-action: manipulation; cursor: crosshair; user-select: none; -webkit-user-select: none; }
|
|
.ux-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; }
|
|
.ux-t { position: relative; display: grid; place-items: center; aspect-ratio: 1.35; border-radius: 16px; background: light-dark(#f5f5f5, var(--muted)); will-change: transform; }
|
|
.ux-t b { font-size: 13px; font-weight: 500; color: light-dark(#525252, var(--muted-foreground)); white-space: nowrap; }
|
|
.ux-t.k1 i { width: 58%; height: 26%; border-radius: 999px; background: var(--ink); }
|
|
.ux-t.k2 em { width: 64%; height: 30%; border-radius: 8px; border: 1px solid light-dark(rgba(0, 0, 0, .14), var(--border-control)); background: var(--x-raised); }
|
|
.ux-t.k3 { background: var(--x-raised); box-shadow: inset 0 0 0 1px var(--line); }
|
|
.ux-t.k3::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: #737373; }
|
|
.ux-t.k4 { background: light-dark(#e5e5e5, var(--secondary)); }
|
|
.ux-t.k5 { background: #171717; }
|
|
@media (max-width: 899px) {
|
|
.ux-grid, .ux-row { gap: 6px; }
|
|
.ux-row { grid-template-columns: repeat(6, minmax(0, 1fr)); }
|
|
.ux-row > .ux-t:nth-child(n+7) { display: none; }
|
|
.ux-t { border-radius: 12px; aspect-ratio: 1; }
|
|
.ux-t b { font-size: 11px; }
|
|
}
|
|
|
|
/* entrance 1, accordion: the grid unfolds row by row from a hinge at each row's top */
|
|
.ux-row { transform-origin: 50% 0; transition: transform .55s cubic-bezier(.16, 1, .3, 1) calc(var(--r) * 110ms), opacity .3s cubic-bezier(0, 0, .2, 1) calc(var(--r) * 110ms); }
|
|
.js .ux-sig:not([data-in]) .ux-row { transform: scaleY(0); opacity: 0; }
|
|
|
|
/* entrance 2, page-curl: the paper above the dark room curls off it from the bottom-left corner */
|
|
@property --k { syntax: '<number>'; inherits: true; initial-value: -1; }
|
|
.ux-curlw { position: relative; --k: -1; transition: --k 1.1s cubic-bezier(.4, 0, .2, 1); }
|
|
.ux-curlw[data-in] { --k: 1.15; }
|
|
.ux-curl, .ux-curl-f { display: none; position: absolute; inset: 0; pointer-events: none; z-index: 3; }
|
|
.js .ux-curl, .js .ux-curl-f { display: block; }
|
|
.ux-curl { background: var(--x-raised); --q: var(--k); }
|
|
.ux-curl-f { background: linear-gradient(225deg, light-dark(#fafafa, var(--secondary)) 0%, light-dark(#d4d4d4, var(--muted)) 70%, light-dark(#a3a3a3, var(--card)) 100%); --q: calc(var(--k) - .12); }
|
|
.ux-curl, .ux-curl-f {
|
|
clip-path: polygon(calc(max(var(--q), 0) * 100%) 0, 100% 0, 100% calc(min(1, 1 - var(--q)) * 100%), calc(min(1, 1 + var(--q)) * 100%) calc(min(1, 1 - var(--q)) * 100%), calc(max(var(--q), 0) * 100%) calc(max(0, 0 - var(--q)) * 100%));
|
|
}
|
|
|
|
/* entrance 3, magnet-gather: the six chapter cards start scattered and are pulled together into their places */
|
|
.ux-card { transition: transform .9s cubic-bezier(.16, 1, .3, 1) calc(var(--i) * 60ms), opacity .5s cubic-bezier(0, 0, .2, 1) calc(var(--i) * 60ms); }
|
|
.js .ux-gather:not([data-in]) .ux-card { transform: translate(var(--gx), var(--gy)) rotate(var(--gr)) scale(.9); opacity: 0; }
|
|
|
|
/* entrance 4, cursor-trail: the strip is uncovered behind a sweeping cursor (fine pointers; touch shows it at rest) */
|
|
.ux-trail { position: relative; }
|
|
.js .ux-trail[data-fine]:not([data-in]) .ux-trail-in { clip-path: inset(0 100% 0 0); }
|
|
.ux-dots { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
|
|
.ux-dots i { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); opacity: 0; transition: opacity .25s cubic-bezier(0, 0, .2, 1); will-change: transform; }
|
|
|
|
/* entrance 5, zoom-through: the closing band flies in from far behind the screen */
|
|
.ux-zoom { transform-origin: 50% 60%; transition: transform 1s cubic-bezier(.16, 1, .3, 1), opacity .6s cubic-bezier(0, 0, .2, 1); }
|
|
.js .ux-zoom:not([data-in]) { transform: perspective(900px) translate3d(0, 40px, -720px); opacity: 0; }
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.js .ux-sig .ux-row, .js .ux-gather .ux-card, .js .ux-zoom, .js .ux-trail .ux-trail-in { transform: none !important; opacity: 1 !important; clip-path: none !important; transition: none !important; }
|
|
.js .ux-curl, .js .ux-curl-f { display: none; }
|
|
}
|