/* The Million Merge — shared design tokens.
   Every page under site/ loads this file. Do not hard-code colours or fonts elsewhere. */

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  /* Surfaces: a castle at night */
  --bg: #0a0c11;
  --bg-raised: #11141c;
  --bg-sunken: #07090d;
  --line: #222838;
  --line-soft: #181c28;

  /* Text */
  --text: #e9ecf3;
  --text-muted: #8d95aa;
  --text-faint: #5b6377;

  /* Brand */
  --ember: #ffb347;        /* a lit brick */
  --ember-strong: #ff8a3d;
  --ember-glow: rgba(255, 179, 71, 0.18);

  /* Brick states */
  --state-planned: #151a26;
  --state-open: #9aa8d0;
  --state-claimed: #5b8cff;
  --state-review: #f5c044;
  --state-merged: #ffb347;

  /* Subsystems (merged bricks are tinted by subsystem) */
  --sub-kernel: #ff6b5e;
  --sub-security: #c084fc;
  --sub-hooks: #f472b6;
  --sub-memory: #5b8cff;
  --sub-scheduler: #22d3ee;
  --sub-drivers: #3ecf8e;
  --sub-sandbox: #a3e635;
  --sub-evals: #f5c044;
  --sub-userland: #fb923c;
  --sub-docs: #7dd3fc;

  /* Feedback */
  --ok: #3ecf8e;
  --warn: #f5c044;
  --bad: #ff6b5e;

  /* Type */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.75rem;
  --text-2xl: 2.5rem;
  --text-hero: clamp(2.75rem, 8vw, 5.5rem);

  /* Shape and space */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;
  --gutter: 16px;
  --page-max: 1200px;

  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}

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

a {
  color: var(--ember);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Small uppercase label above a heading or stat. */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-raised);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
}

.btn:hover {
  border-color: var(--text-faint);
  text-decoration: none;
}

.btn-primary {
  background: var(--ember);
  border-color: var(--ember);
  color: #1a1206;
}

.btn-primary:hover {
  background: var(--ember-strong);
  border-color: var(--ember-strong);
}

.card {
  background: var(--bg-raised);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
