/* ==========================================================================
   LUMINA — ULTRA-PREMIUM EDITORIAL DESIGN SYSTEM (Obsidian Minimalist)
   ========================================================================== */

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

:root {
  /* Dark Mode Default (Ultra-Premium Obsidian Editorial) */
  --bg-canvas: #07080B;
  --bg-surface: #0E1017;
  --bg-surface-hover: #151822;
  --bg-elevated: #191C28;

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-inverse: #07080B;

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-accent: rgba(59, 130, 246, 0.4);

  --accent-primary: #3B82F6;
  --accent-hover: #60A5FA;
  --accent-active: #2563EB;
  --accent-subtle: rgba(59, 130, 246, 0.12);
  --accent-subtle-text: #93C5FD;

  --badge-investigation-bg: #1E293B;
  --badge-investigation-text: #38BDF8;
  --badge-investigation-border: rgba(56, 189, 248, 0.3);

  --badge-deanon-bg: #2C0F14;
  --badge-deanon-text: #FCA5A5;
  --badge-deanon-border: rgba(248, 113, 113, 0.3);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing Scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 36px;
  --space-12: 56px;
  --space-16: 80px;

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Smooth Easing Curves */
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 160ms var(--ease-smooth);
  --transition-normal: 280ms var(--ease-smooth);
  --transition-slow: 420ms var(--ease-smooth);

  /* Shadows */
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 20px 48px -10px rgba(0, 0, 0, 0.65);
  --shadow-modal: 0 32px 80px -16px rgba(0, 0, 0, 0.9);
  --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.18);

  --max-width-content: 1200px;
  --max-width-article: 760px;
}

/* Light Theme Overrides */
[data-theme="light"] {
  --bg-canvas: #FFFFFF;
  --bg-surface: #FAFAFA;
  --bg-surface-hover: #F4F4F5;
  --bg-elevated: #F1F5F9;

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --text-inverse: #FFFFFF;

  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.18);
  --border-accent: rgba(37, 99, 235, 0.4);

  --accent-primary: #0F172A;
  --accent-hover: #1E293B;
  --accent-active: #2563EB;
  --accent-subtle: #F1F5F9;
  --accent-subtle-text: #1E3A8A;

  --badge-investigation-bg: #0F172A;
  --badge-investigation-text: #FFFFFF;
  --badge-investigation-border: transparent;

  --badge-deanon-bg: #7F1D1D;
  --badge-deanon-text: #FEE2E2;
  --badge-deanon-border: transparent;

  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 20px 48px -10px rgba(0, 0, 0, 0.08);
  --shadow-modal: 0 32px 80px -16px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 30px rgba(37, 99, 235, 0.12);
}

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--bg-canvas);
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  transition: transform var(--transition-fast), opacity var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast);
}

button:active {
  transform: scale(0.97);
}

/* Smooth Page View Transitions */
#appMain {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 180ms var(--ease-smooth), transform 180ms var(--ease-smooth);
}

#appMain.view-fade-out {
  opacity: 0;
  transform: translateY(-8px);
}

#appMain.view-fade-in {
  animation: smoothViewIn 260ms var(--ease-smooth) forwards;
}

@keyframes smoothViewIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
