/* joaxclaw.ai — hand-written, no build step, no framework. Palette matches the app
   (--bg-primary #0f1117, --accent #6366f1) and follows the visitor's colour scheme. */

:root {
  --bg: #0f1117;
  --surface: #161923;
  --border: #262a36;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #6366f1;
  --accent-fg: #ffffff;
  --radius: 10px;
  --maxw: 1040px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --surface: #f6f7fb;
    --border: #e2e6ef;
    --text: #1a1d29;
    --muted: #5b6478;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.02em; }

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
}

pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  /* Wrap rather than clip: the install commands are longer than a phone is wide, and a
     command the reader can't see the end of is worse than one that takes two lines. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

pre code { background: none; padding: 0; }

code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
}

/* ── Nav ─────────────────────────────────────────────────────────────────── */

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 650;
  color: var(--text);
  font-size: 17px;
}

.brand img { border-radius: 6px; }

.nav nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-left: auto;
  font-size: 15px;
}

.nav nav a { color: var(--muted); }
.nav nav a:hover { color: var(--text); text-decoration: none; }

/* ── Sections ────────────────────────────────────────────────────────────── */

main { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

section { padding: 56px 0; border-top: 1px solid var(--border); }
section:first-child { border-top: none; }

section > h2 {
  font-size: 28px;
  margin: 0 0 28px;
}

.hero { text-align: center; padding: 56px 0 64px; }

.hero-logo { margin-bottom: 20px; }

.hero h1 {
  font-size: clamp(32px, 6vw, 52px);
  margin: 0 0 18px;
  background: linear-gradient(180deg, var(--text), color-mix(in srgb, var(--text) 62%, var(--accent)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: 18px;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 32px;
}

.lede.narrow { max-width: 560px; margin-bottom: 24px; }

.cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0 0 18px;
}

.btn {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-weight: 550;
  font-size: 15px;
}

.btn:hover { text-decoration: none; border-color: var(--accent); }

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}

.btn.primary:hover { filter: brightness(1.1); }

.btn .meta { font-size: 12px; opacity: 0.75; font-weight: 400; }

.fineprint { font-size: 13px; color: var(--muted); text-align: center; }

.note { color: var(--muted); font-size: 15px; }

/* ── Screenshots ─────────────────────────────────────────────────────────── */

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.shots figure { margin: 0; }

.shots img {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: block;
}

.shots figcaption {
  font-size: 13px;
  color: var(--muted);
  padding-top: 8px;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.grid article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.grid h3 { margin: 0 0 8px; font-size: 17px; }
.grid p { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.grid p:last-child { margin-bottom: 0; }

/* ── Document pages (changelog, privacy) ─────────────────────────────────── */

.doc { padding: 40px 0 64px; border: none; }
.doc h1 { font-size: 34px; margin: 0 0 28px; }
.doc h2 { font-size: 22px; margin: 40px 0 10px; padding-top: 20px; border-top: 1px solid var(--border); }
.doc h3 { font-size: 16px; margin: 22px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 10px; }
.doc hr { display: none; }
.doc p, .doc li { color: var(--text); }

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

footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 20px 48px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 14px;
}

footer p { margin: 6px 0; }
footer a { color: var(--muted); }
footer a:hover { color: var(--accent); }
