/* Shared styles for the marketing site: the landing page (/) and every generated
   documentation page (/docs/). It lives in public/ rather than in src/ because the
   docs pages are written out by build/docsPlugin.ts, OUTSIDE Vite's module graph —
   they cannot import a hashed asset, so both halves of the site link one stable
   /site.css instead. The app itself (/app/) does not use this file; it has Tailwind.

   Colours track the app's own palette (Tailwind neutral + blue-600) so launching it
   does not feel like landing on a different product. */

:root {
  --bg:        #ffffff;
  --bg-soft:   #f5f5f5;
  --bg-sunk:   #ebebeb;
  --fg:        #171717;
  --fg-muted:  #525252;
  --fg-faint:  #737373;
  --line:      #e5e5e5;
  --line-firm: #d4d4d4;
  --accent:    #2563eb;
  --accent-hi: #1d4ed8;
  --accent-fg: #ffffff;
  --accent-wash:#eff6ff;
  --warm:      #b45309;
  --code-bg:   #f5f5f5;
  --shadow:    0 1px 2px rgb(0 0 0 / 0.06), 0 8px 24px -8px rgb(0 0 0 / 0.12);
  --radius:    10px;
  --maxw:      1120px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #0a0a0a;
    --bg-soft:   #171717;
    --bg-sunk:   #111111;
    --fg:        #f5f5f5;
    --fg-muted:  #a3a3a3;
    --fg-faint:  #737373;
    --line:      #262626;
    --line-firm: #404040;
    --accent:    #3b82f6;
    --accent-hi: #60a5fa;
    --accent-fg: #0a0a0a;
    --accent-wash:#172554;
    --warm:      #f59e0b;
    --code-bg:   #171717;
    --shadow:    0 1px 2px rgb(0 0 0 / 0.5), 0 8px 24px -8px rgb(0 0 0 / 0.6);
  }
}

:root[data-theme="dark"] {
  --bg:        #0a0a0a;
  --bg-soft:   #171717;
  --bg-sunk:   #111111;
  --fg:        #f5f5f5;
  --fg-muted:  #a3a3a3;
  --fg-faint:  #737373;
  --line:      #262626;
  --line-firm: #404040;
  --accent:    #3b82f6;
  --accent-hi: #60a5fa;
  --accent-fg: #0a0a0a;
  --accent-wash:#172554;
  --warm:      #f59e0b;
  --code-bg:   #171717;
  --shadow:    0 1px 2px rgb(0 0 0 / 0.5), 0 8px 24px -8px rgb(0 0 0 / 0.6);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* 16px side gutter on phones, per the layout rule the app's panels follow too. */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* ── Site header ─────────────────────────────────────────────────────────── */

.site-head {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex; align-items: center; gap: 20px;
  height: 58px;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 650; font-size: 1.02rem; letter-spacing: -0.01em;
  color: var(--fg); text-decoration: none; flex: none;
}
.brand:hover { text-decoration: none; }
.brand svg { display: block; }
.site-nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.site-nav a { color: var(--fg-muted); font-size: 0.92rem; font-weight: 500; }
.site-nav a:hover { color: var(--fg); text-decoration: none; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 8px;
  font-size: 0.93rem; font-weight: 600; line-height: 1;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hi); color: #fff; }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line-firm); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-lg { padding: 13px 24px; font-size: 1rem; border-radius: 9px; }

@media (max-width: 700px) {
  .site-nav a.nav-hide-sm { display: none; }
  .site-head .wrap { gap: 12px; }
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

.site-foot {
  border-top: 1px solid var(--line);
  margin-top: 72px; padding: 36px 0 48px;
  color: var(--fg-faint); font-size: 0.88rem;
}
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
.site-foot a { color: var(--fg-muted); }
.site-foot .spacer { margin-left: auto; }

/* ── Code ────────────────────────────────────────────────────────────────── */

code, kbd, samp, pre { font-family: var(--mono); }
code {
  background: var(--code-bg); border: 1px solid var(--line);
  padding: 0.1em 0.38em; border-radius: 5px; font-size: 0.875em;
}
pre {
  background: var(--code-bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; overflow-x: auto;
  font-size: 0.875rem; line-height: 1.55;
}
pre code { background: none; border: 0; padding: 0; font-size: inherit; }
