/* Muted, original edge artwork. The invitation stylesheet owns the page palette. */
.ambient-scene {
  position: fixed;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  contain: paint;
  pointer-events: none;
  user-select: none;
}

.ambient-scene *,
.ambient-scene *::before,
.ambient-scene *::after {
  pointer-events: none;
}

.ambient-layer,
.ambient-particles {
  position: absolute;
  inset: 0;
}

.ambient-layer {
  opacity: 0;
  transition: opacity 1.4s ease;
}

.ambient-scene .ambient-layer * {
  animation-play-state: paused;
}

[data-mood="day"] .ambient-day,
[data-mood="evening"] .ambient-evening,
[data-mood="night"] .ambient-night {
  opacity: 1;
}

[data-mood="day"] .ambient-day *,
[data-mood="evening"] .ambient-evening *,
[data-mood="night"] .ambient-night * {
  animation-play-state: running;
}

.ambient-bird {
  position: absolute;
  display: block;
  width: clamp(27px, 3.4vw, 47px);
  color: var(--ambient-bird-color, #35513b);
  opacity: 0.38;
  animation: ambient-bird-drift 23s ease-in-out infinite;
}

.ambient-bird svg,
.ambient-leaf svg {
  display: block;
  width: 100%;
  height: auto;
  fill: currentColor;
}

.ambient-bird--1 { top: 13%; left: 3%; }
.ambient-bird--2 { top: 9%; right: 4%; width: clamp(24px, 2.8vw, 40px); animation-duration: 29s; animation-delay: -13s; }
.ambient-bird--2 svg { transform: scaleX(-1); }
.ambient-bird--3 { top: 28%; right: 1.5%; width: clamp(21px, 2.4vw, 34px); animation-duration: 26s; animation-delay: -7s; opacity: 0.27; }

.ambient-leaf {
  position: absolute;
  top: -9%;
  display: block;
  width: clamp(13px, 1.5vw, 20px);
  color: var(--ambient-leaf-color, #a65e3d);
  opacity: 0;
  animation: ambient-leaf-fall 27s linear infinite;
}

.ambient-leaf-vein {
  fill: none;
  stroke: #fff4df;
  stroke-width: 0.9;
  stroke-linecap: round;
  opacity: 0.5;
}

.ambient-leaf--1 { left: 2%; --ambient-still-top: 21%; animation-delay: -5s; }
.ambient-leaf--2 { right: 2%; --ambient-still-top: 39%; animation-delay: -19s; animation-duration: 34s; }
.ambient-leaf--3 { left: 6%; --ambient-still-top: 67%; animation-delay: -25s; animation-duration: 38s; color: #6f7848; }
.ambient-leaf--4 { right: 6%; --ambient-still-top: 80%; animation-delay: -11s; animation-duration: 31s; color: #b28b50; }

.ambient-star {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--ambient-star-color, #c9ad76);
  opacity: 0.24;
  animation: ambient-star-breathe 9s ease-in-out infinite;
}

.ambient-star--1 { top: 5%; left: 7%; }
.ambient-star--2 { top: 16%; left: 3%; animation-delay: -3s; }
.ambient-star--3 { top: 31%; left: 8%; animation-delay: -6s; }
.ambient-star--4 { top: 48%; left: 2%; animation-delay: -2s; }
.ambient-star--5 { top: 67%; left: 6%; animation-delay: -5s; }
.ambient-star--6 { top: 86%; left: 3%; animation-delay: -7s; }
.ambient-star--7 { top: 95%; left: 10%; animation-delay: -4s; }
.ambient-star--8 { top: 6%; right: 6%; animation-delay: -1s; }
.ambient-star--9 { top: 21%; right: 2%; animation-delay: -5s; }
.ambient-star--10 { top: 36%; right: 7%; animation-delay: -7s; }
.ambient-star--11 { top: 51%; right: 3%; animation-delay: -3s; }
.ambient-star--12 { top: 69%; right: 8%; animation-delay: -6s; }
.ambient-star--13 { top: 83%; right: 3%; animation-delay: -2s; }
.ambient-star--14 { top: 96%; right: 9%; animation-delay: -4s; }

.ambient-shooting-star {
  position: absolute;
  top: 9%;
  right: 5%;
  width: clamp(25px, 4vw, 52px);
  height: 1px;
  border-radius: 100%;
  background: linear-gradient(90deg, transparent, #c9ad76);
  opacity: 0;
  transform: translate3d(0, -15px, 0) rotate(-34deg);
  animation: ambient-shooting-star 32s linear infinite;
}

.ambient-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--ambient-particle-color, #b18b52);
  opacity: 0.13;
  animation: ambient-particle-float 17s ease-in-out infinite;
}

.ambient-particle--1 { top: 20%; left: 1%; }
.ambient-particle--2 { top: 43%; left: 5%; animation-delay: -8s; }
.ambient-particle--3 { top: 78%; left: 2%; animation-delay: -4s; }
.ambient-particle--4 { top: 17%; right: 1%; animation-delay: -12s; }
.ambient-particle--5 { top: 58%; right: 4%; animation-delay: -2s; }
.ambient-particle--6 { top: 91%; right: 2%; animation-delay: -6s; }

@keyframes ambient-bird-drift {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-3deg); }
  50% { transform: translate3d(10px, -9px, 0) rotate(4deg); }
}

@keyframes ambient-leaf-fall {
  0% { transform: translate3d(0, -8vh, 0) rotate(-25deg); opacity: 0; }
  9% { opacity: 0.29; }
  38% { transform: translate3d(12px, 35vh, 0) rotate(55deg); }
  70% { transform: translate3d(-5px, 76vh, 0) rotate(130deg); opacity: 0.29; }
  95%, 100% { transform: translate3d(8px, 119vh, 0) rotate(200deg); opacity: 0; }
}

@keyframes ambient-star-breathe {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.34; }
}

@keyframes ambient-shooting-star {
  0%, 90% { opacity: 0; transform: translate3d(0, -15px, 0) rotate(-34deg); }
  91% { opacity: 0.4; }
  94% { opacity: 0; transform: translate3d(-22px, 20px, 0) rotate(-34deg); }
  100% { opacity: 0; transform: translate3d(-22px, 20px, 0) rotate(-34deg); }
}

@keyframes ambient-particle-float {
  0%, 100% { transform: translate3d(0, 0, 0); opacity: 0.09; }
  50% { transform: translate3d(5px, -15px, 0); opacity: 0.2; }
}

.page-hidden .ambient-scene *,
[data-ambient-paused] .ambient-scene * {
  animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
  .ambient-scene *,
  .ambient-scene *::before,
  .ambient-scene *::after {
    animation: none !important;
    transition: none !important;
  }

  .ambient-leaf { top: var(--ambient-still-top, 25%); opacity: 0.23; }
  .ambient-shooting-star { display: none; }
}
