/* ===== TOP NAV ===== */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
}

.nav-brand:hover { color: var(--accent); }

.nav-links { display: flex; gap: 1.5rem; }
.nav-link {
  font-size: 0.9rem;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--fg); }

/* ===== DEMO PAGE LAYOUT ===== */
.demo-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  padding: 8rem 4rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}

@media (max-width: 900px) {
  .demo-page {
    grid-template-columns: 1fr;
    padding: 6rem 1.5rem 3rem;
    gap: 2.5rem;
  }
}

.demo-badge {
  display: inline-block;
  padding: 0.3rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 100px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.demo-explain h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.demo-desc {
  font-size: 1rem;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 460px;
}

/* Steps */
.demo-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 2.5rem;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  opacity: 0.4;
  transition: opacity 0.3s;
}
.step:first-child { border-top: 1px solid var(--border); }
.step.active { opacity: 1; }
.step.done { opacity: 0.7; }

.step-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--fg-muted);
  margin-top: 0.3rem;
  flex-shrink: 0;
  transition: all 0.3s;
}
.step.active .step-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}
.step.done .step-dot {
  background: #22c55e;
  border-color: #22c55e;
}

.step-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}
.step-title {
  font-size: 0.95rem;
  font-weight: 500;
}

/* Stats bar */
.demo-stats-bar {
  display: flex;
  gap: 2rem;
}
.dstat { text-align: center; }
.dstat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
}
.dstat-label {
  font-size: 0.78rem;
  color: var(--fg-muted);
}

/* ===== PHONE CARD ===== */
.demo-phone-wrap {
  position: sticky;
  top: 5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.phone-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

.phone-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.phone-icon {
  font-size: 1.6rem;
  background: rgba(255, 107, 53, 0.12);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.phone-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
}
.phone-subtitle, .phone-status {
  font-size: 0.8rem;
  color: var(--fg-muted);
}
.phone-badge {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--accent-secondary);
}
.phone-divider { height: 1px; background: var(--border); margin: 0; }

.phone-prompt {
  padding: 1.25rem 1.5rem 0.5rem;
  font-size: 0.9rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* Form inside phone card */
.form-group { padding: 0.75rem 1.5rem; }
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--fg-muted);
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.form-input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--accent); }

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: calc(100% - 3rem);
  margin: 1rem 1.5rem 1.5rem;
  padding: 0.85rem 1.5rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  text-decoration: none;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  width: 100%;
  padding: 0.75rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--fg-muted);
  font-family: var(--font-display);
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--fg); }

/* ===== CHAT MESSAGES ===== */
.chat-messages {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 360px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.chat-bubble {
  max-width: 80%;
  padding: 0.7rem 1rem;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  animation: bubbleIn 0.25s ease;
}

@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.bubble-ai {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.bubble-lead {
  background: var(--accent);
  color: white;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

.bubble-time {
  font-size: 0.7rem;
  color: var(--fg-muted);
  margin-top: 0.3rem;
  padding: 0 0.25rem;
}
.bubble-lead + .bubble-time { text-align: right; }

/* Typing dots */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 0.75rem 1.5rem;
  align-items: center;
}
.typing-indicator span {
  width: 8px;
  height: 8px;
  background: var(--fg-muted);
  border-radius: 50%;
  animation: typingBounce 1.2s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* Chat input row */
.chat-input-area {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
}
.chat-input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.6rem 1rem;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s;
}
.chat-input:focus { border-color: var(--accent); }
.chat-send {
  background: var(--accent);
  border: none;
  border-radius: 20px;
  padding: 0.6rem 1.2rem;
  color: white;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.chat-send:hover { opacity: 0.9; }
.chat-send:disabled { opacity: 0.5; cursor: not-allowed; }

/* Booked banner */
.booked-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.5rem 1rem 1rem;
  padding: 1rem 1.25rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 12px;
  animation: bubbleIn 0.4s ease;
}
.booked-icon { font-size: 1.5rem; }
.booked-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: #22c55e;
  margin-bottom: 0.25rem;
}
.booked-detail { font-size: 0.82rem; color: var(--fg-muted); }

.hidden { display: none !important; }
