/* WELLUNEX Hareket: the opening scene and the drifting effect (motion-scene.js). */

.wxm-stage {
  --bh: min(62vh, 520px);
  position: fixed;
  inset: 0;
  z-index: 9000;
  overflow: hidden;
  pointer-events: none;
  animation: wxm-fade-in .35s ease both;
}
.wxm-stage.is-leaving { opacity: 0; transition: opacity .55s ease; }
.wxm-stage--veil { background: radial-gradient(130% 85% at 50% 100%, rgba(255, 251, 245, .62), rgba(255, 251, 245, .34) 55%, rgba(255, 251, 245, .14)); }
.wxm-stage--night { background: linear-gradient(180deg, rgba(9, 12, 32, .9), rgba(26, 20, 44, .82)); }
.wxm-stage--warm { background: radial-gradient(90% 70% at 50% 55%, rgba(74, 22, 20, .78), rgba(28, 10, 12, .9)); }
.wxm-stage--cozy { background: radial-gradient(80% 70% at 50% 60%, rgba(92, 60, 46, .62), rgba(38, 24, 20, .86)); }
.wxm-stage--sky { background: linear-gradient(180deg, rgba(186, 216, 240, .78), rgba(240, 246, 252, .55)); }

.wxm-skip {
  position: absolute;
  right: 16px;
  top: calc(16px + env(safe-area-inset-top, 0px));
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 999px;
  background: rgba(24, 18, 14, .55);
  color: #fff;
  font: 600 .875rem/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: .02em;
  cursor: pointer;
  pointer-events: auto;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.wxm-skip:focus-visible { outline: 2px solid #F3D27C; outline-offset: 2px; }

.wxm-sprite {
  position: absolute;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .18));
}
.wxm-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Gelin arabası: in from the right, a pause, out to the left. */
.wxm-car-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(7vh + env(safe-area-inset-bottom, 0px));
  animation: wxm-drive 5.6s both;
}
.wxm-car {
  position: relative;
  display: block;
  width: min(82vw, 560px);
  margin: 0 auto;
  animation: wxm-bob .32s ease-in-out infinite alternate;
}
@keyframes wxm-drive {
  0% { transform: translateX(105vw); animation-timing-function: cubic-bezier(.15, .7, .3, 1); }
  40% { transform: translateX(0); }
  60% { transform: translateX(0); animation-timing-function: cubic-bezier(.6, 0, .85, .4); }
  100% { transform: translateX(-115vw); }
}
@keyframes wxm-bob {
  from { transform: translateY(0) rotate(0deg); }
  to { transform: translateY(-2px) rotate(-.25deg); }
}

/* Gelin buketi: the bride from behind; the bouquet flies back over her head. */
.wxm-bride {
  left: 50%;
  bottom: 0;
  height: var(--bh);
  width: auto;
  animation: wxm-bride 5.2s ease both;
}
@keyframes wxm-bride {
  0% { opacity: 0; transform: translate(-50%, 40px); }
  14% { opacity: 1; transform: translate(-50%, 0); }
  78% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 12px); }
}
.wxm-bouquet {
  width: calc(var(--bh) * .3);
  height: auto;
  animation: wxm-bouquet 5.2s both;
}
@keyframes wxm-bouquet {
  0%, 29% { left: calc(50% + var(--bh) * .16); top: calc(100% - var(--bh) * .98); opacity: 0; transform: translate(-50%, -50%) scale(.3); }
  31% { opacity: 1; animation-timing-function: cubic-bezier(.2, .6, .4, 1); }
  42% { left: 54%; top: 16%; transform: translate(-50%, -50%) scale(.55) rotate(-200deg); animation-timing-function: cubic-bezier(.5, 0, .7, .6); }
  51% { left: 50%; top: 42%; opacity: 1; transform: translate(-50%, -50%) scale(1.9) rotate(-340deg); }
  56%, 100% { left: 50%; top: 42%; opacity: 0; transform: translate(-50%, -50%) scale(2.3) rotate(-360deg); }
}

