/* site.css — the shared visual shell for foundryos.ca CHASSIS-RENDERED pages.
 *
 * WHY THIS FILE EXISTS
 * The preserved hand-authored pages (index / about / assessment) each carry a large inline
 * <style> block that establishes the site's look: the dark theme tokens, the fonts, the fixed
 * top nav, and the footer. Pages the OAS chassis renders (articles + evidence + hubs) are NOT
 * hand-authored, so they cannot carry that inline block — without a shared stylesheet they render
 * as unstyled black-on-white content. This file consolidates the SHARED shell (tokens + reset +
 * body + nav + footer) copied VERBATIM from the live pages, plus the article/content typography
 * the chassis pages need (styling the emitted <main>, breadcrumb, CTA, and hub list). It is linked
 * into chassis pages via the OAS profile's `shell.stylesheets`. It is NOT loaded by the preserved
 * pages (they keep their own inline styles), so it can never double-apply or conflict with them.
 *
 * Reproduces the EXISTING design — the tokens, fonts, nav and footer are the live site's, unchanged.
 */

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

:root {
  --bg:#0c1017; --bg2:#121820; --bg3:#182028; --surface:#1e2a32;
  --border:#1e2e38; --border2:#2a3a44;
  --text:#e2ddd5; --text2:#b4c2cc; --text3:#7c8b96;
  --amber:#dca023; --amber2:#eb5019; --orange:#fa9632;
  --ag:rgba(220,160,35,.06);
  --green:#4ade80; --green2:#22c55e; --red:#ef6b6b; --blue:#6898c8; --purple:#9d7be8;
  --font:'Source Sans 3',-apple-system,sans-serif;
  --mono:'JetBrains Mono',monospace;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  /* Clear the 52px fixed top nav so the breadcrumb is not pinned under it. */
  padding-top: 52px;
}
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--amber); }

.c { max-width: 1180px; margin: 0 auto; padding: 0 36px; }

