/* genewrench.de: one page, no web fonts, no scripts, nothing loaded from other sites. */

:root {
  --bg: #fbfaf7;
  --text: #1d1c1f;
  --muted: #5e5c64;          /* the grey of the DNA in the logo */
  --line: #e4e1da;
  --card: #ffffff;
  --red: #c01c28;            /* the red of the logo */
  --teal: #00957c;           /* the logo's teal (#00bd9d), darkened for text contrast */
  --link: #a3141f;
  --plate: transparent;
  --warn-bg: #fdf0ef;
  --warn-line: #f1c9c6;
  --red-text: #a3141f;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17161a;
    --text: #ecebe8;
    --muted: #a9a6ad;
    --line: #2e2c33;
    --card: #201f24;
    --teal: #3fd4b8;
    --link: #ff7a83;
    --warn-bg: #2c1a1c;
    --warn-line: #57292d;
    --red-text: #ff8a92;
    --plate: #f4f2ee;          /* the logo is dark on transparent: give it a light plate */
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 var(--sans);
}

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

.hero, main, footer {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ---------- hero ---------- */

.hero { padding-top: 4.5rem; padding-bottom: 1rem; text-align: center; }

.logo-plate {
  display: inline-block;
  background: var(--plate);
  border-radius: 18px;
  padding: 0.75rem 1rem;
}

.logo { display: block; width: min(100%, 34rem); height: auto; }

h1 {
  font: 600 clamp(1.7rem, 4.6vw, 2.6rem)/1.2 var(--serif);
  letter-spacing: -0.01em;
  margin: 2.25rem auto 1.25rem;
  max-width: 30rem;
  text-wrap: balance;
}

.lead {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 38rem;
  margin: 0 auto;
  text-wrap: pretty;
}

/* ---------- sections ---------- */

section { padding: 3.25rem 0 0; }

h2 {
  font: 600 1.45rem/1.3 var(--serif);
  margin: 0 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* a short double-strand of red and teal before each heading, after the logo's helix */
h2::before {
  content: "";
  flex: none;
  width: 1.6rem;
  height: 0.5rem;
  border-top: 2px solid var(--red);
  border-bottom: 2px solid var(--teal);
}

p { margin: 0 0 1rem; }

/* ---------- bug warning ---------- */

.warning {
  margin-top: 3rem;
  padding: 1.25rem 1.5rem 0.4rem;
  border: 1px solid var(--warn-line);
  border-left: 6px solid var(--red);
  border-radius: 12px;
  background: var(--warn-bg);
}
.warning h2 { margin-bottom: 0.6rem; color: var(--red-text); }
.warning h2::before { display: none; }
.warning p { font-size: 1.05rem; }

/* ---------- downloads ---------- */

.downloads {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.dl {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1rem 1.1rem;
}

.os { font-weight: 600; }
.detail { font-size: 0.84rem; color: var(--muted); line-height: 1.4; flex: 1; }
.files { display: flex; gap: 0.5rem; margin-top: 0.8rem; }

.btn {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}
.btn:hover { background: var(--red); color: #fff; }

.download-note { font-size: 0.88rem; color: var(--muted); margin-top: 0.9rem; }

/* ---------- credits ---------- */

.credits { margin-top: 1.75rem; display: grid; gap: 1.75rem; }

.credit-group h3 {
  font: 600 0.8rem/1.4 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0;
}

.credit-group .note { font-size: 0.88rem; color: var(--muted); margin: 0.1rem 0 0.6rem; }

.credit-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  column-gap: 1.5rem;
}

.credit-group li {
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.93rem;
  line-height: 1.45;
}

.credit-group li a { font-weight: 600; text-decoration: none; color: var(--text); }
.credit-group li a:hover { color: var(--link); text-decoration: underline; }
.lic { font-size: 0.78rem; color: var(--teal); margin-left: 0.25rem; }
.use { color: var(--muted); }

/* ---------- history and footer ---------- */

#history p { text-wrap: pretty; }

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}
footer a { color: inherit; }

/* ---------- Impressum and privacy pages ---------- */

.legal { padding-top: 2.5rem; padding-bottom: 4rem; }
.legal h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); margin: 1.5rem 0 0.25rem; max-width: none; }
.legal h2 { font-size: 1.15rem; margin: 2rem 0 0.6rem; }
.legal .subtitle, .legal .back { color: var(--muted); font-size: 0.92rem; }
.legal .back a { text-decoration: none; }
.legal hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0 1rem; }
.legal-links { margin-top: 3rem; font-size: 0.92rem; }

/* a detail still to be filled in */
mark.todo { background: #fff1a8; color: #4a3b00; padding: 0 0.25em; border-radius: 3px; }

@media (max-width: 44rem) {
  .downloads { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 30rem) {
  body { font-size: 16px; }
  .hero { padding-top: 2.5rem; }
}
