/* ===== HERO BACKGROUND EFFECTS & PARTICLES ===== */
/* Background animations and particle effects specific to the hero section of index.html */

/* ===== CUSTOM SIGMA BACKGROUND SYSTEM ===== */

.sigma-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
}

/* ===== GEOMETRIC GRID SYSTEM ===== */

.geometric-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.15;
}

.grid-line {
  position: absolute;
  background: linear-gradient(45deg, #667eea, #764ba2);
  animation: gridPulse 8s ease-in-out infinite;
}

.grid-line.horizontal {
  left: 0;
  right: 0;
  height: 1px;
}

.grid-line.vertical {
  top: 0;
  bottom: 0;
  width: 1px;
}

@keyframes gridPulse {
  0%,
  100% {
    opacity: 0.1;
    transform: scaleY(1);
  }
  50% {
    opacity: 0.3;
    transform: scaleY(1.02);
  }
}

/* ===== SIGMA SYMBOL BRANDING ===== */

.sigma-symbols {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.sigma-symbol {
  position: absolute;
  font-family: "Times New Roman", serif;
  font-size: 120px;
  font-weight: 300;
  color: rgba(102, 126, 234, 0.04);
  pointer-events: none;
  animation: sigmaFloat 15s ease-in-out infinite;
  transform-origin: center;
}

.sigma-1 {
  top: 15%;
  left: 8%;
  animation-delay: 0s;
  animation-duration: 18s;
}

.sigma-2 {
  top: 60%;
  right: 12%;
  animation-delay: 4s;
  animation-duration: 20s;
  font-size: 90px;
}

.sigma-3 {
  bottom: 25%;
  left: 70%;
  animation-delay: 8s;
  animation-duration: 16s;
  font-size: 100px;
}

.sigma-4 {
  top: 35%;
  left: 85%;
  animation-delay: 12s;
  animation-duration: 22s;
  font-size: 80px;
}

.sigma-5 {
  bottom: 45%;
  left: 5%;
  animation-delay: 6s;
  animation-duration: 14s;
  font-size: 110px;
}

@keyframes sigmaFloat {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg) scale(1);
    opacity: 0.03;
  }
  25% {
    transform: translateY(-20px) rotate(2deg) scale(1.05);
    opacity: 0.06;
  }
  50% {
    transform: translateY(-10px) rotate(-1deg) scale(0.95);
    opacity: 0.08;
  }
  75% {
    transform: translateY(-30px) rotate(3deg) scale(1.02);
    opacity: 0.04;
  }
}

/* ===== ABSTRACT GEOMETRIC SHAPES ===== */

.abstract-shapes {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.shape {
  position: absolute;
  animation: shapeTransform 12s ease-in-out infinite;
}

.shape-triangle {
  top: 20%;
  right: 25%;
  width: 0;
  height: 0;
  border-left: 25px solid transparent;
  border-right: 25px solid transparent;
  border-bottom: 43px solid rgba(102, 126, 234, 0.1);
  animation-delay: 0s;
}

.shape-circle {
  bottom: 30%;
  left: 20%;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(118, 75, 162, 0.15),
    rgba(102, 126, 234, 0.05)
  );
  animation-delay: 3s;
}

.shape-hexagon {
  top: 70%;
  right: 15%;
  width: 40px;
  height: 23px;
  background: rgba(79, 172, 254, 0.1);
  position: relative;
  animation-delay: 6s;
}

.shape-hexagon::before,
.shape-hexagon::after {
  content: "";
  position: absolute;
  width: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
}

.shape-hexagon::before {
  bottom: 100%;
  border-bottom: 11px solid rgba(79, 172, 254, 0.1);
}

.shape-hexagon::after {
  top: 100%;
  border-top: 11px solid rgba(79, 172, 254, 0.1);
}

.shape-diamond {
  top: 45%;
  left: 75%;
  width: 30px;
  height: 30px;
  background: rgba(34, 197, 94, 0.1);
  transform: rotate(45deg);
  animation-delay: 9s;
}

@keyframes shapeTransform {
  0%,
  100% {
    transform: translateY(0px) scale(1) rotate(0deg);
    opacity: 0.8;
  }
  25% {
    transform: translateY(-15px) scale(1.1) rotate(90deg);
    opacity: 1;
  }
  50% {
    transform: translateY(-8px) scale(0.9) rotate(180deg);
    opacity: 0.6;
  }
  75% {
    transform: translateY(-20px) scale(1.05) rotate(270deg);
    opacity: 0.9;
  }
}

/* ===== DATA FLOW VISUALIZATION ===== */

.data-flow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.flow-svg {
  width: 100%;
  height: 100%;
  opacity: 0.7;
}

.flow-path {
  stroke-dasharray: 20 10;
  animation: pathFlow 8s linear infinite;
}

.path-1 {
  animation-delay: 0s;
}

.path-2 {
  animation-delay: 2s;
}

.path-3 {
  animation-delay: 4s;
}

@keyframes pathFlow {
  0% {
    stroke-dashoffset: 0;
    opacity: 0.4;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    stroke-dashoffset: 30;
    opacity: 0.4;
  }
}