/* ── Top nav (shared header partial) ─────────────────────────────────────── */
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 0; background: var(--bg2); border-bottom: 1px solid var(--border); }
nav .c { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.nl { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nl img { height: 26px; width: auto; }
.nl-text { font-size: 21.2px; font-weight: 700; letter-spacing: -.3px; color: var(--text); }
.nl-text span { color: var(--amber2); }
.nl-sub { font-size: 15.6px; color: var(--text3); letter-spacing: .2px; margin-top: -2px; font-weight: 400; }
.nk { display: flex; gap: 6px; align-items: center; }
.nk a { color: var(--text2); text-decoration: none; font-size: 16.2px; font-weight: 500; padding: 6px 14px; border-radius: 6px; transition: all .15s; }
.nk a:hover { color: var(--text); background: var(--bg3); }
.nc { background: var(--green2) !important; color: var(--bg) !important; font-weight: 600 !important; }
.nc:hover { background: var(--green) !important; }
.nc-amber { background: var(--amber) !important; color: var(--bg) !important; font-weight: 600 !important; }
.nc-amber:hover { background: var(--amber2) !important; }
.nh { display: none; }
.mobile-cta { display: none; }

/* ── Breadcrumb (chassis-emitted) ────────────────────────────────────────── */
.breadcrumb { max-width: 760px; margin: 0 auto; padding: 28px 36px 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12.5px; letter-spacing: .3px; }
.breadcrumb li { display: flex; align-items: center; gap: 8px; color: var(--text3); }
.breadcrumb li:not(:last-child)::after { content: '/'; color: var(--border2); }
.breadcrumb a { color: var(--text3); text-decoration: none; }
.breadcrumb a:hover { color: var(--amber); }
.breadcrumb [aria-current="page"] { color: var(--text2); }

/* ── Article / content body (chassis-emitted <main>) ─────────────────────── */
main { max-width: 760px; margin: 0 auto; padding: 28px 36px 72px; }
main h1 { font-size: 42px; font-weight: 800; letter-spacing: -1px; line-height: 1.15; color: var(--text); margin-bottom: 22px; }
main h2 { font-size: 29px; font-weight: 700; letter-spacing: -.5px; line-height: 1.2; color: var(--text); margin: 44px 0 14px; }
main h3 { font-size: 22px; font-weight: 700; letter-spacing: -.3px; color: var(--text); margin: 30px 0 10px; }
main h4 { font-size: 18px; font-weight: 700; color: var(--text); margin: 24px 0 8px; }
main p { font-size: 18.5px; color: var(--text2); line-height: 1.75; margin-bottom: 20px; }
main strong { color: var(--text); font-weight: 600; }
main em { color: var(--text2); }
main a { color: var(--amber); text-decoration: none; border-bottom: 1px solid rgba(220,160,35,.35); transition: border-color .15s; }
main a:hover { border-bottom-color: var(--amber); }
main ul, main ol { margin: 0 0 20px 26px; color: var(--text2); font-size: 18.5px; line-height: 1.75; }
main li { margin-bottom: 8px; }
main blockquote { border-left: 3px solid var(--amber); background: var(--ag); padding: 12px 20px; margin: 0 0 20px; color: var(--text2); border-radius: 0 8px 8px 0; }
main blockquote p:last-child { margin-bottom: 0; }
main hr { border: 0; border-top: 1px solid var(--border); margin: 36px 0; }
main pre { background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 18px 20px; overflow-x: auto; margin-bottom: 20px; }
main code { font-family: var(--mono); font-size: 14.5px; }
main :not(pre) > code { background: var(--bg3); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; color: var(--text); }
main pre code { color: var(--text2); background: none; border: 0; padding: 0; }
main table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 15.5px; }
main th, main td { border: 1px solid var(--border); padding: 9px 13px; text-align: left; color: var(--text2); }
main th { background: var(--bg2); color: var(--text); font-weight: 600; }
main picture, main figure { display: block; margin: 0 0 20px; }
main img { max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 10px; display: block; }

/* ── Closing CTA (chassis-emitted <aside class="cta">) ───────────────────── */
.cta { max-width: 760px; margin: 4px auto 72px; padding: 0 36px; }
.cta a { display: inline-flex; align-items: center; gap: 8px; background: var(--amber); color: var(--bg); padding: 12px 26px; border-radius: 8px; font-size: 17px; font-weight: 600; text-decoration: none; transition: all .15s; }
.cta a:hover { background: var(--amber2); box-shadow: 0 4px 20px rgba(220,160,35,.2); }

/* ── Generated hub pages (chassis-emitted <ul class="hub-list">) ─────────── */
.hub-list { list-style: none; max-width: 760px; margin: 0 auto 72px; padding: 0 36px; }
.hub-list li { margin-bottom: 6px; }
.hub-list a { display: block; padding: 16px 20px; background: var(--bg2); border: 1px solid var(--border); border-left: 3px solid var(--amber); border-radius: 10px; color: var(--text); font-size: 18px; font-weight: 600; text-decoration: none; transition: all .2s; }
.hub-list a:hover { border-color: var(--border2); background: var(--bg3); }
.empty { max-width: 760px; margin: 0 auto 72px; padding: 0 36px; color: var(--text3); }

/* ── Footer (shared footer partial) ──────────────────────────────────────── */
footer { padding: 40px 0; border-top: 1px solid var(--border); background: var(--bg2); }
.fi { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.fl { font-size: 17.5px; font-weight: 700; letter-spacing: -.3px; color: var(--text2); }
.fl span { color: var(--amber); }
.fk { display: flex; gap: 24px; }
.fk a { color: var(--text3); text-decoration: none; font-size: 15px; font-weight: 500; transition: color .15s; }
.fk a:hover { color: var(--text); }
.fc { font-size: 13.8px; color: var(--text3); font-family: var(--mono); }

/* ── Responsive (mirrors the live pages' breakpoints) ────────────────────── */
@media (max-width: 900px) {
  .nk { display: none; }
  main h1 { font-size: 34px; letter-spacing: -.6px; }
  main h2 { font-size: 25px; }
  .fi { flex-direction: column; text-align: center; }
  .fk { flex-wrap: wrap; justify-content: center; }
}
@media (max-width: 600px) {
  main { padding: 24px 20px 56px; }
  .breadcrumb, .cta, .hub-list, .empty { padding-left: 20px; padding-right: 20px; }
  main h1 { font-size: 29px; }
  main p, main ul, main ol { font-size: 16.5px; }
  .c { padding: 0 20px; }
}
