/*
 * Motion layer. Everything that starts hidden is gated on html.motion, which is
 * only set when the visitor hasn't asked for reduced motion (see <head>), so the
 * page is fully readable without JS or with motion turned off.
 * The 3D hero scene is untouched here.
 */

:root {
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-inout: cubic-bezier(.65, 0, .35, 1);
}

section[id] { scroll-margin-top: 96px; }

/* ---------- scroll progress ---------- */
.progress {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: 2px;
  background: var(--blue);
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
  pointer-events: none;
}

/* ---------- nav: sticky, condenses, hides on scroll down ---------- */
/* The nav's layout height never changes: condensing is a transform, not padding. Shrinking a sticky
   element's padding reflows the page under it, scroll anchoring then shifts scrollY back over the
   40px threshold, and the nav flip-flops (stutter at the top of the page). */
.nav {
  position: sticky; top: 0; z-index: 40;
  transition: transform .5s var(--ease-out);
  will-change: transform;
}
.nav::before {
  content: ""; position: absolute; z-index: -1;
  top: 20px; bottom: 20px; left: 50%; width: 100vw;  /* = 16px of padding around the links once stuck */
  transform: translateX(-50%);
  background: oklch(100% 0 0 / .78);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transition: opacity .4s ease;
}
.nav.is-stuck { transform: translateY(-20px); }
.nav.is-stuck::before {
  opacity: 1;
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
          backdrop-filter: saturate(1.6) blur(14px);
}
/* phones: no backdrop blur; re-blurring the animating hero under the nav every frame is too heavy */
@media (max-width: 900px) {
  .nav.is-stuck::before { -webkit-backdrop-filter: none; backdrop-filter: none; background: oklch(100% 0 0 / .96); }
}
.nav.is-hidden { transform: translateY(-100%); }

.nav__links a:not(.btn) { position: relative; transition: color .25s; }
.nav__links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1.5px; background: var(--blue);
  transform: scaleX(0); transform-origin: 100% 50%;
  transition: transform .45s var(--ease-out);
}
.nav__links a:not(.btn):hover::after,
.nav__links a.is-active::after { transform: scaleX(1); transform-origin: 0 50%; }
.nav__links a.is-active { color: var(--ink); }

/* wordmark dot: drops in, bounces on hover */
.wordmark { display: inline-flex; align-items: baseline; }
.wordmark::after { display: inline-block; transition: transform .5s var(--ease-spring); }
.wordmark:hover::after { transform: translateY(-.35em) scale(1.3); }

/* ---------- buttons: fill sweep + label roll (no magnetic pull: the founder doesn't want it) ---------- */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  transition: box-shadow .4s ease, scale .2s var(--ease-spring);
}
/* exaggerated feedback: a pressed button visibly gives, then springs back */
.btn:active { scale: .95; transition-duration: .4s, .08s; }
.btn:hover { background: var(--ink); box-shadow: 0 10px 30px -10px oklch(57.36% 0.2114 260.1 / .6); }
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--blue); border-radius: inherit;
  transform: translateY(101%) scale(1.2, 1);
  border-radius: 50% 50% 0 0 / 30% 30% 0 0;
  transition: transform .55s var(--ease-out), border-radius .55s var(--ease-out);
}
.btn:hover::before { transform: translateY(0) scale(1); border-radius: inherit; }
.btn__roll { position: relative; display: inline-block; overflow: hidden; vertical-align: top; }
.btn__roll > span { display: inline-block; transition: transform .5s var(--ease-out); }
.btn__roll::after {
  content: attr(data-t); position: absolute; left: 0; top: 100%;
  content: attr(data-t) / "";   /* duplicate label is visual only: keep it out of the button's accessible name */
  transition: transform .5s var(--ease-out);
}
.btn:hover .btn__roll > span,
.btn:hover .btn__roll::after { transform: translateY(-100%); }

.link .arrow { display: inline-block; transition: transform .45s var(--ease-spring); }
.link:hover .arrow { transform: translateX(6px); }

/* ---------- hero intro (copy only) ---------- */
.hero__the { text-decoration: none; position: relative; }
.hero__the::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .02em;
  height: 3px; background: var(--blue);
  transform-origin: 0 50%;
}

