/* translations.codebycarson.com — landing page */

:root {
  --bg: #181a1b;
  --surface: #1e2021;
  --border: #3c4143;
  --text: #e8e6e3;
  --muted: #a7a096;
  --accent: #8eb4f1;
  --accent-hover: #b1cbf5;
  --paper: #111;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color-scheme: dark;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

a { color: var(--accent); }
a:hover, a:focus { color: var(--accent-hover); }

/* ---- header ---- */

.site-header h1 {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.site-header p {
  margin: 0;
  color: var(--muted);
  max-width: 44rem;
}

/* ---- cards ---- */

.books {
  margin: 2.5rem 0 0;
  display: grid;
  gap: 1.5rem;
}

.book {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.book-thumb {
  display: block;
  width: 200px;
  height: auto;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 2px;
}

.book-body { min-width: 0; }

.book-body h2 {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 0.25rem;
}

.book-byline,
.book-progress {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.book-byline { margin-bottom: 0.75rem; }

.book-body p.book-desc {
  margin: 0 0 0.75rem;
}

.book-read {
  display: inline-block;
  margin-top: 1rem;
  text-decoration: none;
  font-weight: 600;
}

.book-read:hover, .book-read:focus { text-decoration: underline; }

/* ---- footer ---- */

.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9375rem;
}

.site-footer p { margin: 0 0 0.25rem; }

/* ---- narrow ---- */

@media (max-width: 600px) {
  .wrap { padding: 2rem 1.5rem; }

  .book {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }

  .book-thumb {
    width: 100%;
    max-width: 200px;
  }
}

/* a card that could not load its data */
.book-error {
  grid-template-columns: minmax(0, 1fr);
  color: var(--muted);
}
