/* The stage sticks only when the entire hero can fit in the viewport. */
.wing-sequence { position: relative; }
@media (min-width: 801px) and (min-height: 610px) and (prefers-reduced-motion: no-preference) {
  .wing-sequence { height: 226svh; }
  .wing-sequence .stage-frame { max-height: 63svh; }
  .wing-sequence .hero {
    position: sticky;
    top: 0;
    height: 100svh;
    min-height: 0;
    padding-top: clamp(74px, 11svh, 112px);
    padding-bottom: clamp(18px, 4svh, 38px);
  }
}
#wing-stage { isolation: isolate; }
.stage-frame .layers {
  width: 84%;
  left: 8%;
  top: 0;
}
.stage-frame .layers span {
  padding: 3px 6px 0;
  background: linear-gradient(#10171be0, transparent 72%);
}
@media (max-width: 620px) {
  .stage-frame .layers span { font-size: 8px; }
}

.wing-flight {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  transform-origin: center;
  contain: layout paint;
  transition: opacity .18s ease;
}
.wing-flight.active { display: block; }
/* Lift off the text layer while crossing a section, then land beside its title. */
.wing-flight[data-stop="flight"] { z-index: 3; }
.wing-flight[data-stop="work"] { opacity: .9; }
/* At touchdown the physical emblem casts the dark shape in the light pool. */
.wing-flight[data-lit] { filter: brightness(var(--wing-brightness,1)); }
#contact { position: relative; isolation: isolate; overflow: hidden; }
.contact-projection {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: -1; opacity: 0; pointer-events: none;
  overflow: hidden;
}
.projected-still { display: none; filter: brightness(.035); }
@media (max-width: 620px) {
  #contact { padding-top: 214px; }
}
@media (prefers-reduced-motion: reduce) {
  .projected-still { display: block; }
}
@media (max-width: 620px) {
  #work .heading h2 { font-size: clamp(36px,10.4vw,59px); }
}
#wing-stage.departed { background: none; }
#wing-stage .wing-flight-fallback { display: none; }
.wing-flight .wing-flight-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0 7.5%;
  transform: rotate(var(--flight-bank,0deg));
}
/* The emblem skims across each surface and tucks beneath the lettering.
   Foreground content and all controls keep their own hit targets. */
.section h2, .section .kicker, .section .profile-copy, .project-title,
.gallery-footer, .section .email, .section .foot, .ledger details, .services article {
  position: relative;
  z-index: 2;
}
@media (prefers-reduced-motion: reduce) {
  .wing-flight { display: none !important; }
}
