/* ARARA tap artwork is rendered unchanged; only separate waves and transforms animate. */
.scroll-cue {
  position: absolute;
  z-index: 120;
  left: 50%;
  bottom: max(46px, calc(env(safe-area-inset-bottom) + 32px));
  width: clamp(78px, 5.8vw, 88px);
  aspect-ratio: 1;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  opacity: clamp(0, calc(.98 - var(--scroll-p, 0) * 17), .98);
  transform: translate3d(-50%, calc(var(--scroll-p, 0) * 24px), 0);
  transform-origin: 50% 50%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform, opacity;
  contain: layout style;
  isolation: isolate;
  overflow: visible;
}
.scroll-cue.is-hidden {
  pointer-events: none;
}

.scroll-cue::before {
  content: "";
  position: absolute;
  inset: -18px -22px;
}

.scroll-cue__float {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: translate3d(0, 0, 0);
  transition: transform 220ms cubic-bezier(.16, 1, .3, 1);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.scroll-cue__art,
.scroll-cue__waves {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.scroll-cue__art {
  z-index: 1;
  object-fit: contain;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.scroll-cue__waves {
  z-index: 0;
  overflow: visible;
}

/*
  Full-circle ripples stay behind the supplied PNG. The image itself is never
  masked, filtered, recoloured, or reshaped.
*/
.scroll-cue__ring {
  fill: none;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  transform-box: fill-box;
  transform-origin: center;
}

.scroll-cue__ring--core {
  stroke: rgba(234, 183, 90, .56);
  stroke-width: .8;
  stroke-dasharray: 70 5 17 8;
  opacity: .28;
  animation: arara-ring-breathe 3.4s cubic-bezier(.4, 0, .2, 1) infinite;
}

.scroll-cue__ring--one,
.scroll-cue__ring--two,
.scroll-cue__ring--three {
  opacity: 0;
  animation: arara-ring-ripple 3.4s cubic-bezier(.18, .72, .2, 1) infinite;
}

.scroll-cue__ring--one {
  --ring-rotation: -16deg;
  stroke: rgba(234, 183, 90, .8);
  stroke-width: 1.05;
  stroke-dasharray: 78 5 9 8;
}

.scroll-cue__ring--two {
  --ring-rotation: 38deg;
  stroke: rgba(234, 183, 90, .58);
  stroke-width: .85;
  stroke-dasharray: 48 8 26 18;
  animation-delay: 560ms;
}

.scroll-cue__ring--three {
  --ring-rotation: -52deg;
  stroke: rgba(231, 68, 63, .56);
  stroke-width: .75;
  stroke-dasharray: 34 12 43 11;
  animation-delay: 1120ms;
}

.scroll-cue.is-hidden .scroll-cue__ring {
  animation: none;
}

@keyframes arara-ring-breathe {
  0%, 100% { opacity: .2; transform: translate3d(0, 0, 0) scale(.995); }
  48% { opacity: .48; transform: translate3d(0, 0, 0) scale(1.025); }
}

@keyframes arara-ring-ripple {
  0%, 18% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(var(--ring-rotation)) scale(.96);
  }
  29% {
    opacity: .66;
    transform: translate3d(0, 0, 0) rotate(var(--ring-rotation)) scale(1.01);
  }
  68%, 100% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(var(--ring-rotation)) scale(1.18);
  }
}

@media (any-hover: hover) and (any-pointer: fine) {
  .scroll-cue:hover .scroll-cue__float {
    transform: translate3d(0, -2px, 0);
  }
}

/* The final scene stays locked after the guided scroll. Instead of replaying the
   reveal, the supplied CTA artwork breathes very lightly on its own layer. */
body.is-cue-arrived .mega-cta__art {
  transform-origin: 50% 50%;
  animation: arara-cta-alive 2.65s cubic-bezier(.45, 0, .55, 1) infinite;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
}

body.is-entering .mega-cta__art {
  animation: none;
}

@keyframes arara-cta-alive {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  44% { transform: translate3d(0, -5px, 0) scale(1.012); }
  58% { transform: translate3d(0, -4px, 0) scale(1.019); }
  70% { transform: translate3d(0, -3px, 0) scale(1.009); }
}

@media (max-width: 900px), (any-pointer: coarse) {
  .scroll-cue {
    bottom: max(124px, calc(env(safe-area-inset-bottom) + 98px));
    width: 76px;
  }
}

/*
  Mobile-only petal stabilization. The old live wind value was intentionally
  paused during fast swipes and then resumed at a new X offset, which made all
  petals snap sideways at once. Their individual curved trajectories remain;
  only the shared live X jump is removed on phones.
*/
@media (max-width: 900px) {
  .hero {
    --petal-wind-x: 0px !important;
    --petal-wind-soft-x: 0px !important;
  }

  body.is-cue-arrived .mega-cta__art {
    animation-duration: 2.8s;
  }
}

@media (max-height: 650px) {
  .scroll-cue {
    width: 70px;
    bottom: max(92px, calc(env(safe-area-inset-bottom) + 72px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue__ring,
  body.is-cue-arrived .mega-cta__art {
    animation: none;
    transform: none;
  }

  .scroll-cue__ring--core { opacity: .3; }
  .scroll-cue__ring--one { opacity: .18; }
  .scroll-cue__ring--two,
  .scroll-cue__ring--three { opacity: 0; }
}
