/* AutoReach Demo Page — Mobile-first animated flow demo */

:root {
  --bg: #0a0a0a;
  --bg-surface: #141414;
  --bg-card: #1c1c1c;
  --fg: #f5f5f0;
  --fg-muted: #8a8a8a;
  --accent: #F59E0B;
  --accent-dim: rgba(245, 158, 11, 0.12);
  --accent-border: rgba(245, 158, 11, 0.25);
  --border: rgba(255, 255, 255, 0.08);
  --green: #22c55e;
  --font-body: 'Instrument Sans', system-ui, sans-serif;
  --font-display: 'Instrument Serif', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ─── HEADER ─────────────────────────────────────────── */
.demo-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.demo-logo {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
}
.demo-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent-dim);
  color: var(--accent);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--accent-border);
}
.demo-header .restart-btn {
  margin-left: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--fg-muted);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: border-color 0.2s, color 0.2s;
  font-family: var(--font-body);
}
.demo-header .restart-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── PROGRESS BAR ────────────────────────────────────── */
.demo-progress {
  display: flex;
  align-items: center;
  padding: 20px 24px;
  gap: 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--fg-muted);
  transition: all 0.3s ease;
}
.progress-step.active .step-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}
.progress-step.done .step-dot {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}
.step-label {
  font-size: 11px;
  color: var(--fg-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
}
.progress-step.active .step-label { color: var(--accent); }
.progress-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  margin: 0 8px;
  margin-bottom: 18px;
  min-width: 24px;
}

/* ─── DEMO WRAP ────────────────────────────────────────── */
.demo-wrap {
  min-height: 100vh;
}

/* ─── STAGE LAYOUT ────────────────────────────────────── */
.stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px;
}
.stage-panel {
  max-width: 400px;
}
.stage-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.stage-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 14px;
}
.stage-desc {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.65;
}
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--fg-muted);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  padding: 8px 14px;
  border-radius: 8px;
  margin-top: 16px;
}
.ai-badge strong { color: var(--accent); }

/* ─── PHONE FRAME ─────────────────────────────────────── */
.phone-frame {
  width: 280px;
  background: #111;
  border-radius: 40px;
  padding: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.08);
  margin: 0 auto;
}
.phone-notch {
  width: 100px;
  height: 28px;
  background: #111;
  border-radius: 0 0 18px 18px;
  margin: -16px auto 12px;
  position: relative;
  z-index: 2;
}
.phone-screen {
  background: #0d0d0d;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
  min-height: 480px;
}

/* Status bar */
.phone-statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px 6px;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  font-weight: 500;
}
.statusbar-time { font-weight: 600; }
.statusbar-icons {
  display: flex;
  align-items: center;
  gap: 4px;
}
.battery {
  background: rgba(255,255,255,0.3);
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
}

/* Call notification */
.call-notification {
  margin: 4px 12px;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 14px 14px 10px;
  animation: ringPulse 0.8s ease-in-out infinite alternate;
}
@keyframes ringPulse {
  from { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.2); }
  to   { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
}
.caller-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.caller-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F59E0B 0%, #d97706 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #000;
  flex-shrink: 0;
}
.caller-info { flex: 1; min-width: 0; }
.caller-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.caller-number {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
}
.call-icons {
  display: flex;
  gap: 6px;
}
.call-icon-wrap {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.call-icon-wrap.decline {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}
.call-icon-wrap.accept {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}
.call-time-label {
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  text-align: center;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Missed label */
.missed-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--accent);
  padding: 8px 14px;
  margin: 4px 12px;
  background: var(--accent-dim);
  border-radius: 8px;
}

