/**
 * Cadences Demo Page - Premium Styles
 * Immersive, animated, professional experience
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  --demo-primary: #6366f1;
  --demo-primary-light: #818cf8;
  --demo-secondary: #8b5cf6;
  --demo-accent: #10b981;
  --demo-accent-amber: #f59e0b;
  --demo-danger: #ef4444;
  
  --demo-bg-dark: #0a0a0f;
  --demo-bg-card: rgba(15, 23, 42, 0.8);
  --demo-bg-card-hover: rgba(30, 41, 59, 0.9);
  
  --demo-text-primary: #f8fafc;
  --demo-text-secondary: #94a3b8;
  --demo-text-muted: #64748b;
  
  --demo-border: rgba(148, 163, 184, 0.1);
  --demo-border-hover: rgba(148, 163, 184, 0.2);
  
  --demo-radius-sm: 0.5rem;
  --demo-radius-md: 1rem;
  --demo-radius-lg: 1.5rem;
  --demo-radius-xl: 2rem;
  
  --demo-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  --demo-shadow-glow: 0 0 60px rgba(99, 102, 241, 0.15);
}

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */
.demo-page-body {
  background: var(--demo-bg-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

.demo-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.demo-bg-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

.demo-bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  animation: glow-float 20s ease-in-out infinite;
}

.demo-bg-glow-1 {
  width: 600px;
  height: 600px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  top: -200px;
  right: -100px;
  animation-delay: 0s;
}

.demo-bg-glow-2 {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  bottom: -150px;
  left: -100px;
  animation-delay: -7s;
}

.demo-bg-glow-3 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, #10b981, #14b8a6);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -14s;
  opacity: 0.2;
}

@keyframes glow-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
}

.demo-bg-particles .particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(99, 102, 241, 0.5);
  border-radius: 50%;
  animation: particle-float linear infinite;
}

@keyframes particle-float {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

/* ============================================
   HEADER
   ============================================ */
.demo-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--demo-border);
}

.demo-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.demo-logo img {
  width: 32px;
  height: 32px;
}

.demo-logo span {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--demo-text-primary);
}

.demo-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.demo-nav a {
  color: var(--demo-text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.demo-nav a:hover,
.demo-nav a.active {
  color: var(--demo-text-primary);
}

.demo-lang-switch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 9999px;
  font-size: 0.8rem;
}

.demo-lang-switch span {
  color: var(--demo-text-muted);
}

.demo-lang-switch a {
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
}

.demo-lang-switch a.active {
  background: rgba(99, 102, 241, 0.2);
  color: var(--demo-primary-light);
}

.demo-cta-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: linear-gradient(135deg, var(--demo-primary), var(--demo-secondary));
  border-radius: 9999px;
  color: white !important;
  font-weight: 600;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.demo-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(99, 102, 241, 0.4);
}

.demo-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--demo-text-primary);
  cursor: pointer;
}

@media (max-width: 768px) {
  .demo-nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 10, 15, 0.98);
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--demo-border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
  }
  
  .demo-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  
  .demo-menu-toggle {
    display: block;
  }
}

/* ============================================
   HERO SECTION
   ============================================ */
.demo-hero {
  position: relative;
  z-index: 1;
  padding: 8rem 2rem 4rem;
  text-align: center;
}

.demo-hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.demo-badge-row {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--demo-primary-light);
}

.demo-badge-dot {
  width: 8px;
  height: 8px;
  background: var(--demo-accent);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.demo-badge-new {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--demo-accent-amber);
}

.demo-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 1.5rem;
  color: var(--demo-text-primary);
}

.demo-hero p {
  font-size: 1.25rem;
  color: var(--demo-text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.demo-hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 2rem;
  padding: 1rem 2rem;
  background: var(--demo-bg-card);
  border: 1px solid var(--demo-border);
  border-radius: var(--demo-radius-lg);
}

.demo-stat {
  text-align: center;
}

.demo-stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--demo-text-primary);
  line-height: 1;
}

