/* 动效：悬浮、揭示、切换。 */

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes fade-swap {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 780ms var(--ease-out),
    transform 780ms var(--ease-out);
  transition-delay: calc(var(--reveal-delay, 0) * 80ms);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

[data-split] .char {
  display: inline-block;
  opacity: 0;
  animation: rise 760ms var(--ease-out) forwards;
  animation-delay: calc(var(--i) * 42ms + 80ms);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  [data-split] .char {
    opacity: 1;
  }

  .hero-tile {
    animation: none;
  }
}
