/* /features/autopilot's hero demo (#autopilot-fx, /features/autopilot-demo.js):
 * on top of /home-page.css (the page) and /home-autopilot.css (the deck, the
 * window, the pill), what the app has besides: the director picker, the
 * deck's head, the director's thinking face, Why it works, the pill's face.
 * Their looks follow src/lib/ui/autopilot-run.css. Transform and opacity. */
.ft-demo { max-width: 780px; margin: 64px auto 0; }
.ft-demo .ax-page { height: 600px; }

/* ---- the window, two parts: the direction, then the directors ---- */
.fd-modal { width: min(460px, calc(100% - 24px)); }
.fd-part { transition: opacity 0.3s; }
.fd-pick { position: absolute; inset: 0; padding: 20px 16px 18px; display: flex; flex-direction: column; align-items: center; opacity: 0; pointer-events: none; }
.fd-modal.is-pick .fd-dir { opacity: 0; }
.fd-modal.is-pick .fd-pick { opacity: 1; }
.fd-pick h4 { margin-top: 6px; }
.fd-pick .ax-m-lead { margin-bottom: 12px; }
.fd-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; margin-bottom: auto; }
.fd-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 6px 10px; border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.25s, background 0.25s, transform 0.3s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.3s;
}
.fd-card.is-ollie { --dir: #34d399; }
.fd-card.is-velvet { --dir: #f472b6; }
.fd-card.is-jinx { --dir: #b9a4fb; }
.fd-card.is-picked { border-color: var(--dir); background: color-mix(in srgb, var(--dir) 12%, transparent); transform: translateY(-3px); box-shadow: 0 12px 26px -16px var(--dir); }
.fd-card.is-press { transform: scale(0.95); }
.fd-card.is-out { opacity: 0.3; transform: scale(0.94); }
.fd-art { width: 82px; height: auto; display: block; }
.fd-check { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.25); transition: background 0.2s, border-color 0.2s; }
.fd-check svg { width: 11px; height: 11px; fill: none; stroke: #1b1720; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.fd-card.is-picked .fd-check { background: var(--dir); border-color: var(--dir); }
.fd-card.is-picked .fd-check svg { opacity: 1; }
.fd-says { position: absolute; top: -9px; left: 50%; transform: translateX(-50%) rotate(-3deg); padding: 3px 7px; border-radius: 9px; background: #fff; color: #2a1a3d; font-size: 9.5px; font-weight: 800; white-space: nowrap; opacity: 0; transition: opacity 0.25s; }
.fd-card.is-picked .fd-says { opacity: 1; }
.fd-name { font-family: var(--font-display); font-size: 12.5px; font-weight: 500; line-height: 1.15; color: #fff; }
.fd-role { font-size: 10px; font-weight: 700; color: var(--dir); }
.fd-pips { display: flex; gap: 3px; margin-top: 4px; }
.fd-pips i { width: 9px; height: 4px; border-radius: 999px; background: #e879a6; }
.fd-pips i.is-progress { background: #34d399; }
.fd-pips i.is-twist { background: #a78bfa; }
.fd-go { gap: 8px; height: 40px; padding: 0 22px; font-size: 14px; margin-top: 14px; }
.fd-go svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fd-go.is-clap svg path:first-child { transform-origin: 3px 10px; animation: fd-clap 0.5s ease-in-out; }
@keyframes fd-clap { 0%, 100% { transform: rotate(0); } 40% { transform: rotate(-18deg); } 70% { transform: rotate(0); } }

/* ---- the deck's head: Autopilot · Beat n of 3 ---- */
.fd-deck-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: #4a4038; font: 600 12px/1 var(--font-ui, Manrope, sans-serif); }
.fd-chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; color: #fff; background: linear-gradient(135deg, #7c3aed, #c2366e); font-weight: 700; }
.fd-chip svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---- the director's face: thinking while the cards riffle ---- */
.fd-loader { justify-content: center; min-height: 40px; max-width: 420px; transition: opacity 0.3s; }
.fd-face { position: relative; flex: none; display: inline-block; width: 34px; height: 34px; }
.fd-face-frame { display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: #efe3d2; border: 1.5px solid rgba(109, 40, 217, 0.35); }
.fd-face-frame img { display: block; width: 100%; height: 100%; }
.fd-face.is-thinking .fd-face-frame { animation: fd-ponder 1.8s ease-in-out infinite; }
@keyframes fd-ponder { 50% { transform: rotate(-6deg) translateY(-1px); } }
.fd-think { position: absolute; right: -10px; top: -12px; }
.fd-think i { position: absolute; border-radius: 50%; background: #fffdf9; border: 1px solid rgba(109, 40, 217, 0.4); opacity: 0; animation: fd-think 1.8s ease-in-out infinite; }
.fd-think i:nth-child(1) { width: 4px; height: 4px; left: 0; top: 12px; }
.fd-think i:nth-child(2) { width: 6px; height: 6px; left: 4px; top: 4px; animation-delay: 0.2s; }
.fd-think i:nth-child(3) { width: 9px; height: 9px; left: 10px; top: -5px; animation-delay: 0.4s; }
@keyframes fd-think { 0%, 100% { opacity: 0; transform: scale(0.6); } 30%, 70% { opacity: 1; transform: scale(1); } }
.fd-why { text-align: left; font-weight: 500; line-height: 1.45; color: #4a4038; animation: fd-fade 0.4s ease-out both; }
.fd-why b { color: #2a2420; font-weight: 700; }
@keyframes fd-fade { from { opacity: 0; transform: translateY(4px); } }

/* ---- the pill: the director's face, Pause, Stop ---- */
.fd-orb { overflow: hidden; background: #efe3d2; padding: 0; }
.fd-orb .fd-face-frame { border: 0; }
.fd-pause { gap: 2px; grid-auto-flow: column; }
.fd-pause i { width: 3px !important; height: 9px !important; border-radius: 1px !important; }

@media (max-width: 560px) {
  .ft-demo { margin-top: 70px; }
  .ft-demo .ax-page { height: 560px; }
  .fd-cards { gap: 5px; }
  .fd-art { width: 64px; }
  .fd-name { font-size: 11px; }
  .fd-pick .ax-m-lead { display: none; }
  .fd-loader { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .fd-face *, .fd-think i, .fd-why { animation: none !important; }
}
