/* Moritz and Musil: the web site's stylesheet (no build step, system fonts only) */

:root {
  color-scheme: light dark;
  --paper: #fbfaf6;
  --paper-2: #f2efe7;
  --ink: #1c1d22;
  --ink-2: #4a4c55;
  --ink-3: #6e707a;
  --rule: #dcd8cc;
  --accent: #a8461b;
  --accent-ink: #ffffff;
  --accent-soft: #f3e3d6;
  --code-bg: #efece3;
  --shot-border: #cfcabd;
  --shadow: 0 1px 2px rgba(20, 20, 30, 0.08), 0 8px 24px rgba(20, 20, 30, 0.08);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --text-w: 42rem;
  --wide-w: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14161c;
    --paper-2: #1b1e26;
    --ink: #e6e6ea;
    --ink-2: #b7b9c2;
    --ink-3: #8b8e99;
    --rule: #2e323d;
    --accent: #f0a85a;
    --accent-ink: #1a1208;
    --accent-soft: #2c241b;
    --code-bg: #1f222b;
    --shot-border: #343846;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

code, pre { font-family: var(--mono); font-size: 0.9em; }
code { background: var(--code-bg); padding: 0.08em 0.32em; border-radius: 4px; }
pre {
  background: var(--code-bg);
  padding: 0.9rem 1.1rem;
  border-radius: 6px;
  overflow-x: auto;
  line-height: 1.5;
  font-size: 0.875rem;
}
pre code { background: none; padding: 0; font-size: inherit; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; letter-spacing: 0.005em; }
h2 { font-size: 1.75rem; margin: 0 0 1rem; }
h3 { font-size: 1.2rem; margin: 0 0 0.4rem; }

.wrap { max-width: var(--wide-w); margin: 0 auto; padding: 0 1rem; }
.prose { max-width: var(--text-w); }
.wrap.prose { max-width: var(--wide-w); }
.wrap.prose > * { max-width: var(--text-w); }
.wrap.prose > .downloads { max-width: var(--wide-w); }

/* the header */
.masthead { border-bottom: 1px solid var(--rule); background: var(--paper-2); }
.masthead .wrap { padding-top: 2.5rem; padding-bottom: 2.25rem; }
.brand { display: flex; align-items: center; gap: 1.25rem; }
.brand img { width: 88px; height: 88px; flex: none; }
.brand h1 { font-size: 3rem; margin: 0; letter-spacing: 0.01em; }
.tagline { font-family: var(--serif); font-size: 1.3rem; line-height: 1.45; color: var(--ink-2); max-width: 40rem; margin: 1.25rem 0 1.5rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.button {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--accent);
}
.button.primary { background: var(--accent); color: var(--accent-ink); }
.button.secondary { color: var(--accent); background: transparent; }
.button:hover { filter: brightness(1.08); }
.meta { color: var(--ink-3); font-size: 0.9rem; margin: 1rem 0 0; }

nav.sections { border-bottom: 1px solid var(--rule); font-size: 0.92rem; }
nav.sections ul { list-style: none; margin: 0; padding: 0.6rem 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
nav.sections a { color: var(--ink-2); text-decoration: none; }
nav.sections a:hover { color: var(--accent); }

/* sections */
section { padding: 3rem 0; border-bottom: 1px solid var(--rule); }
section:last-of-type { border-bottom: none; }
.lead { font-family: var(--serif); font-size: 1.2rem; line-height: 1.55; }

.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 1.75rem 2.25rem; }
.feature p { margin: 0; color: var(--ink-2); font-size: 0.98rem; }
.feature.wide { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 0 2.25rem; align-items: start; }
.feature.wide > * { min-width: 0; }
.feature.wide pre { margin: 0.6rem 0 0; }
.feature h3 { padding-top: 0.6rem; border-top: 2px solid var(--accent); display: inline-block; }

/* screenshots */
.shots { display: grid; gap: 2.5rem; }
figure { margin: 0; }
figure a { display: block; }
figure img {
  border: 1px solid var(--shot-border);
  border-radius: 6px;
  box-shadow: var(--shadow);
  background: #24262c;
}
figcaption { margin-top: 0.7rem; color: var(--ink-2); font-size: 0.95rem; max-width: var(--text-w); }
figcaption strong { color: var(--ink); }
.shots .pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: 2.5rem; align-items: start; }

/* downloads */
.downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 1rem; margin: 1.5rem 0; }
.dl {
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  background: var(--paper-2);
}
.dl h3 { margin-bottom: 0.2rem; }
.dl p { margin: 0.2rem 0 0; font-size: 0.92rem; color: var(--ink-2); }
.note { border-left: 3px solid var(--accent); padding: 0.4rem 0 0.4rem 1rem; color: var(--ink-2); background: var(--accent-soft); border-radius: 0 6px 6px 0; }

.doclist { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.9rem; }
.doclist li { padding-left: 0; }
.doclist a { font-weight: 600; }
.doclist span { display: block; color: var(--ink-2); font-size: 0.95rem; }

footer { border-top: 1px solid var(--rule); background: var(--paper-2); color: var(--ink-3); font-size: 0.9rem; }
footer .wrap { padding-top: 1.75rem; padding-bottom: 2rem; }
footer p { margin: 0.3rem 0; }
footer a.author { color: inherit; text-decoration: none; }
footer a.author:hover { text-decoration: underline; }

@media (max-width: 40rem) {
  body { font-size: 1rem; }
  .masthead .wrap { padding-top: 1.75rem; padding-bottom: 1.75rem; }
  .brand { gap: 0.9rem; }
  .brand img { width: 64px; height: 64px; }
  .brand h1 { font-size: 2.2rem; }
  .tagline { font-size: 1.12rem; }
  h2 { font-size: 1.5rem; }
  section { padding: 2.25rem 0; }
}
