/* Demo portal — immersive Copilot activation quest experience */

.demo-nav {
  padding: 18px 48px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}
.demo-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}
.demo-nav-back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.demo-nav-back:hover { color: var(--fg); }
.demo-nav-brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.demo-nav-brand .nav-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--fg);
}
.demo-nav-brand .nav-tagline {
  font-size: 12px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.demo-day-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  padding: 6px 14px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

/* Progress bar */
.demo-progress-bar {
  height: 3px;
  background: var(--border);
}
.demo-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #C8922A, #e8a93a);
  width: 0;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Main container */
.demo-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  max-width: 1100px;
  margin: 0 auto;
  min-height: calc(100vh - 120px);
  gap: 0;
}

/* Sidebar */
.demo-sidebar {
  padding: 40px 32px;
  border-right: 1px solid var(--border);
  position: sticky;
  top: 60px;
  height: fit-content;
}

.demo-quest-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}
.quest-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
}
.quest-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 8px;
  line-height: 1.3;
}
.quest-desc {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}
.quest-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.quest-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--fg-muted);
  font-weight: 500;
}

/* Streak card */
.demo-streak {
  background: var(--fg);
  color: #fff;
  border-radius: 12px;
  padding: 20px 24px;
  text-align: center;
  margin-bottom: 24px;
  transition: opacity 0.5s ease;
}
.streak-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}
.streak-label {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* Leaderboard */
.demo-leaderboard {
  background: var(--accent-light);
  border: 1px solid rgba(200,146,42,0.25);
  border-radius: 12px;
  padding: 20px;
}
.leaderboard-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
}
.leaderboard-stat {
  font-size: 14px;
  color: var(--fg);
  font-weight: 500;
  margin-bottom: 8px;
}
.leaderboard-note {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(200,146,42,0.2);
}

/* Chat area */
.demo-chat {
  padding: 48px 48px 80px;
  overflow-y: auto;
}

