/* Demo-specific UI — loaded after style.css */

.demo-head {
  margin-bottom: 1.75rem;
}

.demo-benefit {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 36rem;
}

.demo-try {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--cyan);
  font-weight: 700;
  font-size: 0.88rem;
}

.demo-shell {
  margin-top: 1.5rem;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  min-height: 420px;
}

.demo-grid-2 {
  display: grid;
  gap: 1rem;
}

@media (min-width: 900px) {
  .demo-grid-2 {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: start;
  }
}

/* ---- Chatbot ---- */
.chat-panel {
  display: flex;
  flex-direction: column;
  min-height: 440px;
  border-radius: 1.1rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  color: #04140c;
  font-weight: 800;
  font-size: 0.75rem;
}

.chat-header strong {
  display: block;
  font-size: 0.95rem;
}

.chat-online {
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 700;
}

.chat-stream {
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  overflow-y: auto;
  max-height: 280px;
}

.msg {
  max-width: 88%;
  padding: 0.75rem 0.9rem;
  border-radius: 1rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

.msg-ai {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-bottom-left-radius: 0.3rem;
}

.msg-user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.85), rgba(34, 211, 238, 0.75));
  color: #04140c;
  font-weight: 600;
  border-bottom-right-radius: 0.3rem;
}

.msg-typing {
  align-self: flex-start;
  color: var(--muted);
  font-size: 0.85rem;
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0 1rem 0.75rem;
}

.chip {
  appearance: none;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(34, 211, 238, 0.08);
  color: var(--white);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.chip:hover {
  background: rgba(34, 211, 238, 0.16);
  border-color: rgba(34, 211, 238, 0.5);
}

.chat-composer {
  display: flex;
  gap: 0.5rem;
  padding: 0.85rem;
  border-top: 1px solid var(--border);
}

.chat-composer input {
  flex: 1;
  min-width: 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--white);
  padding: 0.7rem 1rem;
  outline: none;
}

.chat-composer input:focus {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.chat-composer .btn {
  min-height: 44px;
  padding-inline: 1.1rem;
}

.stat-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.stat-card {
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.stat-card strong {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* ---- Workflow ---- */
.flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.flow-node {
  width: min(100%, 360px);
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.flow-node.is-active {
  border-color: rgba(34, 197, 94, 0.55);
  box-shadow: 0 0 28px rgba(34, 197, 94, 0.18);
  transform: translateZ(12px);
}

.flow-node strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.2rem;
}

.flow-node span {
  color: var(--muted);
  font-size: 0.8rem;
}

.flow-connector {
  width: 2px;
  height: 28px;
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.15), rgba(34, 197, 94, 0.55), rgba(34, 211, 238, 0.15));
  position: relative;
}

.flow-connector.is-lit {
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.65);
  background: linear-gradient(180deg, var(--cyan), var(--green));
}

.flow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.25rem;
}

.flow-result {
  color: var(--green);
  font-weight: 700;
  opacity: 0;
}

.flow-result.is-visible {
  opacity: 1;
}

.flow-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* ---- Leads calculator ---- */
.calc-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 900px) {
  .calc-grid {
    grid-template-columns: 1fr 1.1fr;
  }
}

.field {
  margin-bottom: 0.9rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.field input[type="range"],
.field input[type="number"] {
  width: 100%;
}

.field input[type="number"] {
  border-radius: 0.85rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.3);
  color: var(--white);
  padding: 0.7rem 0.85rem;
  outline: none;
}

.field input[type="number"]:focus {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.field input[type="range"] {
  accent-color: var(--green);
}

.field-value {
  float: right;
  color: var(--cyan);
  font-weight: 700;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.score-bars {
  margin-top: 1rem;
  display: grid;
  gap: 0.55rem;
}

.score-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.82rem;
}

.bar-track {
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  transition: width 0.5s ease;
}

/* ---- Data processing ---- */
.dropzone {
  border: 1.5px dashed rgba(34, 211, 238, 0.35);
  border-radius: 1.1rem;
  padding: 2rem 1.25rem;
  text-align: center;
  background: rgba(34, 211, 238, 0.04);
  position: relative;
  overflow: hidden;
  min-height: 160px;
  display: grid;
  place-items: center;
}

.dropzone.is-scanning::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: scanLine 1.2s linear infinite;
}

@keyframes scanLine {
  from {
    top: 0;
  }
  to {
    top: 100%;
  }
}

.process-steps {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.process-steps li {
  color: var(--muted);
  font-size: 0.88rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.65rem;
  border: 1px solid transparent;
}

.process-steps li.is-done {
  color: var(--green);
  border-color: rgba(34, 197, 94, 0.25);
  background: rgba(34, 197, 94, 0.06);
}

.process-steps li.is-current {
  color: var(--white);
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.08);
}

.table-wrap {
  margin-top: 1rem;
  overflow-x: auto;
  border-radius: 1rem;
  border: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  min-width: 640px;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table th {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.03);
}

.data-table tr.is-hidden {
  display: none;
}

.badge {
  display: inline-flex;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-hot {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}

.badge-warm {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
}

/* ---- Booking ---- */
.booking-layout {
  display: grid;
  gap: 1rem;
}

@media (min-width: 900px) {
  .booking-layout {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.day-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.day-tab,
.time-slot {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--white);
  border-radius: 0.75rem;
  padding: 0.65rem 0.35rem;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
}

.day-tab.is-active,
.time-slot.is-active {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
}

.time-slot:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: line-through;
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  width: min(420px, 100%);
  padding: 1.25rem;
  border-radius: 1.25rem;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s ease;
}

.modal-backdrop.is-open .modal {
  transform: none;
}

.modal h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.modal p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.modal .field input {
  width: 100%;
  border-radius: 0.85rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.3);
  color: var(--white);
  padding: 0.7rem 0.85rem;
  outline: none;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.booking-success {
  text-align: center;
  padding: 1rem 0;
}

.booking-success .check {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.85rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
  font-size: 1.5rem;
  font-weight: 800;
}

/* ---- Missed call phone ---- */
.phone-demo {
  display: grid;
  gap: 1rem;
  justify-items: center;
}

@media (min-width: 900px) {
  .phone-demo {
    grid-template-columns: auto 1fr;
    align-items: start;
  }
}

.phone-frame {
  width: min(280px, 100%);
  aspect-ratio: 9 / 17;
  padding: 0.7rem;
  border-radius: 2rem;
  border: 1px solid var(--border);
  background: #05070d;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}

.phone-screen {
  height: 100%;
  border-radius: 1.5rem;
  background: linear-gradient(180deg, #102033, #0a1220);
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow: hidden;
}

.phone-frame.is-vibrating {
  animation: phoneBuzz 0.35s linear 4;
}

@keyframes phoneBuzz {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-3px) rotate(-0.5deg);
  }
  75% {
    transform: translateX(3px) rotate(0.5deg);
  }
}

.sms-bubble {
  align-self: flex-start;
  max-width: 92%;
  padding: 0.75rem 0.85rem;
  border-radius: 1rem 1rem 1rem 0.3rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  font-size: 0.84rem;
  line-height: 1.4;
}

.sms-bubble.user {
  align-self: flex-end;
  border-radius: 1rem 1rem 0.3rem 1rem;
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.3);
}

.timeline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.timeline-list li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.7rem 0.85rem;
  border-radius: 0.85rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--muted);
  font-size: 0.88rem;
  opacity: 0.45;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.timeline-list li.is-on {
  opacity: 1;
  transform: none;
  color: var(--white);
  border-color: rgba(34, 197, 94, 0.35);
}

.timeline-list .mark {
  color: var(--green);
  font-weight: 800;
}

/* ---- CRM ---- */
.kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(160px, 1fr);
  gap: 0.7rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 1100px) {
  .kanban {
    grid-auto-flow: unset;
    grid-template-columns: repeat(5, 1fr);
    overflow: visible;
  }
}

.kanban-col {
  min-height: 240px;
  padding: 0.7rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.kanban-col h4 {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.crm-card {
  padding: 0.75rem;
  border-radius: 0.85rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 0.55rem;
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.crm-card.is-moving {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.2);
  transform: translateY(-4px);
}

.crm-card strong {
  display: block;
  font-size: 0.88rem;
}

.crm-card span {
  color: var(--muted);
  font-size: 0.78rem;
}

.crm-log {
  margin-top: 1rem;
  max-height: 180px;
  overflow-y: auto;
  display: grid;
  gap: 0.4rem;
}

.crm-log-item {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.5rem 0.7rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
}

/* ---- Mid CTA (Part 3 also uses) ---- */
.mid-cta {
  text-align: center;
  padding: clamp(3rem, 6vw, 4.5rem) 1.5rem;
  border-radius: 1.5rem;
  border: 1px solid var(--border);
  background:
    radial-gradient(500px 220px at 50% 0%, rgba(34, 197, 94, 0.14), transparent 65%),
    rgba(255, 255, 255, 0.03);
}

.mid-cta h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.mid-cta p {
  margin: 0 auto 1.35rem;
  max-width: 36rem;
  color: var(--muted);
}

.mid-cta-trust {
  margin: 1.1rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .dropzone.is-scanning::after,
  .phone-frame.is-vibrating {
    animation: none !important;
  }
}

/* Part 3 — demo micro polish */
.demo-shell.depth-card {
  transform-style: preserve-3d;
}

.flow-node,
.crm-card,
.stat-card {
  transform-style: preserve-3d;
}

.chat-composer .btn:disabled {
  opacity: 0.55;
}

.mid-cta .footer-actions {
  margin-top: 0.25rem;
}

@media (max-width: 480px) {
  .mid-cta .btn {
    width: 100%;
  }

  .day-tabs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .day-tab {
    font-size: 0.68rem;
    padding: 0.55rem 0.15rem;
  }

  .time-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .phone-frame {
    width: min(260px, 100%);
  }

  .flow-meta {
    grid-template-columns: 1fr;
  }

  .result-grid,
  .stat-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 899px) {
  .kanban {
    padding-bottom: 0.75rem;
  }

  .kanban-col {
    min-width: 170px;
  }
}

