/* base.css: Chicha Cybersecurity Design System
 * Following DracoCam variable pattern — unique cybersecurity identity
 * DracoCam = green (#00ff89), DracoCam feel
 * Chicha Cybersecurity = cyan (#00d4ff), shield/security feel
 */

:root {
  /* === Primary Colors — Electric Cyan (Security) === */
  --primary: #00d4ff;
  --primary-hover: #00bfe6;
  --primary-light: #33ddff;
  --primary-soft: rgba(0, 212, 255, 0.1);
  --primary-dark: #0099cc;
  --primary-glow: rgba(0, 212, 255, 0.15);

  /* === Secondary — Deep Purple (Severity/Critical) === */
  --secondary: #7c3aed;
  --secondary-hover: #6d28d9;
  --secondary-light: #a78bfa;
  --secondary-soft: rgba(124, 58, 237, 0.1);

  /* === Background Colors — Darker than DracoCam === */
  --dark-bg: #0b0e14;
  --dark-surface: #151a24;
  --dark-surface-elevated: #1e2430;
  --dark-surface-highlight: #252d3a;

  /* === Text Colors === */
  --text-primary: #f0f4f8;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-bright: #ffffff;

  /* === Border and Effects === */
  --border-subtle: rgba(148, 163, 184, 0.1);
  --border-medium: rgba(148, 163, 184, 0.2);
  --gradient-hero: linear-gradient(135deg, #0b0e14 0%, #151a24 50%, #0d1520 100%);
  --gradient-card: linear-gradient(145deg, #151a24 0%, #1e2430 100%);
  --gradient-accent: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px var(--primary-glow);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.3);

  /* === Status Colors (Consistent with DracoCam) === */
  --danger: #ef4444;
  --danger-light: #f87171;
  --danger-dark: #dc2626;
  --danger-soft: rgba(239, 68, 68, 0.1);
  --success: #22c55e;
  --success-light: #4ade80;
  --success-soft: rgba(34, 197, 94, 0.1);
  --warning: #f59e0b;
  --warning-light: #fbbf24;
  --warning-soft: rgba(245, 158, 11, 0.1);
  --info: #3b82f6;
  --info-light: #60a5fa;
  --info-soft: rgba(59, 130, 246, 0.1);

  /* === Severity Colors (Security-Specific) === */
  --severity-critical: #ef4444;
  --severity-high: #f97316;
  --severity-medium: #f59e0b;
  --severity-low: #22c55e;
  --severity-info: #3b82f6;

  /* === Typography (Same family as DracoCam for ecosystem consistency) === */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
  --base-font-size: 16px;
  --line-height: 1.6;

  /* === Spacing (Same scale as DracoCam) === */
  --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: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-full: 9999px;

  /* === Transitions === */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* === Z-Index Scale (Same as DracoCam) === */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;
}

/* === Reset === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--base-font-size);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: var(--font-primary);
  line-height: var(--line-height);
  color: var(--text-primary);
  background: var(--dark-bg);
  min-height: 100vh;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-bright);
  font-weight: 600;
  line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-light);
}

/* === Focus Indicators (Keyboard Accessibility) === */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

code, pre {
  font-family: var(--font-mono);
}

code {
  background: var(--dark-surface);
  padding: 0.2em 0.4em;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
  color: var(--primary-light);
}

pre {
  background: var(--dark-surface);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
}

/* === Utility Classes === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-xl);
}

.text-primary { color: var(--primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-bright { color: var(--text-bright); }

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

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

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

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary-soft);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: var(--danger-dark);
}

/* === Cards === */
.card {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  transition: all var(--transition-normal);
}

.card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

/* === Badges (Severity) === */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15em 0.6em;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-critical { background: var(--danger-soft); color: var(--danger-light); }
.badge-high { background: rgba(249, 115, 22, 0.1); color: #fb923c; }
.badge-medium { background: var(--warning-soft); color: var(--warning-light); }
.badge-low { background: var(--success-soft); color: var(--success-light); }
.badge-info { background: var(--info-soft); color: var(--info-light); }

/* === Shield Icon Glow (Brand Element) === */
.shield-glow {
  filter: drop-shadow(0 0 20px var(--primary-glow));
}

/* === Responsive === */
/* === Mobile Hamburger Nav === */
.nav-hamburger {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: var(--spacing-xs);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.nav-hamburger:hover {
  color: var(--text-bright);
}

@media (max-width: 768px) {
  :root {
    --base-font-size: 15px;
  }
  .container {
    padding: 0 var(--spacing-md);
  }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }

  .nav-hamburger {
    display: flex;
    align-items: center;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--dark-surface);
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    padding: var(--spacing-md);
    gap: var(--spacing-sm);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
  }

  .nav-links a:hover {
    background: var(--dark-surface-elevated);
  }
}
