/* FirstRunTour overlay — spotlight walkthrough (Griffin spec 2026-09-10).
   White ring + arrow, darkened surroundings, one-line tooltip card. */

#frt-root {
  position: fixed;
  inset: 0;
  z-index: 200000;
  pointer-events: auto;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

/* On the interactive (spin) step the backdrop lets touches through to the reactor;
   only the tooltip card stays tappable. */
#frt-root.frt-interactive { pointer-events: none; }
#frt-root.frt-interactive #frt-tip { pointer-events: auto; }

#frt-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#frt-ring {
  fill: none;
  stroke: #ffffff;
  stroke-width: 3;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.85));
  animation: frt-ring-pulse 1.8s ease-in-out infinite;
}

@keyframes frt-ring-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

#frt-arrow {
  stroke: #ffffff;
  stroke-width: 3;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));
}

/* Tooltip card */
#frt-tip {
  position: absolute;
  background: rgba(14, 14, 24, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  padding: 16px 16px 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  color: #fff;
  animation: frt-tip-in 0.28s ease-out;
}

@keyframes frt-tip-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

#frt-copy {
  font-size: 15px;
  line-height: 1.45;
  font-weight: 600;
  margin-bottom: 12px;
}

#frt-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 12px;
}

.frt-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

.frt-dot.on { background: #ffffff; }
.frt-dot.done { background: rgba(255, 255, 255, 0.6); }

#frt-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#frt-skip {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  padding: 10px 4px;
  cursor: pointer;
}

#frt-next {
  background: #ffffff;
  color: #0a0a12;
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  padding: 10px 26px;
  cursor: pointer;
}

/* Translucent thumb that demos the spin (step 2). Orbits the reactor center. */
#frt-thumb-orbit {
  position: absolute;
  width: 0;
  height: 0;
  display: none;
  pointer-events: none;
}

#frt-thumb-orbit.frt-thumb-on { display: block; }

#frt-thumb {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%) translateY(calc(var(--frt-orbit-r, 130px) * -1));
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

#frt-thumb-orbit.frt-thumb-on #frt-thumb {
  animation: frt-thumb-swipe 1.6s ease-in-out infinite;
}

@keyframes frt-thumb-swipe {
  0%, 100% { transform: translate(-50%, -50%) translateY(calc(var(--frt-orbit-r, 130px) * -1)) translateX(-30px) rotate(-12deg); }
  50% { transform: translate(-50%, -50%) translateY(calc(var(--frt-orbit-r, 130px) * -1)) translateX(30px) rotate(12deg); }
}

/* Hide the built-in "spin me" hint while the tour runs: zero confusion. */
body.frt-running #arc-spin-hint { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  #frt-ring { animation: none; }
  #frt-tip { animation: none; }
  #frt-thumb-orbit.frt-thumb-on #frt-thumb { animation: none; }
}
