/* Homepage hero demo (assets/hero-demo.js builds the markup).
   A row of scenario chips over a stage that plays one scenario at a time:
   the prompt is typed into a composer, the trace steps tick off, the answer
   appears block by block, then the next scenario starts.
   Uses the page's colour and font tokens (--bg3, --t1, --ac, --f, --m...). */

.hd{width:100%;max-width:720px;margin:.5rem 0 4rem;animation:hd-rise .7s cubic-bezier(.2,.7,.2,1) .18s both}

/* Scenario chips */
.hd-chips{display:flex;flex-wrap:wrap;justify-content:center;gap:.5rem}
.hd-chips button{padding:.4rem 1rem;border-radius:6px;border:1px solid var(--brd);background:none;color:var(--t3);font-family:var(--f);font-size:.85rem;font-weight:500;cursor:pointer;transition:color .2s,background .2s,border-color .2s}
.hd-chips button:hover{color:var(--t1);border-color:var(--brdh)}
.hd-chips button[aria-pressed="true"]{color:var(--ac);background:var(--acbg);border-color:var(--acbr)}

/* Stage: hero-demo.js sets its height to that of what it shows; the transition makes it
   grow and shrink smoothly, and overflow:hidden reveals each new block as it grows */
.hd-stage{margin-top:2rem;text-align:left;overflow:hidden;transition:height .9s var(--e)}
.hd-rise{animation:hd-rise .5s cubic-bezier(.2,.7,.2,1) both}

/* 1. Composer: the prompt being typed */
.hd-comp{padding:1.5rem;border-radius:10px;background:var(--bg3);border:1px solid var(--brd)}
.hd-comp p{min-height:4rem;font-size:1.15rem;line-height:1.5;color:var(--t1)}
.hd-caret{display:inline-block;width:1px;height:1.15em;margin-left:2px;vertical-align:-.2em;background:var(--t1);animation:hd-blink 1s step-end infinite}
.hd-foot{display:flex;align-items:center;justify-content:space-between;margin-top:1.5rem;font-size:.85rem;color:var(--t3)}
.hd-send{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.05);color:var(--t3);transition:background .2s,color .2s}
.hd-send.on{background:var(--acf);color:#fff}
.hd-send svg{width:16px;height:16px}

/* 2. Conversation: the prompt as a message, then the trace steps */
.hd-ask{width:fit-content;max-width:90%;margin-left:auto;padding:.85rem 1.25rem;border-radius:10px;background:var(--bg3h);border:1px solid var(--brd);font-size:1.05rem;line-height:1.55;color:var(--t1)}
.hd-trace{display:flex;flex-direction:column;gap:.35rem;margin-top:1.5rem;font-size:.85rem;color:var(--t3)}
.hd-trace div{display:flex;align-items:center;gap:.5rem}
.hd-trace svg{width:14px;height:14px;flex-shrink:0;color:var(--ac)}
.hd-spin{animation:hd-spin 3s linear infinite}

/* 3. Answer blocks */
.hd-ans{display:flex;flex-direction:column;gap:1rem;margin-top:1.5rem;font-size:1.05rem;line-height:1.7;color:var(--t1)}
.hd-ans code{white-space:nowrap;padding:.1rem .4rem;border-radius:4px;background:rgba(255,255,255,.06);font-family:var(--m);font-size:.85em}

/* Phones: smaller text keeps the stage within about one screen */
@media(max-width:480px){
  .hd-stage{margin-top:1.5rem}
  .hd-comp{padding:1.15rem}
  .hd-comp p,.hd-ask,.hd-ans{font-size:.95rem}
  .hd-ans{gap:.75rem;line-height:1.6}
  .hd-trace{font-size:.8rem}
}

@keyframes hd-rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes hd-blink{50%{opacity:0}}
@keyframes hd-spin{to{transform:rotate(360deg)}}
