/* ==========================================================================
   backgrounds.css — Reusable cyberpunk scene backdrops
   Consumed by: all pages via class hooks (.scene-*, .corner-brackets)
   Depends on: design-system.css tokens (--bg, --blue-*, --line-*)
   ========================================================================== */

/* Base scene utility — covers parent, centered, decorative */
.scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

/* ===== Hero banner (homepage) — arcs + crystal + particles ===== */
.scene-hero {
  background-image:
    radial-gradient(ellipse at 50% 120%, rgba(0, 120, 200, 0.35), transparent 60%),
    url('/images/scenes/hero-arcs-crystals.svg');
}

/* ===== Page hero halo (about/careers/contact/products/blog) ===== */
.scene-halo {
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(0, 212, 255, 0.18), transparent 60%),
    url('/images/scenes/ring-halo.svg');
  background-size: 100% 100%;
}

/* ===== Service tiles / sectional chip grid overlay ===== */
.scene-chip-grid {
  background-image: url('/images/scenes/chip-grid-overlay.svg');
  background-size: 400px 400px;
  background-repeat: repeat;
  opacity: 0.45;
  mix-blend-mode: screen;
}

/* ===== CTA diagonal beam ===== */
.scene-cta-beam {
  background-image:
    radial-gradient(ellipse at 100% 0%, rgba(0, 212, 255, 0.25), transparent 55%),
    url('/images/scenes/cta-beam.svg');
}

/* ===== Blog empty state ===== */
.scene-empty-blog {
  position: static;
  width: 400px;
  max-width: 100%;
  aspect-ratio: 4 / 3;
  background-image: url('/images/scenes/empty-state-blog.svg');
  margin: 0 auto;
}

/* ===== Cinematic hero/CTA backdrops (multi-layer SVG fallback — see report) =====
   Originally planned as PNG via ai-artist (Nano Banana). Gemini free-tier quota
   was exhausted during this build, so shipped as rich multi-layer SVG instead.
   Swap extension to .png once ai-artist is re-run successfully. */
.scene-hero-cinematic {
  background-image:
    linear-gradient(180deg, rgba(3, 7, 17, 0.55) 0%, rgba(3, 7, 17, 0.15) 40%, rgba(3, 7, 17, 0.85) 100%),
    url('/images/scenes/hero-cinematic.svg');
  background-size: cover;
  background-position: center;
}

.scene-cta-cinematic {
  background-image:
    linear-gradient(90deg, rgba(3, 7, 17, 0.75) 0%, rgba(3, 7, 17, 0.2) 55%, rgba(3, 7, 17, 0.6) 100%),
    url('/images/scenes/cta-cinematic.svg');
  background-size: cover;
  background-position: center;
}

/* ===== Corner brackets pattern (framed-element accent) ===== */
.corner-brackets {
  position: relative;
}

.corner-brackets::before,
.corner-brackets::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--blue-2, #4DD4FF);
  pointer-events: none;
  z-index: 2;
}

.corner-brackets::before {
  top: 12px;
  left: 12px;
  border-right: 0;
  border-bottom: 0;
}

.corner-brackets::after {
  bottom: 12px;
  right: 12px;
  border-left: 0;
  border-top: 0;
}

/* ===== Scanline overlay (pairs with any scene-*) ===== */
.scene-scanlines {
  background-image: repeating-linear-gradient(
    0deg,
    transparent 0 3px,
    rgba(0, 191, 255, 0.025) 3px 4px
  );
}

/* ===== Text-readability overlay (apply over scene for dark text zones) ===== */
.scene-overlay-fade {
  background: linear-gradient(
    180deg,
    rgba(3, 7, 17, 0) 0%,
    rgba(3, 7, 17, 0.65) 70%,
    var(--bg, #030711) 100%
  );
}

/* ===== Reduced motion — disable any future animations ===== */
@media (prefers-reduced-motion: reduce) {
  .scene,
  .scene-hero,
  .scene-halo,
  .scene-cta-beam,
  .scene-hero-cinematic,
  .scene-cta-cinematic {
    animation: none !important;
    transition: none !important;
  }
}

/* ===== Mobile tuning — reduce intensity on small screens ===== */
@media (max-width: 640px) {
  .scene-chip-grid {
    opacity: 0.3;
    background-size: 280px 280px;
  }
  .scene-hero,
  .scene-halo {
    background-size: cover, cover;
  }
}