/* Güvercinler: up, a gentle float, and away. */
.wxm-doves {
  left: 50%;
  top: 28%;
  width: min(88vw, 620px);
  height: auto;
  animation: wxm-doves 5.2s ease-in-out both;
}
@keyframes wxm-doves {
  0% { opacity: 0; transform: translate(-50%, 55vh) scale(.6); }
  24% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  44% { transform: translate(-50%, -12px) scale(1); }
  64% { transform: translate(-50%, 6px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -65vh) scale(.82); }
}
.wxm-feather {
  position: absolute;
  top: -24px;
  width: 9px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(#fff, #e9e9f0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
  opacity: 0;
  animation: wxm-feather 3.4s linear forwards;
}
@keyframes wxm-feather {
  0% { opacity: 0; transform: translate(0, 0) rotate(0deg); }
  10% { opacity: .95; }
  100% { opacity: 0; transform: translate(var(--sway, 0), 88vh) rotate(240deg); }
}

/* Balonlar: three bunches rise and sway. */
.wxm-balloons {
  top: 100%;
  width: calc(min(40vw, 270px) * var(--s, 1));
  height: auto;
  animation: wxm-balloon 5.4s cubic-bezier(.35, 0, .65, 1) both;
}
@keyframes wxm-balloon {
  0% { transform: translate(-50%, 0) rotate(-3deg); }
  50% { transform: translate(-50%, -85vh) rotate(3deg); }
  100% { transform: translate(-50%, -175vh) rotate(-2deg); }
}

/* Hearts rising from the car, and petals let loose from the bouquet. */
.wxm-rise {
  position: absolute;
  width: 20px;
  height: 18px;
  opacity: 0;
  animation: wxm-rise 2.2s ease-out forwards;
}
.wxm-rise--heart,
.wxm-bit--heart {
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 18'%3E%3Cpath fill='%23E88A9D' d='M10 18 1.5 9.3A5 5 0 0 1 10 2.6a5 5 0 0 1 8.5 6.7z'/%3E%3C/svg%3E");
}
@keyframes wxm-rise {
  0% { opacity: 0; transform: translate(-50%, 0) scale(.6); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -170px) scale(1.2); }
}
.wxm-bit {
  position: absolute;
  width: 13px;
  height: 9px;
  border-radius: 60% 40% 60% 40%;
  opacity: 0;
  animation: wxm-bit var(--d, 2s) cubic-bezier(.2, .7, .4, 1) forwards;
}
@keyframes wxm-bit {
  0% { opacity: 1; transform: translate(-50%, -50%) rotate(0deg); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px))) rotate(var(--rot, 180deg)); }
}

/* Gelin faytonu and the circumcision horse: the car's track, at a walk. */
.wxm-car-track--slow { animation-duration: 6.2s; }
.wxm-car-track--walk { animation-duration: 6.4s; }
.wxm-carriage { width: min(94vw, 660px); animation-duration: .26s; }
.wxm-horse { width: min(80vw, 500px); animation: wxm-walk .42s ease-in-out infinite alternate; }
@keyframes wxm-walk {
  from { transform: translateY(0) rotate(.4deg); }
  to { transform: translateY(-4px) rotate(-.4deg); }
}

/* Halay: in from the left in step, a moment in the middle, out to the right. */
.wxm-halay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(5vh + env(safe-area-inset-bottom, 0px));
  animation: wxm-halay 7.2s both;
}
.wxm-halay__line {
  position: relative;
  display: block;
  width: min(118vw, 820px);
  margin: 0 auto;
  animation: wxm-step .44s ease-in-out infinite alternate;
}
@keyframes wxm-halay {
  0% { transform: translateX(-110vw); animation-timing-function: cubic-bezier(.2, .6, .4, 1); }
  38% { transform: translateX(-6vw); animation-timing-function: linear; }
  62% { transform: translateX(6vw); animation-timing-function: cubic-bezier(.6, 0, .8, .4); }
  100% { transform: translateX(115vw); }
}
@keyframes wxm-step {
  from { transform: translateY(0) rotate(-.5deg); }
  to { transform: translateY(-7px) rotate(.5deg); }
}

