/* ==========================================================================
   INTEGRAL CONSULTING ENTERPRISE OPERATIONS S.A.S. (I.CEO)
   Sistema de Diseño Corporativo & Motion Design v3.0
   Paleta Oficial Manual de Identidad:
   - Deep Navy:       #002B49 (Primario Estructural)
   - Cyan Arrow:      #0093D0 (Primario Dinámico / CTAs)
   - Solar Ochre:     #D99B26 (Secundario / Núcleo de Valor)
   - Enterprise Slate:#5A6772 (Gris Técnico)
   - Light Tint:      #EEF4F8 (Azul Nube Suave)
   - Clean Canvas:    #FFFFFF (Blanco Puro)
   - Semáforo I.CEO:  #2ECC71 (Verde) | #F1C40F (Amarillo) | #E74C3C (Rojo)
   ========================================================================== */

:root {
  --iceo-navy: #002B49;
  --iceo-navy-dark: #001A2E;
  --iceo-navy-light: #053B60;
  --iceo-cyan: #0093D0;
  --iceo-cyan-light: #38B6EE;
  --iceo-gold: #D99B26;
  --iceo-gold-light: #F3B947;
  --iceo-slate: #5A6772;
  --iceo-tint: #EEF4F8;
  --iceo-white: #FFFFFF;
  --status-green: #2ECC71;
  --status-yellow: #F1C40F;
  --status-red: #E74C3C;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #2D3748;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Montserrat', sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #001A2E;
}
::-webkit-scrollbar-thumb {
  background: #0093D0;
  border-radius: 9999px;
  border: 2px solid #001A2E;
}
::-webkit-scrollbar-thumb:hover {
  background: #D99B26;
}

/* Morphing Header */
.header-morph {
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.header-morph.scrolled {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px -10px rgba(0, 43, 73, 0.14);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* Hero Animated Background & Hexagonal Grid Pattern */
.hero-bg-mesh {
  background-color: var(--iceo-navy);
  background-image:
    radial-gradient(at 80% 20%, rgba(0, 147, 208, 0.22) 0px, transparent 50%),
    radial-gradient(at 15% 85%, rgba(217, 155, 38, 0.14) 0px, transparent 45%),
    radial-gradient(at 50% 50%, rgba(5, 59, 96, 0.8) 0px, transparent 70%);
}

.hex-pattern-overlay {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5L52 17.5V42.5L30 55L8 42.5V17.5L30 5Z' fill='none' stroke='%230093D0' stroke-width='0.6' stroke-opacity='0.12'/%3E%3C/svg%3E");
  background-size: 60px 60px;
}

/* Animated SVG Dashed Connections */
@keyframes dashFlow {
  to {
    stroke-dashoffset: -40;
  }
}

.orbit-line {
  stroke-dasharray: 5 5;
  animation: dashFlow 2.2s linear infinite;
}

@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-6px);
  }
}

.animate-float {
  animation: floatSlow 5s ease-in-out infinite;
}

@keyframes pulseRing {
  0% {
    transform: scale(0.95);
    opacity: 0.75;
  }
  70% {
    transform: scale(1.22);
    opacity: 0;
  }
  100% {
    transform: scale(1.22);
    opacity: 0;
  }
}

.pulse-ring::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 9999px;
  border: 2px solid var(--iceo-cyan);
  animation: pulseRing 2.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  pointer-events: none;
}

/* Satellite Node Interactive States */
.hex-node {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}
.hex-node:hover,
.hex-node.active {
  transform: translateY(-4px) scale(1.06);
}
.hex-node.active .node-circle,
.hex-node:hover .node-circle {
  background: rgba(0, 147, 208, 0.28);
  border-color: #0093D0;
  box-shadow: 0 0 24px rgba(0, 147, 208, 0.45);
}
.hex-node.active .node-label,
.hex-node:hover .node-label {
  color: #FFFFFF;
  font-weight: 600;
}

/* Scroll Reveal Animations */
.reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Bento Card Hover & Subtle 3D Elevation */
.bento-card {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.35s ease;
}
.bento-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px -15px rgba(0, 43, 73, 0.12);
  border-color: rgba(0, 147, 208, 0.35);
}

/* Unit Selector Tab Styling */
.unit-tab {
  transition: all 0.25s ease;
  border-left: 4px solid transparent;
}
.unit-tab:hover {
  background-color: rgba(255, 255, 255, 0.65);
}
.unit-tab.active {
  background-color: #FFFFFF;
  border-left-color: var(--iceo-navy);
  box-shadow: 0 4px 20px -4px rgba(0, 43, 73, 0.08);
}

/* Semáforo Bars Transition */
.semaforo-bar {
  transition: width 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.35s ease;
}

.semaforo-row {
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.semaforo-row.interactive-mode {
  cursor: pointer;
}
.semaforo-row.interactive-mode:hover {
  background-color: #EEF4F8;
  transform: translateX(3px);
}

/* Institutional Motion-Graphics Video Player Animations */
@keyframes radarSweep {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes orbitReverse {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

@keyframes scanLaser {
  0% {
    top: -10%;
    opacity: 0;
  }
  15% {
    opacity: 0.85;
  }
  85% {
    opacity: 0.85;
  }
  100% {
    top: 110%;
    opacity: 0;
  }
}

@keyframes sceneFadeZoom {
  0% {
    opacity: 0;
    transform: scale(0.94) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes barPulseGrow {
  0%, 100% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(1.18);
  }
}

@keyframes dataPacket {
  0% {
    stroke-dashoffset: 120;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.video-radar-sweep {
  background: conic-gradient(from 0deg, transparent 70%, rgba(0, 147, 208, 0.35) 100%);
  animation: radarSweep 6s linear infinite;
}

.video-orbit-cw {
  animation: radarSweep 18s linear infinite;
}

.video-orbit-ccw {
  animation: orbitReverse 24s linear infinite;
}

.video-scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #0093D0, #38B6EE, #0093D0, transparent);
  box-shadow: 0 0 14px #0093D0;
  animation: scanLaser 4.2s ease-in-out infinite;
  pointer-events: none;
}

.motion-scene {
  animation: sceneFadeZoom 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.skyline-bar {
  transform-origin: bottom;
  animation: barPulseGrow 3.6s ease-in-out infinite;
}
.skyline-bar:nth-child(2n) {
  animation-delay: 0.8s;
}
.skyline-bar:nth-child(3n) {
  animation-delay: 1.6s;
}

.data-packet-line {
  stroke-dasharray: 12 28;
  animation: dataPacket 2.4s linear infinite;
}

.video-paused .video-radar-sweep,
.video-paused .video-orbit-cw,
.video-paused .video-orbit-ccw,
.video-paused .video-scan-line,
.video-paused .skyline-bar,
.video-paused .data-packet-line {
  animation-play-state: paused !important;
}


/* Infinite Partner Marquee */
@keyframes marqueeScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 38s linear infinite;
}
.marquee-track:hover {
  animation-play-state: paused;
}

/* WhatsApp Floating Action Button Radar */
@keyframes waPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
  }
  70% {
    box-shadow: 0 0 0 18px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}
.wa-fab {
  animation: waPulse 2.2s infinite;
}

/* Respect Reduced Motion */
@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;
  }
}