.demo-stat-label {
  font-size: 0.75rem;
  color: var(--demo-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.demo-stat-divider {
  width: 1px;
  height: 40px;
  background: var(--demo-border);
}

/* Mobile responsive for hero stats */
@media (max-width: 480px) {
  .demo-hero-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    width: calc(100% - 2rem);
    max-width: 320px;
    margin: 0 auto;
  }
  
  .demo-stat {
    min-width: 60px;
    flex: 0 1 auto;
  }
  
  .demo-stat-value {
    font-size: 1.5rem;
  }
  
  .demo-stat-label {
    font-size: 0.65rem;
  }
  
  .demo-stat-divider {
    display: none;
  }
}

@media (max-width: 768px) and (min-width: 481px) {
  .demo-hero-stats {
    gap: 1.25rem;
    padding: 0.875rem 1.5rem;
  }
  
  .demo-stat-value {
    font-size: 1.75rem;
  }
  
  .demo-stat-divider {
    height: 32px;
  }
}

/* ============================================
   SCENARIO CARDS
   ============================================ */
.demo-scenarios-section {
  position: relative;
  z-index: 1;
  padding: 4rem 2rem;
}

.demo-container {
  max-width: 1200px;
  margin: 0 auto;
}

.demo-section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  color: var(--demo-text-primary);
  margin: 0 0 0.5rem;
}

.demo-section-subtitle {
  text-align: center;
  color: var(--demo-text-secondary);
  margin: 0 0 3rem;
}

.demo-scenario-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.demo-scenario-card {
  position: relative;
  background: var(--demo-bg-card);
  border: 1px solid var(--demo-border);
  border-radius: var(--demo-radius-lg);
  padding: 2rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.demo-scenario-card:hover {
  transform: translateY(-8px);
  border-color: var(--demo-border-hover);
  box-shadow: var(--demo-shadow), var(--demo-shadow-glow);
}

.demo-card-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.demo-scenario-card:hover .demo-card-glow {
  opacity: 1;
}

.demo-card-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
  border-radius: var(--demo-radius-md);
  color: var(--demo-primary-light);
  margin-bottom: 1.5rem;
  transition: all 0.4s;
}

.demo-scenario-card:hover .demo-card-icon {
  transform: scale(1.1) rotate(-5deg);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.25));
}

.demo-card-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--demo-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.demo-card-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--demo-text-primary);
  margin: 0 0 0.75rem;
}

.demo-card-content p {
  color: var(--demo-text-secondary);
  line-height: 1.6;
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
}

.demo-card-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.demo-card-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--demo-text-secondary);
}

.demo-card-features li svg {
  color: var(--demo-accent);
}

.demo-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--demo-border);
}

.demo-card-time {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--demo-text-muted);
}

.demo-card-action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--demo-primary-light);
  transition: gap 0.3s;
}

.demo-scenario-card:hover .demo-card-action {
  gap: 0.75rem;
}

/* ============================================
   DEMO STAGE
   ============================================ */
.demo-stage-section {
  position: relative;
  z-index: 1;
  padding: 4rem 2rem;
  min-height: 80vh;
}

.demo-progress-bar {
  margin-bottom: 3rem;
}

.demo-progress-track {
  height: 4px;
  background: rgba(71, 85, 105, 0.3);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.demo-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--demo-primary), var(--demo-secondary));
  border-radius: 9999px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}

.demo-progress-steps {
  display: flex;
  justify-content: space-between;
}

.demo-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.demo-progress-step-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(71, 85, 105, 0.5);
  border: 2px solid rgba(71, 85, 105, 0.8);
  transition: all 0.3s;
}

.demo-progress-step.active .demo-progress-step-dot {
  background: var(--demo-primary);
  border-color: var(--demo-primary);
  box-shadow: 0 0 12px var(--demo-primary);
}

.demo-progress-step.current .demo-progress-step-dot {
  transform: scale(1.3);
}

.demo-progress-step-label {
  font-size: 0.7rem;
  color: var(--demo-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  max-width: 80px;
  text-align: center;
  display: none;
}

@media (min-width: 768px) {
  .demo-progress-step-label {
    display: block;
  }
}

.demo-progress-step.active .demo-progress-step-label {
  color: var(--demo-text-secondary);
}

/* Main Stage Layout */
.demo-main-stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  min-height: 500px;
}

