/* 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;
}

/* Cream clouds with a light sage shadow so they read against the sky. */
html.motion .motion-cloud {
  position: absolute;
  background: rgba(255, 253, 248, 0.95);
  border-radius: 40px;
  box-shadow: 0 3px 10px rgba(47, 111, 106, 0.16);
  will-change: transform;
}
html.motion .motion-cloud::before,
html.motion .motion-cloud::after {
  content: "";
  position: absolute;
  background: rgba(255, 253, 248, 0.95);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(47, 111, 106, 0.1);
}
html.motion .cloud-a {
  top: 8%;
  left: 3%;
  width: 110px;
  height: 34px;
  animation: cloud-drift-a 16s ease-in-out infinite;
}
html.motion .cloud-a::before { width: 44px; height: 44px; left: 18px; top: -20px; }
html.motion .cloud-a::after { width: 34px; height: 34px; right: 16px; top: -12px; }
html.motion .cloud-b {
  top: 5%;
  left: auto;
  right: 8%;
  width: 78px;
  height: 24px;
  opacity: 0.9;
  animation: cloud-drift-b 18s ease-in-out infinite;
}
html.motion .cloud-b::before { width: 30px; height: 30px; left: 12px; top: -14px; }
html.motion .cloud-b::after { width: 24px; height: 24px; right: 10px; top: -8px; }

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 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 .hero-motion,
  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%;
  }
}
