/* ════════════════════════════════════════════════════════════════════
   VYAN · motion-app (the in-product celebration layer)
   Loads ONLY inside /app (and the studio shell). Sparks, fly-ups,
   stamps, and assembly springs fire when money or trust moves. The still
   marketing surface never loads this; it stays quiet on motion-core.
   Everything here respects prefers-reduced-motion.
   ════════════════════════════════════════════════════════════════════ */

/* ── Ember sparks: the win moment (money or trust moved) ─────────── */
.spark-host { position: relative; }
.spark {
  position: absolute; width: 5px; height: 5px; border-radius: 1px;
  background: var(--grad-ember); pointer-events: none; z-index: 90;
  animation: sparkFly 640ms var(--ease-exit) forwards;
}
@keyframes sparkFly {
  0%   { opacity: 1; transform: translate(0, 0) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translate(var(--sx), var(--sy)) scale(.4) rotate(120deg); }
}

/* ── The +1 fly-up: every knock counts, visibly ──────────────────── */
.flyup {
  position: fixed; z-index: 120; pointer-events: none;
  font: 700 15px var(--mono); color: var(--ember-text);
  animation: flyUp 760ms var(--ease-exit) forwards;
}
@keyframes flyUp {
  0%   { opacity: 0; transform: translateY(4px) scale(.9); }
  20%  { opacity: 1; transform: translateY(-2px) scale(1.05); }
  100% { opacity: 0; transform: translateY(-34px) scale(1); }
}

/* ── Map pin pop: a stamp should feel like a stamp ───────────────── */
@keyframes pinPop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.9); }
  100% { transform: scale(1); }
}
.pin-pop { transform-box: fill-box; transform-origin: center; animation: pinPop 380ms var(--ease-spring); }

/* ── Streak shimmer: the ember underline breathes once on entry ──── */
@keyframes streakIn {
  from { background-size: 0% 1px; }
  to   { background-size: 100% 1px; }
}
.streak-chip {
  border-bottom: none !important;
  background-image: linear-gradient(90deg, var(--ember-hi), var(--ember));
  background-repeat: no-repeat; background-position: 0 100%; background-size: 100% 1px;
  animation: streakIn 700ms var(--ease-exit);
  padding-bottom: 3px;
}

/* ── Builder: module rows snap in with spring ────────────────────── */
.asm-mod { transition: opacity 300ms var(--ease-exit), transform 340ms var(--ease-spring), color 300ms var(--ease); }
.asm-mod.on { transform: none; }

/* ── Respect the human ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .streak-chip { animation: none !important; }
  .spark, .flyup { display: none; }
  .pin-pop { animation: none; }
}