/* A picture that comes up, stays and goes (the henna tray, the cake). */
.wxm-box { position: absolute; left: 50%; }
.wxm-box__img { position: relative; display: block; width: 100%; height: auto; }
.wxm-present { animation: wxm-present 6s ease both; }
@keyframes wxm-present {
  0% { opacity: 0; transform: translate(-50%, -38%) scale(.86); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  84% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -56%) scale(1.02); }
}
.wxm-tray { top: 54%; width: min(84vw, 500px); }
.wxm-cake { top: 55%; width: min(64vw, 330px); animation-duration: 5.8s; }
.wxm-flame {
  position: absolute;
  width: 11%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
  pointer-events: none;
  transition: opacity .35s ease;
}
.wxm-flame::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 244, 200, .95) 0 10%, rgba(255, 196, 96, .55) 32%, rgba(255, 150, 50, 0) 70%);
  animation: wxm-flicker .16s ease-in-out infinite alternate;
  animation-delay: inherit;
}
.wxm-tray .wxm-flame { width: 15%; }
.wxm-cake .wxm-flame { width: 16%; }
/* The cake's own flames (its picture has none, so they can be blown out). */
.wxm-cake .wxm-flame::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20%;
  height: 52%;
  border-radius: 50% 50% 50% 50% / 64% 64% 36% 36%;
  background: radial-gradient(ellipse at 50% 72%, #FFFBEA 0 22%, #FFD36E 52%, #F39A2C 100%);
  transform: translate(-50%, -58%);
  animation: wxm-wick .2s ease-in-out infinite alternate;
  animation-delay: inherit;
}
@keyframes wxm-wick {
  from { transform: translate(-50%, -58%) scale(.92, 1) rotate(-3deg); }
  to { transform: translate(-50%, -62%) scale(1, 1.08) rotate(3deg); }
}
.is-out .wxm-flame { opacity: 0; }
@keyframes wxm-flicker {
  from { opacity: .72; transform: scale(.9); }
  to { opacity: 1; transform: translateY(-4%) scale(1.08); }
}
.wxm-smoke {
  position: absolute;
  width: 5px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(rgba(200, 200, 210, 0), rgba(200, 200, 210, .7));
  opacity: 0;
  animation: wxm-smoke 1.6s ease-out forwards;
}
@keyframes wxm-smoke {
  0% { opacity: 0; transform: translate(-50%, -50%) scaleY(.4); }
  25% { opacity: .9; }
  100% { opacity: 0; transform: translate(calc(-50% + 10px), -320%) scaleY(1.6) rotate(12deg); }
}

/* Yüzükler: down on their ribbon, a swing that settles, and up and away. */
.wxm-rings {
  left: 50%;
  top: 0;
  width: min(72vw, 400px);
  height: auto;
  transform-origin: 50% 0;
  animation: wxm-swing 5.8s both;
}
@keyframes wxm-swing {
  0% { opacity: 0; transform: translate(-50%, -100%) rotate(0deg); animation-timing-function: cubic-bezier(.2, .7, .4, 1); }
  20% { opacity: 1; transform: translate(-50%, 14vh) rotate(9deg); animation-timing-function: ease-in-out; }
  31% { transform: translate(-50%, 14vh) rotate(-6deg); animation-timing-function: ease-in-out; }
  42% { transform: translate(-50%, 14vh) rotate(3.5deg); animation-timing-function: ease-in-out; }
  52% { transform: translate(-50%, 14vh) rotate(-1.5deg); animation-timing-function: ease-in-out; }
  60%, 84% { opacity: 1; transform: translate(-50%, 14vh) rotate(0deg); animation-timing-function: ease-in; }
  100% { opacity: 0; transform: translate(-50%, -30vh) rotate(0deg); }
}

