/* Small touches of motion, loaded last. They use `scale`, `rotate` and `translate`, which are
   separate from `transform`, so nothing here can disturb an element's existing movement. */

/* Controls give softly under the finger. */
.vc__btn, .pa, .ev-barrel__btn { transition: background-color .3s ease, border-color .3s ease, scale .18s ease; }
.j-nav__link { transition: color .5s ease, scale .18s ease; }
:is(.vc__btn, .pa, .ev-barrel__btn, .j-nav__link):is(:active, .is-pressed) { scale: .95; }

/* Sound's icon lifts a little and Replay's turns back, while pressed. */
.vc__icon { transition: scale .18s ease, rotate .3s ease; }
.vc__btn--sound:is(:active, .is-pressed) .vc__icon { scale: 1.18; }
.vc__btn--replay:is(:active, .is-pressed) .vc__icon { rotate: -50deg; }

/* The lines beside the Family Details lotus draw outward from it. */
.j-families__lotus > path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease-io) .25s; }
.j-families__head.is-visible .j-families__lotus > path { stroke-dashoffset: 0; }

/* Schedules arrive a line at a time once reached: softly at the Sangeet, slowly at the wedding. */
.ev--sangeet { --line-time: .8s; --line-gap: .22s; --line-wait: .5s; }
.ev--wedding { --line-time: 1.4s; --line-gap: .55s; --line-wait: .9s; }
.ev--sangeet .ev-card--detail .ev-card__list li, .ev--wedding .ev-card--detail .ev-card__list li { opacity: 0; }
.ev.is-info .ev-card--detail .ev-card__list.is-in li { animation: mm-line var(--line-time) ease calc(var(--line-wait) + var(--n, 0) * var(--line-gap)) both; }
@keyframes mm-line { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0; } }

/* The wedding's divider: gold lines draw slowly out from its diamond. */
.ev--wedding .ev__rule { display: flex; align-items: center; justify-content: center; gap: 10px; }
.ev--wedding .ev__rule::before, .ev--wedding .ev__rule::after { content: ""; width: clamp(48px, 14vw, 96px); height: 1px; background: var(--ev-accent); transform: scaleX(0); }
.ev--wedding .ev__rule::before { transform-origin: 100% 50%; }
.ev--wedding .ev__rule::after { transform-origin: 0 50%; }
.ev--wedding.is-info .ev__rule::before, .ev--wedding.is-info .ev__rule::after { animation: mm-draw 2.2s cubic-bezier(.65, 0, .35, 1) .7s both; }
@keyframes mm-draw { to { transform: scaleX(1); } }

@media (max-width: 720px) {
  .j-nav__link, .j-nav__link:hover { transition: background-color .4s ease, border-color .4s ease, color .4s ease, scale .18s ease; }
}

@media (prefers-reduced-motion: reduce) {
  .vc__btn, .pa, .ev-barrel__btn, .j-nav__link, .j-nav__link:hover, .vc__icon { transition: none; }
  :is(.vc__btn, .pa, .ev-barrel__btn, .j-nav__link):is(:active, .is-pressed), .vc__btn--sound:is(:active, .is-pressed) .vc__icon { scale: none; }
  .vc__btn--replay:is(:active, .is-pressed) .vc__icon { rotate: none; }
  .j-families__lotus > path { stroke-dashoffset: 0; transition: none; }
  .ev--sangeet .ev-card--detail .ev-card__list li, .ev--wedding .ev-card--detail .ev-card__list li { opacity: 1; }
  .ev.is-info .ev-card--detail .ev-card__list.is-in li { animation: none; }
  .ev--wedding .ev__rule::before, .ev--wedding .ev__rule::after { transform: none; animation: none !important; }
}
