/* ============================================================
   LAB HERO ANIMATION — Movement Hub
   Clean, professional with subtle motion
   Distinct from Obsidian constellation and Sentinel radial
   ============================================================ */

.lab-hero-animation {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

/* Show only when Lab version active */
body[data-version="lab"] .lab-hero-animation {
  opacity: 1;
}

/* Hide Obsidian animation when Lab active */
body[data-version="lab"] .hero-animation canvas {
  opacity: 0;
}

/* Hide Sentinel animation when Lab active */
body[data-version="lab"] .sentinel-hero-animation {
  opacity: 0 !important;
  visibility: hidden;
}

/* ============================================================
   SUBTLE GRID — Clean, professional background
   ============================================================ */

.lab-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(0deg, rgba(20, 184, 166, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 184, 166, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.5;
}

/* ============================================================
   FLOATING PARTICLES — Subtle ambient motion
   ============================================================ */

.lab-nodes {
  position: absolute;
  inset: 0;
}

.lab-node {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(20, 184, 166, 0.5);
  border-radius: 50%;
  animation: labFloat 20s ease-in-out infinite;
}

.lab-node:nth-child(1) { top: 20%; left: 15%; animation-delay: 0s; }
.lab-node:nth-child(2) { top: 30%; left: 45%; animation-delay: 2s; }
.lab-node:nth-child(3) { top: 15%; left: 75%; animation-delay: 4s; }
.lab-node:nth-child(4) { top: 60%; left: 25%; animation-delay: 6s; }
.lab-node:nth-child(5) { top: 50%; left: 60%; animation-delay: 8s; }
.lab-node:nth-child(6) { top: 70%; left: 80%; animation-delay: 10s; }
.lab-node:nth-child(7) { top: 80%; left: 35%; animation-delay: 12s; }
.lab-node:nth-child(8) { top: 40%; left: 85%; animation-delay: 14s; }

@keyframes labFloat {
  0%, 100% {
    opacity: 0.3;
    transform: translateY(0) scale(1);
  }
  50% {
    opacity: 0.6;
    transform: translateY(-20px) scale(1.2);
  }
}

/* ============================================================
   GRADIENT ACCENT — Subtle brand color wash
   ============================================================ */

.lab-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 50% at 70% 40%,
    rgba(20, 184, 166, 0.08) 0%,
    transparent 70%
  );
  pointer-events: none;
}

/* Secondary gradient */
.lab-gradient::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 60% 40% at 20% 70%,
    rgba(139, 92, 246, 0.05) 0%,
    transparent 60%
  );
}

/* ============================================================
   CORNER ACCENTS — Minimal, professional brackets
   ============================================================ */

.lab-brackets {
  position: absolute;
  inset: 24px;
  pointer-events: none;
}

.lab-bracket {
  position: absolute;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(20, 184, 166, 0.3);
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

/* Top-left bracket */
.lab-bracket.tl {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}

/* Top-right bracket */
.lab-bracket.tr {
  top: 0;
  right: 0;
  border-left: none;
  border-bottom: none;
}

/* Bottom-left bracket */
.lab-bracket.bl {
  bottom: 0;
  left: 0;
  border-right: none;
  border-top: none;
}

/* Bottom-right bracket */
.lab-bracket.br {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
}

/* ============================================================
   SCANNER LINE — Subtle sweep (less aggressive)
   ============================================================ */

.lab-scanner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    transparent 30%,
    rgba(20, 184, 166, 0.4) 50%,
    transparent 70%,
    transparent 100%
  );
  animation: labScan 12s linear infinite;
}

@keyframes labScan {
  0% {
    top: 0;
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  95% {
    opacity: 1;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

/* ============================================================
   LIGHT MODE ADJUSTMENTS
   ============================================================ */

body[data-theme="light"] .lab-grid {
  background-image:
    linear-gradient(0deg, rgba(20, 184, 166, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 184, 166, 0.06) 1px, transparent 1px);
  opacity: 0.7;
}

body[data-theme="light"] .lab-bracket {
  border-color: rgba(20, 184, 166, 0.5);
}

body[data-theme="light"] .lab-scanner {
  background: linear-gradient(
    90deg,
    transparent 0%,
    transparent 30%,
    rgba(20, 184, 166, 0.6) 50%,
    transparent 70%,
    transparent 100%
  );
}

body[data-theme="light"] .lab-node {
  background: rgba(20, 184, 166, 0.7);
}

body[data-theme="light"] .lab-gradient {
  background: radial-gradient(
    ellipse 80% 50% at 70% 40%,
    rgba(20, 184, 166, 0.06) 0%,
    transparent 70%
  );
}

body[data-theme="light"] .lab-gradient::after {
  background: radial-gradient(
    ellipse 60% 40% at 20% 70%,
    rgba(139, 92, 246, 0.04) 0%,
    transparent 60%
  );
}

/* ============================================================
   MOBILE ADJUSTMENTS
   ============================================================ */

@media (max-width: 768px) {
  .lab-grid {
    background-size: 40px 40px;
  }

  .lab-bracket {
    width: 24px;
    height: 24px;
  }

  .lab-node {
    width: 3px;
    height: 3px;
  }
}

@media (max-width: 480px) {
  .lab-grid {
    background-size: 30px 30px;
  }

  .lab-bracket {
    width: 20px;
    height: 20px;
  }

  .lab-brackets {
    inset: 16px;
  }
}

/* ============================================================
   REDUCED MOTION — Disable animations
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .lab-grid,
  .lab-bracket,
  .lab-scanner,
  .lab-node {
    animation: none;
  }

  .lab-scanner {
    display: none;
  }

  .lab-grid {
    opacity: 0.4;
  }

  .lab-bracket {
    opacity: 0.5;
  }

  .lab-node {
    opacity: 0.4;
  }
}