@media (max-width: 968px) {
  .demo-main-stage {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Visual Panel */
.demo-visual-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  background: var(--demo-bg-card);
  border: 1px solid var(--demo-border);
  border-radius: var(--demo-radius-xl);
  padding: 2rem;
  transition: all 0.5s;
}

/* Narration Panel */
.demo-narration-panel {
  padding: 2rem;
}

.demo-step-indicator {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.demo-step-indicator .step-number {
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--demo-primary), var(--demo-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.demo-step-indicator .step-total {
  font-size: 1.5rem;
  color: var(--demo-text-muted);
  font-weight: 500;
}

.demo-step-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--demo-text-primary);
  margin: 0 0 1rem;
  line-height: 1.2;
}

.demo-step-description {
  font-size: 1.1rem;
  color: var(--demo-text-secondary);
  line-height: 1.7;
  margin: 0 0 1.5rem;
}

.demo-tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--demo-border);
  border-radius: var(--demo-radius-sm);
  margin-bottom: 2rem;
}

.demo-tech-badge .tech-label {
  font-size: 0.75rem;
  color: var(--demo-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.demo-tech-badge code {
  font-size: 0.85rem;
  color: var(--demo-primary-light);
  font-family: 'JetBrains Mono', monospace;
}

.demo-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Buttons */
.demo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: var(--demo-radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  text-decoration: none;
}

.demo-btn-secondary {
  background: transparent;
  border: 1px solid var(--demo-border);
  color: var(--demo-text-secondary);
}

.demo-btn-secondary:hover:not(:disabled) {
  border-color: var(--demo-border-hover);
  color: var(--demo-text-primary);
}

.demo-btn-secondary:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.demo-btn-primary {
  background: linear-gradient(135deg, var(--demo-primary), var(--demo-secondary));
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.demo-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(99, 102, 241, 0.4);
}

.demo-btn-large {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.demo-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  padding: 0.5rem 1rem;
  background: none;
  border: none;
  color: var(--demo-text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.2s;
}

.demo-back-btn:hover {
  color: var(--demo-text-secondary);
}

/* ============================================
   COMPLETION SECTION
   ============================================ */
.demo-completion-section {
  position: relative;
  z-index: 1;
  padding: 6rem 2rem;
}

.demo-completion-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.demo-completion-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(20, 184, 166, 0.2));
  border-radius: 50%;
  color: var(--demo-accent);
  animation: completion-pulse 2s infinite;
}

@keyframes completion-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  50% { box-shadow: 0 0 0 20px rgba(16, 185, 129, 0); }
}

.demo-completion-content h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--demo-text-primary);
  margin: 0 0 1rem;
}

.demo-completion-content > p {
  font-size: 1.1rem;
  color: var(--demo-text-secondary);
  margin: 0 0 2rem;
}

.demo-completion-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1.5rem;
  background: var(--demo-bg-card);
  border: 1px solid var(--demo-border);
  border-radius: var(--demo-radius-md);
  margin-bottom: 2rem;
}

.demo-completion-stat {
  text-align: center;
}

.demo-completion-stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--demo-text-primary);
}

.demo-completion-stat-label {
  font-size: 0.75rem;
  color: var(--demo-text-muted);
  text-transform: uppercase;
}

.demo-completion-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.demo-share-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--demo-border);
}

.demo-share-section span {
  color: var(--demo-text-muted);
  font-size: 0.85rem;
}

.demo-share-buttons {
  display: flex;
  gap: 0.5rem;
}

.demo-share-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--demo-border);
  border-radius: 50%;
  color: var(--demo-text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.demo-share-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--demo-text-primary);
  transform: translateY(-2px);
}

/* ============================================
   FOOTER
   ============================================ */
.demo-footer {
  position: relative;
  z-index: 1;
  padding: 2rem;
  border-top: 1px solid var(--demo-border);
}

.demo-footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.demo-footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--demo-text-secondary);
  font-weight: 600;
}

.demo-footer-links {
  display: flex;
  gap: 1.5rem;
}

