/* NodeZro Website - Custom CSS */
/* Mission Control Command Center Design System */

:root {
  /* Base Colors - Command Center Aesthetic */
  --color-navy-deep: #0A0E27;
  --color-charcoal: #1A1D2E;
  --color-navy-medium: #1E293B;
  --color-slate: #2D3748;

  /* Primary Accent - Electric Cyan */
  --color-cyan-primary: #00D9FF;
  --color-cyan-light: #33E3FF;
  --color-cyan-dark: #00B8DB;
  --color-cyan-glow: rgba(0, 217, 255, 0.5);

  /* Secondary Accent - Neon Green */
  --color-green-primary: #00FF88;
  --color-green-light: #33FFA3;
  --color-green-dark: #00DB73;
  --color-green-glow: rgba(0, 255, 136, 0.5);

  /* Warning - Amber */
  --color-amber-primary: #FFB020;
  --color-amber-light: #FFC04D;
  --color-amber-dark: #E09A1C;
  --color-amber-glow: rgba(255, 176, 32, 0.5);

  /* Critical - Red */
  --color-red-primary: #FF3366;
  --color-red-light: #FF5C85;
  --color-red-dark: #DB2952;
  --color-red-glow: rgba(255, 51, 102, 0.5);

  /* Additional Accent Colors */
  --color-purple: #A855F7;
  --color-blue: #3B82F6;
  --color-orange: #FB8C00;

  /* Backgrounds - Dark Mode Native */
  --bg-primary: #0A0E27;
  --bg-secondary: #1A1D2E;
  --bg-tertiary: #1E293B;
  --bg-elevated: #1A1D2E;
  --bg-card: #1E293B;
  --bg-overlay: rgba(10, 14, 39, 0.95);

  /* Text Colors */
  --text-primary: #F1F5F9;
  --text-secondary: #CBD5E1;
  --text-tertiary: #94A3B8;
  --text-muted: #64748B;
  --text-on-cyan: #0A0E27;

  /* Borders */
  --border-primary: rgba(0, 217, 255, 0.2);
  --border-secondary: rgba(148, 163, 184, 0.2);
  --border-glow: rgba(0, 217, 255, 0.4);

  /* Interactive States */
  --hover-bg: rgba(0, 217, 255, 0.1);
  --active-bg: rgba(0, 217, 255, 0.2);
  --hover-border: rgba(0, 217, 255, 0.4);

  /* Shadows & Glows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.7);

  --glow-cyan: 0 0 20px var(--color-cyan-glow);
  --glow-cyan-strong: 0 0 30px var(--color-cyan-glow), 0 0 60px var(--color-cyan-glow);
  --glow-green: 0 0 20px var(--color-green-glow);
  --glow-amber: 0 0 20px var(--color-amber-glow);
  --glow-red: 0 0 20px var(--color-red-glow);

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Typography */
  --font-header: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;

  /* Legacy Compatibility (for gradual migration) */
  --nodezro-primary: var(--color-cyan-primary);
  --nodezro-secondary: var(--color-green-primary);
  --nodezro-accent: var(--color-purple);
  --severity-critical: var(--color-red-primary);
  --severity-high: var(--color-amber-primary);
  --severity-medium: #FCD34D;
  --severity-low: var(--color-green-primary);
}

/* Dark Mode is Default - Light mode overrides (optional) */
[data-theme="light"] {
  --bg-primary: #FFFFFF;
  --bg-secondary: #F9FAFB;
  --bg-tertiary: #F3F4F6;
  --bg-elevated: #FFFFFF;
  --bg-card: #FFFFFF;

  --text-primary: #0F172A;      /* Darker: slate-900 for better contrast */
  --text-secondary: #334155;    /* Darker: slate-700 for better readability */
  --text-tertiary: #64748B;     /* Darker: slate-500 for improved contrast */
  --text-muted: #94A3B8;

  --border-primary: rgba(0, 217, 255, 0.3);
  --border-secondary: rgba(209, 213, 219, 0.5);

  --hover-bg: rgba(0, 217, 255, 0.05);
  --active-bg: rgba(0, 217, 255, 0.1);
}

