/* The demo after the hero: the promo video's scene, drawn and played in the browser. A Mac screen
   (760 × 475 units, scaled to fit) with Mail, a notification, the MarkdownDraft window (real captures of the app), the agent's terminal as
   glass plates over it, and a pointer. demo.js moves it along a timeline; this file is every state. */

.demo { padding-top: 24px; }
/* the text on top, the scene below at the panel's full width */
.demo .panel { background: var(--panel); border-radius: 36px; padding: 40px 40px 48px; }
.demo .demo-text { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: start; margin-top: 40px; }
.demo .demo-text .lead { margin-top: 14px; max-width: 560px; }
.demo .demo-steps { padding-top: 10px; }
@media (max-width: 900px) { .demo .panel { padding: 20px 20px 32px; } .demo .demo-text { grid-template-columns: 1fr; gap: 24px; } }
.demo-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-size: 15px; }
.demo-steps li { display: flex; align-items: center; gap: 10px; transition: color .3s; }
.demo-steps li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: background .3s; }
.demo-steps li.on { color: var(--text); font-weight: 600; }
.demo-steps li.on::before { background: var(--blue); }

.scene-box { width: 100%; aspect-ratio: 760 / 475; position: relative; overflow-x: clip; }
.scene { position: absolute; left: 0; top: 0; width: 760px; height: 475px; transform-origin: 0 0; font: 11px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif; color: var(--text); }
.scene .hid { opacity: 0 !important; pointer-events: none; }
/* the desktop: a wallpaper photo, like a real Mac */
.screen { position: absolute; inset: 0; border-radius: 14px; overflow: hidden; background: #c1441e url(/wallpaper.jpg) center / cover no-repeat; box-shadow: 0 0 0 1px rgba(17,19,24,.14), 0 20px 50px -20px rgba(17,19,24,.35); transition: filter .5s, opacity .5s; }
.screen.dim { filter: blur(5px); opacity: .6; }
.scene .dots { display: flex; gap: 5px; }
.scene .dots i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.scene .dots i:nth-child(2) { background: #febc2e; } .scene .dots i:nth-child(3) { background: #28c840; }
.scene .av { width: 16px; height: 16px; border-radius: 50%; background: var(--text); color: var(--bg); display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; flex: none; }
.scene .av.ag { background: var(--agent); color: transparent; position: relative; }
.scene .caret { display: inline-block; width: 1.5px; height: 12px; background: var(--blue); vertical-align: -2px; margin-left: 1px; animation: blink 1s steps(2) infinite; }
@keyframes blink { to { opacity: 0; } }
.scene .pill { display: inline-flex; align-items: center; justify-content: center; height: 22px; padding: 0 10px; border-radius: 11px; font-size: 10.5px; font-weight: 600; background: var(--bg); box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); white-space: nowrap; transition: transform .15s; }
.scene .pill.dark { background: var(--text); color: var(--bg); box-shadow: none; }
.scene .pill.pressed { transform: scale(.94); }

/* Mail, behind everything, where the user is typing */
.scene .mail { position: absolute; left: 300px; top: 70px; width: 420px; height: 300px; border-radius: 12px; background: var(--bg); box-shadow: 0 0 0 .5px rgba(17,19,24,.3), 0 10px 24px rgba(17,19,24,.12); overflow: hidden; transition: opacity .4s; }
.scene .mail .mbar { height: 34px; display: flex; align-items: center; gap: 14px; padding: 0 12px; background: var(--panel); border-bottom: 1px solid var(--line); font-weight: 600; font-size: 11px; }
.scene .mail .mf { height: 28px; display: flex; align-items: center; gap: 8px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.scene .mail .mf span { width: 48px; color: var(--muted); }
.scene .mail .mbody { padding: 14px 16px; font-size: 12px; line-height: 1.6; }

/* macOS notification */
.scene .notif { position: absolute; right: 14px; top: 12px; width: 300px; height: 62px; border-radius: 16px; display: flex; align-items: center; gap: 10px; padding: 0 14px 0 12px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(20px); box-shadow: 0 0 0 .5px rgba(0,0,0,.18), 0 10px 30px rgba(17,19,24,.24); transform: translateX(340px); transition: transform .55s cubic-bezier(.2,.8,.2,1), opacity .3s; z-index: 5; }
.scene .notif.in { transform: none; }
.scene .notif img { width: 34px; height: 34px; border-radius: 8px; }
.scene .notif b { display: block; font-size: 11px; } .notif span { font-size: 10.5px; color: var(--muted); }
.scene .notif em { position: absolute; right: 12px; top: 8px; font-style: normal; font-size: 9px; color: var(--muted); }

/* the MarkdownDraft window: real captures of the app, one per state of the round (demo.js shows them in turn, each
   one fading in over the one before) */
.app { position: absolute; left: 30px; top: 24px; width: 700px; height: 431px; border-radius: 14px; background: #f1f1f1; overflow: hidden; box-shadow: 0 0 0 .5px rgba(17,19,24,.28), 0 14px 28px rgba(17,19,24,.08), 0 40px 80px rgba(17,19,24,.12); transform: scale(.92); opacity: 0; transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .35s; }
.app.in { transform: none; opacity: 1; }
.app .fr { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .3s; }
.app .fr.on { opacity: 1; }
.app .fr.cut { transition: none; }
/* typing in the New comment sheet: the capture has the whole comment; a cover the colour of the field hides what
   isn't typed yet and steps back a letter at a time, its left edge the caret; then it goes, and the capture's own
   caret is at the end */
.app .typing { position: absolute; top: 48.25%; height: 2.45%; width: 0; box-sizing: content-box; background: #fff; border-left: 1px solid #3478f6; opacity: 0; }
.app #typing1 { right: 53.65%; --w: 10.87%; --t: 1.21s; --n: 22; }
.app #typing2 { right: 55.7%; --w: 8.82%; --t: 1.1s; --n: 20; }
.app .typing.in { opacity: 1; width: var(--w); }
.app .typing.in.go { width: 0; transition: width var(--t) steps(var(--n)); }
/* the passage being selected, before its comment: where the two passages are in the capture */
.app .pick { position: absolute; height: 2.7%; width: 0; background: rgba(10,124,255,.24); border-radius: 2px; transition: width .35s cubic-bezier(.4,0,.3,1), opacity .25s; }
.app #pick1 { left: 34.15%; top: 38.45%; } .app #pick1.on { width: 9.98%; }
.app #pick2 { left: 22.42%; top: 46.8%; } .app #pick2.on { width: 11.05%; }
.app .pick.off { opacity: 0; }
/* where the pointer goes in the capture: the main button (Send, then Approve) and the first comment's corner */
.app .hot { position: absolute; width: 0; height: 0; }
.app #hotSend { left: 93%; top: 96.9%; }
.app #hotApprove { left: 95.4%; top: 96.9%; }
.app #hotAccept { left: 95.1%; top: 19.4%; }

/* the agent's terminal: a glass plate over the screen */
.plate { position: absolute; left: 50%; top: 50%; width: 460px; transform: translate(-50%, -50%) scale(.96); opacity: 0; transition: opacity .35s, transform .35s; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(18px) saturate(1.3); border-radius: 16px; padding: 16px 18px; box-shadow: 0 0 0 1px rgba(17,19,24,.08), 0 24px 60px -10px rgba(17,19,24,.35); z-index: 8; }
.plate.in { opacity: 1; transform: translate(-50%, -50%); }
.plate .ph { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 12px; margin-bottom: 10px; }
.plate .ask { display: inline-block; padding: 6px 10px; border-radius: 10px; background: var(--text); color: var(--bg); font-size: 12px; margin-bottom: 8px; }
.plate .reply { padding: 6px 10px; border-radius: 10px; background: var(--panel); font-size: 12px; margin-top: 8px; }
.plate .row { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px; border-radius: 8px; background: rgba(17,19,24,.04); margin-top: 6px; font-size: 11.5px; white-space: nowrap; }
@media (prefers-color-scheme: dark) { .plate .row { background: rgba(255,255,255,.06); } }
.plate .row code { font: 500 11px ui-monospace, "SF Mono", Menlo, monospace; }
.plate .row span { color: var(--muted); }
.plate .row em { margin-left: auto; font-style: normal; font-weight: 600; }
.plate .row em.add { color: var(--green); } .plate .row em .del { color: var(--red); margin-left: 4px; }
.plate .row em.blue { color: var(--blue); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.plate .row i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.plate .row i.spin { border: 1.5px solid rgba(10,124,255,.3); border-top-color: var(--blue); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.plate .row i.chk { background: var(--green); position: relative; }
.plate .row i.chk::after { content: ""; position: absolute; left: 3px; top: 3px; width: 4px; height: 2px; border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: rotate(-45deg); }
.plate .ask, .plate .row, .plate .reply { opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
.plate .in-row { opacity: 1 !important; transform: none !important; }

/* the pointer and its click */
.ptr { position: absolute; left: 0; top: 0; width: 16px; height: 20px; z-index: 12; opacity: 0; transition: left .65s cubic-bezier(.3,0,.15,1), top .65s cubic-bezier(.3,0,.15,1), opacity .25s; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.ptr.in { opacity: 1; }
.ptr svg { width: 16px; height: 20px; display: block; }
.ripple { position: absolute; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; background: rgba(10,124,255,.18); box-shadow: 0 0 0 2px rgba(10,124,255,.7); opacity: 0; transform: scale(.2); z-index: 11; pointer-events: none; }
.ripple.go { animation: ripple .5s ease-out forwards; }
@keyframes ripple { from { opacity: 1; transform: scale(.2); } to { opacity: 0; transform: scale(1); } }
