/* ===== FEATURE ANIMATION STYLES ===== */

/*
Stylized product demonstration animations for Section 3
Shows Extract, AI Pitch, and CRM functionality through simplified UI representations
Plays sequentially on scroll, holds final state
*/

/* ===== ANIMATION CONTAINERS ===== */

.animation-container {
  border: none;
  border-radius: var(--border-radius-md);
  padding: var(--spacing-lg);
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin: var(--spacing-md) 0;
}

/* ===== EXTRACT ANIMATION ===== */

.extract-demo {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  background: transparent;
}

.extract-button {
  background: #7c3aed;
  color: #ffffff;
  border: none;
  border-radius: var(--border-radius-md);
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}

.extract-status-container {
  display: none;
  align-items: center;
  gap: var(--spacing-sm);
  min-height: 1.5em;
  position: absolute;
  width: 100%;
}

.extract-status-container.active {
  display: flex;
}

.extract-spinner {
  display: flex;
  gap: 4px;
  align-items: center;
}

.spinner-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7c3aed;
  animation: bounce 1.4s infinite;
}

.spinner-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.spinner-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {
  0%, 80%, 100% { opacity: 0.4; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.2); }
}

.extract-status {
  font-size: 0.8125rem;
  color: #6b7280;
  font-weight: 500;
  line-height: 1.5;
  min-height: 1.5em;
}

.extract-results {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.extract-badge {
  background: #e5e7eb;
  color: #374151;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

.extract-score {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #ffffff;
  padding: var(--spacing-md);
  border-radius: var(--border-radius-md);
}

.extract-score.green {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.score-header {
  display: flex;
  align-items: baseline;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.score-value {
  font-size: 1.5rem;
  font-weight: 800;
}

.extract-score.green .score-value {
  font-size: 1.75rem;
}

.score-label {
  font-size: 0.75rem;
  opacity: 0.9;
}

.score-result {
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
}

.score-reasoning {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.5;
  letter-spacing: 0.3px;
}

/* ===== AI PITCH ANIMATION ===== */

.pitch-demo {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  background: transparent;
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
}

.spinner-icon {
  font-size: 2rem;
  animation: spin 1s linear infinite;
  display: inline-block;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spinner-text {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}

.pitch-content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.pitch-buttons {
  display: flex;
  gap: var(--spacing-sm);
  width: 100%;
}

.pitch-text-line {
  font-size: 0.875rem;
  color: #374151;
  line-height: 1.6;
  min-height: 1.4em;
  font-weight: 500;
}

.pitch-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: #7c3aed;
  margin-left: 2px;
  opacity: 0;
}

.media-kit-link {
  color: #1a73e8;
  text-decoration: underline;
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-block;
}

.pitch-button {
  border: none;
  border-radius: var(--border-radius-md);
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.3);
}

.pitch-button-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  flex: 6;
}

.pitch-button-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  flex: 4;
}

/* ===== CRM ANIMATION ===== */

.crm-demo {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: transparent;
  position: relative;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Kanban board view */
.kanban-view {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-sm);
  width: 95%;
  max-width: 95%;
  opacity: 1;
  transition: opacity 0.4s ease, transform 0.4s ease;
  position: absolute;
  z-index: 1;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
}

.kanban-column {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: var(--border-radius-sm);
  padding: var(--spacing-sm);
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.kanban-header {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0;
}

.kanban-header-sim {
  height: 6px;
  background: #d1d5db;
  border-radius: 2px;
  width: 60%;
}

.kanban-card {
  color: #ffffff;
  padding: 6px 8px;
  border-radius: var(--border-radius-sm);
  font-size: 0.625rem;
  font-weight: 600;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.card-color-1,
.card-color-2 {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}

.card-color-3 {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.card-color-4 {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.card-color-5 {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.card-color-6 {
  background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

.card-color-7 {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.card-color-8 {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

/* Table view */
.table-view {
  width: 95%;
  max-width: 95%;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  opacity: 0;
  position: absolute;
  z-index: 2;
  transition: opacity 0.4s ease, z-index 0s ease;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
}

.table-view.visible {
  z-index: 2;
}

.table-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  background: #f3f4f6;
  border-bottom: 1px solid #d1d5db;
  padding: var(--spacing-sm);
  gap: var(--spacing-sm);
}

.table-header-cell {
  font-size: 0.7rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: var(--spacing-sm);
  gap: var(--spacing-sm);
  border-bottom: 1px solid #e5e7eb;
  align-items: center;
}

.table-cell {
  font-size: 0.75rem;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 4px;
}

.table-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-purple {
  background: #7c3aed;
}

.status-green {
  background: #10b981;
}

.status-orange {
  background: #f59e0b;
}

/* Revenue Metrics View */
.metrics-view {
  width: 85%;
  max-width: 85%;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  opacity: 0;
  position: absolute;
  z-index: 3;
  transition: opacity 0.4s ease, z-index 0s ease;
  padding: var(--spacing-sm);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  top: 75%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
}

.metrics-view.visible {
  z-index: 3;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
}

.metrics-row.metrics-best-deal {
  grid-template-columns: 1fr;
}

.metric-box,
.best-deal-box {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: var(--border-radius-md);
  padding: var(--spacing-md);
  text-align: center;
}

.best-deal-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
  border: 1px solid #d1d5db;
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  text-align: left;
}

.best-deal-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.best-deal-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-label {
  font-size: 0.65rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 2px;
}

.best-deal-label {
  font-size: 0.65rem;
  color: #6b7280;
  font-weight: 600;
}

.metric-value {
  font-size: 1.125rem;
  font-weight: 800;
  color: #1f2937;
}

.best-deal-value {
  font-size: 1rem;
  font-weight: 700;
  color: #10b981;
}

.best-deal-icon {
  font-size: 1.5rem;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 640px) {
  .animation-container {
    height: 280px;
    padding: var(--spacing-md);
  }

  .extract-demo,
  .pitch-demo,
  .crm-demo {
    gap: var(--spacing-sm);
  }

  .kanban-view {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }

  .kanban-column {
    padding: 4px;
    min-height: 80px;
  }

  .kanban-header {
    font-size: 0.65rem;
    margin-bottom: 4px;
  }

  .table-header,
  .table-row {
    gap: 4px;
    padding: 6px;
  }

  .table-header-cell,
  .table-cell {
    font-size: 0.65rem;
  }

  .extract-button,
  .pitch-button {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.8125rem;
  }

  .score-value {
    font-size: 1.25rem;
  }
}

@media (max-width: 768px) {
  .animation-container {
    height: 280px;
  }

  .kanban-view {
    grid-template-columns: repeat(4, 1fr);
  }

  .score-value {
    font-size: 1.375rem;
  }
}

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