/* Material Symbols Outlined font properties */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}

/* Prevent horizontal overflow across all viewports */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-overflow-scrolling: touch;
}

/* Fine tactical dot-matrix grid with interactive mouse ambient glow */
.bg-tactical-grid {
  background-image: 
    radial-gradient(rgba(28, 28, 22, 0.08) 1.25px, transparent 1.25px),
    linear-gradient(to right, rgba(28, 28, 22, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(28, 28, 22, 0.03) 1px, transparent 1px);
  background-size: 28px 28px, 140px 140px, 140px 140px;
}

/* Ambient reactive cursor spotlight */
#cursor-spotlight {
  background: radial-gradient(650px circle at var(--mouse-x, 50vw) var(--mouse-y, 30vh), rgba(255, 107, 53, 0.085), transparent 75%);
}

/* Radar sweep animation */
@keyframes radarSweep {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.animate-radar-sweep {
  animation: radarSweep 3.2s linear infinite;
}

/* Fast sonar ping for Hunter simulation */
.animate-radar-sweep-fast {
  animation: radarSweep 1.4s linear infinite;
}

/* Looping concentric sonar ripples */
@keyframes pingRings {
  0% { transform: scale(0.65); opacity: 0.95; }
  75% { transform: scale(1.45); opacity: 0.15; }
  100% { transform: scale(1.6); opacity: 0; }
}
.animate-ping-ring {
  animation: pingRings 2.4s cubic-bezier(0.1, 0.3, 0.7, 1) infinite;
}
.animate-ping-ring-fast {
  animation: pingRings 1.2s cubic-bezier(0.1, 0.3, 0.7, 1) infinite;
}
.animate-ping-ring-delayed {
  animation: pingRings 2.4s cubic-bezier(0.1, 0.3, 0.7, 1) infinite 1.2s;
}

/* Tactile button press effect with glowing hover shimmer & micro bounce */
.btn-tactile {
  position: relative;
  box-shadow: 0 4px 0 #1c1c16;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.btn-tactile::before {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-22deg);
  transition: left 0.75s ease;
  pointer-events: none;
}
.btn-tactile:hover::before {
  left: 140%;
}
.btn-tactile:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 #1c1c16, 0 10px 22px -5px rgba(255, 107, 53, 0.35);
}
.btn-tactile:active {
  transform: translateY(2px) scale(0.97);
  box-shadow: 0 1px 0 #1c1c16;
}

/* Secondary tactile button styling */
.btn-tactile-secondary {
  position: relative;
  box-shadow: 0 3px 0 #1c1c16;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-tactile-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #1c1c16, 0 8px 18px -4px rgba(28, 28, 22, 0.15);
}
.btn-tactile-secondary:active {
  transform: translateY(2px) scale(0.98);
  box-shadow: 0 1px 0 #1c1c16;
}

/* Glowing card hover */
.glow-card-hover {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}
.glow-card-hover:hover {
  border-color: rgba(255, 107, 53, 0.65);
  box-shadow: 0 20px 45px -10px rgba(255, 107, 53, 0.18);
}

/* 3D Perspective Card Tilts */
.hero-tilt-stage {
  perspective: 1200px;
}
.hero-tilt-card {
  transition: transform 0.18s cubic-bezier(0.2, 0, 0.3, 1), box-shadow 0.25s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

/* Continuous Live Streaming GPS Dash Animation */
@keyframes flowDash {
  to { stroke-dashoffset: -120; }
}
.route-animated {
  stroke-dasharray: 8 10;
  animation: flowDash 2.4s linear infinite;
}

/* QR Scan laser bar */
@keyframes scanLaser {
  0% { top: 0%; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
.animate-scan-laser {
  animation: scanLaser 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Floating Badge Motion */
@keyframes badgeFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}
.animate-badge-float {
  animation: badgeFloat 3.8s ease-in-out infinite;
}
.animate-badge-float-lag {
  animation: badgeFloat 4.2s ease-in-out infinite 1.5s;
}

/* Expanding Phone Radar Pulse Shockwave */
@keyframes sonarShockwave {
  0% { transform: scale(0.4); opacity: 1; border-width: 4px; }
  60% { opacity: 0.6; }
  100% { transform: scale(2.8); opacity: 0; border-width: 1px; }
}
.animate-sonar-shockwave {
  animation: sonarShockwave 1.1s cubic-bezier(0.1, 0.6, 0.2, 1) forwards;
}

/* Active Haptic Audio Wave Bar Pulsing */
@keyframes audioBarHop {
  0%, 100% { height: 6px; }
  50% { height: 22px; }
}
.audio-wave-bar {
  animation: audioBarHop 0.9s ease-in-out infinite;
}
.audio-wave-bar:nth-child(2) { animation-delay: 0.15s; }
.audio-wave-bar:nth-child(3) { animation-delay: 0.3s; }
.audio-wave-bar:nth-child(4) { animation-delay: 0.45s; }
.audio-wave-bar:nth-child(5) { animation-delay: 0.6s; }
.audio-wave-bar:nth-child(6) { animation-delay: 0.75s; }

/* Stealth Glitch / Ghost Shimmer */
.stealth-active {
  filter: blur(2px) grayscale(0.85);
  opacity: 0.35;
  transition: all 0.5s ease-in-out;
}

/* Tactical Shake */
@keyframes tacticalShake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3px, 2px); }
  40% { transform: translate(3px, -2px); }
  60% { transform: translate(-2px, -2px); }
  80% { transform: translate(2px, 1px); }
}
.shake-once {
  animation: tacticalShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* Reveal On Scroll with smooth keyframe transitions */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  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;
}
.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Touch & Mobile Screen Optimizations */
@media (max-width: 640px) {
  /* Ensure hero 3D card stays steady during touch scroll */
  .hero-tilt-card {
    transform: none !important;
  }
  
  /* Buttons provide minimum touch target size */
  .btn-tactile, .btn-tactile-secondary {
    min-height: 44px;
  }
  
  /* Disable heavy spotlight on touch devices */
  #cursor-spotlight {
    display: none;
  }
}

/* Respect Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .route-animated,
  .animate-radar-sweep,
  .animate-radar-sweep-fast,
  .animate-ping-ring,
  .animate-ping-ring-fast,
  .animate-ping-ring-delayed,
  .animate-badge-float,
  .animate-badge-float-lag,
  .animate-scan-laser,
  .audio-wave-bar {
    animation: none !important;
  }
  .btn-tactile,
  .btn-tactile-secondary,
  .hero-tilt-card,
  .reveal-on-scroll {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}
