/* Warp Studios motion layer.
   Ideas taken from prompt-motion.com: one shape that connects every scene (our violet
   diamond), springs with a small overshoot, words that move into place, and a camera
   that glides down a whole page. Nothing here hides content unless motion.js has run
   and the visitor has not asked for reduced motion. */
:root{--spring:cubic-bezier(.34,1.32,.64,1);--glide:cubic-bezier(.22,1,.36,1)}

/* Kinetic headline: each word rises out of its own mask */
.mo .kt-w{display:inline-block;overflow:hidden;vertical-align:top;padding-bottom:.08em;margin-bottom:-.08em}
.mo .kt-w>span{display:inline-block;transform:translateY(105%);transition:transform .9s var(--spring);transition-delay:calc(var(--i)*70ms + 120ms)}
.mo .kt-in .kt-w>span{transform:none}

/* Hero diamond: drops in, then becomes the thread */
.mo .hero .dot{transform:rotate(45deg) scale(0);transition:transform .7s var(--spring) .05s}
.mo .hero.lit .dot{transform:rotate(45deg) scale(1)}

/* Hero figure: the lines draw themselves, then drift; a diamond travels the dashed line */
.mo .hero-art path.draw{stroke-dasharray:1;stroke-dashoffset:1;transition:stroke-dashoffset 1.6s var(--glide);transition-delay:calc(var(--i)*60ms + 300ms)}
.mo .hero.lit .hero-art path.draw{stroke-dashoffset:0}
.mo .hero-art .drift{animation:drift 9s ease-in-out infinite alternate;transform-box:fill-box;transform-origin:center}
@keyframes drift{to{transform:translate(-6px,7px) skewY(-1.2deg)}}
.hero-art .runner{opacity:0}
.mo .hero.lit .hero-art .runner{opacity:1;transition:opacity .4s 1.4s}

/* Section reveal with a small spring */
.mo [data-reveal]{opacity:0;transform:translateY(26px);transition:opacity .6s ease,transform .9s var(--spring);transition-delay:calc(var(--d,0)*80ms)}
.mo [data-reveal].in{opacity:1;transform:none}

