:root {
  --motion-ease: cubic-bezier(.22,.76,.25,1);
}
.studio-motion { min-width: 0; perspective: 950px; }
.studio-demo { position: relative; transform-origin: center 72%; }
.demo-banner { position: relative; isolation: isolate; overflow: hidden; }
.demo-banner::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(ellipse at var(--light-x, 32%) var(--light-y, 35%),
    color-mix(in srgb, var(--lime) 24%, transparent), transparent 59%);
  opacity: .72;
  pointer-events: none;
}
.demo-cards > .demo-control { position: relative; overflow: hidden; }
.demo-cards > .demo-control::after {
  content: "";
  position: absolute;
  inset: auto 10px 6px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: .27;
  transform: scaleX(var(--card-progress, .35));
  transform-origin: right;
  pointer-events: none;
}
#process .steps ol { position: relative; isolation: isolate; }
#process .steps ol::before,
#process .steps ol::after {
  content: "";
  position: absolute;
  inset: 15px 16px 19px auto;
  width: 2px;
  border-radius: 2px;
  z-index: -1;
}
#process .steps ol::before { background: var(--line); }
#process .steps ol::after {
  background: var(--green);
  transform: scaleY(var(--process-progress, 1));
  transform-origin: top;
}
#process .steps li::before { transition: color .28s, background-color .28s; }
#process .steps li.is-reached::before { background: var(--green); color: #fff; }

@media (prefers-reduced-motion: no-preference) {
  .motion-ready .studio-demo {
    transform: translateY(var(--demo-lift, 0px))
      rotateX(var(--demo-pitch, 0deg)) rotateY(var(--demo-yaw, 0deg));
    transition: transform .18s var(--motion-ease);
  }
  .motion-ready .hero-copy > * {
    animation: riwaq-arrive .76s var(--motion-ease) both;
  }
  .motion-ready .hero-copy > :nth-child(2) { animation-delay: .07s; }
  .motion-ready .hero-copy > :nth-child(3) { animation-delay: .14s; }
  .motion-ready .hero-copy > :nth-child(4) { animation-delay: .21s; }
  .motion-ready .hero-copy > :nth-child(5) { animation-delay: .28s; }
  .motion-ready .studio-motion { animation: riwaq-arrive .9s var(--motion-ease) .12s both; }
  .motion-ready .demo-cards > .demo-control::after { transition: transform .36s var(--motion-ease); }
  .motion-ready .service-card .icon { transition: transform .34s var(--motion-ease); }
  .motion-ready .service-card:hover .icon { transform: translateY(-3px) rotate(-6deg); }
}

@keyframes riwaq-arrive {
  from { opacity: 0; translate: 0 15px; }
  to { opacity: 1; translate: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  #process .steps li::before { transition: none; }
  #process .steps ol::after { transform: none; }
}
