/* MindMap Chat site — deliberately small, dependency-free and self-hosted.
   No CDN fonts or scripts: a page that preaches "nothing leaves your machine"
   must not itself phone out to third parties. */

:root {
  --bg: #ffffff;
  --fg: #14161a;
  --muted: #5b6472;
  --line: #e3e7ee;
  --accent: #2f6feb;
  --accent-fg: #ffffff;
  --card: #f7f9fc;
  --code: #f1f3f7;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216;
    --fg: #e8ebf0;
    --muted: #9aa4b2;
    --line: #262c35;
    --accent: #5b8cff;
    --accent-fg: #0f1216;
    --card: #161b22;
    --code: #1b212a;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
main { max-width: 860px; margin: 0 auto; padding: 0 20px 64px; }
h1 { font-size: 2.1rem; line-height: 1.2; margin: 32px 0 12px; letter-spacing: -0.02em; }
h2 { font-size: 1.4rem; margin: 44px 0 12px; letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; margin: 28px 0 8px; }
p { margin: 0 0 16px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* Nav */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  max-width: 860px; margin: 0 auto; padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 650; color: var(--fg); }
.nav nav { display: flex; gap: 18px; flex-wrap: wrap; }
.nav nav a { color: var(--muted); font-size: 0.95rem; }

/* Hero */
.lede { font-size: 1.2rem; color: var(--muted); margin-bottom: 28px; }
.hero-note { font-size: 0.95rem; color: var(--muted); }

/* Buttons */
.btn {
  display: inline-block; padding: 11px 18px; border-radius: 8px;
  background: var(--accent); color: var(--accent-fg);
  font-weight: 600; border: 1px solid transparent;
}
.btn:hover { text-decoration: none; opacity: 0.92; }
.btn.secondary { background: transparent; color: var(--fg); border-color: var(--line); }

/* Download grid */
.downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 20px 0; }
.dl {
  display: block; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--card); color: var(--fg);
}
.dl:hover { border-color: var(--accent); text-decoration: none; }
.dl b { display: block; }
.dl span { color: var(--muted); font-size: 0.85rem; }

/* Tables scroll rather than breaking the page on mobile */
.table-wrap { overflow-x: auto; margin: 16px 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 650; }

/* Cards / callouts */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin: 20px 0; }
.card h3 { margin-top: 0; }

ul { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 6px; }

code { background: var(--code); padding: 2px 6px; border-radius: 5px; font-size: 0.9em; }
pre {
  background: var(--code); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px; overflow-x: auto; font-size: 0.85rem; line-height: 1.5;
}
pre code { background: none; padding: 0; }

img { max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }

/* ── Screenshots ────────────────────────────────────────────────────────────
   Captured from the running app by "Capture screenshots" and published by
   Build-Site, so what the page shows is always the app that ships. */

.shot { display: block; }
.shot:hover { text-decoration: none; }
.shot img { display: block; width: 100%; box-shadow: 0 6px 24px rgb(0 0 0 / 0.10); }
.shot:hover img { border-color: var(--accent); }

/* Hero: the product, before any prose describing it. */
.hero-shot { margin: 32px 0 8px; }

/* Feature bands. Text and picture side by side on a wide screen, stacked on a phone
   (where the image goes first — the screenshot is the point, the copy explains it). */
.band {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 28px; align-items: center; margin: 48px 0;
}
.band-text h2 { margin-top: 0; }
.band-text p { margin-bottom: 0; color: var(--muted); }
.band.reverse .band-text { order: 2; }
.band.reverse .band-shot { order: 1; }
@media (max-width: 720px) {
  .band { grid-template-columns: 1fr; gap: 16px; margin: 36px 0; }
  .band .band-text, .band .band-shot { order: initial; }
  .band .band-shot { order: -1; }
}

/* Gallery grid */
.gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px; margin: 20px 0 8px;
}
.gallery .shot span {
  display: block; margin-top: 7px;
  color: var(--muted); font-size: 0.85rem; line-height: 1.4;
}

/* Lightbox */
#lightbox[hidden] { display: none; }
#lightbox {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgb(0 0 0 / 0.82);
}
#lightbox figure { margin: 0; max-width: 1200px; width: 100%; }
#lightbox img { width: 100%; max-height: 82vh; object-fit: contain; border-color: transparent; }
#lightbox figcaption {
  margin-top: 12px; text-align: center;
  color: #e8ebf0; font-size: 0.95rem;
}
#lightbox-close {
  position: absolute; top: 14px; right: 18px;
  background: none; border: 0; cursor: pointer;
  color: #e8ebf0; font-size: 2.2rem; line-height: 1;
}
#lightbox-close:hover { opacity: 0.75; }

footer {
  max-width: 860px; margin: 0 auto; padding: 28px 20px 48px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem;
}
footer a { color: var(--muted); }
