/* ===========================================================
   BowHub — Design tokens & shared components
   =========================================================== */

:root {
  /* Type */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, "SF Mono", Menlo, monospace;

  /* Neutral scale (warm-tinted) */
  --n-0:   #ffffff;
  --n-25:  #fbfaf8;
  --n-50:  #f7f6f2;
  --n-100: #efeee9;
  --n-200: #e2e1da;
  --n-300: #cbcabf;
  --n-400: #a4a399;
  --n-500: #797870;
  --n-600: #565650;
  --n-700: #3e3e3a;
  --n-800: #2a2a27;
  --n-900: #1a1a18;
  --n-950: #0f0f0e;

  /* Accent — warm forest green (archery / outdoor) */
  --accent-50:  #edf6ee;
  --accent-100: #d6ebd8;
  --accent-200: #aed6b1;
  --accent-300: #82bd87;
  --accent-400: #5fa066;
  --accent-500: #3f8347;
  --accent-600: #2f6a37;
  --accent-700: #25542d;
  --accent-800: #1d4124;
  --accent-900: #14301a;

  /* Danger */
  --d-50:  #fdf1ee;
  --d-100: #fbdcd4;
  --d-500: #d24a2b;
  --d-600: #b03a20;
  --d-700: #8a2c18;

  /* Semantic — light theme defaults */
  --bg: var(--n-50);
  --bg-elev: var(--n-0);
  --bg-subtle: var(--n-100);
  --text: var(--n-900);
  --text-muted: var(--n-500);
  --text-soft: var(--n-600);
  --border: var(--n-200);
  --border-strong: var(--n-300);
  --brand-bg: var(--accent-700);
  --brand-fg: var(--n-25);

  --shadow-sm: 0 1px 2px rgba(20,18,12,0.04), 0 1px 1px rgba(20,18,12,0.03);
  --shadow-md: 0 4px 12px rgba(20,18,12,0.06), 0 2px 4px rgba(20,18,12,0.04);
  --shadow-lg: 0 12px 32px rgba(20,18,12,0.08), 0 4px 12px rgba(20,18,12,0.05);

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

[data-theme="dark"] {
  --bg: var(--n-950);
  --bg-elev: #1a1a18;
  --bg-subtle: #232320;
  --text: #f5f4ef;
  --text-muted: #8a8980;
  --text-soft: #b8b7ad;
  --border: #2e2e2a;
  --border-strong: #3e3e3a;
  --brand-bg: #14241a;
  --brand-fg: #e8efe5;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.6);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--n-950);
    --bg-elev: #1a1a18;
    --bg-subtle: #232320;
    --text: #f5f4ef;
    --text-muted: #8a8980;
    --text-soft: #b8b7ad;
    --border: #2e2e2a;
    --border-strong: #3e3e3a;
    --brand-bg: #14241a;
    --brand-fg: #e8efe5;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.6);
  }
}

/* ============ BASE ============ */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ============ LOGO ============ */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark {
  border-radius: 8px;
  background: var(--accent-600);
  color: var(--n-0);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.logo-name { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; color: var(--text); }

/* ============ BUTTON ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 120ms, color 120ms, border-color 120ms, transform 60ms;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:active:not(:disabled) { transform: translateY(0.5px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-md { height: 40px; padding: 0 16px; font-size: 14px; }
.btn-lg { height: 46px; padding: 0 18px; font-size: 14.5px; }
.btn-full { width: 100%; }
.btn-icon { display: inline-flex; }

.btn-primary {
  background: var(--accent-600);
  color: var(--n-0);
  border-color: var(--accent-700);
  box-shadow: 0 1px 0 rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.08);
}
.btn-primary:hover:not(:disabled) { background: var(--accent-700); }

.btn-secondary {
  background: var(--bg-elev);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover:not(:disabled) { background: var(--bg-subtle); border-color: var(--n-400); }

.btn-ghost {
  background: transparent;
  color: var(--text-soft);
}
.btn-ghost:hover:not(:disabled) { background: var(--bg-subtle); color: var(--text); }

/* ============ ICON BUTTON ============ */
.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-soft);
  cursor: pointer;
  transition: background 120ms, color 120ms, border-color 120ms;
}
.icon-btn:hover { background: var(--bg-subtle); color: var(--text); border-color: var(--border-strong); }