/* Leylek: a glide across, right to left, rising and dipping. */
.wxm-stork-path {
  position: absolute;
  top: 16%;
  left: 100%;
  animation: wxm-cross 6s cubic-bezier(.3, .1, .7, .9) both;
}
.wxm-stork {
  position: relative;
  display: block;
  width: min(70vw, 440px);
  animation: wxm-glide 1.5s ease-in-out infinite alternate;
}
@keyframes wxm-cross {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-100vw - 100%)); }
}
@keyframes wxm-glide {
  from { transform: translateY(0) rotate(1.5deg); }
  to { transform: translateY(5vh) rotate(-2deg); }
}

/* Kep atma: thrown up spinning, falling back down. */
.wxm-cap {
  top: 100%;
  width: calc(min(22vw, 116px) * var(--s, 1));
  height: auto;
  animation: wxm-throw 3.8s both;
}
@keyframes wxm-throw {
  0% { opacity: 1; transform: translate(-50%, 0) rotate(0deg); animation-timing-function: cubic-bezier(.15, .6, .35, 1); }
  46% { transform: translate(calc(-50% + var(--dx, 0px) * .5), calc(-1 * var(--h, 70vh))) rotate(calc(var(--spin, 360deg) * .5)); animation-timing-function: cubic-bezier(.55, 0, .85, .45); }
  100% { opacity: 1; transform: translate(calc(-50% + var(--dx, 0px)), 12vh) rotate(var(--spin, 360deg)); }
}

/* Kelebekler: out from the middle, wings beating. */
.wxm-fly {
  position: absolute;
  width: calc(min(15vw, 80px) * var(--s, 1));
  animation: wxm-fly 4.4s cubic-bezier(.35, .15, .65, 1) both;
}
.wxm-fly__wing {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .14));
  animation: wxm-flap .2s ease-in-out infinite alternate;
}
@keyframes wxm-fly {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--turn, 0deg)) scale(.3); }
  12% { opacity: 1; transform: translate(calc(-50% + var(--dx, 0px) * .06), calc(-50% + var(--dy, 0px) * .06)) rotate(var(--turn, 0deg)) scale(1); }
  50% { transform: translate(calc(-50% + var(--dx, 0px) * .45 + 24px), calc(-50% + var(--dy, 0px) * .45)) rotate(calc(var(--turn, 0deg) + 14deg)) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px))) rotate(var(--turn, 0deg)) scale(.9); }
}
@keyframes wxm-flap {
  from { transform: scaleX(1); }
  to { transform: scaleX(.22); }
}

