/* ============================================
   MONTAGE — Lumière Dark Cinema Theme
   ============================================ */

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

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Anton&family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Cinzel:wght@400;500;600;700&display=swap');

/* --- Design Tokens --- */
:root {
  /* Palette — Deep Obsidian + Champagne Gold + Slate Gray */
  --black-deep: #0A0A0B;
  --surface: #141415;
  --surface-raised: #1c1c1e;
  --surface-hover: #242426;
  --surface-active: #2E2E2E;
  --border: #2a2a2c;
  --border-subtle: #1e1e20;
  --gold: #D4AF37;
  --gold-dim: #B8952E;
  --gold-bright: #E4C44A;
  --gold-glow: rgba(212, 175, 55, 0.15);
  --gold-glow-strong: rgba(212, 175, 55, 0.3);
  --text-primary: #e8e6e0;
  --text-secondary: #a0a0b0;
  --text-muted: #6a6a7e;
  --text-on-gold: #0A0A0B;

  /* Accent alias (used in app UI) */
  --accent-primary: var(--gold);
  --accent: var(--gold);

  /* Status Colors */
  --status-success: #4ade80;
  --status-success-bg: rgba(74, 222, 128, 0.1);
  --status-warning: #fbbf24;
  --status-warning-bg: rgba(251, 191, 36, 0.1);
  --status-error: #f87171;
  --status-error-bg: rgba(248, 113, 113, 0.1);
  --status-info: #60a5fa;
  --status-info-bg: rgba(96, 165, 250, 0.1);
  --status-processing: #c084fc;
  --status-processing-bg: rgba(192, 132, 252, 0.1);

  /* Typography */
  --font-display: 'Bebas Neue', 'Anton', 'Inter', -apple-system, sans-serif;
  --font-body: 'Bebas Neue', 'Anton', 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-logo: 'Cinzel', 'Playfair Display', serif;

  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-lg: 1.125rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  --text-3xl: 2.5rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.6);
  --shadow-gold: 0 0 20px rgba(212, 175, 55, 0.15);

  /* Layout */
  --sidebar-width: 240px;
  --topbar-height: 56px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* --- Base --- */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--black-deep);
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- Film Grain Overlay --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* --- Vignette --- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.4) 100%);
}

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

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p { margin-bottom: var(--space-4); }

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--gold-bright); }

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

pre {
  background: var(--black-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  overflow-x: auto;
  color: var(--text-secondary);
}

::selection {
  background: var(--gold);
  color: var(--text-on-gold);
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* --- Utility --- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.font-mono { font-family: var(--font-mono); }
.font-display { font-family: var(--font-display); }
