3D engine that AI agents drive
/* Home-hero prototypes. One shared set of tokens and parts; each direction adds its own layout at the end.
Motion follows the animate skill: transform and opacity only, strong ease-out for entrances, short eases for hover,
hover effects gated to real pointers, everything softened under prefers-reduced-motion. */
:root {
color-scheme: dark;
--bg: #09070f;
--surface: #17141f;
--surface-hover: #221e2c;
--text: #f1eff5;
--muted: #a9a4b5;
--accent: #ff6a2b;
--focus: #a6c1ff;
--ease-out: cubic-bezier(0.23, 1, 0.32, 1);
--ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
--press: 140ms;
--hover: 160ms;
--enter: 700ms;
font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { min-height: 100svh; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 10px; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 20; padding: 8px 12px; border-radius: 10px; background: var(--text); color: var(--bg); transition: transform var(--hover) var(--ease-out); }
.skip-link:focus { transform: translateY(60px); }
/* Navigation: quiet text links, a soft fill on hover, no rules. */
.lab-nav { position: absolute; z-index: 10; inset: 0 0 auto 0; display: flex; align-items: center; gap: 4px; padding: 18px clamp(16px, 4vw, 48px); }
.lab-brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; font-weight: 650; font-size: 18px; letter-spacing: -0.02em; }
.lab-brand img { width: 30px; height: 30px; }
.lab-nav a:not(.lab-brand) { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px; border-radius: 12px; color: var(--muted); font-size: 14px; font-weight: 500; transition: background-color var(--hover) ease, color var(--hover) ease, transform var(--press) var(--ease-out); }
.lab-nav a:not(.lab-brand):active { transform: scale(0.97); }
.lab-nav svg { flex: none; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) and (pointer: fine) {
.lab-nav a:not(.lab-brand):hover { background: var(--surface); color: var(--text); }
}
.logo-mask { flex: none; display: inline-block; width: 17px; height: 17px; background: currentColor; mask: var(--logo) center / contain no-repeat; -webkit-mask: var(--logo) center / contain no-repeat; }
.logo-github { --logo: url('/logos/github.svg'); }
.logo-npm { --logo: url('/logos/npm.svg'); }
/* Buttons: press feedback 140 ms, hover only on pointers that hover, the arrow nudges 3 px. */
.lab-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.lab-button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 0 20px; border: 0; border-radius: 14px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; background: var(--surface); color: var(--text); transition: transform var(--press) var(--ease-out), background-color var(--hover) ease, box-shadow var(--hover) ease; }
.lab-button svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--hover) var(--ease-out); }
.lab-button.is-primary { background: var(--text); color: var(--bg); }
.lab-button:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
.lab-button:hover { background: var(--surface-hover); }
.lab-button.is-primary:hover { background: #ffffff; box-shadow: 0 0 0 6px rgb(255 106 43 / 0.18); }
.lab-button:hover .arrow { transform: translateX(3px); }
}
/* Entrance: opacity and a short rise, staggered by --i. Under reduced motion only the fade remains. */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.rise { animation: rise var(--enter) var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 70ms + 120ms); }
@media (prefers-reduced-motion: reduce) {
.rise { animation-name: fade; animation-duration: 300ms; animation-delay: 0ms; }
}
/* The stage: poster first, the live canvas fades in over it, then the poster leaves. */
.stage { position: absolute; inset: 0; overflow: hidden; background: var(--bg); }
.stage canvas, .stage .poster { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage .poster { object-fit: cover; z-index: 1; transition: opacity 520ms ease 80ms; }
.stage canvas { z-index: 0; touch-action: pan-y; }
.stage[data-live='true'] .poster { opacity: 0; pointer-events: none; }
.stage-status { position: absolute; z-index: 2; right: 16px; bottom: 16px; display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 12px; border-radius: 12px; background: var(--surface); color: var(--text); font-size: 13px; }
h1 { margin: 0; font-weight: 640; letter-spacing: -0.04em; line-height: 0.98; text-wrap: balance; }
.lede { margin: 0; color: var(--muted); font-size: clamp(16px, 1.5vw, 19px); line-height: 1.5; max-width: 34ch; }
/* ---------- Direction A: one object that follows the pointer ---------- */
.hero-a { position: relative; min-height: max(100svh, 720px); overflow: hidden; }
.hero-a .copy { position: relative; z-index: 3; display: flex; flex-direction: column; gap: 24px; justify-content: center; min-height: max(100svh, 720px); padding: 96px clamp(16px, 6vw, 96px) 64px; max-width: 760px; pointer-events: none; }
.hero-a .copy > * { pointer-events: auto; }
.hero-a h1 { font-size: clamp(44px, 6.4vw, 92px); }
.hero-a .stage::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(120% 90% at 78% 52%, transparent 38%, rgb(9 7 15 / 0.55) 100%); }
@media (max-width: 700px) {
.hero-a .copy { justify-content: flex-end; padding-bottom: 36px; background: linear-gradient(to top, rgb(9 7 15 / 0.92) 0%, rgb(9 7 15 / 0.7) 45%, transparent 100%); }
.hero-a h1 { font-size: 40px; }
}
/* ---------- Direction B: a world, the scroll moves the camera ---------- */
.hero-b { position: relative; height: 260svh; }
.hero-b .pin { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.hero-b .stage::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(to top, rgb(9 7 15 / 0.72) 0%, transparent 46%), radial-gradient(75% 65% at 0% 100%, rgb(9 7 15 / 0.5), transparent 72%); }
/* The port is busy behind the words (crane legs, hull lettering), so it gets a stronger scrim from the left edge. */
.hero-b[data-scene='port'] .stage::after { background: linear-gradient(to top, rgb(9 7 15 / 0.78) 0%, transparent 52%), linear-gradient(to right, rgb(9 7 15 / 0.72) 0%, rgb(9 7 15 / 0.35) 38%, transparent 66%); }
.hero-b .chapter { position: absolute; z-index: 3; left: clamp(16px, 6vw, 96px); bottom: clamp(32px, 9svh, 96px); max-width: 640px; display: flex; flex-direction: column; gap: 22px; will-change: transform, opacity; }
.hero-b h1 { font-size: clamp(42px, 6vw, 88px); }
.hero-b .chapter-two { pointer-events: none; opacity: 0; }
.hero-b .chapter-two h2 { margin: 0; font-size: clamp(28px, 3.6vw, 52px); font-weight: 620; letter-spacing: -0.03em; line-height: 1.04; }
.hero-b .chapter-two .lab-actions { pointer-events: auto; }
.hero-b .cue { position: absolute; z-index: 3; right: clamp(16px, 4vw, 48px); bottom: clamp(32px, 9svh, 96px); display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.hero-b .cue svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; animation: nudge 1.8s var(--ease-in-out) infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .hero-b .cue svg { animation: none; } }
.hero-b .progress { position: absolute; z-index: 3; left: clamp(16px, 4vw, 48px); top: 50%; width: 6px; height: 96px; margin-top: -48px; border-radius: 6px; background: rgb(255 255 255 / 0.14); overflow: hidden; }
.hero-b .progress i { position: absolute; inset: 0; background: var(--text); border-radius: 6px; transform-origin: top; transform: scaleY(0); }
@media (max-width: 700px) { .hero-b .progress { display: none; } .hero-b .cue { display: none; } }
/* ---------- Direction C: type-led, a small live scene, loud UI ---------- */
.hero-c { position: relative; min-height: max(100svh, 760px); display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: center; gap: clamp(16px, 4vw, 64px); padding: 110px clamp(16px, 6vw, 96px) 64px; overflow: hidden; }
.hero-c .words { display: flex; flex-direction: column; gap: 32px; }
.hero-c h1 { font-size: clamp(54px, 9.4vw, 148px); line-height: 0.92; letter-spacing: -0.055em; }
.hero-c h1 .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero-c h1 .line > span { display: block; animation: line-up 900ms var(--ease-out) both; animation-delay: calc(var(--i) * 90ms + 100ms); }
@keyframes line-up { from { transform: translateY(105%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero-c h1 .line > span { animation-name: fade; animation-duration: 300ms; animation-delay: 0ms; } }
.hero-c .chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.hero-c .chips li { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px; border-radius: 12px; background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 500; }
.hero-c .chips svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.hero-c .stage { position: relative; inset: auto; aspect-ratio: 1; width: 100%; max-width: 520px; justify-self: end; border-radius: 32px; background: radial-gradient(circle at 50% 40%, #1d1829 0%, #100d18 70%); }
.hero-c .stage canvas, .hero-c .stage .poster { border-radius: 32px; }
@media (max-width: 800px) {
.hero-c { grid-template-columns: 1fr; padding-top: 96px; }
.hero-c .stage { justify-self: center; max-width: 340px; order: -1; }
.hero-c h1 { font-size: clamp(46px, 14vw, 72px); }
}
/* ---------- Index of the three directions ---------- */
.lab-index { display: grid; gap: 12px; max-width: 760px; margin: 0 auto; padding: 120px 24px; }
.lab-index h1 { font-size: 40px; margin-bottom: 16px; }
.lab-index a { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; border-radius: 18px; background: var(--surface); transition: background-color var(--hover) ease, transform var(--press) var(--ease-out); }
.lab-index a:active { transform: scale(0.99); }
@media (hover: hover) and (pointer: fine) { .lab-index a:hover { background: var(--surface-hover); } }
.lab-index strong { font-size: 18px; }
.lab-index span { color: var(--muted); font-size: 14px; }