/* Kurdele: the ribbon runs in from both sides; cut, its ends fall away. */
.wxm-ribbon {
  position: absolute;
  top: 46%;
  width: 50.5%;
  height: clamp(28px, 5vh, 44px);
  margin-top: calc(clamp(28px, 5vh, 44px) / -2);
  background: linear-gradient(180deg, #8F0F1C, #D62837 28%, #F0606B 46%, #C41E2E 64%, #7D0D18);
  box-shadow: 0 8px 18px rgba(90, 10, 20, .25);
  animation: wxm-ribbon-in .8s cubic-bezier(.2, .7, .3, 1) both;
}
.wxm-ribbon--l { left: 0; transform-origin: 0 50%; }
.wxm-ribbon--r { right: 0; transform-origin: 100% 50%; }
@keyframes wxm-ribbon-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.is-cut .wxm-ribbon--l { animation: wxm-ribbon-l 1.8s cubic-bezier(.5, 0, .75, .5) forwards; }
.is-cut .wxm-ribbon--r { animation: wxm-ribbon-r 1.8s cubic-bezier(.5, 0, .75, .5) forwards; }
@keyframes wxm-ribbon-l {
  0% { transform: rotate(0deg); }
  60% { opacity: 1; transform: rotate(78deg); }
  100% { opacity: 0; transform: translateY(30vh) rotate(88deg); }
}
@keyframes wxm-ribbon-r {
  0% { transform: rotate(0deg); }
  60% { opacity: 1; transform: rotate(-78deg); }
  100% { opacity: 0; transform: translateY(30vh) rotate(-88deg); }
}
.wxm-bow {
  left: 50%;
  top: 46%;
  width: min(36vw, 190px);
  height: auto;
  transform: translate(-50%, -42%);
  animation: wxm-bow-in .9s .3s cubic-bezier(.3, 1.4, .5, 1) both;
}
@keyframes wxm-bow-in { from { opacity: 0; transform: translate(-50%, -42%) scale(.3); } to { opacity: 1; transform: translate(-50%, -42%) scale(1); } }
.is-cut .wxm-bow { animation: wxm-bow-drop 1.6s cubic-bezier(.5, 0, .8, .5) forwards; }
@keyframes wxm-bow-drop {
  from { opacity: 1; transform: translate(-50%, -42%) rotate(0deg); }
  to { opacity: 0; transform: translate(-50%, 60vh) rotate(-35deg); }
}

/* Glints and confetti let loose by a scene. */
.wxm-bit--glint {
  width: 16px;
  height: 16px;
  border-radius: 0;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23F3D27C' d='M10 0Q10 10 20 10Q10 10 10 20Q10 10 0 10Q10 10 10 0z'/%3E%3C/svg%3E");
}
.wxm-bit--confetti { width: 10px; height: 6px; border-radius: 1px; }
.wxm-bit--heart { width: 16px; height: 14px; border-radius: 0; }

/* Saray kapısı: two carved leaves swing inward on a warm light. */
.wxm-doors {
  position: absolute;
  left: 50%;
  top: 50%;
  height: min(86vh, calc(96vw * 900 / 532), 780px);
  aspect-ratio: 532 / 900;
  perspective: 1100px;
  animation: wxm-doors 5.8s ease both;
}
@keyframes wxm-doors {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.95); }
  10% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  62% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.14); }
}
/* The light spilling out of the doorway, around it. */
.wxm-doors::before {
  content: "";
  position: absolute;
  inset: -25% -70%;
  background: radial-gradient(closest-side, rgba(255, 214, 150, .5), rgba(255, 214, 150, 0));
  opacity: 0;
  animation: wxm-door-light 5.8s ease both;
}
.wxm-doors__light {
  position: absolute;
  inset: 3% 4% 0;
  overflow: hidden;
  border-radius: 50% 50% 0 0 / 18% 18% 0 0;
  background: radial-gradient(65% 55% at 50% 58%, #FFFDF7, #FFEFCB 38%, #F6CF8E 74%, #DDA75C 100%);
  box-shadow: 0 0 40px rgba(255, 222, 160, .55), inset 0 0 30px rgba(190, 130, 60, .35);
  opacity: 0;
  animation: wxm-door-light 5.8s ease both;
}
.wxm-doors__light::before {
  content: "";
  position: absolute;
  inset: -50%;
  background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 255, 255, .26) 0 3deg, rgba(255, 255, 255, 0) 3deg 13deg);
  -webkit-mask: radial-gradient(circle, #000 0 8%, transparent 42%);
  mask: radial-gradient(circle, #000 0 8%, transparent 42%);
  animation: wxm-rays 14s linear infinite;
}
@keyframes wxm-door-light { 0%, 14% { opacity: 0; } 34%, 100% { opacity: 1; } }
@keyframes wxm-rays { to { transform: rotate(360deg); } }
.wxm-leaf {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  transform-style: preserve-3d;
  animation: wxm-leaf-l 5.8s cubic-bezier(.55, 0, .2, 1) both;
}
.wxm-leaf--l { left: 0; transform-origin: 0 50%; }
.wxm-leaf--r { right: 0; transform-origin: 100% 50%; animation-name: wxm-leaf-r; }
.wxm-leaf__img { position: relative; display: block; width: 100%; height: 100%; }
.wxm-leaf--r .wxm-leaf__img { transform: scaleX(-1); }
@keyframes wxm-leaf-l {
  0%, 15% { transform: rotateY(0deg); filter: brightness(1); }
  48%, 100% { transform: rotateY(68deg); filter: brightness(.72); }
}
@keyframes wxm-leaf-r {
  0%, 15% { transform: rotateY(0deg); filter: brightness(1); }
  48%, 100% { transform: rotateY(-68deg); filter: brightness(.72); }
}

/* Kuğular: over a still lake, in from both sides, to meet in a heart. */
.wxm-lake {
  position: absolute;
  left: -10%;
  right: -10%;
  top: 50%;
  height: 40%;
  background: radial-gradient(55% 45% at 50% 35%, rgba(150, 196, 226, .5), rgba(150, 196, 226, 0) 72%);
  animation: wxm-fade-in 1s ease both;
}
.wxm-swans {
  --sw: min(44vw, 300px);
  position: absolute;
  left: 50%;
  top: 62%;
  width: calc(var(--sw) * 1.98);
  height: calc(var(--sw) * .72);
  transform: translate(-50%, -100%);
}
.wxm-swan {
  position: absolute;
  bottom: 0;
  width: var(--sw);
  animation: wxm-swan-l 6.4s cubic-bezier(.25, .6, .3, 1) both;
}
.wxm-swan--l { left: 0; }
.wxm-swan--r { right: 0; animation-name: wxm-swan-r; }
@keyframes wxm-swan-l {
  0% { opacity: 0; transform: translateX(-62vw); }
  12% { opacity: 1; }
  44%, 86% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(0); }
}
@keyframes wxm-swan-r {
  0% { opacity: 0; transform: translateX(62vw); }
  12% { opacity: 1; }
  44%, 86% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(0); }
}
.wxm-swan__bob { position: relative; animation: wxm-float 2.2s ease-in-out infinite alternate; }
.wxm-swan--r .wxm-swan__bob { animation-delay: -1.1s; }
@keyframes wxm-float {
  from { transform: translateY(0) rotate(-.6deg); }
  to { transform: translateY(4px) rotate(.6deg); }
}
.wxm-swan__img { position: relative; display: block; width: 100%; height: auto; filter: none; }
.wxm-swan--r .wxm-swan__img { transform: scaleX(-1); }
.wxm-swan__img--mirror {
  position: absolute;
  left: 0;
  top: 100%;
  opacity: .22;
  transform: scaleY(-1);
  -webkit-mask: linear-gradient(to top, #000, transparent 65%);
  mask: linear-gradient(to top, #000, transparent 65%);
}
.wxm-swan--r .wxm-swan__img--mirror { transform: scale(-1, -1); }
.wxm-ripple {
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 90%;
  height: 18px;
  border: 1.5px solid rgba(255, 255, 255, .8);
  border-radius: 50%;
  opacity: 0;
  animation: wxm-ripple 2.4s ease-out infinite;
}
@keyframes wxm-ripple {
  0% { opacity: 0; transform: translateX(-50%) scale(.5); }
  20% { opacity: .8; }
  100% { opacity: 0; transform: translateX(-50%) scale(1.5); }
}
.wxm-swans__heart {
  position: absolute;
  left: 50%;
  top: 34%;
  width: calc(var(--sw) * .2);
  aspect-ratio: 20 / 18;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 18'%3E%3Cpath fill='%23F2A7B5' d='M10 18 1.5 9.3A5 5 0 0 1 10 2.6a5 5 0 0 1 8.5 6.7z'/%3E%3C/svg%3E");
  filter: drop-shadow(0 0 10px rgba(242, 167, 181, .9));
  opacity: 0;
  animation: wxm-heart-glow 6.4s ease both;
}
@keyframes wxm-heart-glow {
  0%, 44% { opacity: 0; transform: translate(-50%, -50%) scale(.3); }
  52% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
  58%, 84% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -90%) scale(.9); }
}

