/* ═══════════════════════════════════════════════════════
   SignVerse Product Demo — animated browser-frame showcase
   ═══════════════════════════════════════════════════════ */

/* ── Browser Frame ── */
.demo-browser {
  margin: 48px auto 0;
  max-width: 960px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 24px 80px rgba(0,0,0,0.5),
    0 0 120px rgba(249,115,22,0.08);
  position: relative;
}
.demo-browser-bar {
  background: #2a2420;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.demo-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.demo-address {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  font-family: ui-monospace, SFMono-Regular, monospace;
  margin-left: 8px;
}

/* ── Scene Container ── */
.demo-viewport {
  background: #f8f7f5;
  height: 400px;
  position: relative;
  overflow: hidden;
}
.demo-scene {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1);
  pointer-events: none;
}
.demo-scene.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.demo-scene.exit {
  opacity: 0;
  transform: translateX(-40px);
}

/* ── Common Scene Layout ── */
.demo-screen-header {
  width: 100%;
  height: 100%;
  display: flex;
}
.demo-sidebar-mini {
  width: 48px;
  background: #1e293b;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0;
  gap: 12px;
  flex-shrink: 0;
}
.demo-logo-dot {
  width: 24px; height: 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f97316, #ea580c);
  margin-bottom: 8px;
}
.demo-nav-line {
  width: 28px; height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.1);
  transition: background 0.3s;
}
.demo-nav-line.active {
  background: rgba(249,115,22,0.6);
}
.demo-main-area {
  flex: 1;
  padding: 16px 20px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.demo-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.demo-title-text {
  font-size: 15px;
  font-weight: 800;
  color: #1c1917;
  letter-spacing: -0.02em;
}
.demo-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}
.demo-btn-sm {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 8px;
}
.demo-badge-green {
  background: rgba(22,163,74,0.12);
  color: #16a34a;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
}

