/* ScanHaul figure: the LiDAR drive lane (assets/lane/). Homepage only, via index.njk front matter.
   The panel stays dark: point clouds read best on it, and the poster image is dark too. */

.feature .fig.lane-fig {
  padding: 0;
  overflow: hidden;
  background: #0b0c0e;
  border-color: transparent;
}
/* The figure's label, light over the dark panel */
.feature .lane-fig > .mono {
  z-index: 2;
  color: rgba(255, 255, 255, 0.78);
  pointer-events: none;
}

.lane-viewer {
  position: absolute;
  inset: 0;
}
.lane-poster, .lane-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* drive-lane.js adds the canvas; it fades in over the poster once a vehicle is on it */
.lane-viewer canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.lane-viewer.is-live canvas { opacity: 1; }
@media (pointer: fine) {
  .lane-viewer canvas { cursor: grab; }
  .lane-viewer canvas:active { cursor: grabbing; }
}

/* Inset past the figure's 48px corner curve; may wrap to two lines on phones */
.lane-viewer-caption {
  position: absolute;
  left: 20px;
  bottom: 20px;
  max-width: calc(100% - 40px);
  padding: 6px 12px;
  border-radius: 14px;
  background: rgba(11, 12, 14, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f2f2f0;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  z-index: 1;
}
.lane-viewer-caption:empty { display: none; }
.lane-part { white-space: nowrap; }
.lane-viewer-caption b { color: #fff; font-weight: 700; }

/* "Scanning" light: brand red */
.lane-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 1px;
  animation: lane-pulse 1s ease-in-out infinite;
}
@keyframes lane-pulse { 50% { opacity: 0.3; } }

/* No WebGL or no data: the poster alone */
.lane-viewer--static canvas, .lane-viewer--static .lane-viewer-caption { display: none; }

@media (max-width: 768px) {
  .lane-viewer-caption { left: 16px; bottom: 16px; max-width: calc(100% - 32px); padding: 5px 10px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .lane-dot { animation: none; }
  .lane-viewer canvas { transition: none; }
}

/* ScanBarge figure: the load replay (assets/lane/barge/) reuses the lane panel above.
   Its final scan is coloured by distance from design; this key shows only then. */
.barge-legend {
  position: absolute;
  top: 16px;
  right: 20px;
  display: flex;
  gap: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  pointer-events: none;
  z-index: 1;
}
.barge-legend[hidden] { display: none; }
.barge-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-radius: 2px;
}
@media (max-width: 768px) {
  .barge-legend { top: auto; bottom: 56px; left: 16px; right: auto; gap: 8px; }
}