.w { display: inline-block; overflow: hidden; padding: 0 .02em .14em; margin: 0 -.02em -.14em; vertical-align: baseline; }
.w__i, .c { display: inline-block; }

.hero__name .c {
  transition: translate .5s var(--ease-spring), color .3s ease;
}
/* The hero name's words are masked with clip-path, not overflow. An inline-block with overflow: hidden takes its
   baseline from its bottom edge, so lifting the mask when the intro ends (for the hover lift) changed every line's
   height and the lede + buttons under the title jumped. clip-path masks the same box and never touches layout. */
.hero__name .w { overflow: visible; clip-path: inset(0); }
.hero__title.is-done .w { clip-path: none; }
.hero__title.is-done .c:hover { translate: 0 -.14em; color: var(--blue); transition-duration: .25s; }

.motion .nav { animation: drop .9s var(--ease-out) backwards; }
.motion .hero__the { animation: rise-fade 1s var(--ease-out) .15s both; }
.motion .hero__the::after { animation: draw 1s var(--ease-inout) .55s both; }
.motion .wordmark::after { animation: dot-drop 1s var(--ease-spring) .6s backwards; }
.motion .hero__name:not(.is-split) { opacity: 0; }
.motion .hero__name .c { animation: char-up 1s var(--ease-out) both; animation-delay: calc(.3s + var(--i) * 32ms); }
.motion .hero__lede    { animation: rise-blur 1.1s var(--ease-out) 1s both; }
.motion .hero__actions { animation: rise-blur 1.1s var(--ease-out) 1.15s both; }

@keyframes drop     { from { transform: translateY(-100%); opacity: 0; } }
@keyframes rise-fade { from { transform: translateY(18px); opacity: 0; } }
/* rise-blur keeps its name but no longer blurs: an animated filter re-rasterises every frame and stuttered
   (founder, 2026-11-24). Transform + opacity only, like the page transitions. */
@keyframes rise-blur { from { transform: translateY(26px); opacity: 0; } }
@keyframes draw     { from { transform: scaleX(0); } }
@keyframes char-up  { from { transform: translateY(110%) rotate(8deg); } }
@keyframes dot-drop { from { transform: translateY(-1.4em); opacity: 0; } 60% { opacity: 1; } }

/* ---------- intros wait for the fonts ----------
   Every animation on the page is held on its first frame until js/motion.js sets html.is-ready: the fonts above the
   fold are in (or about 3s have passed) and the scripts that build the page have run. Without this the intro starts
   at first paint while the text is still invisible or in a fallback font, and when the real fonts land every line
   re-wraps and moves mid-animation. Held intros are hidden by their own first keyframe, so that reflow is never seen.
   Scroll reveals wait the same way (motion.js starts observing at the same moment).
   Not when the page arrived by page transition (html.vt-in): its timings are chained to the transition's clock.
   No JS: <head> drops html.motion after 3s, which releases all of this. */
.motion:not(.is-ready):not(.vt-in) *,
.motion:not(.is-ready):not(.vt-in) *::before,
.motion:not(.is-ready):not(.vt-in) *::after { animation-play-state: paused !important; }
/* Smooth scrolling starts with the intros. A page opened at an anchor (/#pricing) lands there at once, instead of
   scrolling the whole page past while it loads and stopping short when the fonts change its height. (Reduced
   motion never gets is-ready, so it never smooth-scrolls.) */
html:not(.is-ready) { scroll-behavior: auto; }

