/* ---------- "you can touch this": one visual language for every interactive thing ----------
   Brass is the cue colour. A cue plays once when the reader stops scrolling with the element
   in view, and stops for good once they use it. */
:root { --cue: 230, 201, 127; }

/* hear buttons: the play disc breathes out a ring */
.cue-ring::before { animation: cueRing 1.5s ease-out 2; }
@keyframes cueRing { 0% { box-shadow: 0 0 0 0 rgba(var(--cue), .85); } 100% { box-shadow: 0 0 0 14px rgba(var(--cue), 0); } }

/* single buttons: a ring and a small lift */
.cue-pulse { animation: cuePulse 1.4s ease-out 2; }
@keyframes cuePulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--cue), .8); transform: translateY(0); }
  30% { transform: translateY(-2px); }
  100% { box-shadow: 0 0 0 14px rgba(var(--cue), 0); transform: translateY(0); }
}

/* groups of buttons: a light runs along them, each one lifting in turn */
.cue-sweep > * { animation: cueLift .7s cubic-bezier(.3,.7,.3,1) both; animation-delay: calc(var(--ci, 0) * 70ms); }
@keyframes cueLift {
  0%, 100% { transform: translateY(0); box-shadow: 0 0 0 0 rgba(var(--cue), 0); }
  40% { transform: translateY(-4px); box-shadow: 0 0 0 2px rgba(var(--cue), .9), 0 6px 14px rgba(0,0,0,.25); }
}

/* the colour card: a ripple across the swatches from the top corner */
.cue-ripple > * { animation: cueChip .8s ease-out both; animation-delay: calc(var(--ci, 0) * 45ms); }
@keyframes cueChip { 0%, 100% { transform: scale(1); } 45% { transform: scale(1.1); box-shadow: 0 0 0 2px #f4f1ea, 0 0 0 4px rgba(var(--cue), .95); z-index: 2; } }

/* things that turn over: lift a corner to show there is a back */
.ticket.cue-peek { animation: cuePeekT 1.3s cubic-bezier(.3,.7,.3,1) both; animation-delay: calc(var(--ci, 0) * 160ms); }
@keyframes cuePeekT { 0%, 100% { transform: rotateY(0); } 40% { transform: rotateY(-32deg) translateY(-4px); } }
.postcard__card.cue-peek { animation: cuePeekP 1.5s cubic-bezier(.3,.7,.3,1) both; }
@keyframes cuePeekP { 0%, 100% { transform: rotate(-1.2deg); } 40% { transform: rotate(-1.2deg) rotateY(-26deg) translateY(-6px); } }

/* the ship's wheel: a turn each way, the way you would test it */
.cue-wobble svg { animation: cueWobble 1.8s cubic-bezier(.45,0,.3,1) both; }
@keyframes cueWobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-38deg); } 65% { transform: rotate(30deg); } }

/* the page telegraph and the music button: a ring once you are aboard */
.telegraph.cue-pulse { animation: none; }
.telegraph.cue-pulse .tg__dial, .telegraph.cue-pulse .tg__btn { animation: cuePulse 1.4s ease-out 2; }
.telegraph.cue-pulse .tg__dial { border-radius: 50%; }
#balladBtn.cue-pulse { border-radius: 999px; }

/* hint pill: says what to do, with a little hand of its own */
.cue-host { position: relative; }
.cue-hint {
  position: absolute; z-index: 6; pointer-events: none; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 11px 5px 9px; border-radius: 999px;
  background: rgba(11, 20, 30, .9); color: #f2f4ef; border: 1px solid rgba(var(--cue), .8);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(0,0,0,.3);
  opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s;
}
.cue-hint.is-on { opacity: 1; transform: translateY(0); }
.cue-hint i { position: relative; width: 10px; height: 10px; border-radius: 50%; background: rgb(var(--cue)); flex: none; }
.cue-hint i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(var(--cue), .9); animation: cueTap 1.2s ease-out infinite; }
@keyframes cueTap { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
.cue-hint--drag i { animation: cueDrag 1.4s ease-in-out infinite; }
.cue-hint--drag i::after { display: none; }
@keyframes cueDrag { 0%, 100% { transform: translateX(-5px); } 50% { transform: translateX(5px); } }

/* where each hint sits */
.cue-hint--wheel { left: 50%; top: -8px; transform: translate(-50%, -100%); }
.cue-hint--wheel.is-on { transform: translate(-50%, -100%); }
.helm__wheelbox.cue-host { overflow: visible; }
.cue-hint--corner { right: 10px; top: 10px; }
.cue-hint--range { left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); }
.cue-hint--range.is-on { transform: translateX(-50%); }

@media (prefers-reduced-motion: reduce) {
  .cue-ring::before, .cue-pulse, .cue-sweep > *, .cue-ripple > *, .ticket.cue-peek, .postcard__card.cue-peek, .cue-wobble svg,
  .telegraph.cue-pulse .tg__dial, .telegraph.cue-pulse .tg__btn { animation: cueStill 2.4s ease both !important; transform: none !important; }
  @keyframes cueStill { 0%, 100% { box-shadow: 0 0 0 0 rgba(var(--cue), 0); } 20%, 70% { box-shadow: 0 0 0 3px rgba(var(--cue), .9); } }
  .cue-hint i::after, .cue-hint--drag i { animation: none; }
}