/* Çiçek bahçesi: stems rise from the foot of the screen and sway. */
.wxm-stem {
  position: absolute;
  bottom: -3vh;
  height: var(--h, 45vh);
  transform-origin: 50% 100%;
  animation: wxm-grow 6.8s both;
}
.wxm-stem__img {
  position: relative;
  display: block;
  height: 100%;
  width: auto;
  transform-origin: 50% 100%;
  animation: wxm-sway 3.2s ease-in-out infinite alternate;
}
@keyframes wxm-grow {
  0% { opacity: 0; transform: translate(-50%, 100%) rotate(0deg) scale(.8); animation-timing-function: cubic-bezier(.25, 1.25, .45, 1); }
  8% { opacity: 1; }
  30%, 84% { opacity: 1; transform: translate(-50%, 0) rotate(var(--tilt, 0deg)) scale(1); animation-timing-function: cubic-bezier(.5, 0, .8, .5); }
  100% { opacity: 0; transform: translate(-50%, 30%) rotate(var(--tilt, 0deg)) scale(1); }
}
@keyframes wxm-sway {
  from { transform: rotate(-2deg); }
  to { transform: rotate(2deg); }
}
.wxm-flutter {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 20;
  width: min(13vw, 64px);
  opacity: 0;
  animation: wxm-flutter-in 4.6s ease-in-out both;
}
.wxm-flutter--out { animation-name: wxm-flutter-out; }
@keyframes wxm-flutter-in {
  0% { opacity: 0; transform: translate(-10vw, 70vh) rotate(60deg); }
  10% { opacity: 1; }
  35% { transform: translate(28vw, 46vh) rotate(40deg); }
  60% { transform: translate(52vw, 56vh) rotate(80deg); }
  90% { opacity: 1; }
  100% { opacity: 0; transform: translate(105vw, 18vh) rotate(50deg); }
}
@keyframes wxm-flutter-out {
  0% { opacity: 0; transform: translate(105vw, 64vh) rotate(-60deg); }
  10% { opacity: 1; }
  40% { transform: translate(70vw, 40vh) rotate(-30deg); }
  65% { transform: translate(44vw, 50vh) rotate(-75deg); }
  90% { opacity: 1; }
  100% { opacity: 0; transform: translate(-12vw, 14vh) rotate(-40deg); }
}

