/* ============================================================
   hero-demo.css — a self-contained, looping reenactment of
   "Clip 1": dictation streaming into a clean editor on a
   faux-macOS desktop. Mirrors the real Lyre pill (badge.html).
   Scoped under .hd- so it never collides with the landing page.
   ============================================================ */

/* mount point fills the media-frame */
.hd-mount {
  position: absolute;
  inset: 0;
}

.hd-stage {
  position: absolute;
  inset: 34px 0 0 0;            /* sit under the media-frame title bar */
  overflow: hidden;
  border-radius: 0 0 var(--r-lg, 22px) var(--r-lg, 22px);
  /* macOS-ish wallpaper */
  background:
    radial-gradient(120% 90% at 15% 0%, #3b2a63 0%, transparent 55%),
    radial-gradient(120% 90% at 100% 20%, #7d3d63 0%, transparent 50%),
    linear-gradient(160deg, #241a3a 0%, #14172b 60%, #0c0e1c 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  container-type: inline-size;
}

/* faux menu bar */
.hd-menubar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 26px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 14px;
  font-size: 12px;
  color: rgba(255,255,255,0.82);
  background: rgba(20, 20, 28, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 3;
}
.hd-menubar .hd-apple { font-size: 13px; }
.hd-menubar .hd-mb-app { font-weight: 600; }
.hd-menubar .hd-mb-spacer { flex: 1; }
.hd-menubar .hd-mb-right { opacity: 0.75; font-variant-numeric: tabular-nums; }

/* editor window */
.hd-window {
  position: absolute;
  top: 15%;
  left: 8%;
  right: 8%;
  bottom: 12%;
  border-radius: 12px;
  background: #fbfbfa;
  box-shadow: 0 30px 70px rgba(0,0,0,0.5), 0 2px 0 rgba(255,255,255,0.3) inset;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.hd-titlebar {
  height: 34px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  background: #ececec;
  border-bottom: 1px solid #dcdcdc;
}
.hd-dot { width: 11px; height: 11px; border-radius: 50%; }
.hd-dot.r { background: #ff5f57; }
.hd-dot.y { background: #febc2e; }
.hd-dot.g { background: #28c840; }
.hd-titlebar .hd-doc-name {
  margin-left: 8px;
  font-size: 12px;
  color: #8a8a8a;
  font-weight: 500;
}

.hd-page {
  flex: 1;
  padding: 26px 30px;
  overflow: hidden;
}
.hd-text {
  font-size: clamp(13px, 2.6cqw, 19px);
  line-height: 1.7;
  color: #24242c;
  letter-spacing: -0.005em;
  max-width: 46ch;
}
/* blinking caret at the end of streamed text */
.hd-caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 1px;
  vertical-align: text-bottom;
  background: #6b5bd6;
  animation: hd-blink 1s steps(1) infinite;
}
@keyframes hd-blink { 50% { opacity: 0; } }

/* ---------- The pill (faithful to badge.html) ---------- */
.hd-pill {
  position: absolute;
  top: 40px;
  right: 16px;
  transform: translateX(calc(100% + 20px));  /* parked off the right edge */
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 14px;
  border-radius: 18px;
  background: rgba(24, 26, 34, 0.74);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.4);
  color: #f4f5f8;
  z-index: 4;
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}
.hd-pill.hd-show { transform: translateX(0); }

/* orb: a small glowing nebula, blue while listening, green when done */
.hd-orb {
  width: 30px; height: 30px;
  border-radius: 50%;
  flex: 0 0 auto;
  background:
    radial-gradient(circle at 50% 45%, #ffb15a 0%, #ff7a3c 38%, transparent 62%),
    radial-gradient(circle at 50% 50%, rgba(40,120,255,0.9) 60%, rgba(40,120,255,0) 74%);
  box-shadow: 0 0 14px rgba(60,140,255,0.55);
  animation: hd-orb-pulse 1.8s ease-in-out infinite;
  transition: box-shadow 0.4s ease, background 0.4s ease;
}
.hd-pill.hd-done .hd-orb {
  background:
    radial-gradient(circle at 50% 45%, #ffb15a 0%, #ff7a3c 38%, transparent 62%),
    radial-gradient(circle at 50% 50%, rgba(40,230,110,0.95) 60%, rgba(40,230,110,0) 74%);
  box-shadow: 0 0 16px rgba(40,230,110,0.6);
}
@keyframes hd-orb-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}

.hd-pill__labels { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hd-pill__label { font-size: 13.5px; font-weight: 550; letter-spacing: 0.01em; }
.hd-pill__app {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
}
.hd-pill__app-ico {
  width: 12px; height: 12px; border-radius: 3px;
  background: linear-gradient(135deg, #fbb, #b7f);
}

/* subtle floating cursor to imply "you spoke" — a small mic glyph rising */
.hd-say {
  position: absolute;
  right: 34px;
  top: 84px;
  z-index: 4;
  font-size: 12px;
  color: rgba(255,255,255,0.9);
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.14);
  padding: 5px 11px;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
  backdrop-filter: blur(6px);
}
.hd-say.hd-say-show { opacity: 1; transform: translateY(0); }

/* replay hint (tiny, unobtrusive) */
.hd-replay {
  position: absolute;
  bottom: 10px;
  right: 12px;
  z-index: 5;
  font-size: 11px;
  font-family: var(--font-mono, monospace);
  color: rgba(255,255,255,0.55);
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
  pointer-events: auto;
  transition: color 0.2s, border-color 0.2s;
}
.hd-replay:hover { color: #fff; border-color: rgba(255,255,255,0.3); }

@media (prefers-reduced-motion: reduce) {
  .hd-pill, .hd-orb, .hd-say { transition: none; animation: none; }
}
