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

:root {
  /* Color Palette */
  --bg: #07090B;
  --bg-surface: #0B0F13;
  --bg-card: #0E141B;
  --bg-elevated: #141C25;
  --bg-input: #080C0F;
  
  --accent: #C6FF3D;
  --accent-hover: #D8FF66;
  --accent-muted: rgba(198, 255, 61, 0.12);
  --accent-dark: #8FD11C;
  --accent-border: rgba(198, 255, 61, 0.22);
  
  --moon-silver: #E8ECEF;
  --text: #E8ECEF;
  --text-muted: #9AA5AE;
  --text-dim: #606A73;
  
  --border: #16210F;
  --border-muted: rgba(154, 165, 174, 0.15);
  --border-active: rgba(198, 255, 61, 0.4);
  
  --danger: #FF4D4D;
  --danger-bg: rgba(255, 77, 77, 0.12);
  --warning: #FFB300;
  --warning-bg: rgba(255, 179, 0, 0.12);
  --success: #C6FF3D;
  --success-bg: rgba(198, 255, 61, 0.12);

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

  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 2rem;      /* 32px */
  --text-4xl: 2.75rem;   /* 44px */
  --text-5xl: 3.5rem;    /* 56px */

  /* 8px Spacing Grid */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

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

  /* Shadows and Elevation */
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 24px rgba(198, 255, 61, 0.18);
  --shadow-glow-sm: 0 0 12px rgba(198, 255, 61, 0.12);

  /* Motion Curves */
  --ease-motion: cubic-bezier(0.2, 0.8, 0.2, 1);
  --duration-fast: 180ms;
  --duration-normal: 300ms;
  --duration-slow: 600ms;

  /* Layout Consts */
  --header-height: 72px;
  --container-max: 1240px;
  --touch-target-min: 44px;
}

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

html {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--space-4));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  max-width: 100%;
  background-color: var(--bg);
  position: relative;
}

/* Accessibility: Focus & Skip Link */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--accent);
  color: #000;
  font-weight: 700;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  z-index: 9999;
  transition: top var(--duration-fast) var(--ease-motion);
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space-4);
}

/* Typography Defaults */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--moon-silver);
  letter-spacing: -0.02em;
}

p {
  color: var(--text-muted);
}

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

img, svg {
  display: block;
  max-width: 100%;
}

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

input, select, textarea {
  font-family: inherit;
  color: inherit;
}

code, pre, .mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

/* Text Selection */
::selection {
  background: rgba(198, 255, 61, 0.3);
  color: var(--text);
}

/* Developer Mode Demo Banner */
.demo-banner {
  display: none;
  background: #B31B1B;
  color: #FFF;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-align: center;
  padding: var(--space-2) var(--space-4);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.demo-banner.active {
  display: block;
}
