/* Motion for the line-art event icons. Self-contained.
   Animations are paused until the parent .event gets .in-view,
   and fully disabled under prefers-reduced-motion. */

.art svg { overflow: hidden; }

.art [class^="wm-"],
.art [class*=" wm-"] {
  transform-box: fill-box;
  transform-origin: center;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-play-state: paused;
  will-change: auto;
}
/* Elements that set their own pivot in user units (inline transform-origin) */
.art .wm-sun, .art .wm-sunglow, .art .wm-leaf, .art .wm-palm, .art .wm-rays { transform-box: view-box; }

.event.in-view .art [class^="wm-"],
.event.in-view .art [class*=" wm-"] { animation-play-state: running; }

/* ---------- shared ---------- */
@keyframes wm-ripple {          /* water rows drift and breathe */
  0%, 100% { transform: translateX(0);    opacity: 1; }
  50%      { transform: translateX(4.5px); opacity: .35; }
}
@keyframes wm-glint {
  0%, 100% { opacity: 1; }
  45%      { opacity: .05; }
}
@keyframes wm-flap {            /* gentle wingbeat */
  0%, 100% { transform: scaleY(1); }
  50%      { transform: scaleY(.55); }
}

/* ---------- bridge (Haldi) ---------- */
@keyframes wm-boat {
  0%, 100% { transform: translateX(-24px); }
  50%      { transform: translateX(14px); }
}
@keyframes wm-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25%      { transform: translateY(-1.6px) rotate(-3deg); }
  75%      { transform: translateY(1px) rotate(2.5deg); }
}
@keyframes wm-wake {
  0%, 100% { opacity: .9; transform: scaleX(1); }
  50%      { opacity: .2; transform: scaleX(.6); }
}
@keyframes wm-gull-path {
  0%   { transform: translate(-20px, 4px); opacity: 0; }
  8%   { opacity: 1; }
  50%  { transform: translate(100px, -3px); }
  92%  { opacity: 1; }
  100% { transform: translate(220px, 2px); opacity: 0; }
}
.art .wm-boat      { animation-name: wm-boat; animation-duration: 16s; }
.art .wm-bob       { animation-name: wm-bob; animation-duration: 4.2s; transform-origin: 50% 100%; }
.art .wm-wake      { animation-name: wm-wake; animation-duration: 3s; }
.art .wm-ripple    { animation-name: wm-ripple; animation-duration: 6s; }
.art .wm-gull-path { animation-name: wm-gull-path; animation-duration: 15s; animation-timing-function: linear; }
.art .wm-gull-flap { animation-name: wm-flap; animation-duration: 1.6s; }

/* ---------- nyc (Sangeet) ---------- */
@keyframes wm-twinkle {
  0%, 100% { opacity: 1;   transform: scale(1) rotate(0deg); }
  50%      { opacity: .08; transform: scale(.25) rotate(45deg); }
  75%      { opacity: 1;   transform: scale(1.35) rotate(60deg); }
}
@keyframes wm-dot {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}
@keyframes wm-flicker {          /* window goes dark for a while, then relights */
  0%, 38%  { opacity: 1; }
  44%, 78% { opacity: .15; }
  84%,100% { opacity: 1; }
}
@keyframes wm-moon {
  0%, 100% { filter: drop-shadow(0 0 .5px currentColor); opacity: .85; }
  50%      { filter: drop-shadow(0 0 5px currentColor); opacity: 1; }
}
.art .wm-twinkle  { animation-name: wm-twinkle; animation-duration: 2.6s; }
.art .wm-dot      { animation-name: wm-dot; animation-duration: 1.8s; }
.art .wm-flicker  { animation-name: wm-flicker; animation-duration: 11s; animation-timing-function: steps(1, end); }
.art .wm-moon     { animation-name: wm-moon; animation-duration: 4.5s; }
.art .wm-moonpath { animation-name: wm-ripple; animation-duration: 3s; }
.art .wm-glint    { animation-name: wm-glint; animation-duration: 2.2s; }

/* ---------- vineyard (Welcome Party) ---------- */
@keyframes wm-sun {
  0%, 100% { transform: scale(1);    opacity: .85; }
  50%      { transform: scale(1.07); opacity: 1; }
}
@keyframes wm-sunglow {
  0%, 100% { transform: scale(.9);  opacity: .5; }
  50%      { transform: scale(1.35); opacity: 1; }
}
@keyframes wm-birds {
  0%   { transform: translate(-150px, 8px); opacity: 0; }
  10%  { opacity: 1; }
  50%  { transform: translate(-40px, -2px); }
  90%  { opacity: 1; }
  100% { transform: translate(70px, 4px); opacity: 0; }
}
@keyframes wm-leaf {
  0%, 100% { transform: rotate(-2.5deg); }
  50%      { transform: rotate(2.5deg); }
}
@keyframes wm-rowshim {
  0%, 100% { opacity: 1; }
  50%      { opacity: .25; }
}
.art .wm-sun     { animation-name: wm-sun; animation-duration: 6s; }
.art .wm-sunglow { animation-name: wm-sunglow; animation-duration: 6s; }
.art .wm-birds   { animation-name: wm-birds; animation-duration: 22s; animation-delay: -9s; animation-timing-function: linear; }
.art .wm-flap    { animation-name: wm-flap; animation-duration: 1.5s; }
.art .wm-leaf    { animation-name: wm-leaf; animation-duration: 5s; }
.art .wm-rowshim { animation-name: wm-rowshim; animation-duration: 5.5s; }

/* ---------- island (Reception) ---------- */
@keyframes wm-palm {
  0%, 100% { transform: rotate(-3deg); }
  50%      { transform: rotate(3deg); }
}
@keyframes wm-wave {
  0%, 100% { transform: translateX(-4px); opacity: 1; }
  50%      { transform: translateX(4px);  opacity: .4; }
}
@keyframes wm-glide {
  0%, 100% { transform: translate(0, 0); }
  33%      { transform: translate(14px, -5px); }
  66%      { transform: translate(-8px, 3px); }
}
@keyframes wm-rays {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.art .wm-palm  { animation-name: wm-palm; animation-duration: 12s; }
.art .wm-wave  { animation-name: wm-wave; animation-duration: 14s; }
.art .wm-glide { animation-name: wm-glide; animation-duration: 24s; }
.art .wm-rays  { animation-name: wm-rays; animation-duration: 90s; animation-timing-function: linear; }

/* ---------- peacocks (Wedding) ----------
   Vector rig from icons.js (window.WeddingIcons.peacocks), animated entirely by motion.js. */
.art[data-icon="peacocks"] svg { overflow: hidden; }

/* no hover bounce on the schedule art (overrides the page's .event:hover .art svg rule) */
.event:hover .art svg, .event:hover .art img { transform: none !important; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .art [class^="wm-"],
  .art [class*=" wm-"] {
    animation: none !important;
    transform: none !important;
    filter: none !important;
  }
}
