/* ════════════════════════════════════════════════════════════════
   SANBERNARDA.COM · GPU OPTIMIZE  (carregar POR ÚLTIMO)
   Reduz custo de GPU/VRAM SEM mudar o visual percebido.
   Ativado globalmente; regras cc-gpu-low / cc-gpu-tier-1 aplicam
   equivalentes mais baratos que parecem idênticos no tema escuro.
   ════════════════════════════════════════════════════════════════ */

/* ── 1. GLOW ORBS — gradiente radial pré-difundido (sem filter:blur) ── */


/* Tier baixo: orbs só transform (sem hue-rotate / scale animado) */


/* ── 2. HEADER — blur menor (global); tier baixo = fundo sólido translúcido ── */
body.dark-theme .nav-header{
  backdrop-filter: blur(14px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(160%) !important;
}
html.cc-gpu-low body.dark-theme .nav-header{
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(6, 9, 15, 0.94) !important;
}

/* ── 2b. FULL-SCREEN BLENDS → normal (evita recomposição por frame) ── */


/* ── 3. will-change permanente desnecessário → liberado ── */
.nav-menu a{ will-change: auto !important; }
.hero-word{ will-change: auto !important; }
.hero-title-v3,
.hero-sub-grid,
.hero-bg,
.hero-grain,
.sec-head,
.spec-header,
.hero-container-v3{ will-change: auto !important; }

/* Só promove camada durante hover ativo (main.js seta inline) */
html.cc-gpu-low .magnetic-btn,
html.cc-gpu-low .btn-nav-cta,
html.cc-gpu-low .btn-hero{ will-change: auto !important; }

/* ── 4. MODO OCIOSO (cc-idle) — congela washes ambientes ── */

html.cc-idle .hero-grain,
html.cc-idle .hero-bg__node,
html.cc-idle .hero-bg__scan,
html.cc-idle .hero-bg__glow,
html.cc-idle #cc-depth .ccd-neb,
html.cc-idle #cc-depth .ccd-stars i,
html.cc-idle #cc-depth .ccd-dust,
html.cc-idle #cc-depth .ccd-shape,
html.cc-idle #cc-depth-fg .ccd-fg-motes i,
html.cc-idle #cc-depth-fg .ccd-fg-glow,
html.cc-idle .cc-ship .ship-scanline,
html.cc-idle .ascend__beam,
html.cc-idle .ascend__particles{
  animation-play-state: paused !important;
}

/* ── 5. OFF-SCREEN SECTIONS — pausa ambientes (não UI interativa) ── */

html.cc-offscreen-pause .cc-section-offscreen .hero-grain,
html.cc-offscreen-pause .cc-section-offscreen .hero-bg__node,
html.cc-offscreen-pause .cc-section-offscreen .hero-bg__scan,
html.cc-offscreen-pause .cc-section-offscreen .hero-bg__glow,
html.cc-offscreen-pause .cc-section-offscreen .ahud,
html.cc-offscreen-pause .cc-section-offscreen .spec-depth__neb,
html.cc-offscreen-pause .cc-section-offscreen .spec-depth__stars i,
html.cc-offscreen-pause .cc-section-offscreen .marquee-track{
  animation-play-state: paused !important;
}

/* ── 6. DEPTH FIELD ── */
#cc-depth-fg{ will-change: auto !important; }
.hero-bg__node{ will-change: auto !important; }

html.cc-gpu-low #cc-depth .ccd-fg-glow{
  filter: none !important;
  opacity: .85 !important;
}
html.cc-gpu-low #cc-depth .ccd-stars i,
html.cc-gpu-low #cc-depth-fg .ccd-fg-motes i{
  box-shadow: 0 0 2px rgba(255,255,255,.5) !important;
}

/* ── 7. content-visibility + contain (below-fold) — Acelera FCP e reduz CPU no scroll ── */
.stats-strip,
.cs2,
.spec,
.proc,
.faq-section,
.proof,
.signup-strip,
.page-hero,
.svp-sec,
.ctaform.ctaform--cockpit,
.cases.cases--cockpit {
  content-visibility: auto;
  contain-intrinsic-size: 1px 720px;
}
/* .probsol / #diagnostico: never skip layout — sticky + GSAP pin breaks in Gecko */
.probsol,
#diagnostico {
  content-visibility: visible;
  contain: none;
}

