/**
 * PROCESS FLOW TRANSFORMATION ANIMATION STYLES
 * Professional business transformation visualization
 *
 * BACKUP - Original Settings (2026-01-04):
 * .chaos-control-container max-width: 1400px
 * .chaos-control-container padding: 0 10px
 */

/* Container Styles */
.chaos-control-section {
  width: 100%;
  padding: 0;
  background: transparent;
  position: relative;
  overflow: hidden;
}

.chaos-control-container {
  width: 100%;
  max-width: 2100px;  /* Changed from 1400px to make animation wider */
  margin: 0 auto;
  padding: 0 20px;  /* Changed from 0 10px for better edge spacing */
}

.chaos-control-animation {
  width: 100%;
  height: 100%;
  min-height: 900px;
  position: relative;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* SVG Styling */
#process-flow-svg {
  width: 100%;
  height: auto;
  min-height: 900px;
  transform: scale(1.3);
  transform-origin: center center;
  filter: drop-shadow(0 0 20px rgba(20, 184, 166, 0.1));
}

/* Process Nodes */
.process-node {
  transition: all 0.3s ease-in-out;
  cursor: pointer;
}

.process-node:hover {
  filter: url(#glow) brightness(1.2);
  transform: scale(1.1);
}

/* Connection Lines */
.connection-line {
  transition: stroke 0.5s ease-in-out, opacity 0.5s ease-in-out;
}

.new-connection {
  transition: stroke-dashoffset 1s ease-in-out, opacity 0.3s ease-in-out;
}

/* Animations */
@keyframes dash {
  to {
    stroke-dashoffset: -10;
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scanLine {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

/* Step Label Animation - handles "From Chaos" → steps → "To Control" */
#step-label {
  transition: opacity 0.5s ease-in-out;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 255, 255, 0.3);
  letter-spacing: 1px;
}

/* Grid Lines */
#grid-lines {
  transition: opacity 0.8s ease-in-out;
}

/* Pulsating Lines - smooth transitions */
.new-connection {
  transition: stroke-width 0.6s ease-in-out, opacity 0.6s ease-in-out;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .chaos-control-section {
    padding: 30px 0;
  }

  .chaos-control-animation {
    min-height: 600px;
  }

  #process-flow-svg {
    min-height: 600px;
    max-height: 750px;
  }

  #step-label {
    font-size: 40px;
  }
}

@media (max-width: 768px) {
  .chaos-control-section {
    padding: 20px 0;
  }

  .chaos-control-container {
    padding: 0;
  }

  .chaos-control-animation {
    min-height: 550px;
  }

  #process-flow-svg {
    min-height: 550px;
    max-height: 700px;
  }

  #step-label {
    font-size: 120px !important;
    font-weight: 900 !important;
  }
}

@media (max-width: 480px) {
  .chaos-control-section {
    padding: 10px 0;
  }

  .chaos-control-container {
    padding: 0;
  }

  .chaos-control-animation {
    min-height: 500px;
  }

  #process-flow-svg {
    min-height: 500px;
    max-height: 650px;
  }

  #step-label {
    font-size: 100px !important;
    font-weight: 900 !important;
  }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .process-node,
  .connection-line,
  .new-connection,
  #step-label,
  #tagline,
  #grid-lines {
    transition: none !important;
    animation: none !important;
  }

  #flow-particles circle {
    display: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .process-node {
    stroke: white;
    stroke-width: 2;
  }

  .connection-line,
  .new-connection {
    stroke-width: 3;
  }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
  #process-flow-svg {
    filter: drop-shadow(0 0 30px rgba(20, 184, 166, 0.2));
  }
}

/* Loading State */
.chaos-control-animation.loading {
  opacity: 0;
}

.chaos-control-animation.loaded {
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
}

/* Performance Optimization */
.process-node,
.connection-line,
.new-connection {
  will-change: transform, opacity;
}

/* GPU Acceleration */
#process-flow-svg {
  transform: translateZ(0);
  backface-visibility: hidden;
}
