/* United-AI Design System — matching www.united-ai.ca */

:root {
  /* Backgrounds */
  --bg-deepest: #0f1114;
  --bg-primary: #151820;
  --bg-secondary: #1a1e26;
  --bg-elevated: #161a22;
  --bg-interactive: #1e2330;

  /* Text — warm tones */
  --text-primary: #f0eeeb;
  --text-secondary: #d4d0cb;
  --text-tertiary: #9a958e;
  --text-quaternary: #6b665f;

  /* Brand colors — overridable via /api/brand */
  --primary: #c8973e;
  --secondary: #1a1e26;
  --accent: #c8973e;
  --accent-l: #dbb168;
  --accent-d: #a67b2e;
  --accent-glow: rgba(200,151,62,0.12);

  /* Semantic colors */
  --green: #4ade80;
  --yellow: #fbbf24;
  --blue: #60a5fa;
  --purple: #a78bda;
  --red: #FF4444;

  /* Borders — solid warm grays */
  --border-subtle: #1e2228;
  --border-default: #232830;
  --border-strong: #2e3440;

  /* Glass */
  --glass-bg: rgba(22,26,34,0.8);
  --glass-border: #232830;
  --glass-blur: 20px;
  --glass-radius: 14px;
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.35);

  /* Typography */
  --font-ui: 'Inter', -apple-system, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Animation */
  --duration-fast: 200ms;
  --duration-normal: 300ms;
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

::selection {
  background: rgba(200, 151, 62, 0.3);
}

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

a:hover {
  color: var(--accent-l);
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 600;
}

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

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

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.page {
  min-height: calc(100vh - 140px);
  padding: var(--space-3xl) 0;
}

.section {
  margin-bottom: var(--space-3xl);
}

/* Grid */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  .container { padding: 0 var(--space-md); }
  .page { padding: var(--space-xl) 0; }
}

/* Flex utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* Text utilities */
.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-accent { color: var(--accent); }
.text-green { color: var(--green); }
.text-yellow { color: var(--yellow); }
.text-red { color: var(--red); }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.font-mono { font-family: var(--font-mono); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Spacing utilities */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }
