/* ============================================================
   theme.css — Brand-agnostic neutral color & typography base
   Establishes the color palette, font fallbacks, and base styles.
   Pairs with tokens.css (structural) for the DSv1 architecture.
   ============================================================ */

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

:root {
  /* Color palette — neutral, no brand */
  --color-black:      #000000;
  --color-gray-950:   #0f0f0f;
  --color-gray-900:   #1a1a1a;
  --color-gray-800:   #2d2d2d;
  --color-gray-700:   #404040;
  --color-gray-600:   #525252;
  --color-gray-500:   #737373;
  --color-gray-400:   #a3a3a3;
  --color-gray-300:   #d4d4d4;
  --color-gray-200:   #e5e5e5;
  --color-gray-100:   #f5f5f5;
  --color-white:      #ffffff;

  /* Accent: soft slate-blue (system signal, not brand) */
  --color-accent:     #5866d9;
  --color-accent-light: #7a87e8;
  --color-accent-dark: #3d4a99;

  /* Semantic colors */
  --color-success:    #059669;
  --color-warning:    #d97706;
  --color-error:      #dc2626;
  --color-info:       #0284c7;

  /* Typography */
  --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-family-mono: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;

  /* Text & background */
  --text-primary:     var(--color-gray-900);
  --text-secondary:   var(--color-gray-600);
  --text-tertiary:    var(--color-gray-500);
  --text-inverse:     var(--color-white);

  --bg-primary:       var(--color-white);
  --bg-secondary:     var(--color-gray-100);
  --bg-tertiary:      var(--color-gray-50, #fafafa);

  /* Borders */
  --border-color:     var(--color-gray-300);
  --border-color-subtle: var(--color-gray-200);
  --border-width:     1px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-family-sans);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  line-height: var(--type-body-lh);
  font-size: var(--type-body);
}

/* Headings */
h1 {
  font-size: var(--type-h1);
  line-height: var(--type-h1-lh);
  font-weight: 700;
}

h2 {
  font-size: var(--type-h2);
  line-height: var(--type-h2-lh);
  font-weight: 700;
}

h3 {
  font-size: var(--type-h3);
  line-height: var(--type-h3-lh);
  font-weight: 600;
}

h4, h5, h6 {
  font-size: var(--type-body);
  font-weight: 600;
  line-height: 1.5;
}

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

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

a:hover {
  color: var(--color-accent-dark);
  text-decoration: underline;
}

code {
  font-family: var(--font-family-mono);
  font-size: 0.9em;
  background-color: var(--bg-secondary);
  padding: 0.2em 0.4em;
  border-radius: var(--radius-sm);
}

pre {
  font-family: var(--font-family-mono);
  font-size: var(--type-small);
  line-height: 1.5;
  background-color: var(--color-gray-900);
  color: var(--color-gray-100);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

pre code {
  background-color: transparent;
  padding: 0;
  color: inherit;
}

/* Basic reset for form elements */
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}
