/* Decorative clouds in .hero (index) — positions & sizes from PHP (random per refresh) */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-clouds {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  /* Keep clouds inside visible “safe” inset (notches / home indicator / rounded corners) */
  padding-top: max(12px, env(safe-area-inset-top, 0px));
  padding-right: max(10px, env(safe-area-inset-right, 0px));
  padding-bottom: max(14px, env(safe-area-inset-bottom, 0px));
  padding-left: max(10px, env(safe-area-inset-left, 0px));
  pointer-events: none;
  /* Above hero FontAwesome icons (z-index:1), below .container content (z-index:3) */
  z-index: 2;
}

/* Desktop: extra vertical safe band — clouds sit above dot canvas; bottom row must not clip under .hero */
@media (min-width: 769px) {
  .hero-clouds {
    padding-top: max(20px, env(safe-area-inset-top, 0px));
    padding-bottom: max(72px, env(safe-area-inset-bottom, 0px));
  }
}

.hero .container {
  position: relative;
  z-index: 3;
}

.hero-cloud {
  position: absolute;
  display: block;
  height: auto;
  opacity: 0.82;
  will-change: transform;
  transform-origin: 50% 60%;
  animation: heroCloudSway 5s ease-in-out infinite;
}

@keyframes heroCloudSway {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-3deg);
  }
  50% {
    transform: translate3d(0, -6px, 0) rotate(3deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-cloud {
    animation: none;
  }
}

@media (max-width: 768px) {
  /* Six clouds are too busy on small screens — two on the left, one on the right. */
  .hero-clouds .hero-cloud:nth-child(3),
  .hero-clouds .hero-cloud:nth-child(5),
  .hero-clouds .hero-cloud:nth-child(6) {
    display: none !important;
  }
  .hero-cloud {
    opacity: 0.72;
    max-width: min(32vw, 120px) !important;
  }
}
