/* Self-playing product demo (/demo) */
.dm-wrap { max-width: 1180px; margin: 0 auto; padding: 40px 24px 24px; }
.dm-head { text-align: center; max-width: 760px; margin: 0 auto 22px; }
.dm-head h1 { font-size: 40px; letter-spacing: -.8px; line-height: 1.1; color: var(--navy); margin: 6px 0 12px; }
.dm-head .lead { color: var(--muted); font-size: 17px; margin: 0; }
.dm-caption { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 20px; font-weight: 700; color: var(--navy); min-height: 34px; margin-bottom: 14px; text-align: center; }
.dm-num { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 15px; flex: none; }
.dm-caption #dmCap { transition: opacity .25s; }

.dm-stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; align-items: center; min-height: 520px; }
.dm-dev { transition: opacity .4s, transform .4s; }
.dm-stage.show-laptop .dm-phone, .dm-stage.show-phone .dm-laptop { opacity: .45; transform: scale(.97); }
.dm-scale { transform-origin: top left; position: relative; }
.dm-scale > * { position: absolute; left: 0; top: 0; }

/* laptop */
.dm-laptop { position: relative; }
.dm-laptop .dm-scale { border: 12px solid #1b2433; border-radius: 14px 14px 0 0; box-sizing: content-box; background: #1b2433; }
.dm-base { height: 14px; margin: 0 -26px; background: linear-gradient(#cfd5df, #aeb6c3); border-radius: 0 0 14px 14px; }
.lp-screen { width: 720px; height: 450px; background: var(--bg); overflow: hidden; font-size: 12px; position: relative; }
.lp-top { height: 40px; background: var(--navy); color: #fff; display: flex; align-items: center; gap: 12px; padding: 0 14px; font-size: 13px; }
.lp-org { color: #9fb0c8; font-size: 12px; }
.lp-send { background: #3b4a62; color: #c9d3e2; padding: 6px 16px; border-radius: 7px; font-weight: 700; transition: background .3s, transform .15s; }
.lp-send.ready { background: var(--brand); color: #fff; }
.lp-send.press { transform: scale(.92); }
.lp-view { position: absolute; top: 40px; left: 0; right: 0; bottom: 0; display: flex; transition: opacity .4s; }
.lp-side { width: 210px; padding: 12px; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.lp-label { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; margin-top: 6px; }
.lp-doc, .lp-rec, .lp-tool { border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; display: flex; align-items: center; gap: 7px; opacity: 0; transform: translateY(6px); transition: all .35s; position: relative; }
.lp-doc.on, .lp-rec.on, .lp-tool.on { opacity: 1; transform: none; }
.lp-pdf { background: #E8473B; color: #fff; font-size: 9px; font-weight: 800; padding: 3px 4px; border-radius: 4px; }
.lp-bar { position: absolute; left: 8px; right: 8px; bottom: 3px; height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.lp-bar i { display: block; height: 100%; width: 0; background: var(--brand); transition: width 1.1s ease; }
.lp-av { width: 26px; height: 26px; border-radius: 50%; background: #F5C518; display: grid; place-items: center; font-weight: 800; font-size: 10px; flex: none; }
.lp-name { font-weight: 700; min-height: 15px; }
.lp-mail { color: var(--muted); font-size: 11px; min-height: 14px; }
.lp-tool { font-weight: 600; }
.lp-tool.hl { border-color: var(--brand); background: #EAF1FF; }
.lp-canvas { flex: 1; display: grid; place-items: start center; padding: 14px; overflow: hidden; }
.paper { background: #fff; box-shadow: 0 2px 10px rgba(16,24,40,.12); position: relative; }
.lp-canvas .paper { width: 300px; height: 390px; padding: 22px 24px; transition: opacity .4s; }
.lp-canvas .paper.dim { opacity: .25; }
.pp-h { font-weight: 800; font-size: 13px; letter-spacing: .5px; }
.pp-t { color: #444; margin: 2px 0 12px; }
.pp-l { height: 5px; background: #e6e9ef; border-radius: 3px; margin: 7px 0; }
.w90 { width: 90%; } .w80 { width: 80%; } .w85 { width: 85%; }
.pp-row { display: flex; align-items: flex-end; gap: 8px; margin-top: 22px; font-size: 10px; font-weight: 700; }
.pp-row span { width: 72px; flex: none; }
.pp-row i { flex: 1; border-bottom: 1px solid #9aa3b2; }
.fld { position: absolute; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 10px; opacity: 0; transform: scale(.6); transition: all .3s cubic-bezier(.3,1.5,.6,1); white-space: nowrap; }
.fld.on { opacity: 1; transform: none; }
.f-sig { background: #F5C518cc; border: 1.5px dashed #b38c00; }
.f-pay { background: #CFE3FFdd; border: 1.5px dashed #2c63c7; }
.lp-canvas .f-sig { left: 120px; top: 190px; width: 130px; height: 30px; }
.lp-canvas .f-pay { left: 120px; top: 228px; width: 160px; height: 22px; }
.lp-cursor { position: absolute; left: 600px; top: 300px; width: 18px; height: 18px; pointer-events: none; z-index: 9; transition: left .7s ease, top .7s ease; background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l15 11-7 1-4 7z' fill='%23111' stroke='%23fff' stroke-width='1.5'/%3E%3C/svg%3E"); }
.lp-cursor.click::after { content: ''; position: absolute; left: -8px; top: -8px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--brand); animation: ripple .45s ease-out; }
.lp-toast { position: absolute; left: 50%; bottom: 16px; transform: translate(-50%, 20px); background: var(--navy); color: #fff; padding: 8px 16px; border-radius: 8px; font-weight: 600; opacity: 0; transition: all .35s; }
.lp-toast.on { opacity: 1; transform: translate(-50%, 0); }
.lp-done { opacity: 0; pointer-events: none; flex-direction: column; padding: 16px 20px; gap: 12px; }
.lp-done.on { opacity: 1; }
.ld-title { font-size: 16px; font-weight: 800; color: var(--navy); display: flex; align-items: center; gap: 10px; }
.ld-badge { font-size: 11px; padding: 3px 10px; border-radius: 99px; background: #FFF4E0; color: var(--warn); transition: all .3s; }
.ld-badge.ok { background: #E3F5EC; color: var(--ok); }
.ld-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ld-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; min-height: 250px; }
.ld-h { font-weight: 800; margin-bottom: 8px; }
.ld-ev { padding: 6px 0 6px 18px; border-bottom: 1px solid var(--line); position: relative; opacity: .25; transition: opacity .35s; }
.ld-ev::before { content: ''; position: absolute; left: 2px; top: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.ld-ev.on { opacity: 1; }
#ldPdf { opacity: .25; transition: opacity .4s; }
#ldPdf.on { opacity: 1; }
.ld-pdf { display: flex; gap: 10px; }
.mini-paper { width: 120px; height: 160px; background: #fff; box-shadow: 0 2px 8px rgba(16,24,40,.15); padding: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 9px; }
.mini-paper i { height: 4px; background: #e6e9ef; border-radius: 2px; }
.mini-paper svg { width: 90px; height: 24px; margin-top: 10px; }
.mini-paper svg path { fill: none; stroke: #0E1A6B; stroke-width: 2.4; stroke-linecap: round; }
.mini-paper b { color: var(--ok); }
.mini-paper.cert b { color: var(--navy); }
.ld-note { margin-top: 10px; color: var(--muted); font-size: 11px; }

/* phone */
.dm-phone { justify-self: center; }
.dm-phone .dm-scale { border: 10px solid #111; border-radius: 40px; box-sizing: content-box; background: #111; }
.ph-screen { width: 280px; height: 570px; border-radius: 30px; overflow: hidden; background: var(--bg); position: relative; font-size: 12px; }
.ph-notch { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 84px; height: 22px; background: #111; border-radius: 12px; z-index: 20; }
.pv { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .35s; display: flex; flex-direction: column; }
.pv.on { opacity: 1; }
.pv-lock { background: linear-gradient(160deg, #1d3557, #0E1A2B 60%, #3a2a5d); color: #fff; align-items: center; padding-top: 70px; }
.pl-time { font-size: 58px; font-weight: 300; letter-spacing: -1px; }
.pl-date { opacity: .8; margin-bottom: 30px; }
.pl-note { width: 250px; background: rgba(255,255,255,.88); color: #111; border-radius: 16px; padding: 10px 12px; line-height: 1.35; opacity: 0; transform: translateY(-20px); transition: all .45s cubic-bezier(.3,1.4,.6,1); }
.pl-note.on { opacity: 1; transform: none; }
.pl-note > b { font-size: 10px; color: #555; }
.pv-top { background: var(--navy); color: #fff; padding: 40px 12px 10px; display: flex; flex-direction: column; position: relative; }
.pv-top span { color: #c7d0e0; font-size: 11px; }
.pv-fin { position: absolute; right: 10px; bottom: 10px; background: var(--brand); color: #fff !important; font-weight: 700; padding: 6px 12px; border-radius: 7px; font-size: 12px !important; }
.pv-card { background: #fff; margin: 14px; border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.pv-card.center { text-align: center; margin-top: 60px; }
.pv-card .big { font-size: 46px; }
.pv-h { font-size: 16px; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.pv-card p { color: var(--muted); margin: 0 0 12px; }
.pv-check { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 14px; }
.pv-check .box { width: 18px; height: 18px; border: 2px solid #9aa3b2; border-radius: 4px; flex: none; display: grid; place-items: center; transition: all .2s; }
.pv-check.on .box { background: var(--brand); border-color: var(--brand); }
.pv-check.on .box::after { content: '✓'; color: #fff; font-size: 12px; font-weight: 800; }
.pv-btn { background: var(--brand); color: #fff; text-align: center; font-weight: 700; padding: 11px; border-radius: 9px; transition: transform .15s; }
.pv-btn.press, .pv-fin.press { transform: scale(.93); }
.pv-banner { background: #fff; border-bottom: 1px solid var(--line); padding: 8px 12px; font-weight: 600; }
.ph-paper { margin: 12px; height: 330px; padding: 16px; }
.ph-paper .pp-row { margin-top: 26px; }
.ph-fsig { left: 92px; top: 120px; width: 130px; height: 34px; opacity: 1; transform: none; font-size: 12px; }
.ph-fsig svg { position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); }
.ph-fsig path { fill: none; stroke: #0E1A6B; stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 260; stroke-dashoffset: 260; }
.ph-fsig.signed { background: #fff; border-style: solid; border-color: #e3e7ee; }
.ph-fsig.signed #phSigLbl { display: none; }
.ph-fsig.signed path { animation: draw 1.2s ease forwards; }
.ph-fsig.instant path { animation: none; stroke-dashoffset: 0; }
.ph-fpay { left: 92px; top: 170px; width: 130px; height: 24px; opacity: 1; transform: none; font-size: 12px; }
.ph-fpay.paid { background: #E3F5EC; border-color: var(--ok); color: var(--ok); }
.ph-sheet { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 18px 18px 0 0; padding: 18px 16px 24px; box-shadow: 0 -8px 30px rgba(0,0,0,.25); transform: translateY(105%); transition: transform .4s cubic-bezier(.3,1.1,.6,1); z-index: 10; }
.ph-sheet.on { transform: none; }
.ps-h { font-size: 17px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.ps-row { display: flex; justify-content: space-between; padding: 4px 0; }
.ps-sub { color: var(--muted); font-size: 11px; margin: 4px 0 10px; }
.ps-in { border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; min-height: 36px; margin-bottom: 8px; font-family: ui-monospace, Menlo, monospace; }
.ps-two { display: flex; gap: 8px; } .ps-two .ps-in { flex: 1; }
.ph-tap { position: absolute; width: 34px; height: 34px; border-radius: 50%; background: rgba(11,95,255,.28); border: 2px solid rgba(11,95,255,.6); left: 120px; top: 600px; opacity: 0; pointer-events: none; z-index: 30; transition: left .5s ease, top .5s ease, opacity .2s; }
.ph-tap.on { opacity: 1; }
.ph-tap.click { animation: tap .35s ease; }

/* outro */
.dm-outro { position: absolute; inset: 0; background: rgba(243,245,249,.97); border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity .5s; z-index: 40; }
.dm-outro.on { opacity: 1; pointer-events: auto; }
.dm-outro h2 { font-size: 30px; color: var(--navy); letter-spacing: -.5px; max-width: 640px; }
.dm-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); gap: 14px; margin: 10px 0 22px; }
.dm-cards > div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; text-align: left; }
.dm-cards .fi { font-size: 24px; }
.dm-cards p { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.dm-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.dm-controls { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 22px 0 10px; }
.dm-dots { display: flex; gap: 6px; }
.dm-dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; background: #c9cfdb; cursor: pointer; }
.dm-dots button.on { background: var(--brand); width: 24px; border-radius: 6px; }

@keyframes ripple { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
@keyframes tap { 0% { transform: scale(1); } 50% { transform: scale(.7); } 100% { transform: scale(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (max-width: 860px) {
  .dm-head h1 { font-size: 30px; }
  .dm-caption { font-size: 17px; }
  .dm-stage { grid-template-columns: minmax(0, 1fr); min-height: 0; justify-items: center; }
  .dm-stage.show-laptop .dm-phone, .dm-stage.show-phone .dm-laptop { display: none; }
  .dm-stage .dm-dev { opacity: 1 !important; transform: none !important; }
  .dm-base { margin: 0 -14px; }
  .dm-outro { position: static; opacity: 1; display: none; }
  .dm-outro.on { display: flex; }
  .dm-stage.outro .dm-dev { display: none; }
  .dm-cards { grid-template-columns: 1fr; }
  .dm-outro h2 { font-size: 24px; }
}