.data-point {
  filter: drop-shadow(0 0 6px rgba(102, 126, 234, 0.6));
  opacity: 0.9;
}

/* ===== NEURAL NETWORK NODES ===== */

.neural-network {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.network-node {
  position: absolute;
  width: 12px;
  height: 12px;
  background: radial-gradient(
    circle,
    rgba(102, 126, 234, 0.8),
    rgba(118, 75, 162, 0.4)
  );
  border-radius: 50%;
  animation: nodePulse 4s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

.node-1 {
  top: 25%;
  left: 30%;
  animation-delay: 0s;
}

.node-2 {
  top: 45%;
  right: 35%;
  animation-delay: 0.5s;
}

.node-3 {
  bottom: 35%;
  left: 45%;
  animation-delay: 1s;
}

.node-4 {
  top: 65%;
  left: 25%;
  animation-delay: 1.5s;
}

.node-5 {
  top: 30%;
  right: 20%;
  animation-delay: 2s;
}

.node-6 {
  bottom: 20%;
  right: 40%;
  animation-delay: 2.5s;
}

@keyframes nodePulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.5);
    opacity: 1;
  }
}

/* Connect nodes with lines (pseudo-elements) */
.network-node::after {
  content: "";
  position: absolute;
  width: 100px;
  height: 1px;
  background: linear-gradient(90deg, rgba(102, 126, 234, 0.3), transparent);
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  animation: connectionFlow 6s ease-in-out infinite;
}

@keyframes connectionFlow {
  0%,
  100% {
    opacity: 0.2;
    transform: translateY(-50%) scaleX(1);
  }
  50% {
    opacity: 0.6;
    transform: translateY(-50%) scaleX(1.2);
  }
}

/* ===== ENHANCED HERO PATTERN ===== */

.hero-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(
      circle at 20% 30%,
      rgba(102, 126, 234, 0.03) 1px,
      transparent 1px
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(118, 75, 162, 0.03) 1px,
      transparent 1px
    );
  background-size: 50px 50px, 70px 70px;
  opacity: 0.6;
  animation: patternShift 20s ease-in-out infinite;
}

@keyframes patternShift {
  0%,
  100% {
    transform: translateX(0) translateY(0);
  }
  50% {
    transform: translateX(20px) translateY(-20px);
  }
}

/* ===== MOTION GRAPHICS SYSTEM ===== */

.motion-graphics {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

/* ===== ENHANCED FLOATING SHAPES ===== */

.floating-shape {
  position: absolute;
  animation: floatShape 8s ease-in-out infinite;
  opacity: 0.9;
  transform-origin: center;
}

.floating-shape.shape-1 {
  top: 10%;
  left: 8%;
  width: 120px;
  height: 120px;
  animation: floatShapeComplex 12s ease-in-out infinite;
  animation-delay: 0s;
}

.floating-shape.shape-2 {
  top: 60%;
  right: 12%;
  width: 100px;
  height: 100px;
  animation: floatShapeReverse 14s ease-in-out infinite;
  animation-delay: 2s;
}

.floating-shape.shape-3 {
  bottom: 25%;
  left: 75%;
  width: 90px;
  height: 90px;
  animation: floatShapeRotate 16s ease-in-out infinite;
  animation-delay: 4s;
}

.floating-shape.shape-4 {
  top: 35%;
  left: 15%;
  width: 70px;
  height: 70px;
  animation: floatShapePulse 10s ease-in-out infinite;
  animation-delay: 1s;
}

.floating-shape.shape-5 {
  bottom: 45%;
  right: 25%;
  width: 60px;
  height: 60px;
  animation: floatShapeOrbit 18s linear infinite;
  animation-delay: 3s;
}

.floating-shape svg {
  width: 100%;
  height: 100%;
  filter: blur(0.3px);
  transition: all var(--transition-normal);
}

.floating-shape:hover svg {
  filter: blur(0px);
  transform: scale(1.1);
}

/* ===== ADVANCED ANIMATION KEYFRAMES ===== */

@keyframes floatShapeComplex {
  0%,
  100% {
    transform: translateY(0px) translateX(0px) rotate(0deg) scale(1);
  }
  25% {
    transform: translateY(-30px) translateX(15px) rotate(90deg) scale(1.1);
  }
  50% {
    transform: translateY(-15px) translateX(30px) rotate(180deg) scale(0.9);
  }
  75% {
    transform: translateY(-40px) translateX(10px) rotate(270deg) scale(1.05);
  }
}

@keyframes floatShapeReverse {
  0%,
  100% {
    transform: translateY(0px) translateX(0px) rotate(0deg);
  }
  33% {
    transform: translateY(25px) translateX(-20px) rotate(-120deg);
  }
  66% {
    transform: translateY(-10px) translateX(-35px) rotate(-240deg);
  }
}

@keyframes floatShapeRotate {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg) scale(1);
  }
  50% {
    transform: translateY(-25px) rotate(180deg) scale(1.2);
  }
}

@keyframes floatShapePulse {
  0%,
  100% {
    transform: scale(1) translateY(0px);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.3) translateY(-15px);
    opacity: 1;
  }
}

