/* Hyperscale Africa - Institutional Intelligence Layer Design System */

/* ===== CUSTOM COLOR PALETTE ===== */
:root {
  /* Institutional Integrity (Primary) */
  --navy-950: #0a1628;
  --navy-900: #0f2942;
  --navy-800: #1a3a5c;
  --navy-700: #254b76;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  
  /* The Signal (Accent) */
  --electric-blue: #0ea5e9;
  --electric-blue-light: #38bdf8;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  
  /* Neutrals */
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  
  /* Semantic Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #0ea5e9;
}

/* ===== TYPOGRAPHY ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@600;700;800;900&display=swap');

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Serif Headlines - "Intelligence Agency" Gravity */
.headline-serif {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* Data-Driven Monospace */
.mono {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-variant-numeric: tabular-nums;
}

/* ===== INSTITUTIONAL COMPONENTS ===== */

/* Data Card - Elevated, Professional */
.data-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  transition: all 0.2s ease;
}

.data-card:hover {
  border-color: var(--electric-blue);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.12);
}

/* Signal Badge - High Value Indicator */
.signal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
  }
  50% {
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.5);
  }
}

/* Intelligence Dashboard Elements */
.stat-card {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-800));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 2rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.15), transparent 60%);
  pointer-events: none;
}

.stat-value {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--electric-blue-light), var(--electric-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-400);
  margin-top: 0.5rem;
}

/* Demand Pulse Ticker */
.pulse-ticker {
  background: linear-gradient(90deg, var(--navy-950), var(--navy-900), var(--navy-950));
  border-top: 1px solid var(--electric-blue);
  border-bottom: 1px solid var(--electric-blue);
  padding: 1rem 0;
  overflow: hidden;
  position: relative;
}

.pulse-ticker-content {
  display: flex;
  align-items: center;
  gap: 3rem;
  animation: scroll-ticker 30s linear infinite;
  white-space: nowrap;
}

@keyframes scroll-ticker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.pulse-item {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--amber-500);
  border-radius: 50%;
  animation: pulse-fade 2s ease-in-out infinite;
}

@keyframes pulse-fade {
  0%, 100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

/* Scarcity Counter */
.scarcity-counter {
  background: linear-gradient(135deg, var(--amber-600), var(--amber-700));
  border-radius: 12px;
  padding: 1.5rem;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.scarcity-counter::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 60%);
  animation: rotate-glow 4s linear infinite;
}

@keyframes rotate-glow {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.scarcity-number {
  font-size: 3rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  position: relative;
  z-index: 1;
}

.scarcity-label {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
  z-index: 1;
  opacity: 0.9;
}

/* SLA Timeline Visualization */
.sla-timeline {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
  background: var(--gray-50);
  border-radius: 12px;
  position: relative;
}

.sla-step {
  flex: 1;
  text-align: center;
  position: relative;
}

.sla-step-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  background: white;
  border: 2px solid var(--gray-300);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--gray-500);
  transition: all 0.3s ease;
}

.sla-step.active .sla-step-icon {
  background: linear-gradient(135deg, var(--electric-blue), var(--electric-blue-light));
  border-color: var(--electric-blue);
  color: white;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.sla-step-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
}

.sla-step-time {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}

/* Progress Connector */
.sla-step::after {
  content: '';
  position: absolute;
  top: 28px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--gray-300);
  z-index: -1;
}

.sla-step:last-child::after {
  display: none;
}

.sla-step.active::after,
.sla-step.completed::after {
  background: var(--electric-blue);
}

/* Compliance Shield Icon */
.compliance-shield {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--success), #059669);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* High Value Form Indicator */
.high-value-indicator {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slide-in-up 0.5s ease-out;
  z-index: 50;
}

@keyframes slide-in-up {
  from {
    transform: translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Institutional Button Styles */
.btn-primary-institutional {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-900));
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.875rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(10, 22, 40, 0.3);
}

.btn-primary-institutional:hover {
  background: linear-gradient(135deg, var(--navy-700), var(--navy-800));
  border-color: var(--electric-blue);
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
  transform: translateY(-1px);
}

.btn-signal {
  background: linear-gradient(135deg, var(--electric-blue), var(--electric-blue-light));
  color: white;
  border: none;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.btn-signal:hover {
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
  transform: translateY(-2px);
}

/* Multi-Step Form Progress */
.form-progress {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3rem;
  position: relative;
}

.form-progress::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gray-300);
  z-index: -1;
}

.form-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  background: var(--gray-50);
  padding: 0 1rem;
}

.form-progress-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--gray-500);
  transition: all 0.3s ease;
}

.form-progress-step.active .form-progress-number {
  background: var(--electric-blue);
  border-color: var(--electric-blue);
  color: white;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.form-progress-step.completed .form-progress-number {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.form-progress-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-600);
  text-align: center;
  max-width: 100px;
}

/* Institutional Gradient Backgrounds */
.bg-institutional-gradient {
  background: linear-gradient(135deg, var(--navy-950) 0%, var(--navy-900) 50%, var(--slate-800) 100%);
}

.bg-signal-gradient {
  background: linear-gradient(135deg, var(--electric-blue) 0%, var(--electric-blue-light) 100%);
}

/* Data Visualization - Heatmap Style */
.data-heatmap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: 0.5rem;
}

.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.heatmap-cell:hover {
  transform: scale(1.05);
  z-index: 10;
}

.heatmap-low {
  background: rgba(14, 165, 233, 0.2);
  color: var(--electric-blue);
}

.heatmap-medium {
  background: rgba(14, 165, 233, 0.5);
  color: white;
}

.heatmap-high {
  background: rgba(245, 158, 11, 0.8);
  color: white;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .stat-value {
    font-size: 2rem;
  }
  
  .scarcity-number {
    font-size: 2rem;
  }
  
  .sla-timeline {
    flex-direction: column;
  }
  
  .sla-step::after {
    display: none;
  }
  
  .pulse-ticker-content {
    gap: 2rem;
  }
  
  .high-value-indicator {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
  }
}

/* Loading States */
.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-300) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 6px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Institutional Table Styles */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
}

.data-table thead {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-800));
  color: white;
}

.data-table th {
  padding: 1rem 1.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
}

.data-table td {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--gray-200);
  font-size: 0.9375rem;
}

.data-table tbody tr:hover {
  background: var(--gray-50);
}