.demo-footer-links a {
  color: var(--demo-text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.demo-footer-links a:hover {
  color: var(--demo-text-secondary);
}

.demo-footer-copy {
  color: var(--demo-text-muted);
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  .demo-footer-content {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================================
   VISUAL COMPONENTS
   ============================================ */

/* Device Frame - Phone */
.visual-phone-frame {
  width: 280px;
  background: #1a1a2e;
  border-radius: 2rem;
  padding: 0.75rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.visual-phone-screen {
  background: #0f0f1a;
  border-radius: 1.5rem;
  overflow: hidden;
  min-height: 480px;
}

.visual-phone-notch {
  width: 120px;
  height: 25px;
  background: #1a1a2e;
  border-radius: 0 0 1rem 1rem;
  margin: 0 auto;
}

/* CRM Card Visual */
.visual-crm-card {
  width: 100%;
  max-width: 340px;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.crm-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.crm-card-header h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.crm-status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.crm-status-danger {
  background: #fef2f2;
  color: #dc2626;
}

.crm-status-success {
  background: #f0fdf4;
  color: #16a34a;
}

.crm-card-body {
  padding: 1.25rem;
}

.crm-customer-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.crm-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
}

.crm-customer-info {
  flex: 1;
}

.crm-customer-info strong {
  display: block;
  font-size: 1rem;
  color: #1e293b;
}

.crm-customer-info span {
  font-size: 0.85rem;
  color: #64748b;
}

.crm-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.crm-detail-item {
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 0.5rem;
}

.crm-detail-item label {
  display: block;
  font-size: 0.7rem;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.crm-detail-item span {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e293b;
}

/* Brain/AI Visualization */
.visual-ai-brain {
  text-align: center;
  padding: 2rem;
}

.ai-brain-circle {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(99, 102, 241, 0.2));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.ai-brain-circle svg {
  color: #a78bfa;
  z-index: 2;
}

.ai-brain-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(139, 92, 246, 0.5);
  animation: brain-ring 2s infinite;
}

.ai-brain-pulse:nth-child(2) {
  animation-delay: 0.5s;
}

.ai-brain-pulse:nth-child(3) {
  animation-delay: 1s;
}

@keyframes brain-ring {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

.ai-thinking-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.ai-thinking-dots span {
  width: 10px;
  height: 10px;
  background: #a78bfa;
  border-radius: 50%;
  animation: ai-dot-bounce 1.4s infinite;
}

.ai-thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes ai-dot-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-10px); }
}

.ai-output-lines {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ai-output-lines code {
  padding: 0.5rem 1rem;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 0.5rem;
  font-size: 0.8rem;
  color: #a78bfa;
  font-family: 'JetBrains Mono', monospace;
}

/* Dashboard Visual */
.visual-dashboard {
  width: 100%;
  max-width: 400px;
  background: #0f172a;
  border-radius: 1rem;
  border: 1px solid rgba(71, 85, 105, 0.3);
  overflow: hidden;
}

.dashboard-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #1e293b;
  border-bottom: 1px solid rgba(71, 85, 105, 0.3);
}

.dashboard-dots {
  display: flex;
  gap: 0.375rem;
}

.dashboard-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dashboard-dots span:nth-child(1) { background: #ef4444; }
.dashboard-dots span:nth-child(2) { background: #f59e0b; }
.dashboard-dots span:nth-child(3) { background: #22c55e; }

.dashboard-title {
  flex: 1;
  text-align: center;
  font-size: 0.8rem;
  color: #64748b;
  font-family: 'JetBrains Mono', monospace;
}

.dashboard-body {
  padding: 1rem;
}

.dashboard-alert {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
}

.dashboard-alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.dashboard-alert-success svg {
  color: #10b981;
  flex-shrink: 0;
}

.dashboard-alert-content strong {
  display: block;
  color: #34d399;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.dashboard-alert-content p {
  color: rgba(52, 211, 153, 0.8);
  font-size: 0.8rem;
  margin: 0;
}

/* Website Preview Visual */
.visual-website {
  width: 100%;
  max-width: 380px;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.website-browser-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}

.website-browser-dots {
  display: flex;
  gap: 0.375rem;
}

.website-browser-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
}

.website-url-bar {
  flex: 1;
  padding: 0.375rem 0.75rem;
  background: white;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  color: #64748b;
  font-family: 'JetBrains Mono', monospace;
}

.website-hero {
  height: 160px;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  position: relative;
}

.website-hero h4 {
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.website-hero p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  margin: 0.25rem 0 0;
}

.website-price-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem 1rem;
  background: white;
  border-radius: 9999px;
  font-weight: 700;
  color: #0f172a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.website-price-badge.updated {
  animation: price-flash 0.5s;
}

@keyframes price-flash {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); background: #10b981; color: white; }
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Animations for content transitions */
.fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

.fade-out {
  animation: fadeOut 0.3s ease-out forwards;
}

/* Ensure sections are visible when they should be - use !important to override animation end state */
.demo-hero,
.demo-scenarios-section {
  opacity: 1;
}

.demo-hero.fade-out,
.demo-scenarios-section.fade-out {
  animation: fadeOut 0.3s ease-out forwards;
}

/* Reset opacity when fade-in is applied */
.demo-hero.fade-in,
.demo-scenarios-section.fade-in {
  opacity: 1;
  animation: fadeIn 0.5s ease-out forwards;
}

/* Force visibility reset class */
.visibility-reset {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

/* Ensure demo stage and completion are visible when displayed */
.demo-stage-section,
.demo-completion-section {
  opacity: 1;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-20px); }
}

.slide-in-left {
  animation: slideInLeft 0.5s ease-out forwards;
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
  animation: slideInRight 0.5s ease-out forwards;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ============================================
   ADVANCED CAPABILITIES SECTION
   ============================================ */

.demo-advanced-section {
  position: relative;
  z-index: 1;
  padding: 6rem 0;
  background: linear-gradient(180deg, transparent 0%, rgba(99, 102, 241, 0.03) 50%, transparent 100%);
}

.demo-advanced-header {
  text-align: center;
  margin-bottom: 4rem;
}

.demo-advanced-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--demo-text-primary);
  margin: 1rem 0;
}

.demo-advanced-header p {
  font-size: 1.1rem;
  color: var(--demo-text-secondary);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

.demo-badge-advanced {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(239, 68, 68, 0.2)) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  color: #fbbf24 !important;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.demo-badge-advanced svg {
  color: #f59e0b;
}

.demo-advanced-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.demo-advanced-card {
  background: var(--demo-bg-card);
  border: 1px solid var(--demo-border);
  border-radius: var(--demo-radius-lg);
  padding: 2rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.demo-advanced-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--demo-primary), var(--demo-secondary));
  opacity: 0;
  transition: opacity 0.3s;
}

