/* ── Hero demo ──────────────────────────────────────────────
   The scripted product mockup in the hero (views/landing-demo.js). */

.demo-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-raised);
  /* The structural shadow, plus a whisper of the brand-mark blue and gold so
     the card sits in its own light instead of flat on the page. */
  box-shadow:
    var(--shadow-lg),
    0 0 90px rgba(45, 127, 249, 0.09),
    0 0 50px rgba(245, 180, 41, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.demo-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.demo-dots { display: flex; gap: 6px; flex: none; }

/* The real macOS traffic lights — close, minimise, zoom. */
.demo-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.demo-dot--close { background: #ff5f57; }
.demo-dot--min   { background: #febc2e; }
.demo-dot--zoom  { background: #28c840; }

.demo-url { flex: 1; display: flex; justify-content: center; min-width: 0; }

.demo-url-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 5px 13px;
  max-width: 100%;
  min-width: 0;
}

.demo-url-text svg { width: 10px; height: 10px; color: var(--good); flex: none; }

.demo-url-host { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.demo-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--good);
  flex: none;
}

.demo-thread {
  height: 296px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  overflow: hidden;
}

.demo-msg {
  max-width: 86%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.55;
  animation: rise 0.3s var(--ease);
}

.demo-msg--user {
  align-self: flex-end;
  background: var(--accent);
  color: var(--on-accent);
  border-bottom-right-radius: 5px;
}

.demo-msg--ai {
  align-self: flex-start;
  background: var(--surface-hi);
  border: 1px solid var(--line);
  border-bottom-left-radius: 5px;
}

/* AI messages ride next to a small brand-mark avatar, like the real chat. */
.demo-ai-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 90%;
  animation: rise 0.3s var(--ease);
}

.demo-ai-row .demo-msg { animation: none; max-width: 100%; }

.demo-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  display: grid;
  place-items: center;
  flex: none;
}

.demo-avatar svg { width: 13px; height: 13px; }

.demo-typing { display: inline-flex; gap: 5px; padding: 14px 15px; }

.demo-typing .demo-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--subtle);
  animation: demo-bounce 1s ease-in-out infinite;
}

.demo-typing .demo-dot:nth-child(2) { animation-delay: 0.15s; }
.demo-typing .demo-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes demo-bounce {
  0%, 100% { opacity: 0.35; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

.demo-source {
  align-self: flex-start;
  /* Indented past the avatar so it hangs under the answer it cites. */
  margin-left: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--subtle);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 4px 11px;
  animation: rise 0.3s var(--ease);
}

.demo-source svg { width: 12px; height: 12px; }

.demo-inputbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 14px;
  padding: 9px 9px 9px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
}

.demo-input-line {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 1.5em;
}

.demo-input-text {
  font-size: 13.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
}

.demo-input-text:empty::before { content: "Ask anything…"; color: var(--subtle); }

/* caret-blink is shared with the step vignettes in landing-uses.css:
   keyframes are document-global, and the three landing sheets always load
   together (index.html). */
.demo-caret {
  width: 1.5px;
  height: 16px;
  margin-left: 2px;
  background: var(--brand);
  flex: none;
  animation: caret-blink 1.1s steps(1) infinite;
}

@keyframes caret-blink { 50% { opacity: 0; } }

.demo-send {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  flex: none;
}

.demo-send svg { width: 15px; height: 15px; }

/* ── Voice ──────────────────────────────────────────────── */

.demo-mic {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--muted);
  display: grid;
  place-items: center;
  flex: none;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.demo-mic svg { width: 15px; height: 15px; }

.demo-mic.is-live {
  background: rgba(232, 85, 62, 0.14);
  border-color: rgba(232, 85, 62, 0.45);
  color: #e8553e;
  animation: mic-pulse 1.2s ease-in-out infinite;
}

@keyframes mic-pulse { 50% { box-shadow: 0 0 0 6px rgba(232, 85, 62, 0.12); } }

.demo-rec {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--muted);
  min-width: 0;
}

.demo-rec[hidden] { display: none; }

.demo-rec-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e8553e;
  flex: none;
  animation: pulse 1.2s ease-in-out infinite;
}

.demo-wave { display: inline-flex; align-items: center; gap: 2.5px; height: 16px; }
.demo-wave span { width: 2.5px; border-radius: 2px; background: currentColor; flex: none; }

.demo-wave--anim { color: #e8553e; }
.demo-wave--anim span { animation: wave-dance 0.8s ease-in-out infinite alternate; transform-origin: center; }
.demo-wave--anim span:nth-child(2n) { animation-delay: 0.14s; }
.demo-wave--anim span:nth-child(3n) { animation-delay: 0.28s; }

@keyframes wave-dance { from { transform: scaleY(0.35); } to { transform: scaleY(1); } }

/* A spoken question renders as a voice note inside the user bubble. */
.demo-voice { display: inline-flex; align-items: center; gap: 9px; }
.demo-voice svg { width: 14px; height: 14px; flex: none; }
.demo-voice-dur { font-size: 12px; opacity: 0.75; }

.demo-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 14px 16px; }

.demo-chips-label { font-size: 12px; color: var(--subtle); flex: none; }

.demo-chip {
  padding: 6px 11px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.demo-chip:hover { color: var(--text); border-color: var(--line-hi); background: var(--surface); }

.demo-chip.is-active {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-soft);
}
