.demo-badge {
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--teal);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 780;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.demo-main {
  position: relative;
  min-height: 100vh;
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
}

.demo-phase {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 80px clamp(20px, 5vw, 72px) 40px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 600ms ease, transform 600ms ease;
  pointer-events: none;
}

.demo-phase.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  position: relative;
}

.phase-inner {
  width: min(900px, 100%);
}

.phase-kicker {
  margin: 0 0 14px;
  color: var(--lime);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.demo-company {
  margin: 0 0 8px;
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 0.9;
}

.demo-subtitle {
  margin: 0 0 40px;
  color: rgba(255, 250, 241, 0.6);
  font-size: 1.1rem;
}

/* System cards */
.system-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 40px;
}

.system-card {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 24px 16px;
  border: 1px solid rgba(255, 250, 241, 0.12);
  border-radius: 10px;
  background: rgba(255, 250, 241, 0.04);
  text-align: center;
  transition: border-color 400ms ease, background 400ms ease;
}

.system-card.connected {
  border-color: var(--teal);
  background: rgba(15, 118, 110, 0.12);
}

.system-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 250, 241, 0.08);
  transition: background 400ms ease;
}

.system-icon svg {
  width: 24px;
  height: 24px;
}

.system-card.connected .stripe-icon { background: rgba(99, 91, 255, 0.15); }
.system-card.connected .hubspot-icon { background: rgba(255, 122, 89, 0.15); }
.system-card.connected .quickbooks-icon { background: rgba(44, 160, 28, 0.15); }
.system-card.connected .tracker-icon { background: rgba(127, 140, 141, 0.15); }

.system-status {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 250, 241, 0.2);
  transition: background 400ms ease;
}

.system-card.connecting .system-status {
  background: var(--lime);
  animation: pulse 1s infinite;
}

.system-card.connected .system-status {
  background: var(--teal);
  animation: none;
}

.system-card strong {
  font-size: 0.95rem;
}

.system-detail {
  color: rgba(255, 250, 241, 0.5);
  font-size: 0.8rem;
}

.system-card .system-count {
  color: var(--lime);
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0;
  transition: opacity 400ms ease;
}

.system-card.connected .system-count {
  opacity: 1;
}

.demo-start {
  font-size: 1.1rem;
  padding: 16px 32px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Connection log */
.connect-log {
  display: grid;
  gap: 12px;
  max-width: 600px;
}

.connect-entry {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.05);
  border: 1px solid rgba(255, 250, 241, 0.08);
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 400ms ease, transform 400ms ease;
}

.connect-entry.visible {
  opacity: 1;
  transform: translateX(0);
}

.connect-entry.done {
  border-color: var(--teal);
  background: rgba(15, 118, 110, 0.08);
}

.connect-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 250, 241, 0.3);
  flex-shrink: 0;
  transition: background 300ms ease;
}

.connect-entry.done .connect-dot {
  background: var(--teal);
}

.connect-text {
  flex: 1;
  font-size: 0.95rem;
}

.connect-count {
  color: var(--lime);
  font-weight: 700;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 300ms ease;
}

.connect-entry.done .connect-count {
  opacity: 1;
}

/* Data comparison */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.compare-block {
  padding: 20px;
  border-radius: 10px;
  background: rgba(255, 250, 241, 0.04);
  border: 1px solid rgba(255, 250, 241, 0.1);
}

.compare-block h3 {
  margin: 0 0 16px;
  font-size: 0.88rem;
  color: rgba(255, 250, 241, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.compare-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 250, 241, 0.06);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 400ms ease, transform 400ms ease;
}

.compare-row.visible {
  opacity: 1;
  transform: translateY(0);
}

.compare-row .system-name {
  font-size: 0.9rem;
  color: rgba(255, 250, 241, 0.7);
}

.compare-row .compare-value {
  font-size: 1.05rem;
  font-weight: 780;
  transition: color 400ms ease;
}

.compare-row.variance .compare-value {
  color: var(--copper);
}

.variance-callout {
  padding: 16px 20px;
  border-radius: 8px;
  background: rgba(184, 92, 56, 0.15);
  border: 1px solid rgba(184, 92, 56, 0.3);
  color: var(--copper);
  font-weight: 720;
  font-size: 1.05rem;
  text-align: center;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 500ms ease, transform 500ms ease;
}

.variance-callout.visible {
  opacity: 1;
  transform: scale(1);
}

/* Findings */
.findings-counter {
  margin-bottom: 20px;
  font-size: 1.1rem;
  color: rgba(255, 250, 241, 0.7);
}

.findings-counter span {
  color: var(--lime);
  font-weight: 780;
}

.findings-list {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
}

.finding-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.04);
  border: 1px solid rgba(255, 250, 241, 0.08);
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 400ms ease, transform 400ms ease;
}

.finding-card.visible {
  opacity: 1;
  transform: translateX(0);
}

.severity-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.severity-critical {
  background: rgba(184, 92, 56, 0.2);
  color: var(--copper);
}

.severity-high {
  background: rgba(200, 140, 60, 0.2);
  color: #c88c3c;
}

.severity-medium {
  background: rgba(201, 230, 107, 0.15);
  color: var(--lime);
}

.severity-low {
  background: rgba(255, 250, 241, 0.08);
  color: rgba(255, 250, 241, 0.5);
}

.finding-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.finding-impact {
  font-weight: 780;
  font-size: 0.95rem;
  color: var(--copper);
  white-space: nowrap;
}

/* Score phase - uses existing .score-panel from styles.css */
.phase-score .score-panel {
  max-width: 480px;
}

.phase-score .score-number strong {
  font-size: 4.5rem;
  transition: color 500ms ease;
}

.phase-score .score-grade {
  opacity: 0;
  transition: opacity 500ms ease;
}

.phase-score .score-grade.visible {
  opacity: 1;
}

.phase-score .score-panel p {
  opacity: 0;
  transition: opacity 500ms ease;
}

.phase-score .score-panel p.visible {
  opacity: 1;
}

/* Summary */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 32px 0;
}

.summary-stat {
  display: grid;
  gap: 6px;
  padding: 24px;
  border-radius: 10px;
  background: rgba(255, 250, 241, 0.05);
  border: 1px solid rgba(255, 250, 241, 0.1);
  text-align: center;
}

.summary-value {
  font-size: 2.2rem;
  font-weight: 860;
  color: var(--lime);
}

.summary-value.summary-critical {
  color: var(--copper);
}

.summary-label {
  font-size: 0.82rem;
  color: rgba(255, 250, 241, 0.5);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.summary-desc {
  text-align: center;
  color: rgba(255, 250, 241, 0.65);
  font-size: 1.05rem;
  margin-bottom: 32px;
}

.summary-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
}

/* Progress bar */
.demo-progress {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 250, 241, 0.08);
  z-index: 30;
}

.demo-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--lime);
  transition: width 300ms ease;
}

@media (max-width: 680px) {
  .system-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .compare-grid {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