/* Takı: the ribbon draws itself; coins fly in spinning and hang from it. */
.wxm-sash { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wxm-sash path { fill: none; stroke-linecap: round; transition: stroke-dashoffset 1.1s cubic-bezier(.45, 0, .2, 1); }
.wxm-sash__band { stroke: #B3182A; filter: drop-shadow(0 6px 10px rgba(90, 10, 20, .28)); }
.wxm-sash__shine { stroke: rgba(255, 150, 160, .55); }
.wxm-coin {
  position: absolute;
  width: min(12vw, 62px);
  animation: wxm-coin-in .95s cubic-bezier(.3, .6, .4, 1) both;
}
@keyframes wxm-coin-in {
  0% { opacity: 0; transform: translate(calc(-50% + var(--fx, 0px)), calc(-8% + var(--fy, -60vh))) rotate(-30deg); }
  15% { opacity: 1; }
  80% { transform: translate(-50%, -8%) rotate(4deg); }
  90% { transform: translate(-50%, -16%) rotate(-2deg); }
  100% { opacity: 1; transform: translate(-50%, -8%) rotate(0deg); }
}
.wxm-coin__swing { transform-origin: 50% 3%; animation: wxm-pendulum 1.8s ease-in-out both; }
@keyframes wxm-pendulum {
  0%, 100% { transform: rotate(0deg); }
  18% { transform: rotate(11deg); }
  42% { transform: rotate(-7deg); }
  66% { transform: rotate(3deg); }
  84% { transform: rotate(-1deg); }
}
.wxm-coin__img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 6px rgba(120, 80, 10, .3));
  animation: wxm-coin-flip .3s linear 3 both;
}
@keyframes wxm-coin-flip {
  0%, 100% { transform: scaleX(1); }
  50% { transform: scaleX(.1); }
}

