/* Foreground character and a flat blue flight wake share one animation.
   The world framing and static metallic title are independent. */
.hero-with-flight .hero-copy {
  position: relative;
  z-index: 2;
}

.hero-with-flight .hero-flight {
  position: absolute;
  z-index: 1;
  isolation: isolate;
  top: 50%;
  right: 36px;
  width: min(42%, 520px);
  transform: translateY(-45%);
  pointer-events: none;
}

.hero-with-flight .hero-flight-figure {
  position: relative;
  animation: hero-flight-float 4s ease-in-out infinite;
}

.hero-with-flight .hero-flight-character {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 28px #0007) drop-shadow(0 0 14px #53c8ed16);
}

@keyframes hero-flight-float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-15px) rotate(1deg); }
}

@media (min-width: 901px) {
  .hero-with-flight .hero-copy {
    width: 54%;
    max-width: 650px;
  }
}

/* The cutout joins the normal flow on smaller screens so it has its own
   space below the copy and contributes to the section's natural height. */
@media (max-width: 900px) {
  .hero-with-flight .hero-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-with-flight .hero-copy {
    width: 100%;
    max-width: none;
  }

  .hero-with-flight .hero-flight {
    position: relative;
    top: auto;
    right: auto;
    width: min(330px, 80%);
    align-self: center;
    margin: 20px 0 0;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-with-flight .hero-flight-figure {
    animation: none;
    transform: none;
  }
}
