/* Canonical shared styles for all LEGION web properties
 * (landing, manual, dev blog). Source lives in site-assets/shared/site.css;
 * each site deploys a copy into its own asset dir.
 *
 * Per-site layout (sidebar, post list, centered landing) goes in the
 * site's own stylesheet, loaded AFTER this one.
 */

/* -- Webfont: Rationale (display font for headings only) --
 * Self-hosted under SIL OFL 1.1. See site-assets/shared/fonts/LICENSE.md.
 */
@font-face {
  font-family: 'Rationale';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/Rationale-Regular.woff2') format('woff2');
}

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

html {
  scroll-behavior: smooth;
  scrollbar-color: #30363d #0d1117;
}

body {
  background: #0d1117;
  color: #c9d1d9;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: #264f78;
  color: #e6edf3;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0d1117; }
::-webkit-scrollbar-thumb { background: #30363d; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #484f58; }

/* -- Shared site header (logo + nav, fixed to top) --
 *
 * Markup pattern:
 *   <nav class="site-header">
 *     <a class="site-header-logo" href="https://legionrts.dev/">
 *       <img src=".../LegionLogoSmallMono.png" alt="LEGION">
 *     </a>
 *     <ul class="site-nav">
 *       <li><a href="https://legionrts.dev/" class="active">Main</a></li>
 *       <li><a href="https://blog.legionrts.dev/">Devblogs</a></li>
 *       <li><a href="https://legionrts.dev/manual/">Manual</a></li>
 *     </ul>
 *   </nav>
 *
 * The `active` class goes on whichever link corresponds to the current site.
 * Pages that use this header must reserve ~49px of top padding for content
 * (or use `position: fixed` layouts with an offset, as the manual does).
 */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  background: #010409;
  border-bottom: 1px solid #21262d;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-header-logo img {
  height: 20px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: #8b949e;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}

.site-nav a:hover {
  color: #e6edf3;
}

.site-nav a.active {
  color: #e6edf3;
}

/* -- Shared link + typography defaults -- */
a {
  color: #58a6ff;
  text-decoration: none;
  transition: color 0.15s;
}

a:hover {
  color: #79b8ff;
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  color: #e6edf3;
  font-family: 'Rationale', Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.3;
  font-weight: 400;
  letter-spacing: 0.02em;
}

h1 { font-size: 28px; margin-bottom: 0.4em; }
h2 { font-size: 22px; margin: 1.6em 0 0.5em; }
h3 { font-size: 18px; margin: 1.4em 0 0.4em; }

p { margin-bottom: 1em; }

code {
  background: #161b22;
  border: 1px solid #21262d;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

pre {
  background: #161b22;
  border: 1px solid #21262d;
  padding: 16px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1em 0;
}

pre code {
  background: transparent;
  border: 0;
  padding: 0;
}

hr {
  border: 0;
  border-top: 1px solid #21262d;
  margin: 2em 0;
}

/* -- Shared footer band (pinned to bottom of viewport) --
 * Pages using .site-footer should reserve ~50px of padding-bottom on their
 * main content container so the fixed footer never covers scrolled-in text.
 */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 110;
  text-align: center;
  padding: 16px;
  font-size: 13px;
  color: #484f58;
  border-top: 1px solid #21262d;
  background: #010409;
}
