/* Nodivo motion layer. Everything here is optional: the page is complete without it,
   and all of it is switched off for visitors who prefer reduced motion. */

/* Small hover responses */
.button svg,.header-contact svg,.related-services svg,.contact-direct svg{transition:transform .3s var(--ease)}
.wordmark i{transition:transform .35s var(--ease)}
@media(hover:hover){
  .button:hover svg{transform:translateX(4px)}
  .header-contact:hover svg,.related-services a:hover svg,.contact-direct a:hover svg{transform:translate(2px,-2px)}
  .wordmark:hover i{transform:scale(1.6)}
  .browser-preview,.phone-preview{transition:transform .7s var(--ease)}
  .project:hover .browser-preview{transform:rotate(-2deg) translateY(-6px)}
  .project:hover .phone-preview{transform:rotate(3.5deg) translateY(-10px)}
}

@media(prefers-reduced-motion:no-preference){
  /* First screen: copy rises in sequence */
  .hero .eyebrow,.hero h1>span,.hero-description,.hero-actions,.hero-foot,.service-hero>:not(.service-hero-symbol){animation:rise .85s var(--ease) both}
  .hero h1>span:first-child{animation-delay:.07s}
  .hero h1>span:last-child{animation-delay:.16s}
  .hero-description{animation-delay:.27s}
  .hero-actions{animation-delay:.37s}
  .hero-foot{animation-delay:.75s}
  .service-hero>:nth-child(2){animation-delay:.06s}
  .service-hero>:nth-child(3){animation-delay:.14s}
  .service-hero>:nth-child(4){animation-delay:.24s}
  .service-hero>:nth-child(5){animation-delay:.34s}
  .service-hero-symbol{animation:symbol-in 1.1s var(--ease) .3s both}

  /* First screen: the diagram assembles in the order the data travels */
  .scene-grid,.scene-tag,.scene-orbit,.flow-figure figcaption{animation:fade 1.2s ease-out .2s both}
  .flow-figure figcaption{animation-delay:1.7s}
  .store-node{animation:store-in .9s var(--ease) .25s both,drift 7s ease-in-out 1.4s infinite alternate}
  .order-node{animation:order-in .9s var(--ease) .95s both,drift 8.5s ease-in-out 2s infinite alternate-reverse}
  .erp-node{animation:erp-in .9s var(--ease) 1.6s both,drift 6.5s ease-in-out 2.6s infinite alternate}
  .flow-line--one{animation:wipe-right .7s cubic-bezier(.65,0,.35,1) .65s both}
  .flow-line--two{animation:wipe-down .7s cubic-bezier(.65,0,.35,1) 1.3s both}
  .order-node .check{animation:tick .5s var(--ease) 1.55s both}
  .erp-node .check{animation:tick .5s var(--ease) 2.2s both}

  /* The data dot travels each connection instead of blinking in place */
  @supports (offset-path:path('M0 0')){
    .flow-line>span{top:0;left:0;right:auto;bottom:auto;offset-rotate:0deg;animation:travel-one 5s cubic-bezier(.65,0,.35,1) 2.4s infinite both}
    .flow-line--one>span{offset-path:path('M0 -.5H131A30 30 0 0 1 161.5 30V82')}
    .flow-line--two>span{offset-path:path('M-.5 0V42A28 28 0 0 0 27.5 70.5H166');animation-name:travel-two}
    @media(max-width:480px){
      .flow-line--one>span{offset-path:path('M0 -.5H94A30 30 0 0 1 124.5 30V61')}
      .flow-line--two>span{offset-path:path('M-.5 0V28A28 28 0 0 0 27.5 56.5H164')}
    }
  }

  /* Sections arrive as they are scrolled to. The .js class is only set when the script can run. */
  .js [data-reveal]{opacity:0;translate:0 26px;transition:opacity .8s var(--ease),translate .8s var(--ease);transition-delay:calc(var(--i,0)*90ms)}
  .js [data-reveal].is-in{opacity:1;translate:none}
  .js [data-reveal] .data-check{opacity:0;scale:.3;transition:opacity .4s ease-out,scale .4s var(--ease)}
  .js [data-reveal].is-in .data-check{opacity:1;scale:1}
  .js [data-reveal] li:nth-child(1) .data-check{transition-delay:.45s}
  .js [data-reveal] li:nth-child(2) .data-check{transition-delay:.54s}
  .js [data-reveal] li:nth-child(3) .data-check{transition-delay:.63s}
  .js [data-reveal] li:nth-child(4) .data-check{transition-delay:.72s}
  .js [data-reveal] li:nth-child(5) .data-check{transition-delay:.81s}
  .js [data-reveal] li:nth-child(6) .data-check{transition-delay:.9s}
  .js [data-reveal] .contact-decoration>i{scale:0 1;transform-origin:left;transition:scale .6s var(--ease) .45s}
  .js [data-reveal] .contact-decoration>i:nth-of-type(2){transition-delay:.65s}
  .js [data-reveal].is-in .contact-decoration>i{scale:1}

  /* FAQ answers ease in when opened */
  .faq-list details[open] .faq-answer{animation:answer-in .45s var(--ease)}
}
@media print{.js [data-reveal]{opacity:1;translate:none}}

@keyframes rise{from{opacity:0;transform:translateY(22px)}}
@keyframes fade{from{opacity:0}}
@keyframes store-in{from{opacity:0;transform:translateY(28px) rotate(0deg) scale(.97)}}
@keyframes order-in{from{opacity:0;transform:translate(24px,10px) rotate(0deg) scale(.97)}}
@keyframes erp-in{from{opacity:0;transform:translate(-24px,10px) rotate(0deg) scale(.97)}}
@keyframes drift{to{translate:0 -5px}}
@keyframes wipe-right{from{clip-path:inset(-8px 100% -8px -8px)}to{clip-path:inset(-8px)}}
@keyframes wipe-down{from{clip-path:inset(-8px -8px 100% -8px)}to{clip-path:inset(-8px)}}
@keyframes tick{from{opacity:0;scale:.2}}
@keyframes symbol-in{from{opacity:0;transform:translate(-26px,26px)}}
@keyframes answer-in{from{opacity:0;transform:translateY(-8px)}}
@keyframes travel-one{0%{offset-distance:0%;opacity:0}6%{opacity:1}40%{offset-distance:100%;opacity:1}46%,100%{offset-distance:100%;opacity:0}}
@keyframes travel-two{0%,46%{offset-distance:0%;opacity:0}52%{opacity:1}86%{offset-distance:100%;opacity:1}92%,100%{offset-distance:100%;opacity:0}}

/* Impact layer motion */
@media(prefers-reduced-motion:no-preference){
  .ticker-track{animation:ticker 38s linear infinite}
  .mark{animation:mark 1s cubic-bezier(.65,0,.35,1) .95s both}
  .ai-symbol{display:inline-block;animation:spin 26s linear infinite}
  /* Project previews drift at different speeds while the page scrolls */
  @supports (animation-timeline:view()){
    .browser-preview{animation:drift-slow linear both;animation-timeline:view()}
    .phone-preview{animation:drift-fast linear both;animation-timeline:view()}
  }
}
@keyframes ticker{to{transform:translateX(-50%)}}
@keyframes mark{from{background-size:0 .36em}}
@keyframes spin{to{rotate:360deg}}
@keyframes drift-slow{from{translate:0 34px}to{translate:0 -34px}}
@keyframes drift-fast{from{translate:0 80px}to{translate:0 -60px}}
