/* AI Buddy · the dashboard section ("Watch the agents build your app.")
   One window on a wide page: centred headline and lead, then the sample dashboard card. Nothing here depends on
   scroll position. assets/sec-dash.js plays a nine step demo on the card while it is on screen.

   Layout   .db-h, .db-sub   headline and lead, centred (shared .s-h / .s-sub type)
            .db-card         the light card: .db-top (title and stage pills) over .db-b, two columns:
                             features (four .db-ft rows) and today (three feed lines, a question, the reply)
   No size change: every part of the demo always has its place in the layout. A feature's four status pills sit in one
            grid cell (the cell is as wide as the widest), and only the current one shows; the typing dots and the
            answer share one cell too. Parts that are not shown yet are hidden with visibility, not removed.
   States   [data-db-s] on .db-ft        the feature's status; the pill with the same [data-db-v] shows.
                                         The HTML holds the final state (also the state without script or with motion off)
            .is-demo on .db-card         the script is playing the demo; only then can parts be hidden
            .is-off                      a feed line, the question or the answer not reached yet in this step
            .is-on on .db-ty             the typing dots show (one step only)
            .is-paused on .db-card       off screen: the typing dots stop
            .is-armed / .is-in           the entrance (assets/kit.js): the card enters as one part */

/* head */
.db-h{max-width:none;text-align:center}
.db-sub{margin-inline:auto;max-width:36em;text-align:center}

/* the card */
.db-card{
  --pad:clamp(18px,calc(var(--dvh) * .028),30px);
  --row:clamp(9px,calc(var(--dvh) * .012),14px);
  position:relative;margin-top:clamp(28px,calc(var(--dvh) * .055),64px);
  border:1px solid rgba(255,255,255,.1);border-radius:16px;overflow:hidden;
  background:#f6f6f4;color:var(--ink);
  font-family:'Inter Tight','Helvetica Neue',Arial,sans-serif;text-align:left;
}
.db-top{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px;padding:clamp(12px,calc(var(--dvh) * .016),18px) clamp(18px,2cqw,28px);border-bottom:1px solid rgba(17,17,19,.08)}
.db-dots{display:flex;gap:6px}
.db-dots i{width:9px;height:9px;border-radius:50%;background:#d4d4d8}
.db-top b{flex:1;min-width:200px;margin-left:12px;font-weight:500;font-size:15px}
.db-stg{display:flex;flex-wrap:wrap;gap:6px}
.db-stg span{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px;border-radius:999px;border:1px solid rgba(17,17,19,.1);font-size:12px;color:#6a6a70}
.db-stg .db-ok{color:#1d6b46;border-color:rgba(29,107,70,.25);background:#e8f4ee}
.db-stg .db-now{background:var(--v);color:#fff;border-color:var(--v)}

.db-b{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.db-col{padding:var(--pad)}
.db-col+.db-col{border-left:1px solid rgba(17,17,19,.08)}
.db-k{margin:0 0 8px;font-size:10px;line-height:1.2;letter-spacing:.36em;font-weight:500;color:#6c6c73}
.db-k2{margin-top:clamp(14px,calc(var(--dvh) * .02),22px)}

/* features: name on the left, the status pill on the right */
.db-ft{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:var(--row) 0;border-bottom:1px solid rgba(17,17,19,.07);font-size:15px}
.db-ft:last-child{border-bottom:0}
.db-fn small{display:block;margin-top:3px;font-size:12px;color:var(--v)}
.db-st{display:grid;justify-items:end;flex:none}
.db-st>span{grid-area:1/1;display:inline-flex;align-items:center;height:24px;padding:0 10px;border-radius:999px;font-size:11px;font-weight:500;visibility:hidden;opacity:0;transform:scale(.8);transition:opacity .2s ease,transform .32s var(--ease),visibility 0s linear .2s}
.db-st [data-db-v=planned]{background:#ececef;color:#5f5f66}
.db-st [data-db-v=building]{background:#eee5ff;color:#5b23c9}
.db-st [data-db-v=testing]{background:#fff1dc;color:#7a4800}
.db-st [data-db-v=ready]{background:#e2f3ea;color:#1d6b46}
.db-ft[data-db-s=planned] [data-db-v=planned],.db-ft[data-db-s=building] [data-db-v=building],
.db-ft[data-db-s=testing] [data-db-v=testing],.db-ft[data-db-s=ready] [data-db-v=ready]{visibility:visible;opacity:1;transform:none;transition:opacity .22s ease .06s,transform .32s var(--ease) .06s,visibility 0s}

/* today: three feed lines */
.db-feed p{display:flex;gap:10px;margin:0 0 8px;font-size:14px;line-height:1.5;color:#3d3d42}
.db-feed p::before{content:"";flex:none;width:6px;height:6px;margin-top:.55em;border-radius:50%;background:var(--v)}
.db-feed b{font-weight:500;color:var(--ink)}

/* the question, then the typing dots or the answer in one place */
.db-chat{display:grid;gap:10px;margin-top:14px}
.db-q,.db-a{max-width:85%;padding:11px 15px;border-radius:16px;font-size:14px;line-height:1.45}
.db-q{justify-self:end;background:var(--v);color:#fff;border-bottom-right-radius:5px}
.db-re{display:grid;justify-items:start}
.db-re>*{grid-area:1/1}
.db-a{background:#ebe9f2;color:var(--ink);border-bottom-left-radius:5px}
.db-ty{display:flex;gap:4px;align-self:start;padding:12px 14px;border-radius:16px;background:#ebe9f2;visibility:hidden;opacity:0}
.db-ty i{width:6px;height:6px;border-radius:50%;background:#8a8a92}

/* the demo: parts not reached yet are hidden in place */
.db-feed p,.db-q,.db-a,.db-ty{transition:opacity .28s ease,transform .38s var(--ease),visibility 0s}
.db-a{transition-duration:.5s,.65s,0s}   /* the answer comes in a little slower than the rest */
.db-card.is-demo .is-off{visibility:hidden;opacity:0;transform:translate3d(0,8px,0);transition:opacity .25s ease,transform .25s ease,visibility 0s linear .25s}
.db-card.is-demo .db-ty.is-on{visibility:visible;opacity:1}
.db-card.is-demo .db-ty.is-on i{animation:db-dot .9s infinite}
.db-card.is-demo .db-ty.is-on i:nth-child(2){animation-delay:.14s}
.db-card.is-demo .db-ty.is-on i:nth-child(3){animation-delay:.28s}
.db-card.is-paused .db-ty i{animation-play-state:paused}

/* narrow page (phones, and the phone preview): one column */
@container (max-width:900px){
  .db-h{font-size:clamp(30px,8.8cqw,44px);text-wrap:balance}
  .db-sub{font-size:17px}
  .db-card{margin-top:32px}
  .db-b{grid-template-columns:minmax(0,1fr)}
  .db-col+.db-col{border-left:0;border-top:1px solid rgba(17,17,19,.08)}
  .db-top b{min-width:0;flex-basis:60%}
}

@keyframes db-dot{0%,100%{opacity:.3;transform:none}50%{opacity:1;transform:translateY(-3px)}}