@keyframes floatShapeOrbit {
  0% {
    transform: rotate(0deg) translateX(30px) rotate(0deg);
  }
  100% {
    transform: rotate(360deg) translateX(30px) rotate(-360deg);
  }
}

/* ===== PARTICLE SYSTEM ===== */

.particles {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: linear-gradient(45deg, #667eea, #764ba2);
  border-radius: 50%;
  opacity: 0.6;
  animation: particleFloat 8s ease-in-out infinite;
}

.particle-1 {
  top: 20%;
  left: 20%;
  animation-delay: 0s;
  animation-duration: 12s;
}

.particle-2 {
  top: 50%;
  left: 80%;
  animation-delay: 2s;
  animation-duration: 15s;
  background: linear-gradient(45deg, #f093fb, #f5576c);
}

.particle-3 {
  top: 80%;
  left: 30%;
  animation-delay: 4s;
  animation-duration: 10s;
  background: linear-gradient(45deg, #4facfe, #00f2fe);
}

.particle-4 {
  top: 15%;
  left: 70%;
  animation-delay: 1s;
  animation-duration: 14s;
  background: linear-gradient(45deg, #22c55e, #16a34a);
}

.particle-5 {
  top: 40%;
  left: 10%;
  animation-delay: 3s;
  animation-duration: 11s;
  width: 3px;
  height: 3px;
}

.particle-6 {
  top: 70%;
  left: 90%;
  animation-delay: 5s;
  animation-duration: 13s;
  width: 5px;
  height: 5px;
}

.particle-7 {
  top: 30%;
  left: 50%;
  animation-delay: 2.5s;
  animation-duration: 16s;
  background: linear-gradient(45deg, #8b5cf6, #a855f7);
}

.particle-8 {
  top: 60%;
  left: 25%;
  animation-delay: 6s;
  animation-duration: 9s;
  width: 2px;
  height: 2px;
}

@keyframes particleFloat {
  0%,
  100% {
    transform: translateY(0px) translateX(0px) scale(1);
    opacity: 0.3;
  }
  25% {
    transform: translateY(-50px) translateX(20px) scale(1.2);
    opacity: 0.8;
  }
  50% {
    transform: translateY(-30px) translateX(-15px) scale(0.8);
    opacity: 1;
  }
  75% {
    transform: translateY(-70px) translateX(30px) scale(1.1);
    opacity: 0.6;
  }
}

/* ===== HERO FLOATING ELEMENTS (Generated by JS) ===== */

.hero-floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.hero-morphing-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    rgba(102, 126, 234, 0.08),
    rgba(118, 75, 162, 0.08),
    rgba(240, 147, 251, 0.08),
    rgba(245, 87, 108, 0.08)
  );
  background-size: 400% 400%;
  animation: heroMorphingGradient 20s ease infinite;
  z-index: 0;
}

/* ===== PARTICLE CONTAINERS (Generated by JS) ===== */

#heroParticles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* ===== PARTICLE SYSTEM STYLES ===== */

.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform, opacity;
}

.particle-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.morphing-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */

@media (max-width: 1024px) {
  .sigma-symbol {
    font-size: 80px;
  }

  .sigma-2,
  .sigma-4 {
    font-size: 60px;
  }

  .sigma-3,
  .sigma-5 {
    font-size: 70px;
  }

  .geometric-grid {
    opacity: 0.1;
  }

  .network-node {
    width: 10px;
    height: 10px;
  }

  .floating-shape {
    opacity: 0.7;
  }

  .floating-shape.shape-4,
  .floating-shape.shape-5 {
    display: none;
  }

  .particles {
    opacity: 0.5;
  }
}

@media (max-width: 768px) {
  .sigma-symbols {
    opacity: 0.8;
  }

  .abstract-shapes {
    opacity: 0.7;
  }

  .data-flow {
    opacity: 0.5;
  }

  .neural-network {
    opacity: 0.6;
  }

  .motion-graphics {
    opacity: 0.6;
  }

  .floating-shape.shape-3 {
    display: none;
  }

  .particle {
    opacity: 0.4;
  }

  .hero-floating-elements > div {
    animation-duration: 10s;
  }
}

@media (max-width: 480px) {
  .sigma-symbol {
    font-size: 50px;
  }

  .geometric-grid,
  .neural-network {
    display: none;
  }

  .data-flow {
    opacity: 0.3;
  }

  .floating-shape.shape-2 {
    display: none;
  }

  .particles {
    display: none;
  }
}

/* ===== REDUCED MOTION SUPPORT ===== */

@media (prefers-reduced-motion: reduce) {
  .floating-shape,
  .particle,
  .sigma-symbol,
  .shape,
  .network-node,
  .hero-floating-elements > div,
  .hero-morphing-background {
    animation: none !important;
    transition: none !important;
  }

  .floating-shape svg {
    transition: none;
  }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */

.floating-shape,
.particle,
.sigma-symbol,
.shape,
.network-node {
  will-change: transform;
  transform: translateZ(0);
}

/* ===== KEYFRAME FOR SLOW PAN (FROM INLINE STYLES) ===== */

@keyframes bg-pan {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}
