/* ========================================
   DMS HUB PUBLIC - FIGATA ATOMICA CSS
   ======================================== */

:root {
  /* Colors */
  --bg-dark: #0a1628;
  --bg-darker: #060d1a;
  --bg-card: #1a2f4a;
  --text-primary: #e8fbff;
  --text-secondary: #9bd6de;
  --text-muted: #6b8a96;
  
  /* Accent Colors */
  --accent-teal: #14b8a6;
  --accent-green: #10b981;
  --accent-orange: #f59e0b;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #14b8a6 0%, #10b981 100%);
  --gradient-hero: linear-gradient(135deg, #0a1628 0%, #1a2f4a 50%, #0a1628 100%);
  --gradient-card: linear-gradient(135deg, rgba(26, 47, 74, 0.8) 0%, rgba(10, 22, 40, 0.8) 100%);
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 16px 64px rgba(0, 0, 0, 0.4);
  
  /* Glow Effects */
  --glow-teal: 0 0 20px rgba(20, 184, 166, 0.3);
  --glow-green: 0 0 20px rgba(16, 185, 129, 0.3);
  --glow-orange: 0 0 20px rgba(245, 158, 11, 0.3);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ========================================
   RESET & BASE
   ======================================== */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   MUSIC CONTROL
   ======================================== */

.music-control {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg), var(--glow-teal);
  transition: all var(--transition-normal);
}

.music-control:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-xl), 0 0 30px rgba(20, 184, 166, 0.5);
}

.music-control svg {
  color: white;
}

.music-control .hidden {
  display: none;
}

.music-control .sound-wave {
  animation: pulse 1.5s ease-in-out infinite;
}

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

/* ========================================
   NAVIGATION
   ======================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(10, 22, 40, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(155, 214, 222, 0.1);
  transition: all var(--transition-normal);
}

.navbar.scrolled {
  background: rgba(10, 22, 40, 0.95);
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
}

.brand-icon {
  font-size: 1.5rem;
  animation: rotate 10s linear infinite;
}

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

.brand-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-badge {
  font-size: 0.65rem;
  padding: 0.25rem 0.5rem;
  background: var(--accent-teal);
  color: white;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-fast);
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 8rem 2rem 4rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  opacity: 0.9;
}

.hero-map {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  filter: blur(2px);
}

.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(20, 184, 166, 0.1);
  border: 1px solid rgba(20, 184, 166, 0.3);
  border-radius: 50px;
  color: var(--accent-teal);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 2rem;
}

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

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.gradient-text::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
  opacity: 0.5;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
  padding: 2rem;
  background: rgba(26, 47, 74, 0.3);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(155, 214, 222, 0.1);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-secondary);
  opacity: 0.6;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-normal);
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

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

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-md), var(--glow-teal);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(20, 184, 166, 0.5);
}

.btn-secondary {
  background: rgba(155, 214, 222, 0.1);
  color: var(--text-primary);
  border: 1px solid rgba(155, 214, 222, 0.3);
}

.btn-secondary:hover {
  background: rgba(155, 214, 222, 0.2);
  border-color: rgba(155, 214, 222, 0.5);
  transform: translateY(-2px);
}

.btn-card {
  width: 100%;
  justify-content: center;
  margin-top: 1.5rem;
}

/* ========================================
   SECTIONS
   ======================================== */

.section {
  padding: 6rem 2rem;
  position: relative;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
}

/* ========================================
   FEATURES GRID
   ======================================== */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  padding: 2rem;
  background: var(--gradient-card);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(155, 214, 222, 0.1);
  transition: all var(--transition-normal);
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: rgba(20, 184, 166, 0.5);
  box-shadow: var(--shadow-lg), var(--glow-teal);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========================================
   ACCESS CARDS
   ======================================== */

.access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.access-card {
  position: relative;
  padding: 2.5rem;
  background: var(--gradient-card);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  border: 1px solid rgba(155, 214, 222, 0.1);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.access-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.access-card:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-xl);
}

.access-card:hover::before {
  opacity: 0.05;
}

.card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.access-card:hover .card-glow {
  opacity: 1;
}

.card-content {
  position: relative;
  z-index: 1;
}

.card-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.card-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.card-features {
  list-style: none;
  margin-bottom: 1.5rem;
}

.card-features li {
  padding: 0.5rem 0;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-preview {
  margin-top: 2rem;
  border-radius: 12px;
  overflow: hidden;
  opacity: 0.8;
  transition: opacity var(--transition-normal);
}

.access-card:hover .card-preview {
  opacity: 1;
}

.card-preview img {
  width: 100%;
  height: auto;
  display: block;
}

/* Card Variants */
.card-citizens {
  border-color: rgba(16, 185, 129, 0.3);
}

.card-citizens:hover {
  box-shadow: var(--shadow-xl), var(--glow-green);
}

.card-merchants {
  border-color: rgba(245, 158, 11, 0.3);
}

.card-merchants:hover {
  box-shadow: var(--shadow-xl), var(--glow-orange);
}

.card-admin {
  border-color: rgba(59, 130, 246, 0.3);
}

.card-admin:hover {
  box-shadow: var(--shadow-xl), 0 0 20px rgba(59, 130, 246, 0.3);
}

/* ========================================
   STATS DASHBOARD
   ======================================== */

.stats-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.stat-card {
  padding: 2rem;
  background: var(--gradient-card);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(155, 214, 222, 0.1);
  text-align: center;
  transition: all var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(20, 184, 166, 0.5);
  box-shadow: var(--shadow-lg), var(--glow-teal);
}

.stat-card .stat-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.stat-card .stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.stat-card .stat-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.stat-trend {
  font-size: 0.875rem;
  font-weight: 600;
}

.stat-trend.positive {
  color: var(--accent-green);
}

.stat-trend.negative {
  color: #ef4444;
}

.map-preview {
  height: 500px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(155, 214, 222, 0.1);
}

.stats-map {
  width: 100%;
  height: 100%;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
  background: var(--bg-darker);
  border-top: 1px solid rgba(155, 214, 222, 0.1);
  padding: 4rem 2rem 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.footer-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(155, 214, 222, 0.1);
  border-radius: 50%;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.footer-social a:hover {
  background: var(--accent-teal);
  color: white;
  transform: translateY(-2px);
}

.footer-col h4 {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--accent-teal);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(155, 214, 222, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-teal);
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.animate-fade-in {
  animation: fade-in 0.8s ease-out;
}

.animate-slide-up {
  animation: slide-up 0.8s ease-out;
}

.animate-slide-up.delay-1 {
  animation-delay: 0.2s;
  opacity: 0;
  animation-fill-mode: forwards;
}

.animate-slide-up.delay-2 {
  animation-delay: 0.4s;
  opacity: 0;
  animation-fill-mode: forwards;
}

.animate-slide-up.delay-3 {
  animation-delay: 0.6s;
  opacity: 0;
  animation-fill-mode: forwards;
}

.animate-bounce {
  animation: bounce 2s ease-in-out infinite;
}

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

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .hero {
    padding: 6rem 1rem 3rem;
  }
  
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1.5rem;
  }
  
  .hero-cta {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .section {
    padding: 4rem 1rem;
  }
  
  .features-grid,
  .access-grid,
  .stats-dashboard {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  
  .music-control {
    bottom: 1rem;
    right: 1rem;
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .card-title {
    font-size: 1.5rem;
  }
  
  .stat-card .stat-value {
    font-size: 2rem;
  }
}

/* ========================================
   UTILITIES
   ======================================== */

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