.demo-day {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Day headers */
.day-header {
  margin-bottom: 8px;
}
.day-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 12px;
}
.day-badge-2 { background: #8B7355; }
.day-badge-3 { background: #5A7A5A; }
.day-badge-4 { background: #4A5A7A; }
.day-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.day-sub {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.6;
  max-width: 520px;
}

/* Chat messages */
.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-msg {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.chat-msg.hidden { display: none; }

.ai-msg .msg-avatar {
  width: 36px;
  height: 36px;
  background: var(--accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.msg-bubble {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px 12px 12px 4px;
  padding: 16px 20px;
  font-size: 15px;
  color: var(--fg);
  line-height: 1.6;
  max-width: 520px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.user-msg {
  flex-direction: row-reverse;
}
.user-bubble {
  background: var(--fg);
  color: #fff;
  border-radius: 12px 12px 4px 12px;
  font-size: 14px;
}

/* Prompt bubble */
.prompt-bubble {
  background: var(--accent-light);
  border-color: rgba(200,146,42,0.25);
}
.prompt-question {
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 14px;
  font-size: 14px;
}
.prompt-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.prompt-choice {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--fg);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  font-family: 'DM Sans', system-ui, sans-serif;
}
.prompt-choice:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}
.prompt-choice.selected {
  background: var(--fg);
  color: #fff;
  border-color: var(--fg);
}

/* Mission box */
.mission-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  margin-top: 16px;
}
.mission-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.mission-text {
  font-size: 14px;
  color: var(--fg);
  font-weight: 500;
  margin-bottom: 12px;
}
.mission-complete-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DM Sans', system-ui, sans-serif;
}
.mission-complete-btn:hover { background: #b07820; }
.mission-complete-btn.completed {
  background: #5A7A5A;
  cursor: default;
}
.mission-box-complete {
  background: var(--fg);
  border-color: var(--fg);
}
.mission-box-complete .mission-label { color: rgba(255,255,255,0.7); }
.mission-box-complete .mission-text { color: #fff; }

/* Social proof */
.social-proof-box {
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  padding: 14px 16px;
  margin: 16px 0;
  border-radius: 0 8px 8px 0;
}
.social-proof-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.social-proof-quote {
  font-style: italic;
  font-size: 14px;
  color: var(--fg);
  line-height: 1.6;
  margin-bottom: 6px;
}
.social-proof-attr {
  font-size: 12px;
  color: var(--fg-muted);
}

/* Team feed */
.team-feed {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.team-feed-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.team-member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.team-member-row:last-child { border-bottom: none; }
.team-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}
.team-info { flex: 1; }
.team-name { font-size: 13px; font-weight: 600; color: var(--fg); margin-bottom: 4px; }
.team-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 4px;
}
.team-bar-fill {
  height: 100%;
  background: var(--fg-muted);
  border-radius: 2px;
}
.team-status { font-size: 11px; color: var(--fg-muted); }
.team-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--bg-alt);
  color: var(--fg-muted);
}
.team-badge-lead { background: var(--accent-light); color: var(--accent); }
.team-badge-ahead { background: #5A7A5A; color: #fff; }
.team-badge-behind { background: #E8A93A; color: var(--fg); }

/* Streak reminder */
.streak-reminder {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--accent-light);
  border: 1px solid rgba(200,146,42,0.2);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 12px 0;
  font-size: 13px;
  color: var(--fg);
}
.streak-reminder-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
}

/* Milestone */
.milestone-msg.hidden { display: none; }
.milestone-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, var(--fg) 0%, #2d2c29 100%);
  color: #fff;
  border-radius: 12px;
  padding: 20px 24px;
  animation: milestonePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes milestonePop {
  from { opacity: 0; transform: scale(0.9) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.milestone-icon { font-size: 28px; }
.milestone-text strong { color: #fff; display: block; font-size: 14px; margin-bottom: 4px; }
.milestone-text p { font-size: 12px; color: rgba(255,255,255,0.65); line-height: 1.5; }

/* Continue button */
.day-continue {
  display: flex;
  justify-content: flex-start;
  padding-top: 8px;
}
.day-continue.hidden { display: none; }
.btn-continue {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--fg);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DM Sans', system-ui, sans-serif;
}
.btn-continue:hover { background: #2d2c29; transform: translateX(2px); }

/* Final stats */
.final-stats {
  display: flex;
  gap: 0;
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.final-stat {
  flex: 1;
  text-align: center;
  padding: 16px 8px;
  background: var(--bg-alt);
}
.final-stat + .final-stat {
  border-left: 1px solid var(--border);
}
.final-stat-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--fg);
}
.final-stat-label {
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* Certificate */
.certificate-card {
  background: #fff;
  border: 2px solid var(--accent);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(200,146,42,0.15);
}
.certificate-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 6px;
  background: linear-gradient(90deg, var(--accent), #e8a93a, var(--accent));
}
.cert-header { margin-bottom: 20px; }
.cert-brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.cert-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--fg);
}
.cert-body { margin-bottom: 24px; }
.cert-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 8px;
}
.cert-desc {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
  max-width: 360px;
  margin: 0 auto 20px;
}
.cert-stats-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
}
.cert-stat { text-align: center; padding: 0 20px; }
.cert-stat-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  display: block;
}
.cert-stat-label {
  font-size: 11px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cert-sep { width: 1px; height: 36px; background: var(--border); }
.cert-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.cert-sig { font-size: 13px; font-style: italic; color: var(--fg-muted); }
.cert-date { font-size: 13px; color: var(--fg-muted); }

/* CTA box */
.demo-cta-box {
  background: var(--fg);
  color: #fff;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  margin-top: 8px;
}
.demo-cta-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.demo-cta-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
  max-width: 420px;
  margin: 0 auto 24px;
}
.demo-cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.2s;
}
.demo-cta-btn:hover { background: #b07820; }

/* Mobile */
@media (max-width: 900px) {
  .demo-container { grid-template-columns: 1fr; }
  .demo-sidebar {
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 24px;
  }
  .demo-chat { padding: 24px; }
  .demo-nav { padding: 16px 24px; }
}