/* Noticeable but calm background motion for Little Outings Australia.
   Only applies when the html element has class "motion".
   To go back to the exact previous look, remove class="motion" from the
   <html> tag (motion.css can stay; the extra layer stays hidden).
   To drop the files altogether, also remove this stylesheet link, the
   .hero-motion block in index.html, and the .hero-motion rule in styles.css.
   Or restore git tag pre-motion, or publish LOA-site-pre-motion.zip. */

html.motion .hero-motion {
  display: block;
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

/* Softly breathing sun in the upper right, 8s so a short look is enough. */
html.motion .motion-sun {
  position: absolute;
  top: 0;
  right: 0;
  width: min(58vw, 340px);
  height: min(58vw, 340px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 197, 66, 0.55) 0%, rgba(244, 197, 66, 0.22) 40%, rgba(244, 197, 66, 0) 72%);
  animation: sun-breathe 8s ease-in-out infinite;
  will-change: transform, opacity;
}

/* Illustrated clouds. Farther ones are smaller, lighter, and drift less. */
html.motion .motion-cloud {
  position: absolute;
  display: block;
  height: auto;
  overflow: visible;
  pointer-events: none;
  will-change: transform;
}
html.motion .cloud-d {
  top: 2%;
  left: 22%;
  width: min(18vw, 92px);
  opacity: 0.62;
  z-index: 0;
  animation: cloud-drift-d 22s ease-in-out infinite;
}
html.motion .cloud-c {
  top: 1%;
  right: 20%;
  width: min(16vw, 78px);
  opacity: 0.55;
  z-index: 0;
  animation: cloud-drift-c 24s ease-in-out infinite;
}
html.motion .cloud-a {
  top: 5%;
  left: 1%;
  width: min(36vw, 220px);
  z-index: 1;
  animation: cloud-drift-a 16s ease-in-out infinite;
}
html.motion .cloud-b {
  top: 8%;
  right: 2%;
  width: min(26vw, 156px);
  z-index: 1;
  animation: cloud-drift-b 18s ease-in-out infinite;
}

html.motion .motion-leaf {
  position: absolute;
  opacity: 0.9;
  will-change: transform;
  filter: drop-shadow(0 1px 1px rgba(47, 111, 106, 0.2));
}
html.motion .leaf-a {
  left: 4%;
  top: 22%;
  animation: leaf-float-a 12s ease-in-out infinite;
}
html.motion .leaf-b {
  left: 88%;
  top: 16%;
  animation: leaf-float-b 14s ease-in-out infinite;
}
html.motion .leaf-c {
  left: 6%;
  bottom: 4%;
  animation: leaf-float-c 13s ease-in-out infinite;
}

/* Existing sage and teal hill bands drift by tens of pixels. Wider so edges stay covered. */
html.motion .hero::after {
  left: -24%;
  right: -24%;
  animation: hill-drift-sage 16s ease-in-out infinite;
  will-change: transform;
}
html.motion .hero::before {
  left: 18%;
  right: -28%;
  animation: hill-drift-teal 18s ease-in-out infinite;
  will-change: transform;
}

/* Clear, calm shimmer around the city card's yellow border. */
html.motion .city-picker::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: calc(var(--radius) + 8px);
  box-shadow: 0 0 22px 5px rgba(244, 197, 66, 0.55);
  pointer-events: none;
  z-index: -1;
  animation: city-glow 8s ease-in-out infinite;
  will-change: opacity;
}

@keyframes sun-breathe {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50% { transform: scale(1.28); opacity: 1; }
}
@keyframes cloud-drift-a {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(72px, 10px, 0); }
}
@keyframes cloud-drift-b {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-56px, 8px, 0); }
}
@keyframes cloud-drift-c {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(24px, 5px, 0); }
}
@keyframes cloud-drift-d {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-18px, 4px, 0); }
}
@keyframes leaf-float-a {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-16deg); }
  50% { transform: translate3d(64px, 18px, 0) rotate(20deg); }
}
@keyframes leaf-float-b {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(12deg); }
  50% { transform: translate3d(-48px, 16px, 0) rotate(-22deg); }
}
@keyframes leaf-float-c {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-8deg); }
  50% { transform: translate3d(40px, -16px, 0) rotate(14deg); }
}
@keyframes hill-drift-sage {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(42px, 8px, 0); }
}
@keyframes hill-drift-teal {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-48px, 10px, 0); }
}
@keyframes city-glow {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html.motion .city-picker::before {
    display: none;
  }
  html.motion .hero::before,
  html.motion .hero::after,
  html.motion .motion-sun,
  html.motion .motion-cloud,
  html.motion .motion-leaf,
  html.motion .city-picker::before {
    animation: none !important;
    will-change: auto;
  }
  html.motion .hero::after {
    left: -10%;
    right: -10%;
  }
  html.motion .hero::before {
    left: 30%;
    right: -20%;
  }
}
