mirror of
https://github.com/hanzoai/site.git
synced 2026-11-20 21:21:13 +00:00
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01P5YBdxX2mH7piDf4NGrmPi
157 lines
14 KiB
CSS
157 lines
14 KiB
CSS
/* /support (prefix xsp-). Hanzo's deck only (MASTER.md 3.1): the neutral ramp, Book 497 headings, 48px buttons, a
|
|
56px field with 17px text, deck curves (no springs), flat surfaces (a hairline, never with a shadow).
|
|
Tokens come from components/pages/company/deck.css on .vc. The five entrances are at the end of this file. */
|
|
.xsp { overflow-x: clip; }
|
|
.xsp ::selection { background: light-dark(rgba(0, 0, 0, .1), var(--selection)); }
|
|
.xsp :focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 5px var(--bg); }
|
|
/* the match mark is drawn (a fill and an underline as shadows), so marking a word never moves a line */
|
|
.xsp mark { padding: 0; background: light-dark(#ededed, var(--surface-3)); color: var(--ink); border-radius: 2px; box-shadow: 0 0 0 2px light-dark(#ededed, var(--surface-3)), inset 0 -2px 0 var(--ink); }
|
|
.xsp-big { height: 48px; padding: 0 27px; font-size: 16px; }
|
|
.xsp-go { display: inline-flex; }
|
|
.xsp-pane .x-btn { transition: background-color var(--d-fast) var(--e-out), border-color var(--d-fast) var(--e-out); }
|
|
@media (hover: hover) { .xsp-pane .x-btn.solid:hover { background: light-dark(#262626, var(--primary-hover)); border-color: light-dark(#262626, var(--primary-hover)); } }
|
|
|
|
/* 1. the h1 and its lede (8 and 5, bottom-aligned); the help-finder: the question screens left, the summary right */
|
|
.xsp-hero { padding: clamp(72px, 9vw, 116px) 0 clamp(72px, 11vw, 116px); }
|
|
.xsp-hero-g { row-gap: 44px; align-items: end; }
|
|
.xsp .xsp-h1 { position: relative; grid-column: 1 / 8; font-size: clamp(40px, 5vw, 52px); }
|
|
.xsp-card { display: inline-block; }
|
|
.xsp-lede { grid-column: 8 / 13; margin: 0; }
|
|
.xsp-room { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: start; }
|
|
.xsp-ask { grid-column: 1 / 8; display: flex; flex-direction: column; gap: 17px; }
|
|
.xsp-answer { grid-column: 8 / 13; }
|
|
|
|
/* the two questions as two hairlines: the one you are on, and the one answered, are ink */
|
|
.xsp-steps { display: flex; gap: 6.5px; }
|
|
.xsp-steps i { flex: 1; height: 2px; border-radius: 2px; background: light-dark(#e5e5e5, var(--surface-3)); transition: background-color var(--d-slow) var(--e-io); }
|
|
.xsp-steps i.on { background: var(--ink); }
|
|
/* one screen at a time: the rail slides; it is clipped (never a scroll box, so focus cannot pull it), with room for rings */
|
|
.xsp-track { overflow: clip; margin: -6px; }
|
|
.xsp-rail { display: flex; flex-direction: column; gap: 10px; }
|
|
.xsp-q { flex: 0 0 100%; min-width: 0; padding: 6px; transition: opacity var(--d-slow) var(--e-io); }
|
|
|
|
|
|
.xsp-search { display: flex; align-items: center; gap: 13px; height: 56px; padding: 0 6px 0 20px; border-radius: 999px; background: var(--x-raised); border: 1px solid var(--line); color: var(--ink2); transition: border-color var(--d-fast) var(--e-out), box-shadow var(--d-fast) var(--e-out); }
|
|
@media (hover: hover) { .xsp-search:hover { border-color: light-dark(rgba(0, 0, 0, .3), var(--white-30)); } }
|
|
/* the pill carries the one focus ring (ink, with a white halo), concentric with it; the field inside draws none */
|
|
.xsp-search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink), 0 0 0 5px var(--bg); }
|
|
.xsp .xsp-search input:focus-visible, .xsp .xsp-search input:focus { outline: none; box-shadow: none; }
|
|
.xsp-search svg { flex: none; }
|
|
.xsp-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; font: 400 17px/1 var(--sans); color: var(--ink); caret-color: var(--ink); }
|
|
.xsp-search input::-webkit-search-cancel-button { display: none; }
|
|
.xsp-pause, .xsp-next, .xsp-back { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid light-dark(rgba(0, 0, 0, .14), var(--white-14)); background: var(--x-raised); color: var(--ink); cursor: pointer; transition: border-color var(--d-fast) var(--e-out), background-color var(--d-fast) var(--e-out), color var(--d-fast) var(--e-out), transform var(--d-press) var(--e-out); }
|
|
.xsp-next { background: var(--ink); border-color: var(--ink); color: var(--x-on-ink); }
|
|
.xsp-pause:active, .xsp-next:active, .xsp-back:active { transform: scale(.97); }
|
|
@media (hover: hover) {
|
|
.xsp-pause:hover, .xsp-back:hover { border-color: light-dark(rgba(0, 0, 0, .4), var(--white-40)); }
|
|
.xsp-next:hover { background: light-dark(#262626, var(--primary-hover)); border-color: light-dark(#262626, var(--primary-hover)); }
|
|
.xsp-next:hover svg { transform: translateX(2px); }
|
|
}
|
|
.xsp-next svg { transition: transform var(--d-base) var(--e-io); }
|
|
|
|
/* screen 2: the six ways as the choices, ranked by your words; the best is ink, the one you picked is filled */
|
|
.xsp-q2 { display: flex; flex-direction: column; gap: 10.5px; }
|
|
.xsp-back { width: 40px; height: 40px; }
|
|
.xsp-ways { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6.5px; }
|
|
.xsp-way { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 10.5px; min-height: 56px; padding: 10px 17px; border-radius: 16px; border: 1px solid transparent; background: var(--quiet); color: var(--muted); font: 497 17px/1.2 var(--sans); letter-spacing: -.01em; text-align: left; cursor: pointer; transition: background-color var(--d-fast) var(--e-out), border-color var(--d-fast) var(--e-out), color var(--d-fast) var(--e-out), transform var(--d-press) var(--e-out); }
|
|
.xsp-way span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.xsp-way svg { transition: transform var(--d-base) var(--e-io); }
|
|
.xsp-way.match { color: var(--ink2); }
|
|
.xsp-way.best { color: var(--ink); border-color: var(--ink); }
|
|
.xsp-way.picked { background: var(--ink); border-color: var(--ink); color: var(--x-on-ink); }
|
|
.xsp-way:active { transform: scale(.98); }
|
|
@media (hover: hover) { .xsp-way:hover { color: var(--ink); background: var(--tile); } .xsp-way.picked:hover { background: light-dark(#262626, var(--primary-hover)); color: var(--x-on-ink); } .xsp-way:hover svg { transform: translateX(4px); } }
|
|
|
|
/* the summary: your words, the way, its one action */
|
|
.xsp-answer { position: relative; overflow: hidden; padding: clamp(27px, 3vw, 44px); background: var(--x-raised); border: 1px solid var(--line); border-radius: 28px; }
|
|
.xsp-said { display: flex; align-items: center; gap: 10px; height: 0; margin: 0; overflow: hidden; opacity: 0; font: 400 16px/1.3 var(--mono); color: var(--ink); min-width: 0; transition: height var(--d-base) var(--e-io), margin var(--d-base) var(--e-io), opacity var(--d-fast) var(--e-out); }
|
|
.xsp-said.on { height: 22px; margin-bottom: 17px; opacity: 1; }
|
|
.xsp-said svg { flex: none; }
|
|
.xsp-said span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.xsp-panes { position: relative; display: grid; }
|
|
.xsp-pane { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 17px; pointer-events: none; visibility: hidden; transition: visibility 0s linear .15s; }
|
|
/* only the shown answer takes a tap, from the first paint (before hydration too) */
|
|
.xsp-pane.on { pointer-events: auto; visibility: visible; transition: none; }
|
|
.xsp .xsp-answer-t { margin: 0; max-width: 14ch; font-size: clamp(26px, 2.6vw, 32px); font-weight: 497; line-height: 1.02; letter-spacing: -.035em; color: var(--ink); }
|
|
.xsp-answer-d { margin: 0; max-width: 44ch; font-size: 17px; line-height: 1.45; color: var(--ink2); text-wrap: pretty; }
|
|
.xsp-answer-a { margin-top: 10.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 13px 27px; }
|
|
|
|
/* 2. the closing Band (kit), set on the deck here: Book 497 closing line, the deck's text greys, a 48px ask */
|
|
.xsp .x-band { padding: clamp(72px, 11vw, 188px) 0; }
|
|
.xsp .x-band h2 { font-size: clamp(32px, 4vw, 52px); font-weight: 497; line-height: 1.02; letter-spacing: -.035em; color: #fafafa; max-width: 20ch; }
|
|
.xsp .x-band .x-btn.solid { height: 48px; padding: 0 27px; background: #fafafa; border-color: #fafafa; color: #0a0a0a; }
|
|
/* the Band's own entrance is the page's tilt (5), so the kit's word-by-word reveal and rise stand still here */
|
|
.xsp .x-band .x-word, .xsp .x-band .x-band-act { opacity: 1 !important; transform: none !important; filter: none !important; }
|
|
.xsp-note { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.45; color: #a3a3a3; }
|
|
/* the closing room's object: the six doors as one quiet row of destinations (hover underlines, press .97) */
|
|
.xsp-band-doors { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 4px; margin-top: 28px; }
|
|
.xsp-band-doors a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: #a3a3a3; font-size: 14px; text-decoration: none; transition: color .15s cubic-bezier(0, 0, .2, 1), transform 90ms cubic-bezier(0, 0, .2, 1); }
|
|
.xsp-band-doors a + a::before { content: '·'; margin-right: 14px; color: rgba(255, 255, 255, .3); }
|
|
@media (hover: hover) { .xsp-band-doors a:hover { color: #fafafa; text-decoration: underline; text-underline-offset: 4px; } }
|
|
.xsp-band-doors a:active { transform: scale(.97); }
|
|
|
|
@media (max-width: 899px) {
|
|
.xsp-hero { padding: 88px 0 72px; }
|
|
.xsp-hero-g { row-gap: 27px; }
|
|
.xsp-room { grid-template-columns: minmax(0, 1fr); row-gap: 27px; }
|
|
.xsp-ask, .xsp-answer { grid-column: 1 / -1; }
|
|
.xsp-answer { padding: 24px 20px; border-radius: 24px; }
|
|
.xsp-way { padding: 10px 12px; column-gap: 6px; font-size: 15px; }
|
|
}
|
|
|
|
/* the tiles of entrance 4 exist only while it can play */
|
|
.xsp-tiles { display: none; }
|
|
|
|
/* ---------- the five entrances, each once, as its section first reaches the screen (Support.jsx useEnter) ----------
|
|
The hidden start states exist only with JS on and motion allowed; JS off or reduced motion: everything at rest. */
|
|
@media (prefers-reduced-motion: no-preference) {
|
|
/* 1. card-deal: the h1's words start stacked on a deck at the line's end and are dealt to their places, 60ms apart */
|
|
html.js .xsp-deal:not([data-in]) .xsp-card { opacity: 0; transform: translate(var(--dx, 0px), calc(var(--dy, 0px) + 16px)) rotate(var(--r, 0deg)); }
|
|
.xsp-deal[data-in] .xsp-card { animation: xsp-deal var(--d-slower) var(--e-em) calc(var(--i) * 60ms + 60ms) backwards; }
|
|
/* 2. cursor-lens: a round lens opens from the pointer; inside it the words settle from magnified to their size */
|
|
html.js .xsp-lens:not([data-in]) { clip-path: circle(0 at var(--lx, 0) var(--ly, 50%)); }
|
|
.xsp-lens[data-in] { animation: xsp-lens var(--d-slower) var(--e-em) .2s backwards; transform-origin: var(--lx, 0) var(--ly, 50%); }
|
|
/* 3. fold-out: the question screens unfold from a hinge along their top edge, like paper */
|
|
html.js .xsp-fold:not([data-in]) { opacity: 0; transform: perspective(1200px) rotateX(-72deg); }
|
|
.xsp-fold[data-in] { transform-origin: 50% 0; animation: xsp-fold var(--d-slower) var(--e-em) .3s backwards; }
|
|
/* 4. tile-flip: a grid of tiles flips in, diagonal by diagonal, to form the answer card, then the answer shows */
|
|
html.js .xsp-tiles { position: absolute; inset: 0; z-index: 2; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(4, 1fr); pointer-events: none; perspective: 900px; }
|
|
html.js .xsp-tiles i { background: var(--card); transform: rotateY(90deg); }
|
|
html.js .xsp-flip:not([data-in]) { border-color: transparent; }
|
|
html.js .xsp-flip:not([data-in]) > :not(.xsp-tiles) { opacity: 0; }
|
|
.xsp-flip[data-in] .xsp-tiles { animation: xsp-tiles-off var(--d-base) var(--e-out) 1.05s both; }
|
|
.xsp-flip[data-in] .xsp-tiles i { animation: xsp-tile var(--d-base) var(--e-em) calc(var(--d) * 60ms + .3s) both; }
|
|
.xsp-flip[data-in] > :not(.xsp-tiles) { animation: xsp-show var(--d-base) var(--e-out) 1s backwards; }
|
|
.xsp-flip[data-in] { transition: border-color var(--d-base) var(--e-out) 1s; }
|
|
/* 5. tilt-3d-hover: the Band arrives tilted back in 3D and levels, then leans toward a fine pointer (2.5deg) */
|
|
.xsp-tilt { perspective: 1600px; }
|
|
.xsp-tilt > .x-band { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform var(--d-base) var(--e-out); }
|
|
html.js .xsp-tilt:not([data-in]) > .x-band { opacity: 0; transform: translateY(24px) rotateX(18deg) rotateY(-8deg); }
|
|
.xsp-tilt[data-in] > .x-band { animation: xsp-tilt var(--d-slower) var(--e-em) backwards; }
|
|
}
|
|
@keyframes xsp-deal { from { opacity: 0; transform: translate(var(--dx, 0px), calc(var(--dy, 0px) + 16px)) rotate(var(--r, 0deg)); } 30% { opacity: 1; } }
|
|
@keyframes xsp-lens { from { clip-path: circle(0 at var(--lx, 0) var(--ly, 50%)); transform: scale(1.18); } to { clip-path: circle(150% at var(--lx, 0) var(--ly, 50%)); transform: none; } }
|
|
@keyframes xsp-fold { from { opacity: 0; transform: perspective(1200px) rotateX(-72deg); } 40% { opacity: 1; } to { transform: perspective(1200px) rotateX(0); } }
|
|
@keyframes xsp-tile { from { transform: rotateY(90deg); } to { transform: rotateY(0); } }
|
|
@keyframes xsp-tiles-off { to { opacity: 0; visibility: hidden; } }
|
|
@keyframes xsp-show { from { opacity: 0; } }
|
|
@keyframes xsp-tilt { from { opacity: 0; transform: translateY(24px) rotateX(18deg) rotateY(-8deg); } to { opacity: 1; transform: none; } }
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.xsp-rail, .xsp-q, .xsp-steps i, .xsp-said { transition: none; }
|
|
}
|
|
|
|
/* dark mode (docs/DARK-MODE.md): the Company deck kit (company/deck.css) states its own greys on .vc; here they take Hanzo's
|
|
dark tokens. The closing band is black in both modes. */
|
|
html:not(.light) .vc.xsp { --ink: var(--foreground); --ink2: var(--text-helper); --muted: var(--text-helper); --quiet: var(--surface-2); --card: var(--surface-2); --tile: var(--surface-3); --line: var(--border); }
|
|
|
|
/* dark only: Hanzo's halftone dot field behind the hero, as live hanzo.ai's dark heroes sit on it */
|
|
html:not(.light) .xsp-hero { position: relative; isolation: isolate; }
|
|
html:not(.light) .xsp-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
|
|
background: radial-gradient(circle, color-mix(in srgb, var(--foreground) 36%, transparent) 1.5px, transparent 2.1px) 0 0 / 7px 7px;
|
|
-webkit-mask-image: linear-gradient(90deg, #000, rgba(0,0,0,.15) 32%, rgba(0,0,0,.15) 64%, #000), linear-gradient(180deg, rgba(0,0,0,.25), #000 85%);
|
|
-webkit-mask-composite: source-in;
|
|
mask-image: linear-gradient(90deg, #000, rgba(0,0,0,.15) 32%, rgba(0,0,0,.15) 64%, #000), linear-gradient(180deg, rgba(0,0,0,.25), #000 85%);
|
|
mask-composite: intersect; }
|
|
html:not(.light) .xsp-hero::after { content: ''; position: absolute; inset: 0 0 auto; height: 640px; z-index: -1; pointer-events: none;
|
|
background: radial-gradient(60% 70% at 50% 0%, color-mix(in srgb, var(--foreground) 9%, transparent), transparent 70%); }
|