/* ---------- generic scroll reveal ---------- */
.motion [data-reveal] {
  opacity: 0; transform: translateY(40px);   /* no blur: see rise-blur */
  transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.motion [data-reveal].is-in { opacity: 1; transform: none; }

/* split headings: words slide up out of a mask */
.motion [data-split]:not(.is-split) { opacity: 0; }
.motion [data-split] .w__i {
  transform: translateY(105%) rotate(4deg); transform-origin: 0 100%;
  transition: transform 1.1s var(--ease-out);
  transition-delay: calc(var(--i) * 55ms);
}
.motion [data-split].is-in .w__i { transform: none; }
/* hero titles (big, heavy, rotated): each word gets its layer before it moves, so the slide runs on the graphics
   card even while the page is still busy. Only the heroes: a layer per word on every heading would add up. */
.motion :is(.lhero, .thero) [data-split]:not(.is-in) .w__i { will-change: transform; }

/* scroll-scrubbed heading: words light up as you read down */
[data-scrub] .w__i { transition: color .4s ease, opacity .4s ease; }
.motion [data-scrub] .w__i { color: oklch(85% 0.012 259.8); }
.motion [data-scrub] .w__i.is-lit { color: var(--ink); }

/* eyebrows rise in */
.eyebrow { position: relative; }
.motion .eyebrow { opacity: 0; transform: translateY(10px); transition: opacity .8s var(--ease-out), transform 1s var(--ease-out); }
.motion .eyebrow.is-in { opacity: 1; transform: none; }

/* ---------- steps ---------- */
.steps__n { position: relative; border-bottom-color: transparent; transition: color .3s; }
.steps__n::before, .steps__n::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  transform-origin: 0 50%;
}
.steps__n::before { background: var(--line); }
.steps__n::after  { background: var(--blue); height: 2px; bottom: -1.5px; transform: scaleX(0); transition: transform .7s var(--ease-out); }
.steps li:hover .steps__n { color: var(--blue); }
.steps li:hover .steps__n::after { transform: scaleX(1); }
.steps li h3 { transition: transform .5s var(--ease-out); }
.steps li:hover h3 { transform: translateX(6px); }
.motion .steps__n::before { transform: scaleX(0); transition: transform 1.4s var(--ease-inout) calc(var(--d, 0s) + .2s); }
.motion .is-in .steps__n::before { transform: scaleX(1); }

/* ---------- trades: border draws, cursor spotlight ---------- */
.trade { position: relative; border-top-color: transparent; }
.trade::before {
  content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 2px;
  background: var(--ink); transform-origin: 0 50%;
  transition: background .4s;
}
.trade--muted::before { background: var(--line); }
.trade:hover::before { background: var(--blue); }
.trade::after {
  content: ""; position: absolute; inset: -2px -28px -28px; z-index: -1;
  border-radius: 0 0 18px 18px;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), oklch(57.36% 0.2114 260.1 / .09), transparent 70%);
  opacity: 0; transition: opacity .4s;
  pointer-events: none;
}
.trade:hover::after { opacity: 1; }
.trades { position: relative; z-index: 0; }
.motion .trade::before { transform: scaleX(0); transition: transform 1.3s var(--ease-inout) calc(var(--d, 0s) + .15s), background .4s; }
.motion .trade.is-in::before { transform: scaleX(1); }

/* ---------- doclist: blue sweep on hover ---------- */
.doclist li {
  position: relative;
  padding-right: 48px;
  transition: color .35s ease;
}
.doclist li::before {
  content: ""; position: absolute; inset: 0 16px 0 -16px; z-index: -1;
  background: var(--blue); border-radius: 2px;
  transform: scaleY(0); transform-origin: 50% 100%;
  transition: transform .5s var(--ease-out);
}
.doclist li::after {
  content: "↗"; position: absolute; right: 30px; top: 50%;
  font-family: var(--f-ui); font-size: 16px;
  transform: translate(-10px, -30%); opacity: 0;
  transition: transform .5s var(--ease-out), opacity .3s;
}
.doclist li > span { display: inline-block; transition: transform .5s var(--ease-out); }
.doclist { position: relative; z-index: 0; }
.doclist li:hover { color: oklch(100% 0 0); }
.doclist li:hover::before { transform: scaleY(1); }
.doclist li:hover::after { transform: translate(0, -50%); opacity: 1; }
.doclist li:hover > span { transform: translateX(4px); }

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden;
  margin: calc(var(--section-gap) * -.45) 0 var(--section-gap);
  padding: 12px 0;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(48px, 9vw, 132px);
  letter-spacing: -.03em;
  line-height: 1.05;
  user-select: none;
}
.marquee__row { display: flex; width: max-content; white-space: nowrap; will-change: transform; }
.marquee__row span { padding-right: .35em; }
.marquee__row i {
  display: inline-block; width: .22em; height: .22em; margin: 0 .5em .12em .15em;
  vertical-align: middle; border-radius: 50%; background: var(--blue);
}
.marquee__row--ghost { color: oklch(92.4% 0.006 255.5); }
.marquee__row--ghost i { background: transparent; box-shadow: inset 0 0 0 2px var(--blue); }

