/* ── Reset & base ─────────────────────────────────────────── */

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

:root {
  --bg:         #f9f7f4;
  --fg:         #2c2c2c;
  --muted:      #7a7570;
  --accent:     #3d6b4f;
  --accent-hover: #2e5239;
  --border:     #e0dbd4;
  --term-bg:    #1e1e1e;
  --term-fg:    #d4d0c8;
  --term-dim:   #7a7570;
  --term-cursor:#a8c49a;
  --font-body:  "Georgia", "Times New Roman", serif;
  --font-ui:    system-ui, -apple-system, sans-serif;
  --font-mono:  "Courier New", "Courier", monospace;
  --max-width:  680px;
  --wide:       900px;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Typography ───────────────────────────────────────────── */

h1 { font-size: 2rem;   line-height: 1.2; margin-bottom: 0.5rem; }
h2 { font-size: 1.3rem; line-height: 1.3; margin: 2.5rem 0 0.75rem; font-family: var(--font-ui); font-weight: 600; }
h3 { font-size: 1.1rem; margin: 2rem 0 0.5rem; font-family: var(--font-ui); }

p  { margin-bottom: 1.2rem; }

a  { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

ul, ol { margin: 0 0 1.2rem 1.5rem; }
li { margin-bottom: 0.4rem; }

code, pre {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: #edeae5;
  border-radius: 3px;
}

code { padding: 0.1em 0.4em; }

pre {
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border-left: 3px solid var(--border);
  background: #edebe7;
}

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

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ── Layout ───────────────────────────────────────────────── */

header {
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
}

nav {
  max-width: var(--wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
}

.site-title {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--fg);
}

nav ul {
  list-style: none;
  margin: 0;
  display: flex;
  gap: 2rem;
}

nav ul a {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--muted);
}

nav ul a:hover,
nav ul a.active {
  color: var(--fg);
}

main {
  flex: 1;
}

footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--muted);
}

footer a { color: var(--muted); }

/* ── Home page ────────────────────────────────────────────── */

.home {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
}

.hero {
  text-align: center;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: 3rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.tagline {
  font-size: 1.2rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 0;
}

.hero-body {
  max-width: var(--max-width);
  margin: 0 auto 3rem;
  text-align: center;
  font-size: 1.05rem;
  color: var(--fg);
}

.hero-body a {
  font-family: var(--font-ui);
  font-size: 0.9rem;
}

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

.screenshots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 0 auto 3rem;
  max-width: 900px;
}

.screenshot {
  margin: 0;
}

.screenshot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.13);
  border: 1px solid var(--border);
}

.screenshot figcaption {
  margin-top: 0.6rem;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  font-style: italic;
}

@media (max-width: 600px) {
  .screenshots {
    grid-template-columns: 1fr;
  }
}

/* ── Download buttons ─────────────────────────────────────── */

.platforms {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.download-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 0.65rem 1.4rem;
  border-radius: 4px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  transition: background 0.15s;
}

.download-btn:hover {
  background: var(--accent-hover);
  color: #fff;
}

/* ── Inner pages ──────────────────────────────────────────── */

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
}

.page h1 {
  margin-bottom: 2rem;
}

/* ── Donation ─────────────────────────────────────────────── */

.pwyw-nudge {
  text-align: center;
  margin-top: 2.5rem;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--muted);
}

.pwyw-nudge a {
  color: var(--muted);
}

.donate-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 2.5rem 0;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f4f1ec;
}

.qr-wrap img {
  display: block;
  width: 180px;
  height: 180px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
}

.qr-label {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

.paypal-btn {
  display: inline-block;
  background: #0070ba;
  color: #fff;
  text-decoration: none;
  padding: 0.6rem 1.4rem;
  border-radius: 4px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  transition: background 0.15s;
}

.paypal-btn:hover {
  background: #005ea6;
  color: #fff;
}

/* ── Tutorial page ────────────────────────────────────────── */

.toc {
  background: #f4f1ec;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 2rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.3rem;
  font-family: var(--font-ui);
  font-size: 0.92rem;
}

.toc li {
  margin-bottom: 0.3rem;
}

.toc a {
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

.page h3 {
  font-style: italic;
}

kbd {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  background: #edeae5;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 3px;
  padding: 0.05em 0.45em;
}

.page ol {
  margin-left: 1.4rem;
}

/* ── Announcement teaser ──────────────────────────────────── */

.launch-badge {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  margin-bottom: 1rem;
}

.teaser-features {
  max-width: var(--max-width);
  margin: 0 auto 3rem;
}

.teaser-features ul {
  margin-left: 0;
}

.countdown-box {
  text-align: center;
  margin: 0 auto 3rem;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f4f1ec;
  max-width: 420px;
}

.countdown-box p {
  margin-bottom: 0.3rem;
  font-family: var(--font-ui);
  color: var(--muted);
  font-size: 0.9rem;
}

.countdown-date {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--fg);
  font-family: var(--font-ui);
  letter-spacing: -0.01em;
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 600px) {
  html { font-size: 16px; }
  .hero h1 { font-size: 2.2rem; }
  nav ul { gap: 1.2rem; }
  .platforms { flex-direction: column; align-items: center; }
  .download-btn { width: 100%; max-width: 280px; text-align: center; }
}
