/* Homepage motion. Gentle motion runs for everyone with JS: the flywheel turning, flowing wires,
   and ciphertext. Large movement (zooms, slides, the 3D terminal unfold) runs only without a
   reduced-motion preference. Without JS every element sits in its final state. */

 /* Flywheel: arcs draw in turn when it scrolls into view, then a pulse travels the loop and lights each stage. */
 .motion .fly-arc{stroke-dasharray:1;stroke-dashoffset:1;transition:stroke-dashoffset .7s cubic-bezier(.4,0,.2,1) calc(var(--i)*.28s + .2s)}
 /* Unrevealed content stays legible at reduced opacity, so a fast scroll never shows an empty section. */
 .motion .fly-node{opacity:.35;transition:opacity .6s ease calc(var(--i)*.28s)}
 .motion .fly-svg.is-in .fly-arc{stroke-dashoffset:0}
 .motion .fly-arc{marker-end:none}
 .motion .fly-svg.is-in .fly-arc{animation:arrow-in 0s linear calc(var(--i)*.28s + .85s) both}
 .motion .fly-svg.is-in .fly-node{opacity:1}
 .fly-pulse{fill:#edf0ee;opacity:0;filter:drop-shadow(0 0 6px #78b08a)}
 .motion .fly-svg.is-live .fly-pulse{opacity:1;transition:opacity .6s 2.2s}
 .motion .fly-svg.is-live .fly-medal{animation:medal 10s linear infinite;animation-delay:calc(var(--i)*2s + 2.2s)}
 .motion .fly-steps.is-in>li{opacity:1;transform:none}

 /* Privacy: the wire for the current step carries moving dashes toward its arrow. */
 .motion .data-flow[data-step="0"] .order-wire,.motion .data-flow[data-step="1"] .retention-wire,.motion .data-flow[data-step="2"] .settlement-wire{stroke-dasharray:7 7;animation:flow 1.1s linear infinite}
 .motion .data-flow[data-step="1"] .core-node{animation:breathe 3.2s ease-in-out infinite}
 .motion .data-flow[data-step="2"] .chain-blocks path{animation:block 2.4s ease-in-out infinite}

 /* Privacy: ciphertext reads as machine text while it scrambles. */
 .is-cipher{color:#78b08a;font-variant-numeric:tabular-nums;letter-spacing:.03em;overflow-wrap:anywhere}
 /* Privacy: while the order's fields show as ciphertext, a caption names it as the stored, encrypted form. */
 .cipher-note{display:none}
 .motion .data-flow[data-step="1"] .cipher-note,.motion .data-flow[data-step="2"] .cipher-note{display:flex}

 .motion .fly-steps>li{opacity:.35;transition:opacity .6s ease calc(var(--i)*.14s)}

@media (prefers-reduced-motion:no-preference){
 /* Large movement: the landscape settles into place. */
 .motion .hero-art{animation:hero-settle 2.4s cubic-bezier(.2,.7,.2,1) both}
 .motion .fly-steps>li{transform:translateY(10px);transition:opacity .5s ease calc(var(--i)*.14s),transform .5s ease calc(var(--i)*.14s)}
 /* Terminal: the capture unfolds from a tilted plane as it scrolls in, and a band of light crosses the screen. */
 @supports (animation-timeline:view()){
  .motion .trading .wrap{perspective:1800px}
  .motion .terminal-capture{display:block;position:relative;transform-origin:50% 0;animation:unfold linear both;animation-timeline:view();animation-range:entry 0% cover 42%}
  .motion .terminal-capture:after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(105deg,transparent 35%,#edf0ee1f 48%,transparent 60%);background-size:250% 100%;animation:glare linear both;animation-timeline:view();animation-range:entry 20% cover 60%}
 }

}
@keyframes hero-settle{from{opacity:0;transform:scale(1.09)}to{opacity:1;transform:scale(1.035)}}
@keyframes unfold{from{transform:rotateX(32deg) scale(.86) translateY(40px);opacity:.25;filter:brightness(.6)}to{transform:none;opacity:1;filter:none}}
@keyframes glare{from{background-position:120% 0}to{background-position:-30% 0}}
@keyframes arrow-in{from{marker-end:none}to{marker-end:url(#fly-arrow)}}
@keyframes medal{0%{stroke-opacity:1;stroke:#78b08a;stroke-width:2.4}12%,100%{stroke-opacity:.55;stroke:#dee2df;stroke-width:1.4}}
@keyframes flow{to{stroke-dashoffset:-14}}
@keyframes breathe{0%,100%{box-shadow:0 0 0 0 #78b08a00}50%{box-shadow:0 0 28px 2px #78b08a40}}
@keyframes block{0%,100%{stroke:currentColor}50%{stroke:#78b08a}}
.market-rail a{transition:background .2s}
