@keyframes section-arrival {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes artwork-arrival {
  0% {
    opacity: 0.45;
    transform: translateY(14px) scale(0.97);
  }
  55% {
    opacity: 1;
    transform: translateY(-5px) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes workflow-transfer {
  0%,
  100% {
    transform: translateY(0);
  }
  45% {
    transform: translateY(-9px);
  }
}

@media (prefers-reduced-motion: no-preference) {
  [data-reveal='enter'] {
    /* Release the finished transform so clipped text returns to normal painting. */
    animation: section-arrival 300ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
  }
  [data-reveal='enter'] [data-testid='desktop-capture'] {
    animation: artwork-arrival 900ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
  }
  [data-reveal='enter'] [data-testid='platform-card'] [role='img'],
  [data-reveal='enter'] [data-testid='team-artwork'],
  [data-reveal='enter'] [data-testid='local-control-artwork'] {
    animation: artwork-arrival 2200ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
  }
  [data-reveal='enter'] [data-testid='platform-card']:nth-child(2) [role='img'] {
    animation-delay: 120ms;
  }
  [data-reveal='enter'] [data-testid='platform-card']:nth-child(3) [role='img'] {
    animation-delay: 240ms;
  }
  [data-reveal='enter'] [data-testid='platform-card']:nth-child(4) [role='img'] {
    animation-delay: 360ms;
  }
  [data-reveal='enter'] [data-testid='workflow-artwork'] {
    animation: workflow-transfer 1800ms ease-in-out 2;
  }
  [data-reveal='enter']
    [data-testid='workflow-step']:nth-child(3)
    [data-testid='workflow-artwork'] {
    animation-delay: 300ms;
  }
  [data-reveal='enter']
    [data-testid='workflow-step']:nth-child(5)
    [data-testid='workflow-artwork'] {
    animation-delay: 600ms;
  }
  [role='button'],
  a {
    transition:
      opacity 160ms cubic-bezier(0.16, 1, 0.3, 1),
      transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
  }
  [data-testid='platform-card'] [role='img'] {
    transition: transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  [data-testid='platform-card']:hover [role='img'] {
    transform: scale(1.025);
  }
}

[data-reveal='enter']:focus-within {
  animation: none;
}

[role='button']:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--site-accent);
  outline-offset: 4px;
}

a:active {
  opacity: 0.72;
}

/* Reduced motion cancels press feedback, including React Native inline transforms. */
@media (prefers-reduced-motion: reduce) {
  .v5 a,
  .v5 button,
  #final-cta [role='button'],
  .lyre-community a {
    animation: none !important;
    transition: none !important;
  }
  .v5 a:active,
  .v5 button:active,
  #final-cta [role='button']:active {
    transform: none !important;
  }
}
