/* Guided "Demo" walkthrough (assets/js/demo.js): the "▶ Demo" pill in a
   viewer's top-left corner, the fake cursor, its click ripple and the
   caption that follows it. */

/* --- The button ---------------------------------------------------------- */
.site-demo-btn {
  position: absolute; top: 12px; left: 12px; z-index: 6;
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 14px 0 12px; border-radius: 999px;
  font: inherit; font-size: 13px; font-weight: 600; line-height: 1; letter-spacing: 0.01em;
  color: #15151b; background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(0, 0, 0, 0.14);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.site-demo-btn:hover { background: #fff; transform: scale(1.04); }
.site-demo-btn:focus-visible { outline: 3px solid #2f6df6; outline-offset: 2px; }
.site-demo-btn .site-demo-icon { font-size: 10px; line-height: 1; }
.site-demo-btn.is-running { color: #fff; background: #15151b; border-color: #15151b; }
/* Under the stage's program tag ("Blender"), which sits in the same corner. */
.site-demo-btn.has-tag { top: 50px; left: 14px; }

@media (max-width: 600px) {
  .site-demo-btn { top: 10px; left: 10px; height: 34px; font-size: 13px; }
  .site-demo-btn.has-tag { top: 46px; left: 14px; }
}

/* --- Cursor ------------------------------------------------------------ */
.site-demo-cursor {
  position: fixed; left: 0; top: 0; z-index: 9600;
  width: 0; height: 0;
  pointer-events: none;
  opacity: 0;
  transition-property: transform, opacity;
  transition-timing-function: cubic-bezier(0.45, 0, 0.25, 1), ease;
  will-change: transform;
}
.site-demo-cursor.is-on { opacity: 1; }
.site-demo-cursor.is-hidden { display: none; }

/* Arrow: its tip is the cursor's point. */
.site-demo-arrow {
  position: absolute; left: -4px; top: -2px;
  overflow: visible;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
  transform-origin: 4px 2px;
  transition: transform 0.15s ease;
}
.site-demo-arrow path { fill: #15151b; stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; }
.site-demo-cursor.is-pressing .site-demo-arrow,
.site-demo-cursor.is-dragging .site-demo-arrow { transform: scale(0.86); }

/* Touch screens: a fingertip dot instead of an arrow. */
.site-demo-finger {
  display: none;
  position: absolute; left: -17px; top: -17px; width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(21, 21, 27, 0.32);
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.site-demo-cursor.is-touch .site-demo-arrow { display: none; }
.site-demo-cursor.is-touch .site-demo-finger { display: block; }
.site-demo-cursor.is-pressing .site-demo-finger,
.site-demo-cursor.is-dragging .site-demo-finger { transform: scale(0.82); background: rgba(21, 21, 27, 0.5); }

/* Click ripple. */
.site-demo-ripple {
  position: fixed; z-index: 9599;
  width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border-radius: 50%;
  border: 2px solid rgba(47, 109, 246, 0.9);
  background: rgba(47, 109, 246, 0.18);
  pointer-events: none;
  animation: site-demo-ripple 0.6s ease-out forwards;
}
@keyframes site-demo-ripple {
  from { transform: scale(0.3); opacity: 1; }
  to { transform: scale(1.6); opacity: 0; }
}

/* --- Caption ------------------------------------------------------------- */
.site-demo-caption {
  position: fixed; left: 0; top: 0; z-index: 9601;
  max-width: min(280px, calc(100vw - 24px));
  padding: 8px 12px; border-radius: 10px;
  font-size: 14px; font-weight: 600; line-height: 1.3;
  color: #fff; background: rgba(21, 21, 27, 0.9);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  opacity: 0; visibility: hidden;
  transition-property: transform, opacity, visibility;
  transition-timing-function: cubic-bezier(0.45, 0, 0.25, 1), ease, linear;
}
.site-demo-caption.is-on { opacity: 1; visibility: visible; }

@media (prefers-reduced-motion: reduce) {
  .site-demo-btn, .site-demo-cursor, .site-demo-caption { transition: none !important; }
  .site-demo-ripple { display: none; }
}
