/* LoudenBooks — Design System */
/* Typography: Playfair Display (display), Source Serif 4 (body), JetBrains Mono (labels) */

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

:root {
  --bg: #faf8f4;
  --text: #1a1a1a;
  --text-secondary: #555;
  --text-muted: #888;
  --border: #e0ddd8;
  --surface: #f3f1ec;
  --accent-navy: #162667;
  --accent-gold: #F4C53D;
  --link: #162667;
  --link-hover: #0f1a47;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --page-max: 760px;
  --pad: 24px;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; transition: color .15s; }
a:hover { color: var(--link-hover); text-decoration: underline; }

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

.wrap { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--pad); }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.site-brand {
  font-family: var(--font-display);
  font-size: clamp(18px, 3.5vw, 22px);
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.site-brand:hover { color: var(--text); text-decoration: none; }

.site-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-nav a {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}
.site-nav a:hover { color: var(--text); text-decoration: none; }

/* Hero */
.hero {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border);
}
.hero-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 6vw, 42px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.hero-subtitle {
  font-size: clamp(16px, 2.5vw, 19px);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 600px;
}

/* Section */
.section {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}
.section:last-of-type { border-bottom: none; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.section p { margin-bottom: 16px; }

/* Book card */
.book-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  margin: 24px 0;
}
.book-title {
  font-family: var(--font-display);
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 700;
  font-style: italic;
  margin-bottom: 8px;
}
.book-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.book-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.book-link {
  font-family: var(--font-mono);
  font-size: 12px;
  margin-top: 12px;
  display: inline-block;
}

/* Page content */
.page-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 700;
  margin: 32px 0 8px;
  letter-spacing: -0.02em;
}
.page-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.page-content h2 {
  font-family: var(--font-display);
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 700;
  margin: 32px 0 12px;
}
.page-content p { margin-bottom: 16px; }
.page-content ul, .page-content ol {
  margin: 0 0 16px 24px;
}
.page-content li { margin-bottom: 8px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  margin-top: 48px;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
.footer-links { display: flex; gap: 16px; }
.footer-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* 404 */
.error-page {
  text-align: center;
  padding: 80px 20px;
}
.error-code {
  font-family: var(--font-display);
  font-size: clamp(48px, 10vw, 72px);
  font-weight: 900;
  color: var(--accent-navy);
  line-height: 1;
  margin-bottom: 8px;
}
.error-message {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

@media (max-width: 600px) {
  :root { --pad: 16px; }
  .site-nav { gap: 12px; }
  .site-nav a { font-size: 11px; }
  .site-footer .wrap { flex-direction: column; text-align: center; }
}
