/* ═══════════════════════════════════════════════════════════
   Limitless Design Studio — Animated Backgrounds
   Blueprint drawing + light sweep (canvas) with subtle CSS layers
   ═══════════════════════════════════════════════════════════ */

/* ── Background Container ────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

/* ── Layer 1: Subtle Ambient Gradient ───────────────────── */
@keyframes ambientDrift {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(5vw, -3vh); }
  66% { transform: translate(-3vw, 5vh); }
}

body::before {
  background:
    radial-gradient(ellipse 800px 600px at 20% 30%, rgba(192, 192, 192, 0.02) 0%, transparent 70%),
    radial-gradient(ellipse 600px 800px at 80% 70%, rgba(160, 161, 162, 0.015) 0%, transparent 70%);
  animation: ambientDrift 60s ease-in-out infinite;
}

/* ── Layer 2: Faint Blueprint Grid ──────────────────────── */
@keyframes gridBreath {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.55; }
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(192, 192, 192, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(192, 192, 192, 0.012) 1px, transparent 1px);
  background-size: 100px 100px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 10%, transparent 70%);
  animation: gridBreath 30s ease-in-out infinite;
}

/* ── Hero Section: Subtle Glow ──────────────────────────── */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 600px 400px at 40% 40%, rgba(192, 192, 192, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 400px 500px at 65% 60%, rgba(192, 192, 192, 0.03) 0%, transparent 60%);
  animation: heroGlow 25s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { opacity: 0.7; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.03); }
}

/* ── Section Alternating Backgrounds ─────────────────────── */
section:not(.hero):not(.gallery-section):not(.reviews-section):not(.contact-cta)::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 400px 300px at 75% 25%, rgba(192, 192, 192, 0.015) 0%, transparent 60%),
    radial-gradient(ellipse 500px 400px at 25% 75%, rgba(192, 192, 192, 0.01) 0%, transparent 60%);
  pointer-events: none;
}

section {
  position: relative;
  overflow: hidden;
}

/* ── Canvas Layer ────────────────────────────────────────── */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 1;
}

/* ── Reduced Motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after,
  .hero::before,
  #bg-canvas {
    animation: none !important;
    opacity: 0 !important;
  }

  body::before {
    background: none !important;
  }

  body::after {
    background-image: none !important;
  }
}

/* ── Hero content: reduced-motion + mobile guards ────────── */
@media (prefers-reduced-motion: reduce) {
  .hero-logo,
  .hero h1,
  .hero-corner {
    animation: none !important;
  }
  .hero-corner { opacity: 1 !important; }
}

@media (max-width: 768px) {
  /* Corner registration marks read as clutter on small screens */
  .hero-corner { display: none; }
  .hero-eyebrow i,
  .hero-tagline i { width: 20px; }
}

/* ── Mobile: Simplified ──────────────────────────────────── */
@media (max-width: 768px) {
  body::before {
    background:
      radial-gradient(ellipse 300px 300px at 30% 30%, rgba(192, 192, 192, 0.015) 0%, transparent 70%),
      radial-gradient(ellipse 250px 250px at 70% 70%, rgba(192, 192, 192, 0.01) 0%, transparent 70%) !important;
    animation: none !important;
  }

  body::after {
    background-image: none !important;
    animation: none !important;
  }

  #bg-canvas {
    display: none;
  }
}
