/* heylead.dev marketing pages: chrome (header, footer) and the article layout.
   Every colour comes from /design-tokens.css, so the pages follow the
   viewer's theme. Pair with /theme-boot.js in <head>. */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: light dark; }
body {
  font-family: var(--font-sans);
  background: var(--hl-bg);
  color: var(--hl-fg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--hl-accent); }
a:hover { color: var(--hl-accent-strong); }
:focus-visible { outline: 2px solid var(--hl-focus); outline-offset: 2px; }

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 20;
  height: 64px;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--hl-surface);
  border-bottom: 1px solid var(--hl-border);
}
.logo {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--hl-fg-strong); text-decoration: none; flex-shrink: 0;
}
.logo span { color: var(--hl-accent); }
.site-nav { display: flex; align-items: center; gap: 24px; min-width: 0; }
.site-nav a { font-size: 14px; font-weight: 500; color: var(--hl-fg); text-decoration: none; white-space: nowrap; }
.site-nav a:hover { color: var(--hl-fg-strong); }
.site-nav .nav-github .nav-ic { width: 15px; height: 15px; fill: currentColor; vertical-align: -3px; margin-right: 7px; }
.site-nav .nav-github .gh-stars { margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--hl-border); }
.site-nav .nav-github .gh-stars .star { fill: #f59e0b; margin-right: 4px; }
.site-nav .nav-github .gh-stars b { font-weight: 600; }
.site-nav .nav-github {
  display: inline-flex; align-items: center; height: 34px; padding: 0 10px;
  border: 1px solid var(--hl-border); border-radius: 8px;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--hl-fg);
}
.site-nav .nav-start {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px;
  border-radius: 10px; background: var(--hl-fg-strong); color: var(--hl-bg); font-weight: 600;
}
.site-nav .nav-start:hover { color: var(--hl-bg); opacity: 0.9; }

/* ── Article pages ── */
main.article {
  flex: 1; width: 100%; min-width: 0;
  max-width: 720px; margin: 32px auto 64px; padding: 0 24px;
  line-height: 1.7;
}
main.article h1 {
  font-family: var(--font-display);
  font-size: 40px; line-height: 1.1; font-weight: 700; letter-spacing: -0.015em;
  color: var(--hl-fg-strong); margin-bottom: 8px; text-wrap: balance;
}
main.article .updated { color: var(--hl-fg-muted); font-size: 14px; margin-bottom: 32px; }
main.article h2 {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 600; color: var(--hl-fg-strong);
  margin-top: 32px; margin-bottom: 10px;
}
main.article p { margin-bottom: 16px; }
main.article ul, main.article ol { margin: 0 0 16px 20px; }
main.article li { margin-bottom: 6px; }
main.article strong { color: var(--hl-fg-strong); }
main.article a, main.article code { overflow-wrap: anywhere; }
main.article code {
  font-family: var(--font-mono); font-size: 0.85em;
  background: var(--hl-surface-2); border: 1px solid var(--hl-border);
  border-radius: 4px; padding: 0.1em 0.35em; color: var(--hl-fg-strong);
}
main.article pre {
  font-family: var(--font-mono); font-size: 13.5px; line-height: 1.6;
  background: var(--hl-surface-2); color: var(--hl-fg-strong);
  border: 1px solid var(--hl-border); border-radius: 8px;
  padding: 14px 16px; overflow-x: auto; margin-bottom: 16px;
}
main.article pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
main.article .lede { font-size: 18px; color: var(--hl-fg-strong); margin-bottom: 24px; }
main.article .related { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--hl-border); font-size: 14px; }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--hl-border);
  background: var(--hl-surface);
  padding: 56px 24px 32px;
  color: var(--hl-fg-muted);
  font-size: 13.5px;
}
.footer-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 200px repeat(5, minmax(0, 1fr)); gap: 32px;
}
.footer-brand p { margin-top: 12px; color: var(--hl-fg-muted); font-size: 13px; line-height: 1.5; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h2 { font-size: 13px; font-weight: 600; color: var(--hl-fg-strong); margin: 0; }
.footer-col a { color: var(--hl-fg-muted); text-decoration: none; }
.footer-col a:hover { color: var(--hl-fg-strong); }
.footer-col .coming { color: var(--hl-fg-dim); cursor: default; }
.footer-bar {
  max-width: 1200px; margin: 40px auto 0; padding-top: 24px;
  border-top: 1px solid var(--hl-border);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 18px; font-size: 12.5px; }
.theme-toggle {
  display: inline-flex; padding: 3px; border-radius: 999px;
  border: 1px solid var(--hl-border); background: var(--hl-surface-2);
}
.theme-toggle button {
  border: 0; background: transparent; border-radius: 999px; padding: 6px 10px;
  font: 500 12px/1 var(--font-sans); color: var(--hl-fg-muted); cursor: pointer;
}
.theme-toggle button[aria-pressed="true"] { background: var(--hl-surface); color: var(--hl-fg-strong); box-shadow: var(--hl-shadow-sm); }

@media (max-width: 900px) {
  .site-nav .nav-link, .site-nav .nav-github { display: none; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: span 2; }
}
@media (max-width: 640px) {
  .site-header { padding: 0 16px; }
  .site-nav { gap: 10px; }
  main.article { padding: 0 16px; margin-top: 24px; }
  main.article h1 { font-size: 32px; }
  .site-footer { padding: 40px 16px 24px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-brand { grid-column: span 1; }
}
