/* =========================================================
   Build 32.0.0
   Aero Faction — Ignition / Section Flow / Stacking Hotfix

   Scope:
   - Aero page only
   - no Blaze / Terra selectors
   - no global shell / header / footer changes
   ========================================================= */

/*
 * Establish the Aero article as its own opaque stacking context.
 * This prevents unrelated page surfaces/components from visually
 * bleeding through translucent or transformed descendants.
 */
.mm-aero {
  position: relative !important;
  z-index: 1 !important;
  isolation: isolate !important;
  overflow: clip !important;
  background: #040709 !important;
  opacity: 1 !important;
}

/*
 * Every major Aero section must participate in normal document flow.
 * We explicitly neutralize accidental absolute/fixed positioning,
 * transforms, negative offsets, and inherited transparency.
 */
.mm-aero > section {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  opacity: 1 !important;
  clear: both !important;
  z-index: 1 !important;
}

/* ---------- IGNITION ---------- */

.mm-aero__ignition {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: hidden !important;
  isolation: isolate !important;
  z-index: 4 !important;

  /*
   * Keep the section opaque even when no artwork is assigned.
   * The screenshot regression showed another page surface visible
   * through this exact region.
   */
  background-color: #050a0d !important;
}

.mm-aero__ignition:not(.has-art) {
  background:
    radial-gradient(circle at 24% 45%, rgba(145,232,255,.07), transparent 0 26%),
    #050a0d !important;
}

.mm-aero__ignition.has-art {
  background-image:
    linear-gradient(
      90deg,
      rgba(4,8,10,.92) 0%,
      rgba(4,8,10,.76) 45%,
      rgba(4,8,10,.48) 80%
    ),
    var(--aero-art) !important;
  background-color: #050a0d !important;
  background-size: cover !important;
  background-position: var(--aero-fx,66%) var(--aero-fy,50%) !important;
}

.mm-aero__ignition-grid {
  position: relative !important;
  z-index: 2 !important;
  min-height: 0 !important;
  height: auto !important;
  align-items: end !important;
}

/*
 * Protect the large Ignition headline from escaping its section
 * without changing its established visual scale.
 */
.mm-aero__ignition h2 {
  position: relative !important;
  z-index: 2 !important;
  max-width: 100% !important;
}

/* ---------- FOLLOWING SECTION ---------- */

/*
 * The section after Ignition must begin only after Ignition has
 * completed its natural content height.
 */
.mm-aero__ignition + .mm-aero__engineering {
  position: relative !important;
  z-index: 5 !important;
  clear: both !important;
  margin-top: 0 !important;
  transform: none !important;
  background:
    linear-gradient(145deg,#030608,#071116) !important;
}

.mm-aero__engineering {
  min-height: 0 !important;
  height: auto !important;
  opacity: 1 !important;
  isolation: isolate !important;
}

/* ---------- OTHER AERO SECTIONS ---------- */

/*
 * Explicit opaque backing on the principal information sections.
 * This is intentionally Aero-specific and prevents any stale,
 * fixed, or underlying Garage Guild surface from showing through.
 */
.mm-aero__doctrine,
.mm-aero__movement,
.mm-aero__resonance,
.mm-aero__engineering,
.mm-aero__environment,
.mm-aero__mindset,
.mm-aero__sky,
.mm-aero__founder,
.mm-aero__roster {
  position: relative !important;
  opacity: 1 !important;
  isolation: isolate !important;
}

/*
 * If a section owns a background image, keep its normal artwork,
 * but make sure the image layer cannot become transparent enough
 * to expose an unrelated page underneath.
 */
.mm-aero__resonance,
.mm-aero__environment,
.mm-aero__sky {
  background-color: #04090c !important;
}

/* ---------- STACK ORDER ---------- */

.mm-aero__hero      { z-index: 2 !important; }
.mm-aero__doctrine  { z-index: 2 !important; }
.mm-aero__movement  { z-index: 2 !important; }
.mm-aero__resonance { z-index: 3 !important; }
.mm-aero__ignition  { z-index: 4 !important; }
.mm-aero__engineering,
.mm-aero__environment,
.mm-aero__mindset,
.mm-aero__sky,
.mm-aero__founder,
.mm-aero__roster    { z-index: 5 !important; }

/* ---------- RESPONSIVE ---------- */

@media (max-width: 900px) {
  .mm-aero {
    overflow-x: clip !important;
    overflow-y: visible !important;
  }

  .mm-aero__ignition {
    overflow: hidden !important;
  }

  .mm-aero__ignition-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }
}

/*
 * Diagnostic guard:
 * if an unrelated Garage Guild page surface is ever accidentally
 * nested inside the Aero article, it must not render.
 *
 * This does NOT affect the normal global Garage Guild page because
 * the selector requires it to be physically inside .mm-aero.
 */
.mm-aero .mm-guild-hero,
.mm-aero .mm-guild-page,
.mm-aero .mm-guild-experience {
  display: none !important;
}
