/* ============================================================
   Site chrome — the design system every page of forge-tools.work wears
   ============================================================
   Tokens, the layout container, buttons, the header and the footer. Served as-is
   (Vite public/, unhashed) so pages Vite does not build can link it too: the blog and
   help editions canopy-page writes under /blog/ and /help/ (see the partials in each site/blog edition).

   Those pages do not load styles/main.css, so nothing here may lean on its reset —
   each rule states the margins and padding it needs, which on the site's own pages
   repeats what the reset already says.
   ============================================================ */

/* Tokens – Dark Industrial Theme */
:root {
  --color-bg: #0a0a0a;
  --color-surface: #141414;
  --color-border: #262626;
  --color-text: #e5e5e5;
  --color-text-muted: #a3a3a3;
  --color-accent: #f97316;

  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--color-border);
  --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--color-accent);

  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;

  --max-width: 1120px;
  --gutter: clamp(1rem, 4vw, 2rem);
}

/* ============================================================
   Layout Helpers
   ============================================================ */
.container {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.375rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  border: none;
  transition: background-color var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background-color: #c2410c;
  color: #fff;
}

.btn-primary:hover {
  opacity: 0.88;
}

.btn-outline {
  background-color: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  opacity: 1;
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1.0625rem;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-logo span {
  color: var(--color-accent);
}

.site-nav {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.site-nav a {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition-fast);
  padding: 0.625rem 0.25rem;
}

.site-nav a:hover {
  color: var(--color-text);
  opacity: 1;
}

.lang-switch a {
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.lang-switch a:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.footer-copy a {
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0.5rem 0.125rem;
}

.footer-links {
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
  padding: 0.75rem 0.25rem;
}

.footer-links a:hover {
  color: var(--color-text);
  opacity: 1;
}

@media (max-width: 640px) {
  .site-nav {
    gap: 0.75rem;
  }

  .site-nav a {
    font-size: 0.8125rem;
    padding: 0.5rem 0.125rem;
  }

  .site-logo {
    font-size: 1.125rem;
  }

  .site-footer .container {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}
