/* ==========================================================================
   SECTOR 04 // AVIATION — nap-of-the-earth flyover scene styles
   Mount: #aviation-mount (built procedurally by js/scene-aviation.js)
   ========================================================================== */

#aviation-mount { overflow: hidden; }

#aviation-mount .avn-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------- SVG monospace labels ---------- */

#aviation-mount .avn-txt {
  font: 500 10px var(--font-mono, "IBM Plex Mono", Consolas, monospace);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
#aviation-mount .avn-txt--wpt { font-size: 9px; letter-spacing: 0.14em; }
#aviation-mount .avn-txt--tag { font-size: 9.5px; }

/* ---------- ambient rotor / prop spin (CSS — alive while scroll idles) ---------- */

#aviation-mount .avn-rotor-blade {
  transform-box: fill-box;
  transform-origin: center;
  animation: avn-rotor 0.16s linear infinite;
}
@keyframes avn-rotor {
  0%   { transform: scaleX(1); }
  25%  { transform: scaleX(0.3); }
  50%  { transform: scaleX(-0.92); }
  75%  { transform: scaleX(-0.28); }
  100% { transform: scaleX(1); }
}

#aviation-mount .avn-rotor-disc { animation: avn-disc 0.34s linear infinite; }
@keyframes avn-disc {
  0%, 100% { opacity: 0.16; }
  50%      { opacity: 0.09; }
}

#aviation-mount .avn-rotor-tail {
  transform-box: fill-box;
  transform-origin: center;
  animation: avn-tail 0.42s linear infinite;
}
@keyframes avn-tail { to { transform: rotate(360deg); } }

#aviation-mount .avn-prop {
  transform-box: fill-box;
  transform-origin: center;
  animation: avn-prop 0.13s linear infinite;
}
@keyframes avn-prop {
  0%   { transform: scaleY(1); }
  25%  { transform: scaleY(0.2); }
  50%  { transform: scaleY(-0.9); }
  75%  { transform: scaleY(-0.25); }
  100% { transform: scaleY(1); }
}

/* pause spin while module is inactive; kill it entirely in static mode */
#aviation-mount:not(.avn-live):not(.avn-static) .avn-rotor-blade,
#aviation-mount:not(.avn-live):not(.avn-static) .avn-rotor-disc,
#aviation-mount:not(.avn-live):not(.avn-static) .avn-rotor-tail,
#aviation-mount:not(.avn-live):not(.avn-static) .avn-prop {
  animation-play-state: paused;
}
#aviation-mount.avn-static * { animation: none !important; }
#aviation-mount.avn-static *, #aviation-mount.avn-noanim *,
#aviation-mount.avn-static *::before, #aviation-mount.avn-noanim *::before,
#aviation-mount.avn-static *::after, #aviation-mount.avn-noanim *::after {
  transition: none !important;
}

/* ---------- callout stamps (gated via fx.gate — reversible) ---------- */

.avn-callout {
  position: absolute;
  max-width: 320px;
  padding: 10px 14px 9px;
  font: 500 11px var(--font-mono, "IBM Plex Mono", Consolas, monospace);
  letter-spacing: 0.08em;
  line-height: 1.55;
  color: var(--ghost, #E6F2EA);
  background: rgba(12, 18, 16, 0.88);
  border: 1px solid rgba(17, 61, 44, 0.35);
  box-shadow: 0 0 24px rgba(0, 255, 136, 0.07);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 2;
}

/* border draw — two pseudo boxes chase around the frame */
.avn-callout::before,
.avn-callout::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}
.avn-callout::before {
  top: -1px; left: -1px;
  border-top: 1px solid rgba(0, 255, 136, 0.7);
  border-right: 1px solid rgba(0, 255, 136, 0.7);
  transition: width 0.28s ease 0.1s, height 0.28s ease 0.38s;
}
.avn-callout::after {
  bottom: -1px; right: -1px;
  border-bottom: 1px solid rgba(0, 255, 136, 0.7);
  border-left: 1px solid rgba(0, 255, 136, 0.7);
  transition: width 0.28s ease 0.38s, height 0.28s ease 0.66s;
}
.avn-callout.is-on { opacity: 1; transform: translateY(0); }
.avn-callout.is-on::before,
.avn-callout.is-on::after { width: 100%; height: 100%; }

.avn-callout-idx,
.avn-callout-txt {
  display: block;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.avn-callout-idx {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--amber, #FFB000);
  margin-bottom: 4px;
}
.avn-callout-txt { color: var(--green, #00FF88); }
.avn-callout.is-on .avn-callout-idx { opacity: 0.9; transform: none; transition-delay: 0.3s; }
.avn-callout.is-on .avn-callout-txt { opacity: 0.95; transform: none; transition-delay: 0.42s; }

/* ---------- mobile ---------- */

@media (max-width: 767px) {
  .avn-callout {
    max-width: 210px;
    padding: 8px 10px 7px;
    font-size: 10px;
  }
  .avn-callout-idx { font-size: 8px; }
  #aviation-mount .avn-txt--tag { font-size: 8px; }
  #aviation-mount .avn-txt--wpt { font-size: 8px; }
}