[data-theme="light"] :is(
  .bg-navy-deep,
  .bg-charcoal,
  .bg-navy-deep\/95,
  .bg-navy-deep\/90,
  .bg-navy-deep\/85,
  .bg-navy-deep\/80,
  .bg-navy-deep\/75,
  .bg-navy-deep\/70,
  .bg-navy-deep\/60,
  .bg-navy-deep\/50,
  .bg-navy-deep\/40,
  .bg-navy-deep\/30,
  .bg-navy-deep\/20,
  .from-navy-deep,
  .via-navy-deep,
  .to-navy-deep,
  .from-charcoal,
  .via-charcoal,
  .to-charcoal,
  [class*="from-navy-deep/"],
  [class*="via-navy-deep/"],
  [class*="to-navy-deep/"],
  [class*="from-charcoal/"],
  [class*="via-charcoal/"],
  [class*="to-charcoal/"]
) {
  --text-primary: #F8FAFC;
  --text-secondary: rgba(226, 232, 240, 0.78);
  --text-tertiary: rgba(148, 163, 184, 0.6);
  --border-primary: rgba(148, 163, 184, 0.45);
  --border-secondary: rgba(148, 163, 184, 0.3);
  --hover-bg: rgba(148, 163, 184, 0.12);
  --active-bg: rgba(148, 163, 184, 0.2);
  color: var(--text-primary);
}

[data-theme="light"] :is(
  .bg-navy-deep,
  .bg-charcoal,
  .bg-navy-deep\/95,
  .bg-navy-deep\/90,
  .bg-navy-deep\/85,
  .bg-navy-deep\/80,
  .from-navy-deep,
  .via-navy-deep,
  .to-navy-deep,
  .from-charcoal,
  .via-charcoal,
  .to-charcoal,
  [class*="from-navy-deep/"],
  [class*="via-navy-deep/"],
  [class*="to-navy-deep/"],
  [class*="from-charcoal/"],
  [class*="via-charcoal/"],
  [class*="to-charcoal/"]
) a {
  color: inherit;
}

/* Typography Base */
body {
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header loading placeholder */
#header-placeholder {
  position: relative;
}

.header-loading {
  position: relative;
  overflow: hidden;
}

.header-loading::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.08) 0%, rgba(148, 163, 184, 0.15) 50%, rgba(148, 163, 184, 0.08) 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  animation: header-placeholder-pulse 1.6s ease-in-out infinite;
}

@keyframes header-placeholder-pulse {
  0% {
    transform: translateX(-20%);
    opacity: 0.85;
  }
  50% {
    transform: translateX(0%);
    opacity: 1;
  }
  100% {
    transform: translateX(20%);
    opacity: 0.85;
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-header);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.font-mono {
  font-family: var(--font-mono);
}

/* Button Styles - Command Center Aesthetic */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, var(--color-cyan-primary) 0%, var(--color-cyan-dark) 100%);
  color: var(--color-navy-deep);
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-cyan-light);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--glow-cyan);
  text-decoration: none;
  letter-spacing: 0.05em;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-cyan-light) 0%, var(--color-cyan-primary) 100%);
  box-shadow: var(--glow-cyan-strong);
  transform: translateY(-2px);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  background-color: transparent;
  border: 2px solid var(--color-cyan-primary);
  color: var(--color-cyan-primary);
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background-color: var(--color-cyan-primary);
  transition: width 0.3s ease;
  z-index: -1;
}

.btn-secondary:hover {
  color: var(--color-navy-deep);
  border-color: var(--color-cyan-light);
  box-shadow: var(--glow-cyan);
}

.btn-secondary:hover::before {
  width: 100%;
}

.btn-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  color: var(--color-cyan-primary);
  font-weight: 600;
  transition: all 0.2s;
  text-decoration: none;
  position: relative;
}

.btn-text::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-cyan-primary);
  transition: width 0.3s ease;
}

.btn-text:hover {
  color: var(--color-cyan-light);
}

