/* ==========================================================================
   VEXONA — Motion
   Small, fast and purposeful. Everything here is disabled for users who
   prefer reduced motion (see bottom of file).
   ========================================================================== */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}
@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}
@keyframes bar-grow {
  from {
    transform: scaleY(0.15);
  }
}

/* Scroll reveal — content stays visible if JS is unavailable ------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  transition-delay: calc(var(--i, 0) * 60ms);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* Safety net: if the page scripts never finished (see theme-init.js), show every section instead of leaving them invisible */
.js.app-failed .reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

.hero__copy > * {
  animation: rise 0.6s var(--ease) both;
}
.hero__copy > *:nth-child(2) {
  animation-delay: 60ms;
}
.hero__copy > *:nth-child(3) {
  animation-delay: 120ms;
}
.hero__copy > *:nth-child(4) {
  animation-delay: 180ms;
}
.flow {
  animation: rise 0.7s var(--ease) 120ms both;
}
.flow__chart i {
  transform-origin: bottom;
  animation: bar-grow 0.8s var(--ease) both;
}
.flow__chart i:nth-child(2) { animation-delay: 60ms; }
.flow__chart i:nth-child(3) { animation-delay: 120ms; }
.flow__chart i:nth-child(4) { animation-delay: 180ms; }
.flow__chart i:nth-child(5) { animation-delay: 240ms; }
.flow__chart i:nth-child(6) { animation-delay: 300ms; }
.flow__chart i:nth-child(7) { animation-delay: 360ms; }

/* Smooth colour change while switching theme (class removed after ~300ms) */
html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease),
    fill var(--dur) var(--ease), stroke var(--dur) var(--ease), box-shadow var(--dur) var(--ease) !important;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
