/* =============================================================================
   AI Impact Maine shared immersive layer

   The canvas/reveal scripts may load on every public page, but color changes are
   limited to the existing dark theme. Light mode keeps the original production
   palette and layout.
   ========================================================================== */

.wseo-bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.aim-agent-widget {
  z-index: 9998 !important;
}

html[data-theme="dark"] body.aim-immersive {
  background:
    radial-gradient(1200px 720px at 80% -8%, rgba(61,127,138,0.16), transparent 60%),
    radial-gradient(900px 600px at 8% 8%, rgba(36,53,88,0.50), transparent 55%),
    linear-gradient(180deg, #0b1322 0%, #0c1426 55%, #0a111e 100%) !important;
  background-attachment: fixed !important;
  color: rgba(255,255,255,0.86);
}

html[data-theme="dark"] body.aim-immersive :is(
  section,
  .hero,
  .page-hero,
  .conf-hero,
  .assess-hero,
  .hero-panel,
  .instructor-section,
  .home-local-help,
  .map-section,
  .portal-section,
  .trends-section
) {
  background: transparent !important;
}

html[data-theme="dark"] body.aim-immersive :is(.logo-bar, .mission-strip, .trust-bar) {
  background: rgba(255,255,255,0.03) !important;
  border-color: rgba(255,255,255,0.07) !important;
}

html[data-theme="dark"] body.aim-immersive :is(
  main,
  section,
  footer,
  .hero,
  .page-hero,
  .conf-hero,
  .assess-hero,
  .cta-band
) :is(h1, h2, h3, h4, .section-title, .testimonial-name, .local-seo-item strong, .instructor-photo-card figcaption strong) {
  color: #f3efe7 !important;
}

html[data-theme="dark"] body.aim-immersive :is(
  main,
  section,
  footer,
  .hero,
  .page-hero,
  .conf-hero,
  .assess-hero,
  .cta-band
) :is(p, li, .section-intro, .instructor-bio p, .stat-box .lbl, .local-seo-item span,
  .testimonial-text, .testimonial-role, .web-check span, .web-proof-item span,
  .web-roadmap-item span, .card-copy, .logo-item-name, .audience-pill,
  .audience-card, .trust-item, .instructor-photo-card figcaption) {
  color: rgba(255,255,255,0.8) !important;
}

html[data-theme="dark"] body.aim-immersive :is(main, section, footer) :is(a:not(.btn-primary):not(.btn-outline):not(.btn-teal-outline):not(.portal-btn), .section-intro a, .instructor-bio a) {
  color: var(--teal-light) !important;
}

html[data-theme="dark"] body.aim-immersive .stat-box .num {
  color: var(--sand) !important;
}

html[data-theme="dark"] body.aim-immersive :is(
  .web-card,
  .web-path-card,
  .web-sample-card,
  .web-faq-item,
  .web-scope-card,
  .web-proof-item,
  .web-roadmap-item,
  .web-process-step,
  .web-check,
  .service-card,
  .audience-pill,
  .audience-card,
  .stat-box,
  .testimonial-card,
  .local-seo-item,
  .trust-item,
  .faq-item,
  .refresh-faq-item,
  .portal-faq-item,
  .website-faq-card,
  .agent-mini-card,
  .website-agent-card,
  .service-keyword-card,
  .grant-agent-card,
  .pricing-card,
  .pricing-tier,
  .format-card,
  .refresh-service-card,
  .refresh-card,
  .refresh-marketing-card,
  .refresh-price-card,
  .refresh-demo-card,
  .curriculum-card,
  .bestfor-card,
  .agent-solution-card,
  .agent-process-card,
  .agent-guardrail-card,
  .agent-team-card,
  .agent-product-card,
  .principle-card,
  .overview-card,
  .deliverable-card,
  .founder-card,
  .compact-card,
  .countdown-card,
  .discount-summary-card,
  .intro-card,
  .process-card,
  .outcome-item,
  .ideal-item,
  .pilot-item,
  .check-item,
  .grant-agent-step,
  .buyer-step,
  .refresh-step,
  .example-box,
  .process-box,
  .values-card,
  .agent-risk-panel,
  .discount-feature,
  .discount-feature-copy,
  .discount-note,
  .discount-summary,
  .pilot-panel,
  .pilot-offer,
  .pilot-summary,
  .final-panel,
  .tier-card,
  .tier-header,
  .what-box,
  .website-agent-panel,
  .website-agent-flow-step,
  .website-agent-miss div,
  .refresh-proof-item,
  .intro-dim,
  .q-card,
  .results-card,
  .website-fit-card,
  .website-scope-card,
  .aim-agent-demo-panel,
  .aim-agent-demo-code,
  .nv-point,
  .not-vague,
  .opt,
  .card-body,
  .website-service-callout,
  .int-form,
  .is-featured,
  .is-bright,
  .is-not,
  .metric,
  .ac,
  .ec,
  .ichk,
  .itype
) {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)) !important;
  border-color: rgba(255,255,255,0.12) !important;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.22);
}

