/* The sky and painted bird are separate layers so the moon stays still in flight. */
.hero:before {
  background-image: url('assets/heron-sky.webp');
  background-position: 64% center;
}

.heron-stage {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.heron-flight {
  position: absolute;
  top: 46%;
  right: 3%;
  display: block;
  width: 54%;
  height: auto;
  aspect-ratio: 3 / 2;
  transform: translateY(-50%);
  background: url('assets/heron-flight.webp') center / contain no-repeat;
}

.heron-flight.is-painted { background: none; }

@container atlas (max-width: 740px) {
  .heron-flight { right: 1.5%; top: 48%; width: 56%; }
}

@media (prefers-reduced-motion: no-preference) {
  .heron-flight.in-flight { animation: heron-glide 4.6s ease-in-out both; }
  @keyframes heron-glide {
    0%, 100% { transform: translate(0, -50%) rotate(0deg); }
    24% { transform: translate(-3%, -53%) rotate(-2deg); }
    59% { transform: translate(-4.6%, -48.5%) rotate(1deg); }
    84% { transform: translate(-1%, -52.3%) rotate(-.7deg); }
  }
}

.hero-frame { position: relative; display: grid; min-width: 0; }
.heron-replay {
  position: absolute;
  right: 12px;
  bottom: 10px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border-radius: 24px;
  font-size: 13px;
  color: #f3e4cf;
  isolation: isolate;
}
.heron-replay::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 5px 0;
  border-radius: inherit;
  border: 1px solid #b59d75a6;
  background: #091c25d9;
}
.heron-replay:hover::before { background: #1c3038; border-color: #dfc29a; }
@container atlas (max-width: 740px) {
  .heron-replay { right: 8px; bottom: 4px; gap: 5px; padding: 0 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .heron-replay { display: none; }
}
