/* frame_select motion layer
   Scroll motion is written to CSS custom properties (--fx-*) and applied through the
   individual `translate` / `scale` properties. That keeps it separate from the inline
   `transform` the page already uses for hover states, so the two never fight. */

[data-fx] {
  translate: var(--fx-x, 0px) var(--fx-y, 0px);
  scale: var(--fx-s, 1);
}
[data-fx-will] { will-change: translate, scale; }

/* Match GSAP's starting pose on the very first paint, before its scripts load. */
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
  html[data-hero-intro="pending"] .hero > div:first-child > * {
    translate: 0 var(--fx-y, 28px);
  }
  html[data-hero-intro="pending"] #demo > div {
    translate: 0 var(--fx-y, 48px);
    scale: var(--fx-s, .97);
    will-change: translate, scale;
  }
}

/* Inner-image parallax: the image is slightly larger than its frame and drifts inside it */
[data-fx-inner] {
  translate: 0 var(--fx-y, 0px);
  scale: var(--fx-s, 1.05);
  transform-origin: 50% 50%;
}

/* Fixed header bar hides on scroll down, returns on scroll up */
[data-fx-bar] {
  transition: translate .35s cubic-bezier(.2, .7, .2, 1);
  translate: 0 var(--fx-bar, 0%);
}

/* Play button: a soft ring pulses out from the dot; the dot grows on hover */
[data-fx-pulse] {
  position: relative;
  transition: scale .3s cubic-bezier(.2, .7, .2, 1);
}
[data-fx-pulse]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--color-blue, #55A4FF);
  animation: fx-pulse 2.4s cubic-bezier(.2, .7, .2, 1) infinite;
  pointer-events: none;
}
button:hover > [data-fx-pulse] { scale: 1.08; }
button:active > [data-fx-pulse] { scale: .96; }
@keyframes fx-pulse {
  0%   { opacity: .7; scale: 1; }
  70%  { opacity: 0;  scale: 1.6; }
  100% { opacity: 0;  scale: 1.6; }
}

/* Buy buttons: a small press */
a[data-fx-cta]:active { scale: .98; }

/* Arrows and play glyphs inside links nudge forward on hover */
[data-fx-arrow] {
  display: inline-block;
  transition: translate .25s cubic-bezier(.2, .7, .2, 1);
}
a:hover > [data-fx-arrow],
a:focus-visible > [data-fx-arrow] { translate: 4px 0; }

/* Feature cards: the icon lifts and the frame-step tick slides in */
[data-fx-card] svg { transition: translate .3s cubic-bezier(.2, .7, .2, 1), rotate .3s cubic-bezier(.2, .7, .2, 1); }
[data-fx-card]:hover svg { translate: 0 -4px; rotate: -6deg; }

/* Audience list: the role name steps right on hover, like scrubbing a playhead */
[data-fx-role] > span:first-child {
  display: inline-block;
  transition: translate .3s cubic-bezier(.2, .7, .2, 1), color .3s ease;
}
[data-fx-role]:hover > span:first-child { translate: 10px 0; color: var(--color-blue, #55A4FF); }

/* Step screenshots: a gentle zoom on hover */
[data-fx-stepframe] img { transition: scale .6s cubic-bezier(.2, .7, .2, 1); }
li:hover > [data-fx-stepframe] img { scale: 1.16; }

/* Testimonial: lines brighten top to bottom as it scrolls through.
   At rest the dimmed text still reads at 55% white. */
[data-fx-quote] {
  background-image: linear-gradient(to bottom,
    #FFFFFF calc(var(--fx-p, 130%) - 12%),
    rgba(255, 255, 255, .55) calc(var(--fx-p, 130%) + 12%));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  [data-fx], [data-fx-inner] { translate: none !important; scale: none !important; }
  [data-fx-pulse]::after { animation: none; display: none; }
  [data-fx-quote] { background-image: none; color: inherit; }
}