.btn-text:hover::after {
  width: 100%;
}

/* Card Styles - Command Center Aesthetic */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-cyan-primary), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover {
  box-shadow: var(--shadow-lg), var(--glow-cyan);
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.card:hover::before {
  opacity: 1;
}

.card-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-primary);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  padding: 1.5rem;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-primary);
}

/* Badge Styles - Command Center Aesthetic */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-mono);
  border-radius: var(--radius-sm);
  border: 1px solid;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-critical {
  background-color: rgba(255, 51, 102, 0.15);
  color: var(--color-red-light);
  border-color: var(--color-red-primary);
}

.badge-high {
  background-color: rgba(255, 176, 32, 0.15);
  color: var(--color-amber-light);
  border-color: var(--color-amber-primary);
}

.badge-medium {
  background-color: rgba(252, 211, 77, 0.15);
  color: #FDE68A;
  border-color: #FCD34D;
}

.badge-low {
  background-color: rgba(0, 255, 136, 0.15);
  color: var(--color-green-light);
  border-color: var(--color-green-primary);
}

.badge-primary {
  background-color: rgba(0, 217, 255, 0.15);
  color: var(--color-cyan-light);
  border-color: var(--color-cyan-primary);
}

/* Light mode: darker cyan for better contrast */
[data-theme="light"] .badge-primary {
  background-color: rgba(0, 150, 200, 0.15);
  color: #0369A1;  /* cyan-700 for better contrast */
  border-color: #0284C7;  /* cyan-600 */
}

.badge-secondary {
  background-color: rgba(0, 255, 136, 0.15);
  color: var(--color-green-light);
  border-color: var(--color-green-primary);
}

/* Command Center Specific Utilities */
.terminal-text {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--color-cyan-primary);
}

.glow-cyan {
  box-shadow: var(--glow-cyan);
}

.glow-green {
  box-shadow: var(--glow-green);
}

.glow-amber {
  box-shadow: var(--glow-amber);
}

.glow-red {
  box-shadow: var(--glow-red);
}

.grid-background {
  background-image:
    linear-gradient(rgba(0, 217, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 217, 255, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
}

.scan-line {
  position: relative;
  overflow: hidden;
}

.scan-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 217, 255, 0.1) 50%,
    transparent 100%
  );
  animation: scan 3s linear infinite;
}

@keyframes scan {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100%);
  }
}

.pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: var(--glow-cyan);
  }
  50% {
    box-shadow: var(--glow-cyan-strong);
  }
}

/* Hero Image Enhancements */
.hero-image-container {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-image-container:hover {
  transform: translateZ(20px) scale(1.02);
}

/* Floating animation for badge */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}

/* Shimmer effect for stats */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.shimmer {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 217, 255, 0.2) 50%,
    transparent 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 3s infinite;
}

/* Hero Video Styles */
.hero-video-section {
  position: relative;
  min-height: 100vh;
}

.hero-video-section video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Ensure video plays smoothly */
video {
  -webkit-transform: translateZ(0);
  -moz-transform: translateZ(0);
  -ms-transform: translateZ(0);
  -o-transform: translateZ(0);
  transform: translateZ(0);
}

/* Responsive hero image */
@media (max-width: 1024px) {
  .hero-stats-overlay {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 640px) {
  .hero-stats-overlay {
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
  }

  /* Stack stat cards on mobile */
  .hero-video-section .space-y-4 > div {
    font-size: 0.9rem;
  }
}

/* Text shadow for better readability over video */
.drop-shadow-2xl {
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.9), 0 2px 10px rgba(0, 0, 0, 0.7);
}

.drop-shadow-lg {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8), 0 1px 5px rgba(0, 0, 0, 0.6);
}

/* Animated progress bars */
.progress-bar,
.alert-bar {
  transition: width 0.3s ease-out;
}

/* Counter number transition */
.counter {
  display: inline-block;
  min-width: 2ch;
  transition: transform 0.1s ease-out;
}

.counter:hover {
  transform: scale(1.05);
}

