/* One motion language for the whole invite.
   Entrances rise and fade together (900ms, --ease), staggered with --d.
   Sprigs share one 18s sway, phased with --sway, like a single breeze.
   Hover only changes colour, so it never fights an entrance. */

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

@keyframes sway {
  from { transform: rotate(-2.4deg) translateY(0); }
  to { transform: rotate(2.4deg) translateY(-16px); }
}

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

@keyframes fade-soft {
  from { opacity: 0; }
  to { opacity: 0.92; }
}

@keyframes fade-mark {
  from { opacity: 0; }
  to { opacity: 0.3; }
}

@keyframes fade-ghost {
  from { opacity: 0; }
  to { opacity: 0.14; }
}

.js .reveal {
  opacity: 0;
  transform: translateY(32px);
}

.js .reveal.is-in {
  animation: rise var(--enter) var(--ease) forwards;
  animation-delay: var(--d, 0ms);
}

.sway {
  transform-origin: 50% 78%;
  animation: sway var(--breeze) ease-in-out infinite alternate;
  animation-delay: var(--sway, 0s);
}

.shot-garland .sway { transform-origin: 50% 55%; }

.js .album.reveal.is-in { animation: none; }

.js .album.reveal.is-in.is-ready {
  animation: rise var(--enter) var(--ease) forwards;
  animation-delay: var(--d, 0ms);
}

.appear {
  opacity: 0;
  animation-duration: 1.6s;
  animation-timing-function: var(--ease);
  animation-fill-mode: forwards;
  animation-delay: var(--d, 0ms);
  animation-play-state: paused;
}

.appear-in { animation-name: fade-in; }
.appear-soft { animation-name: fade-soft; }
.appear-mark { animation-name: fade-mark; }
.appear-ghost { animation-name: fade-ghost; }

.appear.is-in,
.hero .appear { animation-play-state: running; }

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

  .js .reveal,
  .js .reveal.is-in,
  .js .album.reveal.is-in.is-ready {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .sway { animation: none; }

  .nav-links,
  .nav-toggle-icon::before,
  .nav-toggle-icon::after { transition: none; }

  .appear { animation: none; }
  .appear-in { opacity: 1; }
  .appear-soft { opacity: 0.92; }
  .appear-mark { opacity: 0.3; }
  .appear-ghost { opacity: 0.14; }
}
