/* ==========================================================================
   AEGIS CAD AI - MAIN DESIGN SYSTEM (main.css)
   Dark Techno-Brutalist, High-Contrast Architectural Compliance Engine
   ========================================================================== */

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

:root {
  /* Color Palette - Deep Monochrome with Tactical Accents */
  --bg-primary: #09090b;
  --bg-secondary: #121215;
  --bg-card: #16161a;
  --bg-surface: #1e1e24;
  --bg-elevated: #24242c;
  --bg-overlay: rgba(9, 9, 11, 0.90);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-color: rgba(255, 255, 255, 0.14);
  --border-bright: rgba(255, 255, 255, 0.28);
  --border-grid: rgba(255, 255, 255, 0.05);

  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --text-bright: #ffffff;

  /* Tactical & Status Accents */
  --accent-red: #ef4444;
  --accent-red-glow: rgba(239, 68, 68, 0.25);
  --accent-amber: #f59e0b;
  --accent-amber-glow: rgba(245, 158, 11, 0.25);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Space Mono', 'SFMono-Regular', Consolas, monospace;

  /* Dimensions & Spacing */
  --header-height: 64px;
  --hud-height: 32px;
  --container-max: 1360px;
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;

  /* Transitions */
  --ease-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  --ease-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --ease-slow: 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Architectural Grid Pattern Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  background-image: 
    linear-gradient(to right, var(--border-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-grid) 1px, transparent 1px);
  background-size: 64px 64px;
  z-index: 0;
  opacity: 0.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
  border-left: 1px solid var(--border-subtle);
}
::-webkit-scrollbar-thumb {
  background: #27272a;
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: #3f3f46;
}

/* Selection */
::selection {
  background: #ffffff;
  color: #000000;
}

/* Base Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-bright);
  line-height: 1.15;
}

p {
  color: var(--text-secondary);
  font-size: 1rem;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  color: var(--text-primary);
}

/* Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.container-wide {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.section-padding {
  padding: 6rem 0;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

/* Monospace Utilities & Micro Labels */
.font-mono {
  font-family: var(--font-mono);
}

.label-mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.label-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
}

.tag-red {
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.1);
}

.tag-amber {
  border-color: rgba(245, 158, 11, 0.4);
  color: #fde68a;
  background: rgba(245, 158, 11, 0.1);
}

.tag-emerald {
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.1);
}

.tag-cyan {
  border-color: rgba(6, 182, 212, 0.4);
  color: #a5f3fc;
  background: rgba(6, 182, 212, 0.1);
}

/* Editorial Headlines */
.headline-giant {
  font-size: clamp(2.5rem, 5.5vw, 5rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.headline-lg {
  font-size: clamp(2rem, 3.5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.headline-md {
  font-size: clamp(1.4rem, 2vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Button System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.75rem 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: all var(--ease-fast);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: #ffffff;
  color: #000000;
  border: 1px solid #ffffff;
}
.btn-primary:hover {
  background: #e4e4e7;
  border-color: #e4e4e7;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  border-color: var(--text-bright);
  background: rgba(255, 255, 255, 0.05);
}

.status-indicator {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald-glow);
}
.status-indicator.amber {
  background-color: var(--accent-amber);
  box-shadow: 0 0 8px var(--accent-amber-glow);
}
.status-indicator.red {
  background-color: var(--accent-red);
  box-shadow: 0 0 8px var(--accent-red-glow);
}

@media (max-width: 1024px) {
  .container, .container-wide {
    padding: 0 1.5rem;
  }
  .section-padding {
    padding: 4.5rem 0;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }
  .container, .container-wide {
    padding: 0 1rem;
  }
  .section-padding {
    padding: 3.5rem 0;
  }
}
