/* CATALYST project website — shared styles
   Apple-tile aesthetic, no framework, system fonts.
   Used by every page in project-site/. */

:root {
  --bg: #fafafa;
  --panel: #fff;
  --border: #e5e5ea;
  --text: #1c1c1e;
  --text-muted: #6e6e73;
  --accent: #0071e3;
  --green: #34c759;
  --amber: #ff9f0a;
  --red: #ff3b30;
  --purple: #af52de;
  --mono: ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display",system-ui,sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* ─── top nav ─── */
nav.topbar {
  position: sticky; top: 0;
  background: rgba(250,250,250,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
  padding: 0.75rem 0;
}
nav.topbar .wrap { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
nav.topbar .brand { font-weight: 600; letter-spacing: -0.01em; font-size: 1.05rem; color: var(--text); text-decoration: none; }
nav.topbar .brand .dot { color: var(--accent); }
nav.topbar a.nav-link { color: var(--text-muted); text-decoration: none; font-size: 0.92rem; }
nav.topbar a.nav-link:hover { color: var(--text); }
nav.topbar a.nav-link.active { color: var(--text); font-weight: 500; }
nav.topbar .nav-spacer { flex: 1; }
nav.topbar .nav-meta { color: var(--text-muted); font-size: 0.78rem; font-family: var(--mono); }

/* ─── page header ─── */
header.page {
  padding: 2.5rem 0 1.8rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
header.page h1 {
  margin: 0 0 0.4rem;
  font-size: 2.2rem;
  letter-spacing: -0.02em;
  font-weight: 600;
}
header.page p.lede { color: var(--text-muted); font-size: 1.08rem; margin: 0; max-width: 720px; }

/* ─── content ─── */
section { margin: 2.4rem 0; }
h2 {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
}
h2 .hint { font-weight: 400; color: var(--text-muted); font-size: 0.92rem; margin-left: 0.5rem; }
h3 { font-size: 1rem; font-weight: 600; margin: 0 0 0.5rem; }
p { margin: 0.4rem 0; }

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

/* ─── tile grid ─── */
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 1rem;
}
.tile {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
}
.tile .tile-meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.7rem;
}

/* ─── stats ─── */
.stat {
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  display: block;
}
.stat .label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 0.2rem;
  letter-spacing: 0;
}
.stat.green { color: var(--green); }
.stat.amber { color: var(--amber); }
.stat.accent { color: var(--accent); }

/* ─── chips and badges ─── */
.chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 0.78rem;
  margin: 2px 3px 2px 0;
  background: #f1f1f3;
  color: #444;
  font-family: var(--mono);
}
.chip.on { background: #e8f8ec; color: #1e7a30; }
.chip.off { background: #fdecec; color: #8c2020; }
.chip.amber { background: #fff6e5; color: #a6670b; }
.chip.blue { background: #e8f2fd; color: #0050b4; }
.chip.purple { background: #f4eafd; color: #6f29a4; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-right: 0.3rem;
}
.badge.green { background: #e8f8ec; color: #1e7a30; }
.badge.amber { background: #fff6e5; color: #a6670b; }
.badge.red { background: #ffeae8; color: #a8281e; }
.badge.blue { background: #e8f2fd; color: #0050b4; }
.badge.grey { background: #f1f1f3; color: #555; }

/* ─── code + pre ─── */
code, .mono { font-family: var(--mono); font-size: 0.9em; }
pre {
  background: #f5f5f7;
  border-radius: 8px;
  padding: 0.95rem 1.1rem;
  overflow-x: auto;
  font-size: 0.82rem;
  margin: 0.5rem 0;
}

/* ─── tables ─── */
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
  margin-top: 0.5rem;
}
th, td { text-align: left; padding: 0.55rem 0.65rem; border-bottom: 1px solid var(--border); }
th { background: #f7f7f9; font-weight: 600; }

/* ─── lists ─── */
ul { padding-left: 1.2rem; margin: 0.4rem 0; }
li { margin: 0.25rem 0; }

/* ─── separators ─── */
.divider { border-top: 1px solid var(--border); margin: 2rem 0; }

/* ─── hero block on landing ─── */
.hero {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
}
.hero h1 {
  font-size: 3rem;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin: 0 0 0.6rem;
  line-height: 1.1;
}
.hero p.lede { font-size: 1.2rem; color: var(--text-muted); max-width: 720px; margin: 0 0 1.2rem; }
.hero .cta-row { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 1.5rem; }
.hero .cta-row a {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
}
.hero .cta-row a.primary { background: var(--accent); color: #fff; }
.hero .cta-row a.primary:hover { background: #005bbf; text-decoration: none; }
.hero .cta-row a.secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
}
.hero .cta-row a.secondary:hover { background: #f5f5f7; text-decoration: none; }

/* ─── footer ─── */
footer.site {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding: 2rem 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}
footer.site .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
footer.site .links a { margin-right: 0.8rem; }

/* ─── small ─── */
.muted { color: var(--text-muted); }
small { color: var(--text-muted); }
hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
