/* Builder OS — Shared CSS
   Source of truth: DESIGN.md
   Used by all pages: landing, /why, /skills, /agents, /community, /getting-started
   Generated pages get this via <link> injected by generate-skill-pages.sh
   Manually maintained pages include it directly */

/* ── Font faces ─────────────────────────────────────────── */
@font-face {
  font-family: "Geist Mono";
  src: url("https://cdn.jsdelivr.net/npm/geist@1.3.0/dist/fonts/geist-mono/GeistMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("https://cdn.jsdelivr.net/npm/geist@1.3.0/dist/fonts/geist-mono/GeistMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ── Design tokens (from DESIGN.md) ────────────────────── */
:root {
  --bg: #faf9f7;
  --surface: #f0eeeb;
  --surface-hover: #e8e5e1;
  --border: #d8d4cf;
  --border-light: #e5e1dc;
  --text: #1c1917;
  --text-dim: #57534e;
  --text-light: #78716c;
  --text-faint: #a8a29e;
  --accent: #c2410c;
  --accent-light: #fff7ed;
  --accent-hover: #9a3412;
  --green: #15803d;
  --green-light: #dcfce7;
  --purple: #8250df;
  --purple-light: #fbefff;
  --code-bg: #1c1917;
  --code-text: #e7e5e4;
}
[data-theme="dark"] {
  --bg: #1c1917;
  --surface: #292524;
  --surface-hover: #3a3633;
  --border: #44403c;
  --border-light: #3a3633;
  --text: #e7e5e4;
  --text-dim: #a8a29e;
  --text-light: #78716c;
  --text-faint: #57534e;
  --accent: #ea580c;
  --accent-light: #431407;
  --accent-hover: #fb923c;
  --green: #4ade80;
  --green-light: #14532d;
  --purple: #a78bfa;
  --purple-light: #2e1065;
  --code-bg: #0c0a09;
  --code-text: #e7e5e4;
}

/* ── Reset & base ───────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Instrument Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.92rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
code {
  font-family: "Geist Mono", "SF Mono", "Fira Code", monospace;
  font-size: 0.85em;
  background: var(--surface);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--border-light);
}

/* ── Layout ─────────────────────────────────────────────── */
.container { max-width: 960px; margin: 0 auto; padding: 2.5rem 1.5rem; }
.container--narrow { max-width: 780px; margin: 0 auto; padding: 2.5rem 1.5rem; }

/* ── Shared nav ─────────────────────────────────────────── */
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}
.site-nav-brand {
  font-family: "General Sans", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.site-nav-brand:hover { color: var(--accent); }
.site-nav-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-left: auto;
}
.site-nav-links a {
  font-size: 0.82rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}
.site-nav-links a:hover { color: var(--accent); }
.site-nav-links a.active { color: var(--accent); font-weight: 500; }

/* ── Section labels ─────────────────────────────────────── */
.section-label {
  font-size: 0.72rem;
  font-family: "Geist Mono", monospace;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  margin-bottom: 1rem;
}

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--bg);
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  padding: 1.25rem;
  transition: border-color 0.15s ease-out, background 0.15s ease-out;
}
.card:hover { border-color: var(--accent); background: var(--surface); }
.card a { text-decoration: none; color: inherit; }

/* ── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 500;
  font-family: "Geist Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.badge--active { background: var(--green-light); color: var(--green); }
.badge--draft { background: var(--surface); color: var(--text-faint); }
.badge--accent { background: var(--accent-light); color: var(--accent); }
.badge--purple { background: var(--purple-light); color: var(--purple); }

/* ── Code blocks ────────────────────────────────────────── */
.code-block {
  background: var(--code-bg);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-family: "Geist Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.8;
  position: relative;
  margin-bottom: 1rem;
  overflow-x: auto;
}
.code-block code {
  color: var(--code-text);
  white-space: pre;
  font-family: inherit;
  background: none;
  border: none;
  padding: 0;
}
.code-comment { color: #8b949e; }
.code-string { color: #7ee787; }
.code-cmd { color: #79c0ff; }
.copy-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: #30363d;
  border: 1px solid #484f58;
  color: #e6edf3;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.15s;
  font-family: "Geist Mono", monospace;
}
.copy-btn:hover { border-color: #79c0ff; color: #79c0ff; }
.copy-btn.copied { background: rgba(63,185,80,0.2); border-color: #3fb950; color: #3fb950; }

/* ── Shared footer ──────────────────────────────────────── */
.site-footer {
  text-align: center;
  color: var(--text-light);
  font-size: 0.78rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border-light);
  margin-top: 3rem;
}
.site-footer a { color: var(--accent); }
.site-footer a:hover { text-decoration: underline; }
.site-footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

/* ── Energy strip (builder activity) ────────────────────── */
.energy-strip {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
}
.energy-strip::-webkit-scrollbar { height: 4px; }
.energy-strip::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.energy-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.78rem;
  transition: border-color 0.15s;
}
.energy-item:hover { border-color: var(--accent); }
.energy-avatar {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 600;
  font-family: "Geist Mono", monospace;
  flex-shrink: 0;
}
.energy-skill { font-weight: 500; color: var(--text); }
.energy-date { color: var(--text-faint); font-family: "Geist Mono", monospace; font-size: 0.68rem; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 720px) {
  .site-nav { gap: 0.75rem; }
  .site-nav-links { gap: 0.75rem; }
  .container { padding: 1.5rem 1rem; }
  .container--narrow { padding: 1.5rem 1rem; }
}