html.cc-gpu-low .stats-strip,
html.cc-gpu-low .cs2,
html.cc-gpu-low .spec,
html.cc-gpu-low .proc,
html.cc-gpu-low .faq-section,
html.cc-gpu-low .proof,
html.cc-gpu-low .signup-strip{
  contain: layout style paint;
}
html.cc-gpu-low .page-hero,
html.cc-gpu-low .svp-sec,
html.cc-gpu-low .ctaform.ctaform--cockpit,
html.cc-gpu-low .cases.cases--cockpit{
  contain: layout style paint;
}
html.cc-gpu-low .probsol,
html.cc-gpu-low #diagnostico {
  contain: none !important;
  content-visibility: visible !important;
}
@media (max-width: 768px) {
  /* content-visibility no touch repinta texto ao entrar na viewport */
  html.cc-gpu-low .hero-v3,
  html.cc-gpu-low .marquee-strip,
  html.cc-gpu-low .stats-strip,
  html.cc-gpu-low .probsol,
  html.cc-gpu-low #diagnostico,
  html.cc-gpu-low .cs2,
  html.cc-gpu-low .spec,
  html.cc-gpu-low .proc,
  html.cc-gpu-low .faq-section,
  html.cc-gpu-low .proof,
  html.cc-gpu-low .signup-strip,
  html.cc-gpu-low .page-hero,
  html.cc-gpu-low .svp-sec,
  html.cc-gpu-low .ctaform.ctaform--cockpit,
  html.cc-gpu-low .cases.cases--cockpit{
    content-visibility: visible !important;
    contain: none !important;
    contain-intrinsic-size: auto !important;
  }
}

html.cc-gpu-low section.reveal,
html.cc-gpu-low .cases{
  contain: layout style paint;
}

/* ── 8. backdrop-filter → fundo estático (tema escuro, visual idêntico) ── */
html.cc-gpu-low body.dark-theme .spec .spec-status{
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(18, 6, 26, 0.88) !important;
}
html.cc-gpu-low body.dark-theme .spec .spec-slider .spec-card,
html.cc-gpu-low body.dark-theme .spec .spec-card--cockpit{
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(24, 10, 34, 0.72) !important;
}

/* Modais / overlays com blur leve */
html.cc-gpu-low [class*="backdrop"],
html.cc-gpu-low .mobile-menu{
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ── 9. filter:blur em elementos grandes ── */
html.cc-gpu-low .hero-bg__glow{
  filter: none !important;
  background: radial-gradient(ellipse 80% 60% at 50% 40%,
    rgba(232, 69, 0, .12), transparent 70%) !important;
}
html.cc-gpu-low .ccd-neb{
  animation-duration: 32s !important;
}

/* ── 10. box-shadow — camadas redundantes simplificadas ── */

html.cc-gpu-low .spec-card--cockpit.is-stack-active{
  box-shadow: 6px 6px 0 var(--cor-secundaria) !important;
}

/* ── 11. MASCOT — drop-shadow → opacidade (mesmo contraste no dock escuro) ── */
html.cc-gpu-low .robo--pet-v6 .robo__body,
html.cc-gpu-low .cc-prompt-dock__mascot .robo--pet-v6{
  filter: drop-shadow(0 calc(var(--r-px) * 1) 0 rgba(0, 0, 0, 0.55)) !important;
}
html.cc-gpu-low .robo--pet-v6 .robo__visor,
html.cc-gpu-low .robo--pet-v6 .robo__eye-glow{
  filter: none !important;
  opacity: .95 !important;
}
html.cc-gpu-low .robo--pet-v6.robo--offscreen,
html.cc-gpu-low .robo--pet-v6.robo--offscreen *{
  animation-play-state: paused !important;
}

/* ── 12. Hero vídeo pausado — tint cobre frame estático ── */
.hero-video video.cc-video-paused{
  object-fit: cover;
}
html.cc-gpu-low .hero-video video.cc-video-paused + .hero-video__tint{
  opacity: 1 !important;
}

/* ── 13. Cursor custom — oculto em GPU baixa (main.js também pula init) ── */
html.cc-gpu-low #cc-ring,
html.cc-gpu-low #cc-dot,
html.cc-gpu-low #cc-label,
html.cc-gpu-low #cc-shape-chip,
html.cc-gpu-low #cc-shape-flash{
  display: none !important;
}
html.cc-gpu-low body,
html.cc-gpu-low body *{
  cursor: auto !important;
}
