/*
 * base.css — Design tokens, reset, and typography
 *
 * Colour palette and spacing scale mirror homecmdr-dash/css/base.css
 * so the website feels visually consistent with the reference dashboard.
 */

/* ── Design tokens ─────────────────────────────────────────────────────── */
:root {
  /* Colour palette */
  --color-bg:           #0d1117;
  --color-surface:      #161b22;
  --color-surface-2:    #1f2937;
  --color-border:       #30363d;
  --color-border-muted: #21262d;

  --color-text:         #e6edf3;
  --color-text-muted:   #7d8590;
  --color-text-subtle:  #484f58;

  --color-accent:       #58a6ff;
  --color-accent-hover: #79c0ff;

  --color-success:      #3fb950;
  --color-warning:      #d29922;
  --color-danger:       #f85149;

  /* Spacing scale */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border radius */
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   14px;
  --radius-xl:   20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);

  /* Typography */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --text-xs:   0.72rem;
  --text-sm:   0.85rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;

  /* Transitions */
  --transition-fast: 100ms ease;
  --transition-base: 180ms ease;

  /* Layout */
  --content-width:     72rem;
  --docs-sidebar-width: 16rem;
  --header-height:     4rem;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.7;
  background-color: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ──────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 600;
  color: var(--color-text);
}

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

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

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

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-muted);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.35em;
  color: var(--color-accent);
}

pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  overflow-x: auto;
  line-height: 1.6;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-text);
  font-size: inherit;
}

img, video {
  max-width: 100%;
  height: auto;
}

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-8) 0;
}

/* ── Utility classes ─────────────────────────────────────────────────────── */
.text-muted   { color: var(--color-text-muted); }
.text-subtle  { color: var(--color-text-subtle); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-danger  { color: var(--color-danger); }
.text-accent  { color: var(--color-accent); }
.text-mono    { font-family: var(--font-mono); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
