/* ===== Home hero, phones: scroll-scrubbed fly-in over Wulingyuan ======
   Licensed aerial footage cut into frames (_tools/fly_prep.py). Shown at
   ≤900px only; wider screens keep the photo hero in hero.css. */
.fly { display: none; }
@media (max-width: 900px) {
  .hg-hero--home { display: none; }
  .fly { display: block; position: relative; height: 460lvh; }
  .fly--static { height: auto; }
  .fly__stage { position: sticky; top: 0; height: 100lvh; overflow: hidden; background: #2d3b33; isolation: isolate; }
  .fly--static .fly__stage { position: relative; height: 100svh; }
  .fly__poster, .fly__cv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .fly__poster { animation: flyKen 14s ease-in-out infinite alternate; }
  .fly.is-moving .fly__poster { animation-play-state: paused; }
  @keyframes flyKen { from { transform: scale(1); } to { transform: scale(1.045); } }
  .fly__cv { opacity: 0; }
  .fly__cv.is-on { opacity: 1; }
  .fly__veil { position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(16, 24, 20, .5) 0%, rgba(16, 24, 20, 0) 34%, rgba(16, 24, 20, 0) 62%, rgba(16, 24, 20, .5) 100%); }
  .fly__ch { position: absolute; left: 0; right: 0; max-width: 640px; margin: 0 auto; padding: 0 22px; color: #fff;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .35); opacity: 0; transform: translateY(18px); will-change: opacity, transform; pointer-events: none; }
  .fly__ch::before { content: ""; position: absolute; z-index: -1; inset: -48px -12px -40px;
    background: radial-gradient(ellipse 70% 60% at 35% 50%, rgba(12, 18, 14, .42), rgba(12, 18, 14, 0) 72%); }
  .fly__ch.is-live { pointer-events: auto; }
  .fly__ch--top { top: calc(env(safe-area-inset-top) + 15svh); opacity: 1; transform: none; }
  .fly__ch--mid { top: 42svh; }
  .fly__ch--end { bottom: calc(100lvh - 100svh + env(safe-area-inset-bottom) + 34px); }
  .fly__kicker { font: 800 .72rem/1.3 var(--hg-sans); letter-spacing: .16em; text-transform: uppercase; margin: 0 0 12px; opacity: .92; }
  .fly h1, .fly__big { font-family: var(--hg-head); font-weight: var(--hg-head-weight); letter-spacing: var(--hg-head-track);
    font-size: clamp(2.7rem, 12vw, 4.4rem); line-height: 1.02; margin: 0; color: #fff; }
  .fly h1 em, .fly__big em { font-family: var(--hg-serif); font-style: italic; font-weight: 500; }
  .fly__big { font-size: clamp(2.1rem, 9.5vw, 3.4rem); }
  .fly__sub { font: 500 1.02rem/1.5 var(--hg-sans); margin: 12px 0 0; max-width: 30ch; opacity: .95; }
  .fly__ctas { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 0; }
  .fly__ctas a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: 999px;
    font: 700 1rem var(--hg-sans); text-decoration: none; text-shadow: none; }
  .fly__ctas a:first-child { background: #fff; color: #18231d; }
  .fly__ctas a + a { background: rgba(255, 255, 255, .18); color: #fff; border: 1px solid rgba(255, 255, 255, .55);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
  .fly__hint { position: absolute; left: 50%; bottom: calc(100lvh - 100svh + env(safe-area-inset-bottom) + 18px); transform: translateX(-50%);
    color: #fff; font: 700 .7rem var(--hg-sans); letter-spacing: .2em; text-transform: uppercase;
    display: flex; flex-direction: column; align-items: center; gap: 8px; transition: opacity .4s; }
  .fly__hint::after { content: ""; width: 1px; height: 34px; background: linear-gradient(#fff, transparent); animation: flyHint 1.8s ease-in-out infinite; }
  @keyframes flyHint { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
  .fly__bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: rgba(255, 255, 255, .15); }
  .fly__bar i { display: block; height: 100%; width: 100%; background: rgba(255, 255, 255, .85); transform: scaleX(0); transform-origin: left; }
  .fly--static .fly__hint, .fly--static .fly__bar, .fly--static .fly__ch--mid { display: none; }
  .fly--static .fly__ch { opacity: 1; transform: none; pointer-events: auto; }
  /* header sits over dark footage on the home page */
  .hg-home .hg-top .hg-brand { color: #fff; }
  .hg-home .hg-top .hg-brand em { color: #e9e2c8; }
}
@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  .fly__poster, .fly__hint::after { animation: none; }
}