/* ── Scene 1: Dashboard KPI + Table ── */
.demo-kpi-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.demo-kpi {
  flex: 1;
  background: #fff;
  border: 1px solid #efe7de;
  border-radius: 10px;
  padding: 10px 12px;
  animation: demoFadeUp 0.5s ease both;
}
.demo-kpi:nth-child(1) { animation-delay: 0.2s; }
.demo-kpi:nth-child(2) { animation-delay: 0.4s; }
.demo-kpi:nth-child(3) { animation-delay: 0.6s; }
.demo-kpi:nth-child(4) { animation-delay: 0.8s; }
.demo-kpi.accent {
  border-color: rgba(249,115,22,0.3);
  background: linear-gradient(135deg, #fff7ed, #fff);
}
.demo-kpi-num {
  font-size: 20px;
  font-weight: 900;
  color: #1c1917;
  line-height: 1.1;
}
.demo-kpi-lbl {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #78716c;
  margin-top: 2px;
}
.demo-table-skeleton {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.demo-table-row {
  height: 28px;
  border-radius: 6px;
  background: rgba(0,0,0,0.03);
  animation: demoFadeUp 0.4s ease both;
}
.demo-table-row:nth-child(1) { animation-delay: 1s; }
.demo-table-row:nth-child(2) { animation-delay: 1.15s; }
.demo-table-row:nth-child(3) { animation-delay: 1.3s; }
.demo-table-row:nth-child(4) { animation-delay: 1.45s; }
.demo-table-row.header {
  background: rgba(0,0,0,0.06);
  height: 24px;
}
.demo-table-row.highlight {
  background: linear-gradient(90deg, rgba(249,115,22,0.08), transparent);
  border-left: 3px solid #f97316;
}

/* ── Scene 2: Envelope Builder ── */
.demo-builder {
  display: flex;
  gap: 16px;
  flex: 1;
}
.demo-doc-preview {
  flex: 2;
  background: #fff;
  border: 1px solid #efe7de;
  border-radius: 10px;
  padding: 20px;
  position: relative;
}
.demo-doc-line {
  height: 6px;
  border-radius: 3px;
  background: #e5e0d8;
  margin-bottom: 10px;
}
.demo-doc-line.w40 { width: 40%; }
.demo-doc-line.w60 { width: 60%; }
.demo-doc-line.w70 { width: 70%; }
.demo-doc-line.w80 { width: 80%; }
.demo-doc-line.w90 { width: 90%; }
.demo-sig-field {
  margin-top: 24px;
  border: 2px dashed #f97316;
  border-radius: 8px;
  padding: 10px 16px;
  background: rgba(249,115,22,0.04);
  display: inline-flex;
  align-items: center;
  animation: demoPulse 2s ease-in-out infinite;
}
.demo-recipients {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.demo-recip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #efe7de;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  color: #1c1917;
  font-weight: 600;
  animation: demoFadeUp 0.4s ease both;
}
.demo-recip:nth-child(1) { animation-delay: 0.4s; }
.demo-recip:nth-child(2) { animation-delay: 0.6s; }
.demo-recip:nth-child(3) { animation-delay: 0.8s; }
.demo-recip-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* ── Scene 3: Signing Flow ── */
.demo-sign-flow {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 20px 32px;
}
.demo-sign-header {
  margin-bottom: 20px;
}
.demo-sign-steps {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 700;
}
.demo-step {
  padding: 4px 12px;
  border-radius: 99px;
  background: rgba(0,0,0,0.06);
  color: #78716c;
}
.demo-step.active {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
}
.demo-step.done {
  background: rgba(22,163,74,0.12);
  color: #16a34a;
}
.demo-step-arrow {
  width: 20px; height: 2px;
  background: #d6d3d1;
}
.demo-sign-doc {
  background: #fff;
  border: 1px solid #efe7de;
  border-radius: 12px;
  padding: 24px;
  max-width: 500px;
  margin: 0 auto;
}
.demo-sig-capture {
  margin-top: 24px;
}
.demo-sig-pad {
  border: 2px solid #f97316;
  border-radius: 10px;
  padding: 12px 20px;
  background: rgba(249,115,22,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
}
.demo-sig-animate {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: demoSignDraw 2s ease-in-out 0.8s forwards;
}
.demo-sig-label {
  text-align: center;
  font-size: 10px;
  color: #78716c;
  margin-top: 6px;
}

/* ── Scene 4: Audit Trail ── */
.demo-audit-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 10px;
}
.demo-audit-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-left: 2px solid #efe7de;
  padding-left: 20px;
  position: relative;
  font-size: 12px;
  color: #1c1917;
  animation: demoFadeUp 0.4s ease both;
}
.demo-audit-item:nth-child(1) { animation-delay: 0.3s; }
.demo-audit-item:nth-child(2) { animation-delay: 0.6s; }
.demo-audit-item:nth-child(3) { animation-delay: 0.9s; }
.demo-audit-item:nth-child(4) { animation-delay: 1.2s; }
.demo-audit-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  position: absolute;
  left: -6px;
  top: 14px;
}
.demo-audit-item strong {
  font-weight: 700;
  display: block;
}
.demo-audit-time {
  font-size: 10px;
  color: #78716c;
}

/* ── Navigation Pills ── */
.demo-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 14px 16px 8px;
  background: #2a2420;
}
.demo-nav-pill {
  background: rgba(255,255,255,0.06);
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.2s;
}
.demo-nav-pill:hover {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
}
.demo-nav-pill.active {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
}

/* ── Progress Bar ── */
.demo-progress {
  height: 3px;
  background: rgba(255,255,255,0.06);
}
.demo-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #f97316, #fbbf24);
  border-radius: 0 3px 3px 0;
}
.demo-progress-fill.animating {
  width: 100%;
  transition: width 5s linear;
}

/* ── Keyframe Animations ── */
@keyframes demoFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes demoPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(249,115,22,0.3); }
  50%      { box-shadow: 0 0 0 8px rgba(249,115,22,0); }
}
@keyframes demoSignDraw {
  to { stroke-dashoffset: 0; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .demo-viewport { height: 320px; }
  .demo-kpi-row { flex-wrap: wrap; }
  .demo-kpi-row .demo-kpi { min-width: calc(50% - 6px); }
  .demo-builder { flex-direction: column; }
  .demo-sidebar-mini { width: 36px; }
  .demo-sign-doc { padding: 14px; }
  .demo-audit-timeline { font-size: 11px; }
}