/* Trust Bar Stat Cards */
.trust-stat-card {
  background: rgba(0, 217, 255, 0.03);
  border: 1px solid rgba(0, 217, 255, 0.15);
  border-radius: 8px;
  padding: 32px 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.trust-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 217, 255, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.trust-stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 217, 255, 0.3);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3), 0 0 24px rgba(0, 217, 255, 0.15);
  background: rgba(0, 217, 255, 0.05);
}

.trust-stat-card:hover::before {
  opacity: 1;
}

/* Responsive adjustments for trust cards */
@media (max-width: 1024px) {
  .trust-stat-card {
    padding: 24px 20px;
  }
}

@media (max-width: 640px) {
  .trust-stat-card {
    padding: 20px 16px;
  }
}

.image-placeholder {
  background-color: #FF3366;
  border: 2px dashed var(--color-red-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  text-align: center;
  padding: 2rem;
  min-height: 200px;
}

/* Smooth transitions */
* {
  transition-property: background-color, border-color, color;
  transition-duration: 200ms;
  transition-timing-function: ease-in-out;
}

/* Accessibility */
*:focus {
  outline: 2px solid var(--nodezro-primary);
  outline-offset: 2px;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Light mode: improve contrast for cyan-primary text */
[data-theme="light"] .text-cyan-primary {
  color: #0369A1 !important;  /* cyan-700 instead of cyan-400 */
}

/* Light mode: improve contrast for green-primary text */
[data-theme="light"] .text-green-primary {
  color: #15803D !important;  /* green-700 for better contrast */
}

/* Light mode: improve contrast for amber-primary text */
[data-theme="light"] .text-amber-primary {
  color: #B45309 !important;  /* amber-700 for better contrast */
}

/* Light mode: improve contrast for terminal text */
html:not(.dark) .terminal-text {
  color: #0369A1;  /* Darker cyan for better readability in light mode */
  font-weight: 600;  /* Slightly bolder for better visibility */
}

/* Light mode: enhance glow effects for better visibility */
html:not(.dark) .glow-cyan {
  box-shadow: 0 0 0 1px rgba(3, 105, 161, 0.3), 0 0 20px rgba(3, 105, 161, 0.2);
}

html:not(.dark) .glow-green {
  box-shadow: 0 0 0 1px rgba(21, 128, 61, 0.3), 0 0 20px rgba(21, 128, 61, 0.2);
}

html:not(.dark) .glow-amber {
  box-shadow: 0 0 0 1px rgba(180, 83, 9, 0.3), 0 0 20px rgba(180, 83, 9, 0.2);
}

/* Light mode: enhance border visibility for journey boxes and timeline cards */
html:not(.dark) .border-cyan-primary\/20 {
  border-color: rgba(3, 105, 161, 0.4) !important;
}

html:not(.dark) .border-amber-primary\/20 {
  border-color: rgba(180, 83, 9, 0.4) !important;
}

html:not(.dark) .border-red-primary\/20 {
  border-color: rgba(220, 38, 38, 0.4) !important;
}

html:not(.dark) .border-green-primary\/20 {
  border-color: rgba(21, 128, 61, 0.4) !important;
}

html:not(.dark) .border-cyan-light\/20 {
  border-color: rgba(3, 105, 161, 0.4) !important;
}

/* Light mode: enhance inline box-shadow styles for journey and timeline cards */
html:not(.dark) [style*="box-shadow"][style*="rgba(51, 227, 255"] {
  box-shadow: 0 0 0 1px rgba(3, 105, 161, 0.3), 0 0 20px rgba(3, 105, 161, 0.2) !important;
}

html:not(.dark) [style*="box-shadow"][style*="rgba(255, 51, 102"] {
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.3), 0 0 20px rgba(220, 38, 38, 0.2) !important;
}

/* Light mode: improve contrast for badge-secondary */
html:not(.dark) .badge-secondary {
  background-color: rgba(21, 128, 61, 0.15);  /* Darker green background */
  color: #15803D;  /* green-700 for better contrast */
  border-color: #16A34A;  /* green-600 for more visible border */
}