/* Recent calls */
.recent-calls {
  margin: 8px 12px;
}
.recent-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.3);
  padding: 8px 2px 6px;
}
.recent-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.recent-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  flex-shrink: 0;
}
.recent-info { flex: 1; }
.recent-name {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
}
.recent-num {
  font-size: 10px;
  color: rgba(255,255,255,0.3);
}
.recent-status {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}
.recent-status.missed {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}
.recent-status.answered {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

/* ─── SMS BUBBLE ──────────────────────────────────────── */
.sms-notification {
  margin: 8px 12px;
  background: #1e1e1e;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  overflow: hidden;
}
.sms-from-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 6px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.sms-app-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  flex-shrink: 0;
}
.sms-from {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
}
.sms-body { padding: 8px 12px 4px; }
.sms-body p {
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  line-height: 1.5;
  margin-bottom: 8px;
}
.sms-link-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1a1a1a;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.sms-link-card:hover { border-color: var(--accent); }
.sms-link-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.sms-link-text { flex: 1; }
.sms-link-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
}
.sms-link-sub {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
}
.sms-link-arrow { color: rgba(255,255,255,0.3); flex-shrink: 0; }
.sms-time {
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  text-align: right;
  padding: 0 12px 8px;
}

/* ─── BOOKING WIDGET ──────────────────────────────────── */
.booking-widget {
  background: #111;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  max-width: 320px;
  margin: 0 auto;
}
.booking-header {
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.booking-business {
  display: flex;
  align-items: center;
  gap: 10px;
}
.booking-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #F59E0B, #d97706);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #000;
  flex-shrink: 0;
}
.booking-business-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--fg);
}
.booking-business-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
}
.booking-service-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #161616;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.service-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  flex-shrink: 0;
}
.service-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
}
.service-duration {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
}

.booking-slots { padding: 16px; }
.slots-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 12px;
}
.slots-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.slot-btn {
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-family: var(--font-body);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.slot-btn:hover { border-color: var(--accent); }
.slot-btn.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.slot-day {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.slot-time {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
}

/* Booking confirmation */
.booking-confirm {
  padding: 20px 16px;
  text-align: center;
}
.confirm-success {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
}
.confirm-text {
  text-align: left;
}
.confirm-text strong {
  display: block;
  font-size: 14px;
  color: var(--green);
  margin-bottom: 2px;
}
.confirm-text span {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}
.confirm-note {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  margin-bottom: 12px;
}
.demo-restart {
  background: none;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  font-family: var(--font-body);
}

/* ─── FINAL PANEL ─────────────────────────────────────── */
.final-panel {
  max-width: 480px;
  margin: 0 auto;
  padding: 32px 0;
  text-align: center;
}
.final-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}
.final-headline {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 14px;
}
.final-sub {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.65;
  margin-bottom: 28px;
}
.final-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
  text-align: left;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}
.final-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
}

/* CTA */
.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #000;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: opacity 0.2s;
  margin-bottom: 32px;
}
.cta-primary:hover { opacity: 0.85; }

/* Booking form */
.book-form-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  text-align: left;
}
.book-form-header {
  font-size: 15px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 16px;
  text-align: center;
}
.book-form { display: flex; flex-direction: column; gap: 12px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.04em;
}
.form-field input {
  background: #0d0d0d;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--fg);
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}
.form-field input::placeholder { color: rgba(255,255,255,0.25); }
.form-field input:focus { border-color: var(--accent); }
.form-error {
  font-size: 12px;
  color: #ef4444;
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.08);
  border-radius: 6px;
}
.form-success {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--green);
  padding: 8px 12px;
  background: rgba(34, 197, 94, 0.08);
  border-radius: 6px;
}
.form-submit {
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  transition: opacity 0.2s;
  margin-top: 4px;
}
.form-submit:hover:not(:disabled) { opacity: 0.85; }
.form-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 700px) {
  .stage {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 32px 16px;
  }
  .phone-frame { width: 240px; }
  .stage-panel { max-width: 100%; }
  .form-row { grid-template-columns: 1fr; }
  .demo-progress { padding: 16px; gap: 0; }
  .progress-line { min-width: 16px; }
  .step-label { font-size: 10px; }
}
@media (max-width: 400px) {
  .phone-frame { width: 220px; }
  .phone-screen { min-height: 400px; }
}