/* ==========================================================================
   XOBIX METROLOGY - FLUID TRANSITIONS & DYNAMIC INTERACTION EFFECTS
   ========================================================================== */

/* Custom Magnetic Fluid Cursor */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              height 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.2s ease,
              border-color 0.2s ease;
  mix-blend-mode: screen;
}

.cursor-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  background: var(--cyan-laser);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px var(--cyan-laser), 0 0 20px #00f0ff;
  transition: transform 0.15s ease;
}

.cursor-ring {
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(0, 240, 255, 0.6);
  border-radius: 50%;
  animation: spinSlow 12s linear infinite;
  transition: all 0.25s ease;
}

/* Crosshair calipers on cursor */
.cursor-crosshair-x,
.cursor-crosshair-y {
  position: absolute;
  background: rgba(0, 240, 255, 0.4);
  pointer-events: none;
}
.cursor-crosshair-x {
  top: 50%;
  left: -8px;
  right: -8px;
  height: 1px;
  transform: translateY(-50%);
}
.cursor-crosshair-y {
  left: 50%;
  top: -8px;
  bottom: -8px;
  width: 1px;
  transform: translateX(-50%);
}

.cursor-trail {
  position: fixed;
  top: 0;
  left: 0;
  width: 16px;
  height: 16px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.08s linear, opacity 0.3s ease;
}

/* Cursor states */
.custom-cursor.hovering {
  width: 56px;
  height: 56px;
}
.custom-cursor.hovering .cursor-ring {
  border: 1.5px solid var(--cyan-laser);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.5), inset 0 0 10px rgba(0, 240, 255, 0.2);
}
.custom-cursor.hovering .cursor-dot {
  transform: translate(-50%, -50%) scale(2);
  background: #ffffff;
}

/* Fluid Card Mouse Spotlight (Shine follow effect) */
.fluid-card-spotlight {
  position: relative;
  overflow: hidden;
}

.fluid-card-spotlight::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: radial-gradient(
    650px circle at var(--mouse-x, -1000px) var(--mouse-y, -1000px),
    rgba(0, 240, 255, 0.16),
    transparent 60%
  );
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.fluid-card-spotlight:hover::before {
  opacity: 1;
}

/* Glowing Border Beam on Hover */
.border-beam-card {
  position: relative;
  background: rgba(6, 12, 28, 0.75);
  border-radius: 8px;
  border: 1px solid rgba(0, 240, 255, 0.15);
  overflow: hidden;
  transition: border-color 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.border-beam-card:hover {
  border-color: rgba(0, 240, 255, 0.55);
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -10px rgba(0, 119, 255, 0.3), 0 0 20px rgba(0, 240, 255, 0.2);
}

/* Fluid Tabs indicator */
.fluid-tab-container {
  position: relative;
  display: inline-flex;
  padding: 4px;
  background: rgba(3, 7, 18, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 8px;
}

.fluid-tab-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.25) 0%, rgba(0, 119, 255, 0.4) 100%);
  border: 1px solid var(--cyan-laser);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.35);
  transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1), width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

/* Fluid Ripple Effect on Click */
.fluid-ripple {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.6) 0%, transparent 70%);
  transform: scale(0);
  animation: rippleAnimation 0.6s linear;
  pointer-events: none;
}

@keyframes rippleAnimation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Fluid Wave Separators */
.fluid-wave-divider {
  position: relative;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  transform: translateZ(0);
}

.fluid-wave-divider svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 60px;
}

.fluid-wave-divider .shape-fill {
  fill: #030712;
}

/* Fluid Hologram shimmer */
.holo-shimmer {
  background: linear-gradient(
    110deg,
    rgba(255, 255, 255, 0) 20%,
    rgba(0, 240, 255, 0.15) 35%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(0, 240, 255, 0.15) 65%,
    rgba(255, 255, 255, 0) 80%
  );
  background-size: 200% 100%;
  animation: holoSweep 6s infinite ease-in-out;
}

@keyframes holoSweep {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Fluid Transition Fade & Slide classes */
.fluid-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fluid-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delay helpers */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* Interactive 3D Canvas Container */
.three-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 540px;
  background: radial-gradient(circle at center, rgba(14, 28, 64, 0.5) 0%, rgba(3, 7, 18, 0.95) 85%);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 12px;
  overflow: hidden;
}

/* Telemetry readout panel */
.telemetry-overlay {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(3, 7, 18, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 6px;
  padding: 12px 16px;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #94a3b8;
  z-index: 10;
}

.telemetry-overlay .val {
  color: var(--cyan-laser);
  font-weight: 600;
}

/* 3D Scene Controls HUD */
.three-controls-hud {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 30px;
  padding: 6px 12px;
  z-index: 10;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.three-hud-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-family: var(--font-display);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.three-hud-btn:hover,
.three-hud-btn.active {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--cyan-laser);
  color: var(--cyan-laser);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

/* Virtual Metrology Lab Heatmap Legend */
.heatmap-bar {
  height: 12px;
  border-radius: 3px;
  background: linear-gradient(90deg, #3b82f6 0%, #06b6d4 25%, #10b981 50%, #eab308 75%, #ef4444 100%);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.2);
}
