/* ============================================================
   HERO — Live chat animation card
   Ported from Home/hiw.css (How it Works → Understand step)
   ============================================================ */
.hero-chat {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}
.hero-chat::before {
  content: '';
  position: absolute;
  inset: -15%;
  background: radial-gradient(ellipse at center,
    rgba(148,20,250,0.22) 0%,
    rgba(148,20,250,0.13) 30%,
    rgba(148,20,250,0.06) 50%,
    rgba(148,20,250,0.02) 68%,
    transparent 82%);
  filter: blur(24px);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.hiw__card {
  position: relative;
  z-index: 1;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px -16px rgba(0,0,0,0.45), 0 0 0 1px rgba(148,20,250,0.10);
  display: flex;
  flex-direction: column;
}
.hiw__card--light {
  background: #fff;
  border: 1px solid #e4e4e4;
  height: 460px;
}
.hiw__card-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
}
.hiw__card-chrome--light {
  background: #f5f5f5;
  border-bottom: 1px solid #e8e8e8;
}
.hiw__dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.hiw__dot--red    { background: #ff5f57; }
.hiw__dot--yellow { background: #febc2e; }
.hiw__dot--green  { background: #28c840; }
.hiw__card-title { font-family: var(--kc-font-display); font-size: 10px; letter-spacing: 0.10em; }
.hiw__card-title--light { color: #222; }

.hiw__progress-wrap { position: relative; height: 3px; z-index: 2; }
.hiw__progress { height: 100%; background: #f0edf8; }
.hiw__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #9414FA, #B33AF0);
  width: 0%;
}

.hiw__chat-body { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.hiw__chat-messages {
  flex: 1;
  padding: 14px 16px 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 9px;
  overflow: hidden;
}
.hiw__bubble {
  max-width: 86%;
  padding: 8px 12px;
  border-radius: 14px;
  font-family: var(--kc-font-body);
  font-size: 12px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 350ms ease, transform 350ms ease;
}
.hiw__bubble.show { opacity: 1; transform: translateY(0); }
.hiw__bubble--user {
  background: #7c3aed;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.hiw__bubble--ai {
  background: transparent;
  color: #222;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  padding: 0;
  max-width: 100%;
  width: 100%;
}
.hiw__bubble--typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: #f0f0f0;
  border-radius: 12px;
  align-self: flex-start;
}
.hiw__bubble--typing span {
  display: block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #bbb;
  animation: heroChatTypingDot 1.2s infinite ease-in-out;
}
.hiw__bubble--typing span:nth-child(2) { animation-delay: 0.2s; }
.hiw__bubble--typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes heroChatTypingDot {
  0%,60%,100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Bar chart response */
.hiw__rchart { background: #fafafa; border: 0.5px solid #e8e8e8; border-radius: 10px; padding: 10px 12px; width: 100%; }
.hiw__rchart-title { font-size: 11px; font-weight: 700; color: #1a1a1a; margin-bottom: 2px; }
.hiw__rchart-meta  { font-size: 10px; color: #aaa; margin-bottom: 10px; }
.hiw__rchart-row   { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.hiw__rchart-label { font-size: 10.5px; color: #555; width: 80px; flex-shrink: 0; text-align: right; }
.hiw__rchart-track { flex: 1; background: #f0eeff; border-radius: 3px; height: 11px; overflow: hidden; }
.hiw__rchart-fill  { height: 100%; background: #7c3aed; border-radius: 3px; width: 0%; transition: width 700ms ease; }
.hiw__rchart-pct   { font-size: 10.5px; color: #666; width: 34px; text-align: right; flex-shrink: 0; }
.hiw__rchart-src   { font-size: 9.5px; color: #bbb; margin-top: 8px; padding-top: 6px; border-top: 0.5px solid #eee; display: flex; justify-content: space-between; }

/* Clarifying question card */
.hiw__rquestion { width: 100%; }
.hiw__rquestion-text { font-size: 11.5px; font-weight: 700; color: #1a1a1a; margin-bottom: 3px; line-height: 1.4; }
.hiw__rquestion-meta { font-size: 9.5px; color: #aaa; margin-bottom: 9px; }
.hiw__rquestion-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.hiw__rquestion-chip {
  font-size: 10px;
  color: #7c3aed;
  border: 1px solid #c4b5fd;
  border-radius: 20px;
  padding: 4px 10px;
  white-space: nowrap;
  transition: background .25s, border-color .25s, color .25s;
}
.hiw__rquestion-chip--selected { background: #7c3aed; border-color: #7c3aed; color: #fff; }

/* Insights card */
.hiw__rinsights { background: #f5f3ff; border: 0.5px solid #ddd6fe; border-radius: 10px; padding: 10px 12px; width: 100%; }
.hiw__rinsights--pink { background: #fce7f3; border-color: #f9a8d4; }
.hiw__rinsights-head { font-size: 10px; font-weight: 700; color: #1a1a1a; letter-spacing: .07em; text-transform: uppercase; display: flex; align-items: center; gap: 5px; margin-bottom: 7px; }
.hiw__rinsights-row  { display: flex; gap: 6px; margin-bottom: 4px; font-size: 10.5px; color: #333; line-height: 1.4; }
.hiw__rinsights-arr  { color: #7c3aed; font-weight: 700; flex-shrink: 0; font-size: 8px; margin-top: 2px; }

/* Go deeper chips */
.hiw__rdeeper--chips { overflow: visible; }
.hiw__rdeeper-lbl { font-size: 10px; color: #aaa; padding: 0 0 7px; letter-spacing: .05em; }
.hiw__rdeeper-chips-row { display: flex; flex-wrap: wrap; gap: 5px; }
.hiw__rdeeper-chip {
  font-size: 10px;
  color: #7c3aed;
  border: 1px solid #c4b5fd;
  border-radius: 20px;
  padding: 4px 10px;
  white-space: nowrap;
}

/* Input row */
.hiw__chat-input-row--light {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 12px;
  border-top: 1px solid #eee;
  background: #fff;
  flex-shrink: 0;
}
.hiw__chat-input-wrap--light {
  flex: 1;
  background: #f7f7f7;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 8px 14px;
  font-family: var(--kc-font-body);
  font-size: 12px;
  color: #222;
  min-height: 36px;
  display: flex;
  align-items: center;
}
.hiw__cursor--light {
  display: inline-block;
  width: 1.5px;
  height: 12px;
  background: #7c3aed;
  margin-left: 1px;
  vertical-align: middle;
  animation: heroChatBlink 0.9s step-end infinite;
}
@keyframes heroChatBlink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
.hiw__chat-send--light {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #7c3aed;
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 150ms, box-shadow 150ms;
}
.hiw__chat-send--light:hover { transform: scale(1.08); box-shadow: 0 4px 14px -4px rgba(124,58,237,0.5); }

@media (max-width: 1100px) {
  .hero-chat { max-width: 420px; }
  .hiw__card--light { height: 420px; }
}
@media (max-width: 560px) {
  .hiw__card--light { height: 400px; }
}
@media (prefers-reduced-motion: reduce) {
  .hiw__bubble--typing span,
  .hiw__cursor--light { animation: none; }
}
