/* ═══════════════════════════════════════════════════════════════════════════
   Broken UFO - Adaptive Performance Mode CSS v1.0.0
   Made by iNTERVOLUTIONS - https://intervolutions.com

   Progressive degradation rules keyed to html.perf-tier-{0..3}
   Tier 0 = Full cinematic (no overrides)
   Tier 1 = Mild reductions
   Tier 2 = No backdrop-filter, simplified overlays
   Tier 3 = Minimal motion, static styling
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════
   TIER 1 - Mild reductions
   Reduce blur radius, lower glow intensity,
   slow down decorative animations
   ═══════════════════════════════════════ */

.perf-tier-1 .header-glass {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(5, 7, 9, 0.92);
}

.perf-tier-1 .backdrop-blur-xl {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Reduce parallax star layer opacity */
.perf-tier-1 .index-hero__stars { opacity: 0.45; }
.perf-tier-1 .index-hero__stars::before { opacity: 0.2; }
.perf-tier-1 .index-hero__stars::after { opacity: 0.15; }

/* Slow down star parallax (less GPU churn) */
.perf-tier-1 .index-hero__stars { animation-duration: 140s; }
.perf-tier-1 .index-hero__stars::before { animation-duration: 200s; }
.perf-tier-1 .index-hero__stars::after { animation-duration: 130s; }

/* Reduce body overlay opacity */
.perf-tier-1 body::before { opacity: 0.025; }
.perf-tier-1 body::after { opacity: 0.015; }

/* Lower glow intensity on scan lines */
.perf-tier-1 .header-scanline::before,
.perf-tier-1 .header-scanline-bottom::before {
  opacity: 0.5;
}

/* Reduce pulse/glow animation intensity */
.perf-tier-1 .access-level::before,
.perf-tier-1 .signal-dot::after {
  animation-duration: 4s;
}

/* Reduce flare animations */
.perf-tier-1 .global-atmosphere__flare {
  animation-duration: 30s;
}

/* Less intense box-shadow glows */
.perf-tier-1 .classified-header-badge {
  animation-duration: 6s;
}

/* Reduce grid-drift animation speed */
.perf-tier-1 .bcc-atmosphere__grid,
.perf-tier-1 .footer-atmosphere__grid {
  animation-duration: 80s;
}

/* ═══════════════════════════════════════
   TIER 2 - Moderate reductions
   Remove backdrop-filter entirely,
   disable extra overlays, reduce GSAP triggers
   ═══════════════════════════════════════ */

/* Remove ALL backdrop-filter */
.perf-tier-2 .header-glass,
.perf-tier-2 .backdrop-blur-sm,
.perf-tier-2 .backdrop-blur-xl,
.perf-tier-2 [style*="backdrop-filter"],
.perf-tier-2 .bufo-nav__mega,
.perf-tier-2 .bufo-nav__mobile,
.perf-tier-2 .bufo-nav__submenu,
.perf-tier-2 .bi-card,
.perf-tier-2 .bi-overlay,
.perf-tier-2 .archive-filter-bar,
.perf-tier-2 .ba-filter-bar,
.perf-tier-2 .single-v4__breadcrumb-bar,
.perf-tier-2 .single-v4__toc-float,
.perf-tier-2 .single-v4__share-float,
.perf-tier-2 .bu-page__breadcrumb-bar,
.perf-tier-2 .recruit-hero,
.perf-tier-2 .unidad-hero__glass {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Compensate: darken backgrounds where blur was removed */
.perf-tier-2 .header-glass {
  background: rgba(5, 7, 9, 0.92);
}

.perf-tier-2 .bi-card,
.perf-tier-2 .archive-filter-bar,
.perf-tier-2 .ba-filter-bar {
  background: rgba(5, 7, 9, 0.88);
}

.perf-tier-2 .single-v4__breadcrumb-bar,
.perf-tier-2 .single-v4__toc-float,
.perf-tier-2 .single-v4__share-float {
  background: rgba(5, 7, 9, 0.94);
}

.perf-tier-2 .unidad-hero__glass {
  background: rgba(5, 7, 9, 0.90);
}

/* Kill the body noise + scanline overlays */
.perf-tier-2 body::before,
.perf-tier-2 body::after {
  display: none !important;
}

/* Kill the header scan lines (4 animated pseudo-elements) */
.perf-tier-2 .header-scanline::before,
.perf-tier-2 .header-scanline-bottom::before,
.perf-tier-2 .header-perimeter::before,
.perf-tier-2 .header-perimeter::after {
  display: none !important;
}

/* Remove global atmosphere overlays */
.perf-tier-2 .global-atmosphere__scan,
.perf-tier-2 .global-atmosphere__flare,
.perf-tier-2 .global-atmosphere__grid {
  display: none !important;
}

/* Remove page atmosphere overlays */
.perf-tier-2 .bcc-atmosphere__orbs,
.perf-tier-2 .bcc-atmosphere__grid,
.perf-tier-2 .bcc-atmosphere__scan {
  display: none !important;
}

/* Simplify the star field to static (no animation) */
.perf-tier-2 .index-hero__stars {
  animation: none !important;
  opacity: 0.35;
}
.perf-tier-2 .index-hero__stars::before {
  animation: none !important;
  opacity: 0.15;
}
.perf-tier-2 .index-hero__stars::after {
  display: none !important;
}

/* Reduce expensive filters */
.perf-tier-2 .index-hero__stars::before {
  filter: none;
}

/* Stop ping animations (continuous scale + opacity) */
.perf-tier-2 .signal-dot::after {
  animation: none !important;
  opacity: 0.3;
}

/* Stop continuous pulse-glow on small decorative elements */
.perf-tier-2 .access-level::before {
  animation: none !important;
}

/* Reduce footer overlays */
.perf-tier-2 .footer-atmosphere__grid,
.perf-tier-2 .footer-atmosphere__scan {
  display: none !important;
}

/* Remove terminal scanline overlays */
.perf-tier-2 .bufo-terminal-block__scanlines {
  display: none !important;
}

/* Simplify blur-based decorative elements */
.perf-tier-2 .bcc-atmosphere__orb,
.perf-tier-2 .page-atmosphere__orb,
.perf-tier-2 .footer-atmosphere__orb,
.perf-tier-2 .single-atmosphere__orb {
  filter: none;
  opacity: 0.08;
}

/* Stop radar spin and blip animations */
.perf-tier-2 .bcc-radar__sweep {
  animation: none !important;
}
.perf-tier-2 .bcc-radar__blip {
  animation: none !important;
}

/* Simplify the recruit hero background */
.perf-tier-2 .recruit-hero::before {
  filter: none;
}

/* Remove magnetic card transforms (saves layout calc) */
.perf-tier-2 [data-magnetic]::before {
  display: none !important;
}

/* ═══════════════════════════════════════
   TIER 3 - Minimal motion
   Disable all continuous animations,
   remove all overlays, static styling only
   ═══════════════════════════════════════ */

/* Kill ALL continuous CSS animations globally */
.perf-tier-3 *,
.perf-tier-3 *::before,
.perf-tier-3 *::after {
  animation-play-state: paused !important;
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
}

/* But allow one-shot entrance animations (they don't loop) */
.perf-tier-3 [data-gsap-fade],
.perf-tier-3 .post-card,
.perf-tier-3 .sidebar-panel {
  opacity: 1 !important;
  transform: none !important;
}

/* Force all transitions to instant */
.perf-tier-3 *,
.perf-tier-3 *::before,
.perf-tier-3 *::after {
  transition-duration: 0.05s !important;
}

/* Everything from tier 2 plus: */

/* Remove ALL fixed overlays (saves compositing layers) */
.perf-tier-3 .global-atmosphere,
.perf-tier-3 .bcc-atmosphere,
.perf-tier-3 .page-atmosphere,
.perf-tier-3 .footer-atmosphere,
.perf-tier-3 .single-atmosphere {
  display: none !important;
}

/* Remove stars completely */
.perf-tier-3 .index-hero__stars {
  display: none !important;
}

/* Remove ALL decorative pseudo-elements that are continuous */
.perf-tier-3 .header-grid {
  display: none !important;
}

/* Remove glitch effects */
.perf-tier-3 .glitch-text:hover {
  animation: none !important;
}

/* Static cursor (no blink) */
.perf-tier-3 .terminal-cursor {
  opacity: 1 !important;
}

/* Remove hover transforms on cards */
.perf-tier-3 .logo-container:hover {
  transform: none !important;
}

/* Ensure all text remains readable */
.perf-tier-3 .hero-brand-title,
.perf-tier-3 .hero-tagline,
.perf-tier-3 .hero-subtitle {
  text-shadow: none;
}

/* ═══════════════════════════════════════
   TAB HIDDEN - Pause everything when tab not visible
   ═══════════════════════════════════════ */

.bufo-tab-hidden *,
.bufo-tab-hidden *::before,
.bufo-tab-hidden *::after {
  animation-play-state: paused !important;
}

/* ═══════════════════════════════════════
   OFFSCREEN ELEMENTS - Pause when not visible
   ═══════════════════════════════════════ */

.bufo-offscreen {
  animation-play-state: paused !important;
}

.bufo-offscreen *,
.bufo-offscreen *::before,
.bufo-offscreen *::after {
  animation-play-state: paused !important;
}

/* ═══════════════════════════════════════
   FIX: top/left animations to use transforms
   These override the animations.css keyframes
   that animate top/left (causes layout thrash)
   Only applied at tier 1+ to avoid visual change at tier 0
   ═══════════════════════════════════════ */

.perf-tier-1 .header-perimeter::before,
.perf-tier-1 .header-perimeter::after {
  top: auto !important;
  bottom: auto !important;
  will-change: transform;
}

/* ═══════════════════════════════════════
   REDUCE BOX-SHADOW in tier 1+
   ═══════════════════════════════════════ */

.perf-tier-1 .post-card:hover,
.perf-tier-1 .sidebar-panel:hover,
.perf-tier-1 .bufo-brief-card:hover,
.perf-tier-1 .bufo-intel-node:hover {
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.04);
}

.perf-tier-2 .post-card:hover,
.perf-tier-2 .sidebar-panel:hover,
.perf-tier-2 .bufo-brief-card:hover,
.perf-tier-2 .bufo-intel-node:hover,
.perf-tier-2 .cta-button:hover {
  box-shadow: none;
}