/* Kız isteme kahvesi: the tray, its steam drawn above it. */
.wxm-coffee { top: 64%; width: min(86vw, 500px); animation-duration: 6.4s; }

/* Davul zurna: the halay's walk; rings on the beat, notes from the bell. */
.wxm-band { animation-duration: 7.2s; }
.wxm-band .wxm-band__img {
  position: relative;
  display: block;
  width: min(66vw, 380px);
  margin: 0 auto;
  animation: wxm-step .47s ease-in-out infinite alternate;
}
.wxm-beat {
  position: absolute;
  width: 70px;
  height: 70px;
  border: 2px solid rgba(233, 185, 73, .85);
  border-radius: 50%;
  opacity: 0;
  animation: wxm-beat .9s ease-out forwards;
}
@keyframes wxm-beat {
  0% { opacity: .9; transform: translate(-50%, -50%) scale(.4); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(2.6); }
}
.wxm-note {
  position: absolute;
  width: 26px;
  height: 30px;
  background: center / contain no-repeat;
  opacity: 0;
  animation: wxm-note 2.2s ease-out forwards;
}
.wxm-note--a { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 30'%3E%3Cpath fill='%23C9962E' d='M10 2h3v19a5 5 0 1 1-3-4.6zM13 2c4 2 9 4 9 10-2-3-5-4-9-4z'/%3E%3C/svg%3E"); }
.wxm-note--b { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 30'%3E%3Cpath fill='%23B3182A' d='M7 6 23 2v19a4.5 4.5 0 1 1-3-4.2V8L10 10.6V24a4.5 4.5 0 1 1-3-4.2z'/%3E%3C/svg%3E"); }
@keyframes wxm-note {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.5) rotate(-10deg); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--sway, 0px)), -170px) scale(1.1) rotate(16deg); }
}

/* Gökkuşağı: the bands draw themselves; clouds drift in to its feet. */
.wxm-rainbow { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .8; }
.wxm-rainbow path { fill: none; stroke-linecap: butt; transition: stroke-dashoffset 1.7s cubic-bezier(.45, 0, .25, 1); }
.wxm-cloud {
  height: auto;
  filter: none;
  animation: wxm-cloud 6.2s cubic-bezier(.25, .7, .35, 1) both;
}
@keyframes wxm-cloud {
  0% { opacity: 0; transform: translate(calc(-50% + var(--from, 0vw)), -60%); }
  25% { opacity: 1; transform: translate(-50%, -60%); }
  88% { opacity: 1; transform: translate(calc(-50% + 12px), -60%); }
  100% { opacity: 0; transform: translate(calc(-50% + 16px), -60%); }
}

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

/* The drifting effect sits over the page, never in the way of a tap. */
.wxm-ambient {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 30;
  pointer-events: none;
}

/* For a device that asks for less motion: the picture alone, fading. */
.wxm-still {
  left: 50%;
  top: 50%;
  width: min(70vw, 420px);
  max-height: 60vh;
  height: auto;
  object-fit: contain;
  transform: translate(-50%, -50%);
  animation: wxm-still 2.6s ease both;
}
@keyframes wxm-still {
  0%, 100% { opacity: 0; }
  25%, 75% { opacity: 1; }
}
@media print {
  .wxm-stage, .wxm-ambient { display: none !important; }
}
