/* ============================================================================
   AumnI digital — cinematic effects layer (effects.css)
   ----------------------------------------------------------------------------
   Layers ON TOP of scrub-engine.js without touching it.

   Engine z-index ladder (scrub-engine.js injectCSS):
     .sw-sky 0 · .sw-track 1 · .sw-stage 10 (video; its scenes' z 100-120 are
     trapped inside the fixed stage's own stacking context) · .sw-copylayer 20
     · .sw-hint 30 · .sw-route 40 · .sw-topbar 50 · .sw-scrollbar 60

   Atmosphere overlays slot BETWEEN the video stage (10) and the copy (20):
     .fx-tint 12 · .fx-particles 13 · .fx-vignette 14 · .fx-grain 15

   The engine injects its CSS inside `@layer sw`, so these unlayered rules win
   the cascade automatically — no !important needed anywhere.
   ========================================================================== */

/* ---- shared overlay base -------------------------------------------------- */
.fx-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

/* ---- color tint (day-night arc), z 12 ------------------------------------ */
.fx-tint {
  z-index: 12;
  mix-blend-mode: soft-light;
  /* the whole arc's ceiling; per-layer opacity is driven by JS (weights sum
     to 1, scaled so the stack never exceeds this) */
  opacity: 1;
}
.fx-tint__layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  will-change: opacity;
}
/* plain low-opacity fallback where blend modes are unsupported */
@supports not (mix-blend-mode: soft-light) {
  .fx-tint { opacity: 0.55; }
}

/* ---- ambient particles (dust / fireflies), z 13 --------------------------- */
.fx-particles {
  z-index: 13;
}

/* ---- vignette, z 14 (static — the one overlay kept under reduced motion) -- */
.fx-vignette {
  z-index: 14;
  background: radial-gradient(
    ellipse 120% 90% at 50% 46%,
    transparent 0%,
    transparent 52%,
    rgba(6, 10, 20, 0.18) 74%,
    rgba(6, 10, 20, 0.38) 88%,
    rgba(6, 10, 20, 0.55) 100%
  );
}

/* ---- film grain, z 15 ------------------------------------------------------ */
.fx-grain {
  z-index: 15;
  opacity: 0.06;
}

@media (prefers-reduced-motion: reduce) {
  /* defense in depth — effects.js also refuses to build these */
  .fx-grain,
  .fx-particles,
  .fx-tint { display: none; }
}

/* ============================================================================
   Glassmorphism on the engine's own chrome (real class names from
   scrub-engine.js: .sw-copy cards, .sw-nav pill, .sw-route__label,
   .sw-topcta, .sw-btn--ghost). Inline opacity/transform on .sw-copy stay
   engine-owned; we only add surface treatment.
   ========================================================================== */

.sw-copy {
  padding: clamp(22px, 2.6vw, 34px) clamp(24px, 2.8vw, 38px);
  border-radius: 22px;
  background: rgba(14, 22, 38, 0.35);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 18px 50px rgba(4, 8, 18, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* nav pill: swap the engine's frosted-white for the same dark glass */
.sw-nav {
  background: rgba(14, 22, 38, 0.35);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(4, 8, 18, 0.28);
}

/* route-rail hover labels */
.sw-route__label {
  background: rgba(14, 22, 38, 0.45);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  backdrop-filter: blur(10px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* top CTA + ghost button pick up the same material language */
.sw-topcta {
  box-shadow: 0 10px 26px rgba(4, 8, 18, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.sw-btn--ghost {
  background: rgba(14, 22, 38, 0.3);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  backdrop-filter: blur(10px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

/* where backdrop-filter is unsupported, deepen the plate so copy stays legible */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .sw-copy,
  .sw-nav { background: rgba(10, 16, 30, 0.68); }
  .sw-route__label,
  .sw-btn--ghost { background: rgba(10, 16, 30, 0.72); }
}

