/* The scan line and the reveal use the same sweep so new seabed detail appears exactly behind it. */
.terrain-ui::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:2;
  pointer-events:none;
  background:url('terrain-sponges.svg') center / 100% 100% no-repeat;
  clip-path:inset(0 0 62% 0);
  animation:terrain-reveal 6s linear infinite;
}
.terrain-ui .scanbar{
  z-index:3;
  top:38%;
  height:2px;
  box-shadow:0 0 9px 2px rgba(94,255,227,.8),0 0 30px 5px rgba(71,235,216,.32);
  animation:terrain-sweep 6s linear infinite;
}
.terrain-ui .scanbar::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:42px;
  background:linear-gradient(0deg,rgba(69,237,209,.15),transparent);
  pointer-events:none;
}
.terrain-ui .terrain-hud,.terrain-ui .terrain-scale{z-index:4}
@keyframes terrain-sweep{
  0%{top:38%;opacity:1}
  72%{top:82%;opacity:1}
  82%{top:82%;opacity:0}
  83%,100%{top:38%;opacity:0}
}
@keyframes terrain-reveal{
  0%{clip-path:inset(0 0 62% 0);opacity:1}
  72%,82%{clip-path:inset(0 0 18% 0);opacity:1}
  83%,100%{clip-path:inset(0 0 62% 0);opacity:0}
}
@media (prefers-reduced-motion:reduce){
  .terrain-ui::after{animation:none;clip-path:inset(0 0 18% 0);opacity:1}
  .terrain-ui .scanbar{animation:none;top:82%;opacity:1}
}
