/* ==========================================================================
   TILS - COMPLETE SCROLL & CARD ANIMATIONS ENGINE
   ========================================================================== */

/* --- 1. Scroll-Trigger Reveal Animations (Cards, Headings, Sections) --- */
.reveal-fade {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

/* Activated via IntersectionObserver in js/main.js */
.reveal-fade.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered Delay for Multi-Card Grids */
.delay-1 { transition-delay: 0.12s; }
.delay-2 { transition-delay: 0.24s; }
.delay-3 { transition-delay: 0.36s; }
.delay-4 { transition-delay: 0.48s; }

/* --- 2. Interactive Card Hover & Lift Animations --- */
.glass-card,
.service-card,
.case-card,
.team-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 !important;
}

.glass-card:hover,
.service-card:hover,
.case-card:hover,
.team-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 16px 36px -6px rgba(11, 34, 70, 0.14) !important;
  border-color: #93C5FD !important;
}

/* --- 3. Floating Telemetry Card Animation --- */
@keyframes floatSmooth {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

.animate-float {
  animation: floatSmooth 4.5s ease-in-out infinite;
}

/* --- 4. Desktop 3D Wireframe / Orbit Visual --- */
.futuristic-orbit-visual {
  position: relative;
  width: 420px;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(0, 86, 179, 0.25);
  box-shadow: 0 0 15px rgba(0, 86, 179, 0.08);
}

.orbit-ring-1 {
  width: 100%;
  height: 100%;
  animation: rotateClockwise 28s linear infinite;
  border-left-color: var(--brand-yellow);
}

.orbit-ring-2 {
  width: 75%;
  height: 75%;
  border: 1px solid rgba(0, 86, 179, 0.2);
  border-top-color: var(--brand-blue);
  animation: rotateCounterClockwise 18s linear infinite;
}

.orbit-ring-3 {
  width: 50%;
  height: 50%;
  border: 1px dotted rgba(245, 158, 11, 0.35);
  animation: rotateClockwise 12s linear infinite;
}

.orbit-node {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand-blue);
  box-shadow: 0 0 10px rgba(0, 86, 179, 0.4);
}

/* Orbit Keyframes */
@keyframes rotateClockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

/* --- 5. Ambient Glowing Background Bubble --- */
.cyber-orb-bg {
  position: absolute;
  top: 40%;
  right: -5%;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 86, 179, 0.08) 0%, rgba(255, 184, 0, 0.04) 50%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
  animation: pulseSubtle 7s ease-in-out infinite alternate;
}

@keyframes pulseSubtle {
  0% { transform: scale(0.92); opacity: 0.6; }
  100% { transform: scale(1.08); opacity: 1; }
}

/* --- 6. Live Status Beacon Pulse --- */
.beacon-dot {
  width: 8px;
  height: 8px;
  background-color: #10B981;
  border-radius: 50%;
  position: relative;
  display: inline-block;
}

.beacon-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid #10B981;
  animation: beaconPulse 2s ease-out infinite;
}

@keyframes beaconPulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* --- 7. Mobile Optimization (Prevents Overflows on Small Screens) --- */
@media (max-width: 768px) {
  .orbit-ring {
    display: none !important; /* Rings hidden on mobile to avoid overflow */
  }

  .futuristic-orbit-visual {
    width: 100% !important;
    height: auto !important;
    margin: 1.5rem auto 0 auto !important;
  }

  .cyber-orb-bg {
    width: 260px !important;
    height: 260px !important;
    right: 50% !important;
    transform: translateX(50%) !important;
    top: 15% !important;
  }
}

/* --- 8. Accessibility: 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;
  }
  .reveal-fade {
    opacity: 1 !important;
    transform: none !important;
  }
}
