/**
 * Ekloudz Animation Stylesheet
 * Continuous Floating Decorative Objects Layer & Motion Fallbacks
 * Strict Solid Colors - Zero Gradients - High Performance
 */

/* ==========================================================================
   1. Shared Ambient Decorative Layer
   Spans the entire viewport, persistent across all sections, pointer-events none
   ========================================================================== */
.ambient-layer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1; /* Sits behind interactive content (z-index: 10) but above base background */
  overflow: hidden;
  user-select: none;
}

/* Base Floating Object */
.ambient-shape {
  position: absolute;
  pointer-events: none;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

/* Shape 1: Refined Outlined Red Ring (Top Left) */
.shape-ring-lg {
  top: 14%;
  left: 7%;
  width: 90px;
  height: 90px;
  border: 1.75px solid var(--color-deep-red);
  border-radius: 50%;
  opacity: 0.45;
  background: transparent;
}

/* Shape 2: Solid Red Micro-Dot (Top Right) */
.shape-dot-sm {
  top: 24%;
  right: 14%;
  width: 10px;
  height: 10px;
  background-color: var(--color-deep-red);
  border-radius: 50%;
  opacity: 0.55;
}

/* Shape 3: Geometric Outlined Charcoal Diamond (Center Right) */
.shape-diamond {
  top: 46%;
  right: 8%;
  width: 40px;
  height: 40px;
  border: 1.75px solid var(--color-text-primary);
  transform: rotate(45deg);
  opacity: 0.4;
  background: transparent;
}

/* Shape 4: Refined Outlined Red Circle (Mid Left) */
.shape-ring-md {
  top: 60%;
  left: 6%;
  width: 56px;
  height: 56px;
  border: 1.75px solid var(--color-primary-red);
  border-radius: 50%;
  opacity: 0.48;
  background: transparent;
}

/* Shape 5: Solid Red Circle (Bottom Left) */
.shape-dot-md {
  top: 78%;
  left: 16%;
  width: 8px;
  height: 8px;
  background-color: var(--color-primary-red);
  border-radius: 50%;
  opacity: 0.55;
}

/* Shape 6: Minimalist Geometric Red Cross (Bottom Right) */
.shape-cross {
  top: 72%;
  right: 16%;
  width: 18px;
  height: 18px;
  opacity: 0.48;
}

.shape-cross::before,
.shape-cross::after {
  content: '';
  position: absolute;
  background-color: var(--color-deep-red);
}

.shape-cross::before {
  top: 8px;
  left: 0;
  width: 18px;
  height: 2px;
}

.shape-cross::after {
  top: 0;
  left: 8px;
  width: 2px;
  height: 18px;
}

/* Mobile Adjustments for Ambient Shapes */
@media (max-width: 768px) {
  .shape-ring-lg {
    width: 60px;
    height: 60px;
    top: 10%;
    left: 4%;
  }
  .shape-diamond {
    display: none; /* Reduce visual noise on compact screens */
  }
  .shape-ring-md {
    width: 40px;
    height: 40px;
    left: 3%;
  }
}

/* ==========================================================================
   2. Fallback CSS Floating Animations (if JS / GSAP is not loaded)
   ========================================================================== */
@keyframes scandiFloatA {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(18px, -22px, 0) rotate(8deg); }
  100% { transform: translate3d(0, 0, 0) rotate(0deg); }
}

@keyframes scandiFloatB {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-14px, 20px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

@keyframes scandiFloatC {
  0% { transform: translate3d(0, 0, 0) rotate(45deg); }
  50% { transform: translate3d(12px, 16px, 0) rotate(60deg); }
  100% { transform: translate3d(0, 0, 0) rotate(45deg); }
}

/* Applied via class if GSAP is unavailable */
.ambient-fallback-a {
  animation: scandiFloatA 18s ease-in-out infinite;
}
.ambient-fallback-b {
  animation: scandiFloatB 24s ease-in-out infinite;
}
.ambient-fallback-c {
  animation: scandiFloatC 20s ease-in-out infinite;
}

/* ==========================================================================
   3. Reduced Motion Support
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .ambient-shape {
    transform: none !important;
    animation: none !important;
    opacity: 0.15;
  }

  .category-card:hover {
    transform: none !important;
  }
}