/* Section diamonds: the same shape as the hero, spinning into each eyebrow */
.thread{display:inline-block;width:7px;height:7px;background:#aa94ff;margin-right:9px;transform:rotate(45deg);vertical-align:1px}
.products .thread{background:#5b41e7}
.mo .thread{transform:rotate(-135deg) scale(0);transition:transform .8s var(--spring) .15s}
.mo .in .thread,.mo .thread.in{transform:rotate(45deg) scale(1)}

/* Process steps: a line draws down through 01, 02, 03 */
.process{position:relative}
.mo .process::before{content:"";position:absolute;left:-18px;top:0;width:1px;height:100%;background:var(--mist);transform:scaleY(0);transform-origin:top;transition:transform 1.4s var(--glide) .2s}
.mo .process.in::before{transform:scaleY(1)}
.mo .process li{opacity:.25;transition:opacity .5s;transition-delay:calc(var(--d)*350ms + 250ms)}
.mo .process.in li{opacity:1}

/* Gallery cards: point at one and the camera glides down that whole site */
.example-card{position:relative;transition:transform .5s var(--spring),border-color .3s}
.example-shot{position:relative;overflow:hidden;aspect-ratio:2/1;background:#26212f}
.example-shot .example-cover{position:absolute;inset:0;height:100%}
.example-tall{position:absolute;left:0;top:0;width:100%;height:auto;opacity:0;transition:opacity .35s}
.example-meta>span:last-child>span{display:inline-block;transition:transform .45s var(--spring)}
@media(hover:hover){
  .mo .example-card:hover{transform:translateY(-6px);border-color:#b5a4ff}
  .mo .example-card:hover .example-meta>span:last-child>span{transform:translate(3px,-3px)}
  .mo .example-card.flying .example-tall{opacity:1;transition:opacity .35s,transform var(--fly,6s) cubic-bezier(.45,0,.55,1) .25s;transform:translateY(var(--travel,0))}
  .mo .example-card:not(.flying) .example-tall{transition:opacity .35s,transform .7s var(--glide)}
}
.example-card .fly-tag{position:absolute;left:12px;top:12px;font:500 .62rem/1 var(--mono);letter-spacing:.12em;background:#121319e6;color:var(--mist);padding:6px 8px;border-radius:2px;opacity:0;transform:translateY(-6px);transition:opacity .3s,transform .45s var(--spring);pointer-events:none}
.mo .example-card.flying .fly-tag{opacity:1;transform:none}

/* Connected systems: a diamond carries one booking down the list, waking each tool */
.systems-list{position:relative}
.signal{position:absolute;left:-18px;top:0;width:9px;height:9px;background:#5be38b;transform:rotate(45deg);opacity:0;pointer-events:none}
.mo .systems-list li h3{transition:color .3s}
.mo .systems-list li.hit h3{color:#5be38b}
.mo .systems-list li.hit{animation:nudge .6s var(--spring)}
@keyframes nudge{40%{transform:translateX(5px)}100%{transform:none}}

/* Buttons: the arrow springs toward where it goes */
.button span,.text-link span,.top-contact span{display:inline-block;transition:transform .45s var(--spring)}
.button:hover span,.top-contact:hover span{transform:translate(3px,-3px)}
.text-link[href^="#"]:hover span{transform:translateY(3px)}

@media(max-width:680px){.signal{left:-12px}.mo .process::before{left:-10px}}
@media(prefers-reduced-motion:reduce){
  .mo [data-reveal],.mo .kt-w>span,.mo .thread,.mo .hero .dot,.mo .process li{opacity:1!important;transform:none!important}
  .mo .hero-art path.draw{stroke-dashoffset:0!important}
  .mo .hero-art .drift{animation:none}
  .mo .process::before{transform:none}
  .example-tall,.fly-tag,.signal{display:none}
}

/* ---- Part two (motion-plus.js) ---- */

/* Hero stage: the small website that builds itself over the figure */
.hero-art{position:relative;transition:transform .7s var(--glide);transform-style:preserve-3d;will-change:transform}
.hero-art .stage{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
.stage *{transform-box:fill-box;transform-origin:center}
.st-mono{font-family:var(--mono),ui-monospace,monospace}
.st-sans{font-family:"Space Grotesk",system-ui,sans-serif}
.st-wire{stroke:#3a3150;stroke-width:1.2;stroke-dasharray:3 4;animation:march 1.6s linear infinite;transition:stroke .3s}
.st-wire.hot{stroke:#aa94ff;animation-duration:.5s}
@keyframes march{to{stroke-dashoffset:-14}}
/* The figure behind steps back and its lines breathe */
.mo .hero-art.staged svg:not(.stage)>g{opacity:.42;transition:opacity 1.4s ease 1.6s}
.mo .hero-art.staged svg:not(.stage) g path{animation:wave 3.4s ease-in-out infinite alternate;animation-delay:calc(var(--i)*-.34s)}
@keyframes wave{from{transform:translateY(3px)}to{transform:translateY(-4px)}}
/* The headline word that changes with each site */
.mo .kt-w.slot{position:relative;white-space:nowrap}
.mo .kt-w.slot{white-space:normal;max-width:100%}.mo .kt-w.slot>span{transition:none}

/* Ticker under the hero */
.ticker{overflow:hidden;border-block:1px solid #2a2438;padding:13px 0;margin-bottom:8px;-webkit-mask:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent);mask:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent)}
.ticker-track{display:flex;align-items:center;width:max-content;font:500 .74rem/1 var(--mono);letter-spacing:.16em;color:var(--mist)}
.ticker-track span{padding:0 22px;white-space:nowrap}
.ticker-track i{width:6px;height:6px;background:#5b41e7;transform:rotate(45deg);flex:none}
.ticker-track i:nth-of-type(3n){background:#aa94ff}

/* Reading progress along the top */
.scroll-thread{position:fixed;left:0;top:0;width:100%;height:2px;z-index:50;pointer-events:none}
.scroll-thread span{position:absolute;inset:0;background:linear-gradient(90deg,#5b41e7,#aa94ff);transform-origin:left;transform:scaleX(0)}
.scroll-thread i{position:absolute;left:-4px;top:-3px;width:8px;height:8px;background:#aa94ff}

/* Section headings use the same word-rise as the headline */
.mo main section:not(.hero) h2{overflow:visible}

/* Cards tilt toward the mouse */
.mo [data-reveal].in.tilt{transform:perspective(1000px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg));transition:transform .4s ease-out,border-color .3s,opacity .6s;transition-delay:0s}
@media(hover:hover){.mo .example-card.tilt.in:hover{transform:perspective(1000px) translateY(-6px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg))}}
.mo .tilt .recruit-art img,.mo .tilt .hub-art img{transform:translate(var(--px,0px),var(--py,0px));transition:transform .4s ease-out}

/* Buttons lean toward the pointer */
.mo .button.magnet{transition:background .15s,transform .45s var(--spring)}

/* The video grows into place */
.mo .studio-reel video{transform-origin:center top;will-change:transform}

/* Process numbers pop in with their step */
.mo .process li>span{display:inline-block;transform:scale(.3);transition:transform .8s var(--spring);transition-delay:calc(var(--d)*350ms + 250ms)}
.mo .process.in li>span{transform:none}

@media(max-width:680px){.ticker-track{font-size:.66rem}.ticker-track span{padding:0 16px}}
@media(prefers-reduced-motion:reduce){
  .hero-art .stage,.ticker,.scroll-thread{display:none}
  .mo .hero-art.staged svg:not(.stage)>g{opacity:1}
  .mo .process li>span{transform:none}
}
.mo .kt-w.slot.slot-break{display:block;width:fit-content}
.mo .kt-w.slot.slot-break+br{display:none}