.demo-advanced-card:hover {
  background: var(--demo-bg-card-hover);
  border-color: var(--demo-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--demo-shadow-glow);
}

.demo-advanced-card:hover::before {
  opacity: 1;
}

.demo-advanced-card[data-category="ai"] .demo-advanced-icon {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(99, 102, 241, 0.2));
  color: #a78bfa;
}

.demo-advanced-card[data-category="data"] .demo-advanced-icon {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(59, 130, 246, 0.2));
  color: #22d3ee;
}

.demo-advanced-card[data-category="hardware"] .demo-advanced-icon {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(20, 184, 166, 0.2));
  color: #34d399;
}

.demo-advanced-card[data-category="communication"] .demo-advanced-icon {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(16, 185, 129, 0.2));
  color: #4ade80;
}

.demo-advanced-card[data-category="vertical"] .demo-advanced-icon {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(245, 158, 11, 0.2));
  color: #f87171;
}

.demo-advanced-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--demo-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  background: rgba(99, 102, 241, 0.1);
  color: var(--demo-primary-light);
}

.demo-advanced-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--demo-text-primary);
  margin: 0 0 0.75rem;
}

.demo-advanced-card p {
  font-size: 0.9rem;
  color: var(--demo-text-secondary);
  line-height: 1.6;
  margin: 0 0 1.25rem;
}

.demo-advanced-card code {
  background: rgba(99, 102, 241, 0.15);
  color: var(--demo-primary-light);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
}

.demo-advanced-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.demo-advanced-tags span {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.7rem;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 9999px;
  color: var(--demo-text-muted);
  transition: all 0.2s;
}

.demo-advanced-card:hover .demo-advanced-tags span {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.2);
  color: var(--demo-primary-light);
}

.demo-advanced-cta {
  text-align: center;
  padding: 3rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--demo-radius-xl);
}

.demo-advanced-cta p {
  font-size: 1rem;
  color: var(--demo-text-secondary);
  margin: 0 0 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive */
@media (max-width: 768px) {
  .demo-advanced-section {
    padding: 4rem 0;
  }
  
  .demo-advanced-grid {
    grid-template-columns: 1fr;
  }
  
  .demo-advanced-card {
    padding: 1.5rem;
  }
  
  .demo-advanced-cta {
    padding: 2rem 1.5rem;
  }
}
