/* ==========================================
   Hardware Hunter — Canonical Design System
   Phase 1 Foundation Stylesheet
   ========================================== */

/* §1 — Token blocks */
:root {
  /* Dark mode palette (Default) */
  --bg:            #0a0e14;
  --surface:       #141a22;
  --surface-2:     #1c2432;
  --surface-3:     #232d3d;
  --border:        #2a3343;
  --border-strong: #3a4658;
  --text:          #e2e8f0;
  --text-muted:    #8892a4;
  --accent:        #f59e0b;
  --accent-hover:  #d97706;
  --accent-wash:   rgba(245, 158, 11, 0.12);
  --green:         #34d399;
  --red:           #f87171;
  --blue:          #58a6ff;
  --yellow:        #fbbf24;

  /* Fonts */
  --font-display:  'Sora', system-ui, sans-serif;
  --font-body:     'DM Sans', system-ui, sans-serif;
  --font-mono:     'JetBrains Mono', ui-monospace, monospace;
  --section-padding: 3rem 1.5rem;

  /* Typography Scale */
  --fs-xs:         0.75rem;
  --fs-sm:         1rem;
  --fs-base:       1rem;
  --fs-md:         1.375rem;
  --fs-lg:         2rem;
  --fs-xl:         2.75rem;

  /* Layout */
  --radius:        8px;
  --radius-lg:     14px;

  /* Transitions */
  --theme-transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="light"] {
  /* Light mode palette */
  --bg:            #f4efe7;
  --surface:       #fdfbf7;
  --surface-2:     #efe9df;
  --surface-3:     #e7e0d3;
  --border:        #e2dcd0;
  --border-strong: #d4ccbb;
  --text:          #1a1a1a;
  --text-muted:    #6b7280;
  --accent:        #c2620a;
  --accent-hover:  #a8530a;
  --accent-wash:   rgba(194, 98, 10, 0.10);
  --green:         #1f8a5b;
  --red:           #c2402f;
  --blue:          #2f6bd1;
  --yellow:        #c57e0b;
}

/* §3 — Base typography and layout resets */
body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  transition: var(--theme-transition);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Display & Heading Brand Voice */
h1, h2, h3, h4, h5, h6, .wordmark, .logo {
  font-family: var(--font-display);
  color: var(--text);
  margin-top: 0;
}

/* §4 — Component resets */

/* Flexible buttons */
button, .btn {
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  transition: var(--theme-transition);
}

/* Form controls */
input, select, textarea {
  font-family: var(--font-body);
  background-color: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  transition: var(--theme-transition);
}

input:focus, select:focus, textarea:focus, button:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
  outline: none;
}