html[data-theme="dark"] body.aim-immersive :is(.dim-pill, .payment-pill, .instructor-tags span, .tag, .service-chip, .agent-product-badge) {
  background: rgba(90,159,170,0.16) !important;
  border-color: rgba(90,159,170,0.3) !important;
  color: #cfeef0 !important;
}

html[data-theme="dark"] body.aim-immersive :is(
  .web-card,
  .service-card,
  .testimonial-card,
  .audience-pill,
  .curriculum-card,
  .bestfor-card,
  .format-card,
  .pricing-card,
  .agent-mini-card,
  .website-agent-card,
  .grant-agent-card,
  .faq-item,
  .local-seo-item,
  .stat-box
):hover {
  border-color: rgba(90,159,170,0.55) !important;
  box-shadow: 0 18px 44px rgba(0,0,0,0.34) !important;
}

html[data-theme="dark"] body.aim-immersive .cta-band {
  background: linear-gradient(180deg, rgba(61,127,138,0.16), rgba(255,255,255,0.03)) !important;
  border: 1px solid rgba(90,159,170,0.28) !important;
}

html[data-theme="dark"] body.aim-immersive :is(
  .about-main,
  .audit-main,
  .contact-main,
  .support-main,
  .training-main,
  .search-main,
  .agents-intro,
  .agent-governance,
  .agent-process,
  .agent-products,
  .agent-risk-list,
  .agent-solutions,
  .agent-use-cases,
  .services-overview,
  .service-keywords,
  .attend-section,
  .expect-section,
  .interest-section,
  .sponsor-section,
  .eligibility-section,
  .faq-section,
  .principles-section,
  .curriculum-section,
  .delivery-section,
  .formats-section,
  .outcomes-section,
  .deliverables-section,
  .ideal-section,
  .grant-agent-section,
  .website-agent-section,
  .tiers-section,
  .privacy-body,
  .error-page,
  .comparison,
  .refresh-comparison,
  .table-wrap,
  .search-fallback,
  .search-noscript,
  .refresh-proof-strip,
  .dims-strip,
  .pricing-strip,
  .last-updated,
  .contact-map
) {
  background-color: transparent !important;
  background-image: none !important;
}

html[data-theme="dark"] body.aim-immersive :is(
  .pagefind-ui__search-input,
  .prog-track,
  .q-progress,
  .dim-bar-wrap,
  .opt-radio,
  .phone-reveal-btn,
  .btn-prev,
  .white
) {
  background-color: rgba(255,255,255,0.07) !important;
  background-image: none !important;
  border-color: rgba(255,255,255,0.14) !important;
  color: rgba(255,255,255,0.9) !important;
}

html[data-theme="dark"] body.aim-immersive .trend-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)) !important;
  border-color: rgba(255,255,255,0.10) !important;
}

html[data-theme="dark"] body.aim-immersive .trend-card h3 {
  color: #f3efe7 !important;
}

html[data-theme="dark"] body.aim-immersive :is(.trend-card p, .trend-card-meta) {
  color: rgba(255,255,255,0.72) !important;
}

html[data-theme="dark"] body.aim-immersive :is(.trend-card-label, .trend-badge) {
  color: #cfeef0 !important;
  background: rgba(90,159,170,0.18) !important;
}

html[data-theme="dark"] body.aim-immersive .trend-cat {
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(255,255,255,0.14) !important;
  color: rgba(255,255,255,0.78) !important;
}

html[data-theme="dark"] body.aim-immersive .trends-search {
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(255,255,255,0.14) !important;
  color: #fff !important;
}

html[data-theme="dark"] body.aim-immersive :is(.featured-trend, .trends-empty) {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)) !important;
  border-color: rgba(255,255,255,0.10) !important;
  color: rgba(255,255,255,0.78) !important;
}

@media (max-width: 760px) {
  html[data-theme="dark"] body.aim-immersive :is(
    .web-card,
    .service-card,
    .testimonial-card,
    .curriculum-card,
    .format-card,
    .pricing-card,
    .faq-item,
    .agent-mini-card
  ) {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wseo-bg-canvas {
    opacity: 1;
  }
}
