/*
 * Shared motion for the website and the Mini App.
 * Rules: motion explains or confirms something, it is short (under 700 ms), nothing depends on an
 * animation finishing to be readable, and all of it is removed for people who ask for reduced motion.
 */
:root {
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-soft: cubic-bezier(0.3, 0.7, 0.2, 1);
}

@keyframes ff-draw {
  from {
    stroke-dashoffset: 420;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes ff-fade {
  from {
    opacity: 0;
  }
}
@keyframes ff-pop {
  0% {
    transform: scale(0.4);
    opacity: 0;
  }
  65% {
    transform: scale(1.14);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

/* The specification diagram is drawn like a measured drawing: frame, rules, then labels and the head zone. */
.ff-diagram .fd-frame {
  stroke-dasharray: 1500;
  animation: ff-draw 1.1s var(--ease-soft) backwards;
}
.ff-diagram .fd-line,
.ff-diagram .fd-dim line {
  stroke-dasharray: 420;
  animation: ff-draw 0.8s 0.25s var(--ease-soft) backwards;
}
.ff-diagram .fd-zone {
  animation: ff-fade 0.6s 0.7s var(--ease-soft) backwards;
}
.ff-diagram .fd-eye,
.ff-diagram .fd-text,
.ff-diagram .fd-small {
  animation: ff-fade 0.5s 0.85s var(--ease-soft) backwards;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
