.rl-hero5 {
  --rl-blue: #3aa8f7;
  --rl-violet: #7851ff;
  position: relative;
  min-height: clamp(420px, 88vh, 900px);
  overflow: hidden;
  background:
    radial-gradient(60% 45% at 50% 62%, rgba(120, 81, 255, 0.22), transparent 70%),
    radial-gradient(40% 35% at 62% 40%, rgba(58, 168, 247, 0.16), transparent 70%),
    #0a0c0f;
}

.rl-hero5__stage {
  position: absolute;
  inset: 0;
  cursor: grab;
  /* Horizontal drag spins the drone; vertical swipes still scroll the page. */
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.rl-hero5__stage.is-dragging { cursor: grabbing; }

.rl-hero5__canvas,
.rl-hero5__canvas canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.rl-hero5__canvas canvas {
  opacity: 0;
  transition: opacity 0.8s ease;
}
.is-ready .rl-hero5__canvas canvas { opacity: 1; }

.rl-hero5__loader {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(220px, 50%);
  height: 2px;
  transform: translate(-50%, -50%);
  background: rgba(139, 139, 145, 0.3);
  border-radius: 2px;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.rl-hero5__bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--rl-violet), var(--rl-blue));
}
.is-ready .rl-hero5__loader,
.is-failed .rl-hero5__loader { opacity: 0; }

.rl-hero5__hint {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  margin: 0;
  font: 600 0.65rem/1 ui-monospace, monospace;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #8b8b91;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.is-ready .rl-hero5__hint {
  opacity: 1;
  animation: rl-hero5-bob 2.4s ease-in-out infinite;
}
.is-touched .rl-hero5__hint { opacity: 0; }

@keyframes rl-hero5-bob {
  50% { transform: translate(-50%, -4px); }
}

@media (prefers-reduced-motion: reduce) {
  .rl-hero5__hint { animation: none !important; }
}

@media (max-width: 767px) {
  .rl-hero5 { min-height: clamp(360px, 70svh, 640px); }
}

/* Zoom buttons */
.rl-hero5__zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.is-ready .rl-hero5__zoom { opacity: 1; }
.is-failed .rl-hero5__zoom { display: none; }
.rl-hero5__zoom button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(120, 81, 255, 0.45);
  background: rgba(10, 12, 15, 0.6);
  color: #cfe2ff;
  font: 600 18px/1 system-ui, sans-serif;
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: border-color 0.2s, color 0.2s;
}
.rl-hero5__zoom button:hover { border-color: var(--rl-blue, #3aa8f7); color: #fff; }
.rl-hero5__zoom button:focus-visible { outline: 2px solid #3aa8f7; outline-offset: 2px; }

/* Embedded in the home hero (right grid column), desktop only */
.hero-visual3d {
  --rl-blue: #3aa8f7;
  --rl-violet: #7851ff;
  display: flex;
  justify-content: center;
  align-items: center;
}
.rl-hero5__stage--inline {
  position: relative;
  inset: auto;
  width: min(100%, 72vh); /* shorter laptops: keep the hero inside the screen */
  max-width: 640px;
  aspect-ratio: 1;
}
/* Soft edges so a zoomed-in drone fades out instead of hitting a hard square. */
.rl-hero5__stage--inline .rl-hero5__canvas {
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent);
  mask-image: radial-gradient(closest-side, #000 72%, transparent);
}
@media (max-width: 1024px), (hover: none) {
  .hero-visual3d { display: none; }
}
