/* Custom CSS for Collective Nexus - Dark Theme */

/* CSS Variables */
:root {
  /* Primary Colors */
  --bg-dark: #0f172a; /* slate-900 */
  --surface-dark: #334155; /* slate-700 */
  --accent-blue: #0891b2; /* teal from logo */
  --accent-purple: #06b6d4; /* cyan-500 */
  --success-green: #10b981; /* emerald-500 */
  
  /* Text Colors */
  --text-primary: #f8fafc; /* slate-50 */
  --text-secondary: #cbd5e1; /* slate-300 */
  --text-muted: #94a3b8; /* slate-400 */
  
  /* Borders & Additional */
  --border-light: #475569; /* slate-600 */
  --medium-dark: #1e293b; /* slate-800 */
  --hover-blue: #0ea5e9; /* sky-500 */
  --focus-ring: rgba(8, 145, 178, 0.5);
  
  /* Font */
  --font-primary: 'Inter', sans-serif;
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-weight: 700;
}

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.lead {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 300;
}

/* Navigation */
.navbar {
  background-color: #e0e7ff; /* Soft blue-gray, much lighter */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #cbd5e1;
  padding: 0.5rem 0;
  transition: all 0.3s ease;
}

.navbar-brand {
  font-weight: 600;
  font-size: 1.5rem;
  color: #1e293b !important; /* Dark text */
}

.navbar-brand img {
  height: 60px;
  width: auto;
}

.nav-link {
  color: #334155 !important; /* Dark gray text */
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-blue) !important;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background-color: var(--accent-blue);
}

/* Navbar toggler for mobile - dark icon for light background */
.navbar-toggler {
  border-color: #94a3b8;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2851, 65, 85, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--medium-dark) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 20% 80%, rgba(8, 145, 178, 0.1) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

/* Utility Classes */
.text-accent {
  color: var(--accent-blue) !important;
}

.text-accent-secondary {
  color: var(--accent-purple) !important;
}

.bg-dark-secondary {
  background-color: var(--medium-dark);
}

.bg-surface {
  background-color: var(--surface-dark);
}

/* Buttons */
.btn {
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: white;
  box-shadow: 0 4px 6px rgba(8, 145, 178, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--hover-blue), var(--accent-blue));
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(8, 145, 178, 0.3);
}

.btn-secondary {
  background-color: var(--surface-dark);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background-color: var(--border-light);
  color: var(--text-primary);
  border-color: var(--accent-blue);
}

.btn-outline-primary {
  background-color: transparent;
  color: var(--accent-blue);
  border: 2px solid var(--accent-blue);
}

.btn-outline-primary:hover {
  background-color: var(--accent-blue);
  color: white;
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* Cards */
.card {
  background-color: var(--surface-dark);
  border: 1px solid var(--border-light);
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(8, 145, 178, 0.2);
  border-color: var(--accent-blue);
}

.card-body {
  padding: 2rem;
}

/* Metric Cards */
.metric-card {
  padding: 2rem;
  background-color: var(--surface-dark);
  border-radius: 0.75rem;
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
  height: 100%;
}

.metric-card:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 8px 24px rgba(8, 145, 178, 0.2);
}

/* Forms */
.form-control,
.form-select {
  background-color: var(--surface-dark);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  background-color: var(--surface-dark);
  border-color: var(--accent-blue);
  color: var(--text-primary);
  box-shadow: 0 0 0 0.25rem var(--focus-ring);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-label {
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

/* Footer */
footer {
  background-color: var(--bg-dark);
  border-top: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 2rem 0;
}

footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: var(--accent-blue);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-section {
    padding-top: 100px;
  }
  
  .display-3 {
    font-size: 2.5rem;
  }
  
  .btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
  }
  
  .navbar-nav {
    padding-top: 1rem;
  }
  
  .nav-link.active::after {
    display: none;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue);
}

/* Override Bootstrap's text-muted for dark theme visibility */
.text-muted {
  color: var(--text-secondary) !important; /* Use our lighter gray instead of Bootstrap's default */
}

/* Selection color */
::selection {
  background-color: var(--accent-blue);
  color: white;
}

::-moz-selection {
  background-color: var(--accent-blue);
  color: white;
}

/* Animated Background */
.animated-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.animated-bg .shape {
  position: absolute;
  opacity: 0.15;
}

/* Orbital paths inspired by logo */
.orbit-1 {
  width: 300px;
  height: 300px;
  border: 3px solid var(--accent-blue);
  border-radius: 50%;
  top: 10%;
  left: -150px;
  animation: rotate 40s linear infinite;
  filter: blur(1px);
}

.orbit-2 {
  width: 400px;
  height: 400px;
  border: 3px solid var(--accent-purple);
  border-radius: 50%;
  top: 50%;
  right: -200px;
  animation: rotate-reverse 50s linear infinite;
  filter: blur(1px);
}

.orbit-3 {
  width: 250px;
  height: 250px;
  border: 3px solid var(--accent-blue);
  border-radius: 50%;
  bottom: 10%;
  left: 20%;
  animation: rotate 35s linear infinite;
  filter: blur(1px);
}

/* Connection nodes inspired by logo */
.node {
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: var(--accent-blue);
  border-radius: 50%;
  animation: pulse 3s ease-in-out infinite;
  box-shadow: 0 0 20px var(--accent-blue);
}

.node-1 {
  top: 20%;
  left: 30%;
  animation-delay: 0s;
}

.node-2 {
  top: 60%;
  right: 25%;
  animation-delay: 1s;
  background-color: var(--accent-purple);
  box-shadow: 0 0 20px var(--accent-purple);
}

.node-3 {
  bottom: 30%;
  left: 60%;
  animation-delay: 2s;
}

/* Curved connection lines */
.connection {
  position: absolute;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
  opacity: 0.4;
  filter: blur(0.5px);
}

.connection-1 {
  width: 200px;
  top: 30%;
  left: 10%;
  transform: rotate(45deg);
  animation: fade-slide 8s ease-in-out infinite;
}

.connection-2 {
  width: 300px;
  bottom: 40%;
  right: 5%;
  transform: rotate(-30deg);
  background: linear-gradient(90deg, transparent, var(--accent-purple), transparent);
  animation: fade-slide 10s ease-in-out infinite reverse;
}

.connection-3 {
  width: 150px;
  top: 70%;
  left: 40%;
  transform: rotate(120deg);
  animation: fade-slide 12s ease-in-out infinite;
  animation-delay: 3s;
}

/* Animation keyframes */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.15;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.3;
  }
  100% {
    transform: scale(1);
    opacity: 0.15;
  }
}

@keyframes fade-slide {
  0% {
    opacity: 0;
    transform: translateX(-20px) rotate(45deg);
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 0;
    transform: translateX(20px) rotate(45deg);
  }
}

/* Ensure hero content is above animated background */
.hero-section .container {
  position: relative;
  z-index: 1;
}

/* Responsive adjustments for animated background */
@media (max-width: 768px) {
  .orbit-1 {
    width: 200px;
    height: 200px;
  }
  
  .orbit-2 {
    width: 250px;
    height: 250px;
  }
  
  .orbit-3 {
    width: 180px;
    height: 180px;
  }
  
  .connection-1,
  .connection-2,
  .connection-3 {
    opacity: 0.2;
  }
}