/* Demo page styles — extends theme.css vars */
.demo-page { min-height: 100vh; padding-top: 72px; }

/* DEMO INTRO */
.demo-intro {
  padding: 60px 32px 40px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.demo-intro h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 16px;
}
.demo-intro p {
  font-size: 17px;
  color: var(--fg-muted);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}
.scenario-picker {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 700px;
  margin: 0 auto;
}
.scenario-btn {
  padding: 12px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--fg-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}
.scenario-btn:hover { border-color: var(--accent); color: var(--accent); }
.scenario-btn.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

/* SIMULATOR LAYOUT */
.simulator {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 32px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
  align-items: start;
}

/* PHONE DEVICE */
.phone-shell {
  background: #0f1923;
  border: 1px solid rgba(34,211,238,0.2);
  border-radius: 40px;
  padding: 24px 20px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5), 0 0 60px rgba(34,211,238,0.06);
  position: sticky;
  top: 100px;
}
.phone-notch {
  width: 120px;
  height: 28px;
  background: #0f1923;
  border-radius: 0 0 16px 16px;
  margin: 0 auto 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.phone-notch::before, .phone-notch::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(34,211,238,0.3);
}
.phone-notch-speaker {
  width: 48px;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}
.phone-call-header { text-align: center; margin-bottom: 20px; }
.phone-avatar-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid rgba(34,211,238,0.4);
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-ring 2s ease-in-out infinite;
}
@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,211,238,0.2); }
  50% { box-shadow: 0 0 0 8px rgba(34,211,238,0); }
}
.avatar-icon svg { width: 40px; height: 40px; }
.phone-business-name {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--fg);
  margin-bottom: 2px;
}
.phone-call-status {
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
}
.phone-timer {
  font-size: 13px;
  color: var(--fg-muted);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

/* WAVEFORM */
.sim-waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 56px;
  margin-bottom: 20px;
}
.sim-waveform.idle .wave-bar {
  animation: none !important;
  height: 8px !important;
  background: rgba(34,211,238,0.15) !important;
}
.sim-waveform.speaking .wave-bar {
  animation: wave 0.9s ease-in-out infinite !important;
}

/* AI TRANSCRIPT LINE (on phone screen) */
.phone-ai-line {
  background: var(--accent-dim);
  border: 1px solid rgba(34,211,238,0.15);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--fg);
  line-height: 1.55;
  margin-bottom: 10px;
  animation: fadeSlideIn 0.3s ease-out;
}
.phone-caller-line {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 16px;
  border-bottom-right-radius: 4px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--fg-muted);
  line-height: 1.5;
  font-style: italic;
  text-align: right;
  margin-bottom: 10px;
  animation: fadeSlideIn 0.3s ease-out;
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.phone-screen-area {
  min-height: 180px;
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(34,211,238,0.2) transparent;
}

/* PHONE BUTTONS */
.phone-controls {
  display: flex;
  gap: 16px;
  justify-content: center;
}
.phone-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}
.phone-btn:disabled { opacity: 0.3; cursor: default; }
.phone-btn:not(:disabled):hover { transform: scale(1.05); }
.phone-btn.mute { background: rgba(100,116,139,0.2); color: var(--fg-muted); }
.phone-btn.end { background: rgba(239,68,68,0.2); color: #ef4444; }
.phone-btn.mute.active { background: rgba(239,68,68,0.3); color: #ef4444; }

/* CALLER INFO SIDEBAR */
.caller-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 20px;
}
.caller-sidebar-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 12px;
}
.caller-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.caller-field:last-child { border-bottom: none; }
.caller-field-label { color: var(--fg-muted); }
.caller-field-value { color: var(--fg); font-weight: 500; }

/* TRANSCRIPT PANEL */
.transcript-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.transcript-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.transcript-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--fg);
}
.transcript-badge {
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.transcript-body {
  max-height: 520px;
  overflow-y: auto;
  padding: 20px 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(34,211,238,0.2) transparent;
}
.transcript-turn {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  animation: fadeSlideIn 0.3s ease-out;
}
.transcript-turn.ai-turn { align-items: flex-start; }
.transcript-turn.caller-turn { align-items: flex-start; flex-direction: row-reverse; }
.turn-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.turn-icon.ai-icon { background: var(--accent-dim); border: 1px solid rgba(34,211,238,0.25); }
.turn-icon.caller-icon { background: rgba(100,116,139,0.15); border: 1px solid var(--border); }
.turn-icon svg { width: 16px; height: 16px; }
.turn-content { flex: 1; }
.turn-role {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.turn-role.ai { color: var(--accent); }
.turn-role.caller { color: var(--fg-muted); }
.turn-text {
  font-size: 14px;
  color: var(--fg);
  line-height: 1.65;
}
.caller-turn .turn-text {
  color: var(--fg-muted);
  font-style: italic;
}
.turn-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.response-btn {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: transparent;
  color: var(--fg-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'DM Sans', sans-serif;
}
.response-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}
.response-btn.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}
.response-btn:disabled { opacity: 0.4; cursor: default; }

/* CALLOUT */
.demo-callout {
  margin: 0 32px 40px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding: 20px 24px;
  background: rgba(34,211,238,0.06);
  border: 1px solid rgba(34,211,238,0.15);
  border-radius: var(--radius);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.demo-callout-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-dim);
  border: 1px solid rgba(34,211,238,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.demo-callout-text {
  flex: 1;
}
.demo-callout-text p {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
}
.demo-callout-text strong { color: var(--fg); }

/* DEMO FOOTER CTA */
.demo-cta {
  text-align: center;
  padding: 60px 32px 80px;
  border-top: 1px solid var(--border);
}
.demo-cta h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: clamp(24px, 3vw, 38px);
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 16px;
}
.demo-cta p {
  font-size: 16px;
  color: var(--fg-muted);
  margin-bottom: 32px;
}

/* Setup guide (separate page section) */
.setup-guide { padding: 60px 32px; max-width: 800px; margin: 0 auto; }
.setup-guide h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 8px;
}
.setup-guide .subtitle {
  font-size: 16px;
  color: var(--fg-muted);
  margin-bottom: 48px;
}
.setup-step {
  display: flex;
  gap: 24px;
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.setup-step:last-child { border-bottom: none; }
.step-num-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid rgba(34,211,238,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: var(--accent);
  flex-shrink: 0;
}
.step-content h3 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--fg);
  margin-bottom: 8px;
}
.step-content p {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.65;
  margin-bottom: 12px;
}
.step-content code {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 12px;
  color: var(--accent);
}
.step-content pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  font-size: 13px;
  color: var(--fg);
  overflow-x: auto;
  margin: 12px 0;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .simulator { grid-template-columns: 1fr; }
  .phone-shell { position: static; }
  .scenario-picker { gap: 10px; }
}