/* ---------- CTA: tag-style rings ---------- */
.section--cta { position: relative; isolation: isolate; }
.cta__rings { position: absolute; left: 50%; top: 22%; width: 0; height: 0; z-index: -1; pointer-events: none; }
.cta__rings span {
  position: absolute; left: -160px; top: -160px; width: 320px; height: 320px;
  border-radius: 50%; border: 1.5px solid var(--blue);
  opacity: 0;
}
.motion .section--cta.is-in .cta__rings span { animation: ping 4.5s var(--ease-out) infinite; }
.cta__rings span:nth-child(2) { animation-delay: 1.5s !important; }
.cta__rings span:nth-child(3) { animation-delay: 3s !important; }
@keyframes ping {
  0%   { transform: scale(.2); opacity: 0; }
  10%  { opacity: .35; }
  100% { transform: scale(3.2); opacity: 0; }
}

@keyframes stroke { to { stroke-dashoffset: 0; } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ---------- footer: giant wordmark ---------- */
.footer { flex-wrap: wrap; }
.footer__big {
  width: 100%; order: -1;
  margin: 0 0 40px;
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(64px, 19vw, 270px);
  line-height: .8; letter-spacing: -.03em;
  color: var(--ink);
  user-select: none;
}
.footer__big .c { transition: translate .5s var(--ease-spring), color .3s; }
.footer__big .c:hover { translate: 0 -.06em; color: var(--blue); transition-duration: .2s; }
.footer__dot { color: var(--blue); }
.motion .footer__big .c { transform: translateY(105%); transition: transform 1.2s var(--ease-out), translate .5s var(--ease-spring), color .3s; transition-delay: calc(var(--i) * 45ms), 0s, 0s; }
.motion .footer__big.is-in .c { transform: none; }
.motion .footer__dot .c { transition-timing-function: var(--ease-spring), var(--ease-spring), ease; transition-duration: 1s, .5s, .3s; transform: translateY(-1.2em) scale(.3); }

/* ---------- old way, timed (the fallback where scroll timelines aren't supported): once it's in view the notes are
   struck out one after another, the paper peels off and the sticker lands ---------- */
.pencil span { transition: opacity .5s ease var(--nd, 0s); }
.pencil span::after { transition: transform .5s var(--ease-out) var(--nd, 0s); }
.pencil__b { --nd: .14s; } .pencil__c { --nd: .28s; } .pencil__d { --nd: .42s; }
.oldlabel { transition: transform 1.1s cubic-bezier(.6, -.35, .7, .55) .6s, opacity .45s ease 1.15s; }
.door__new { transition: opacity .25s ease; }
.motion .door__new { transform: translateY(-36px) scale(1.14) rotate(-5deg); transition: opacity .3s ease, transform .9s var(--ease-spring); }
.motion .oldway[data-state="after"] .door__new { transform: none; transition-delay: 1.3s; }

/* stickers float gently while idle */
.motion .stickers .stk.is-in .stk__slab { animation: bob 6s ease-in-out infinite alternate; animation-delay: calc(var(--d, 0s) * -8); }
.motion .stickers .stk.is-in .stk__stage:hover .stk__slab { animation-play-state: paused; }
@keyframes bob { from { translate: 0 0; } to { translate: 0 -6px; } }

@media (max-width: 900px) {
  .trade::after { inset: -2px -12px -12px; }
}

@media (prefers-reduced-motion: reduce) {
  .cta__rings { display: none; }
  .nav { position: relative; }  /* the scroll handler that frosts the sticky nav doesn't run here */
  .oldlabel, .door__new, .pencil span, .pencil span::after, .stk__slab, .stk__shadow, .stk__face::after { transition: none !important; animation: none !important; }
  .btn, .btn::before, .btn__roll > span, .btn__roll::after, .doclist li::before, .doclist li::after,
  .doclist li > span, .wordmark::after, .link .arrow, .steps li h3 { transition: none !important; }
}
.footer__big .w { padding-right: .1em; margin-right: -.1em; }

/* ---------- dot grid: fades in the first time it scrolls into view ---------- */
.motion [data-dotgrid] > .dotgrid { opacity: 0; transition: opacity 1.6s var(--ease-out, ease); }
.motion [data-dotgrid].is-dotgrid-on > .dotgrid { opacity: 1; }

/* ---------- paused (pause button in the nav, js/motion.js): stop every looping animation ----------
   (js/dotgrid.js canvases watch html.is-paused themselves and freeze on the current frame;
   the app demos' loops are paused in css/demo.css) */
.is-paused .stage, .is-paused .tag__ring, .is-paused .phone, .is-paused .phone-shadow,
.is-paused .phone-shadow::before, .is-paused .phone-shadow::after, .is-paused .phone__idle, .is-paused .phone__doc,
.is-paused .cta__rings span, .is-paused .stk__slab, .is-paused .surface__ping span,
.is-paused .led, .is-paused .meter::after { animation-play-state: paused !important; }

/* ---------- page transitions (js/vt.js) ----------
   Cross-document view transitions: the browser snapshots the old page, loads the new one and animates between them.
   Off under reduced motion, and browsers without them just navigate.
   - Every link: a short cross-fade.
   - Home → trade page (about 1.2s, one thing to watch at a time): everything around the sticker fades away as the
     sticker lifts toward you; in one toss it crosses the empty page and slams onto the equipment; the hit bursts the new page
     out of a soft circle centred on the landing spot (html.vt-plop + the .vt-cover element, both from vt.js).
     The sticker is view-transition-name: sticker (one element per page). The browser's own group animation does the
     travel; the pop, tilt and plop ride on the image pair inside it.
   html.vt-in stays on a page that arrived this way, so it skips the intros the transition already covered. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
::view-transition-old(root) { animation: vt-out .2s ease both; }
::view-transition-new(root) { animation: vt-in .34s ease .1s both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

/* Everything in the sticker sequence is a transform or an opacity, nothing else: those are the two things a browser
   animates on the graphics card without repainting. An animated mask, filter, box-shadow or custom property is
   repainted every frame on the main thread, which is busy loading the new page, and that showed up as stutter. */

/* 1. 0 to .26s: the old page fades out from around the sticker (which is only just lifting off). The new page is
   already underneath, hidden by .vt-cover. */
.vt-plop::view-transition-old(root) { animation: vt-out .26s ease both; mix-blend-mode: normal; }
/* 3. .73s on: the sticker hits and the new page bursts out of the landing spot. It starts fast, like something
   knocked it loose: the page grows from the impact point as the cover's hole opens. */
.vt-plop::view-transition-new(root) {
  mix-blend-mode: normal;
  transform-origin: var(--vt-x) var(--vt-y);
  animation: vt-open .5s cubic-bezier(.1, .7, .2, 1) .73s both;
}
@keyframes vt-open { from { scale: .9; } }

/* The cover (built by vt.js on the new page, removed when the transition ends): a page-coloured sheet with a soft
   round hole at the landing spot. The hole starts small enough to hide behind the landed sticker, plugged until
   the sticker gets there, and opens by scaling the whole sheet up, so the circle is never repainted. One blue ring
   (the "tap here" ring, once) runs out ahead of it.
   --vt-d sheet size, --vt-r0 hole radius at rest, --vt-k how far the sheet scales, --vt-R the ring's final radius. */
.vt-cover { position: fixed; left: var(--vt-x); top: var(--vt-y); width: 0; height: 0; z-index: 9999; pointer-events: none; }
.vt-cover > * { position: absolute; border-radius: 50%; translate: -50% -50%; will-change: transform, opacity; }
.vt-cover__sheet {
  width: var(--vt-d); height: var(--vt-d); border-radius: 0;
  background: radial-gradient(circle at center, transparent calc(var(--vt-r0) * .74), var(--bg) var(--vt-r0));
  animation: vt-sheet .5s cubic-bezier(.1, .7, .2, 1) .73s both;
}
.vt-cover__plug {
  width: calc(var(--vt-r0) * 2 + 4px); height: calc(var(--vt-r0) * 2 + 4px);
  background: var(--bg);
  animation: vt-out .06s linear .72s both;
}
.vt-cover__ring {
  width: calc(var(--vt-R) * 2); height: calc(var(--vt-R) * 2);
  border: 1.5px solid var(--blue);
  opacity: 0;   /* unseen until the hit (the animation fills forwards only) */
  animation: vt-ring .5s cubic-bezier(.1, .7, .2, 1) .73s forwards;
}
@keyframes vt-sheet { to { scale: var(--vt-k); } }
@keyframes vt-ring { from { scale: calc(1 / var(--vt-k)); opacity: .7; } to { scale: 1; opacity: 0; } }

/* 2. the sticker, 0 to .74s: one toss. It lifts toward you, travels and comes down on a single arc (the lift is a
   parabola: easing out to the peak at mid-flight, easing in from it, so there is no hold and no corner in the
   motion), while the box travels on one curve over the same .74s. It is still coming down when it hits, carries
   on into a squash and springs back (by .9s). No shadow of its own: the snapshot already carries the sticker's
   soft ground shadow, which grows with it. (A box-shadow here left a pale rim wherever the tilted sticker didn't
   fill its box.)
   Only with html.vt-plop, when vt.js found a landing spot in view. Otherwise a sticker with nowhere to land just
   fades with its page, rather than popping off toward nothing. */
::view-transition-old(sticker) { animation: vt-out .2s ease both; }
:root { --vt-pop: 1.45; }
@media (max-width: 700px) { :root { --vt-pop: 1.12; } }   /* one-column grid: the sticker is already nearly as wide as the screen */
.vt-plop::view-transition-group(sticker) {
  z-index: 1;
  animation-duration: .74s; animation-fill-mode: both;
  animation-timing-function: cubic-bezier(.5, 0, .3, 1);
}
.vt-plop::view-transition-image-pair(sticker) { animation: vt-stk .9s linear both; }
/* late in the flight the grid sticker's snapshot hands over to the hero's: the old one stays solid underneath until
   the new one has faded in over it, so the sticker never goes see-through */
.vt-plop::view-transition-old(sticker) { animation: vt-stk-old .9s linear both; mix-blend-mode: normal; }
.vt-plop::view-transition-new(sticker) { animation: vt-stk-new .9s linear both; mix-blend-mode: normal; }
@keyframes vt-stk {
  0%   { scale: 1;             rotate: 0deg;  animation-timing-function: cubic-bezier(.33, 1, .68, 1); }
  41%  { scale: var(--vt-pop); rotate: -5deg; animation-timing-function: cubic-bezier(.45, 0, .85, .55); }
  82%  { scale: .9;            rotate: 0deg;  animation-timing-function: cubic-bezier(.34, 1.56, .64, 1); }
  100% { scale: 1;             rotate: 0deg; }
}
/* once the box is near its landing size: a small hero sticker (the racks) blown up early is blurry */
@keyframes vt-stk-old { 0%, 76% { opacity: 1; } 77%, 100% { opacity: 0; } }
@keyframes vt-stk-new { 0%, 60% { opacity: 0; } 76%, 100% { opacity: 1; } }

/* arrived by transition: the nav was already on screen, so it doesn't drop in again */
.vt-in .nav, .vt-in .wordmark::after { animation: none; }

/* the grid stickers are the way in: press one and it lifts */
.stickers .stk__stage { cursor: pointer; }
.stickers .stk__slab { transition: transform .7s cubic-bezier(.16,1,.3,1), --peel .55s cubic-bezier(.34,1.56,.64,1), scale .25s var(--ease-spring); }
.stickers .stk__stage:active .stk__slab { scale: 1.06; }

/* ---------- scroll-timed motion (2026-11-26) ----------
   These animations have no clock: their timebase is scroll position (animation-timeline), so they run forwards as
   you scroll down and backwards as you scroll up, and stop when you stop. Rules:
   - Transforms and opacity only, same as the page transitions: those two scrub on the graphics card.
   - Everything is inside @supports. A browser without scroll timelines keeps the timed reveals above (the markup
     still carries data-stagger / data-reveal for it), so the base styles here undo those first.
   - A parent names the timeline (view-timeline) and its children ride it, so pieces of one thing stay in step and
     a piece's own movement never changes when its animation starts.
   - Ranges end by the middle of the screen: nothing is still half-arrived where someone is reading.
   - Not paused by the nav's pause button (html.is-paused): nothing here moves unless the visitor scrolls.
   - Held until html.is-ready like every other animation (the rule above); off without html.motion. */
@supports (animation-timeline: view()) {
  /* --- home sticker grid: each sticker is held off the page, tilted, and gets pressed on as its row scrolls up.
     Columns land left to right (--r0 / --r1 slide the range), fanned out from the middle (--tilt / --dx). The
     caption follows once its sticker is nearly down. */
  .motion .stickers > .stk[data-reveal] { opacity: 1; transform: none; transition: none; }
  .motion .stickers > .stk {
    view-timeline: --stk block;
    --tilt: -9deg; --dx: -36px; --r0: 0%; --r1: 40%;
  }
  .motion .stickers > .stk:nth-child(3n + 2) { --tilt: 4deg;  --dx: 0px;  --r0: 8%;  --r1: 44%; }
  .motion .stickers > .stk:nth-child(3n)     { --tilt: 10deg; --dx: 36px; --r0: 16%; --r1: 48%; }
  .motion .stickers .stk__stage {
    transform-origin: 50% 60%;
    animation: stk-press cubic-bezier(.3, .7, .2, 1) both, stk-show linear both;
    animation-timeline: --stk, --stk;
    animation-range: entry var(--r0) cover var(--r1), entry var(--r0) entry 85%;
  }
  .motion .stickers .stk__cap {
    animation: stk-cap cubic-bezier(.3, .7, .2, 1) both;
    animation-timeline: --stk;
    animation-range: entry 70% cover calc(var(--r1) + 6%);
  }
  @keyframes stk-press { from { translate: var(--dx) 120px; rotate: var(--tilt); scale: 1.2; } }
  @keyframes stk-show  { from { opacity: 0; } }
  @keyframes stk-cap   { from { opacity: 0; translate: 0 20px; } }
  @media (min-width: 901px) and (max-width: 1100px) {   /* two columns */
    .motion .stickers > .stk:nth-child(n)      { --tilt: -8deg; --dx: -28px; --r0: 0%; --r1: 40%; }
    .motion .stickers > .stk:nth-child(2n)     { --tilt: 8deg;  --dx: 28px;  --r0: 10%; --r1: 46%; }
  }
  @media (max-width: 900px) {   /* one column: no sideways throw, alternate the tilt, a shorter drop */
    .motion .stickers > .stk:nth-child(n)      { --tilt: -6deg; --dx: 0px; --r0: 0%; --r1: 36%; }
    .motion .stickers > .stk:nth-child(2n)     { --tilt: 6deg; }
    @keyframes stk-press { from { translate: 0 70px; rotate: var(--tilt); scale: 1.1; } }
  }

  /* --- the sticker build: the three layers come apart as the section scrolls to the middle of the screen, and
     close again on the way back up. The lift is the `translate` property, on top of the layer's own
     transform: translateZ(--z), which now only carries the hover (a little further apart). */
  .motion .build__vis[data-reveal] { opacity: 1; transform: none; transition: none; }
  .motion .build__vis { view-timeline: --build block; animation: stk-show linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
  .motion .build__layer {
    transition: transform .6s var(--ease-out);
    animation: build-lift cubic-bezier(.3, .6, .25, 1) both;
    animation-timeline: --build;
    animation-range: entry 35% cover 56%;
  }
  .motion .build__vis.is-in .build__layer--chip { --z: 2px; --dl: 0s; --lift: 108px; }
  .motion .build__vis.is-in .build__layer--face { --z: 4px; --dl: 0s; --lift: 216px; }
  .motion .build__layer--chip { --lift: 108px; }
  .motion .build__layer--face { --lift: 216px; }
  .motion .build__vis:hover .build__layer--chip { --z: 20px; }
  .motion .build__vis:hover .build__layer--face { --z: 40px; }
  @keyframes build-lift { to { translate: 0 0 var(--lift, 0px); } }

  /* --- steps: the rule over each step draws in turn, left to right, as the row comes up */
  .motion .steps { view-timeline: --steps block; }
  .motion .steps .steps__n::before {
    transform: none; transition: none;
    animation: draw cubic-bezier(.4, 0, .2, 1) both;
    animation-timeline: --steps;
    animation-range: entry 30% cover 34%;
  }
  .motion .steps > :nth-child(2) .steps__n::before { animation-range: entry 55% cover 40%; }
  .motion .steps > :nth-child(3) .steps__n::before { animation-range: entry 80% cover 46%; }
  .motion .steps > :nth-child(4) .steps__n::before { animation-range: entry 105% cover 52%; }

  /* --- trade pages: the app demo grows into place as it comes up the screen */
  .motion .demo[data-reveal] {
    opacity: 1; transform: none; transition: none;
    transform-origin: 50% 0;
    animation: demo-grow cubic-bezier(.3, .7, .2, 1) both, stk-show linear both;
    animation-timeline: view(), view();
    animation-range: entry 0% cover 40%, entry 0% entry 45%;
  }
  @keyframes demo-grow { from { scale: .88; translate: 0 72px; } }

  /* --- the old way: the scraps drift up into place at different speeds (depth), the notes are struck out one by
     one, the paper peels off and falls, and the sticker is pressed on where it was. --n0 = where a note's strike
     starts, --dy = how far it drifts. The data-state rules still sit underneath; these animations cover them. */
  .motion .door { view-timeline: --old block; }
  .motion .oldway[data-state] .pencil span {
    transition: none;
    animation: note-dim linear both, old-drift cubic-bezier(.2, .6, .3, 1) both;
    animation-timeline: --old, --old;
    animation-range: cover var(--n0) cover calc(var(--n0) + 8%), entry 0% cover 34%;
  }
  .motion .oldway[data-state] .pencil span::after {
    transition: none;
    animation: note-strike cubic-bezier(.3, .7, .2, 1) both;
    animation-timeline: --old;
    animation-range: cover var(--n0) cover calc(var(--n0) + 8%);
  }
  .motion .pencil__a { --n0: 17%; --dy: 60px; }
  .motion .pencil__b { --n0: 22%; --dy: 140px; }
  .motion .pencil__c { --n0: 27%; --dy: 95px; }
  .motion .pencil__d { --n0: 32%; --dy: 170px; }
  .motion .oldway[data-state] .oldlabel {
    transition: none; --dy: 36px;
    animation: old-peel cubic-bezier(.5, 0, .8, .45) both, old-drift cubic-bezier(.2, .6, .3, 1) both;
    animation-timeline: --old, --old;
    animation-range: cover 36% cover 50%, entry 0% cover 34%;
  }
  .motion .oldway[data-state] .door__new {
    opacity: 1; transform: none; transition: none; pointer-events: auto;
    animation: old-press cubic-bezier(.3, .7, .2, 1) both, stk-show linear both;
    animation-timeline: --old, --old;
    animation-range: cover 43% cover 56%, cover 43% cover 49%;
  }
  @keyframes note-dim    { from { opacity: .9; } to { opacity: .45; } }
  @keyframes note-strike { from { transform: rotate(-1.5deg) scaleX(0); } to { transform: rotate(-1.5deg) scaleX(1); } }
  @keyframes old-drift   { from { translate: 0 var(--dy, 80px); } to { translate: 0 0; } }
  @keyframes old-peel    { from { opacity: 1; transform: rotate(-2.5deg); } 72% { opacity: 1; } to { opacity: 0; transform: translate(-14%, 150%) rotate(-38deg); } }
  @keyframes old-press   { from { translate: 0 -48px; rotate: -7deg; scale: 1.22; } }

  /* --- footer: the big wordmark's letters rise out of their mask one after another as the footer scrolls in, and
     the blue dot drops last. Keyframes use `transform`, so the letters' hover lift (`translate`) still works. */
  .motion .footer__big { view-timeline: --foot block; }
  .motion .footer__big .c, .motion .footer__big.is-in .c {
    transform: none;
    transition: translate .5s var(--ease-spring), color .3s;
    animation: foot-rise cubic-bezier(.3, .7, .2, 1) both;
    animation-timeline: --foot;
    animation-range: entry calc(var(--i) * 5%) entry calc(58% + var(--i) * 6%);
  }
  .motion .footer__dot .c, .motion .footer__big.is-in .footer__dot .c {   /* last: after the s is up */
    animation-name: foot-dot; animation-timing-function: var(--ease-spring); animation-range: entry 78% entry 100%;
  }
  @keyframes foot-rise { from { transform: translateY(105%); } }
  @keyframes foot-dot  { from { transform: translateY(-1.2em) scale(.3); } }
}
