/* ========================================================================
   Maximilian Wiesenfeld - Autorenseite
   Ruhig, seriös, essayistisch. Georgia-Serif, warme Creme-Palette.
   ======================================================================== */

:root {
  --bg: #fbf8f4;
  --ink: #2a2a2a;
  --muted: #6b6b6b;
  --soft: #a09286;
  --accent: #8a5a44;
  --accent-dark: #6b4533;
  --line: #e6ddd2;
  --line-soft: #f0e9df;
  --card: #ffffff;
  --radius: 3px;
  --max: 960px;
  --max-narrow: 720px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: Georgia, "Cambria", "Times New Roman", serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }

h1, h2, h3, h4 { font-weight: normal; color: var(--ink); line-height: 1.3; }
h1 { font-size: 2rem; margin-bottom: 1.5rem; }
h2 { font-size: 1.5rem; margin: 2.5rem 0 1rem; color: var(--accent-dark); }
h3 { font-size: 1.2rem; margin: 1.5rem 0 0.5rem; }

p { margin-bottom: 1.25rem; }

blockquote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem;
  font-style: italic;
  color: var(--ink);
  background: var(--card);
  margin: 1.5rem 0;
}

em { color: var(--ink); }

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

/* ----- Header ----- */

header {
  border-bottom: 1px solid var(--line);
  background: var(--card);
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand {
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}
.brand a { color: var(--ink); }
.brand a:hover { color: var(--accent); text-decoration: none; }

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

nav a {
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
nav a:hover { color: var(--accent); text-decoration: none; }
nav a.active { color: var(--ink); border-bottom: 1px solid var(--accent); padding-bottom: 2px; }

/* ----- Main Container ----- */

main {
  max-width: var(--max-narrow);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

main.blog-index, main.books-page { max-width: var(--max); }

/* ----- Hero (Startseite) ----- */

.hero {
  text-align: center;
  padding: 4rem 1.5rem 2.5rem;
  max-width: var(--max-narrow);
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  letter-spacing: 0.01em;
}

.portrait {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 1.25rem;
  border: 4px solid var(--card);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.hero .tagline {
  color: var(--muted);
  font-style: italic;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.hero blockquote {
  max-width: 560px;
  margin: 2.5rem auto;
  padding: 1.5rem 2rem;
  text-align: left;
}

.cta {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background: var(--accent);
  color: #fff !important;
  border-radius: var(--radius);
  margin-top: 0.5rem;
  letter-spacing: 0.03em;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.cta:hover { background: var(--accent-dark); text-decoration: none; }

.cta-secondary {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: var(--radius);
  font-size: 0.95rem;
}
.cta-secondary:hover { background: var(--accent); color: #fff; text-decoration: none; }

.more-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-style: italic;
  color: var(--accent);
}

/* ----- Recent posts on homepage ----- */

.recent-posts .post {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.recent-posts .post:last-child { border-bottom: none; }
.recent-posts .date {
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
  margin-bottom: 0.2rem;
}
.recent-posts h3 {
  margin: 0.15rem 0 0.35rem;
  font-size: 1.2rem;
}
.recent-posts h3 a { color: var(--ink); }
.recent-posts h3 a:hover { color: var(--accent); text-decoration: none; }
.recent-posts .excerpt { color: var(--muted); margin: 0; }

/* ----- Book section on homepage ----- */

.book-section {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.book {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  margin-top: 1.5rem;
  background: var(--card);
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.book-cover {
  width: 180px;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.book-info { flex: 1; }
.book-title { font-size: 1.3rem; margin: 0 0 0.3rem; }
.book-subtitle { color: var(--muted); font-size: 0.95rem; margin-bottom: 1rem; }
.book-description { color: var(--muted); margin-bottom: 1.5rem; }
.book-buy-label { font-size: 0.9rem; color: var(--muted); margin-bottom: 0.75rem; }

.retailers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.retailer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  height: 56px;
  padding: 0 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.retailer:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  transform: translateY(-2px);
  text-decoration: none;
}
.retailer > span { display: none; }
.retailer-logo { max-height: 32px; max-width: 120px; object-fit: contain; }

/* ----- Newsletter teaser ----- */

.newsletter-teaser {
  margin-top: 4rem;
  padding: 2.5rem 2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.newsletter-teaser h2 { margin-top: 0; }
.newsletter-teaser p { color: var(--muted); margin-bottom: 1.5rem; }

/* ----- Blog index ----- */

.blog-index .lede {
  font-size: 1.1rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 2.5rem;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.post-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}
.post-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.06); transform: translateY(-2px); }

.post-card-img {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}
.post-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.post-card-img:hover img { transform: scale(1.03); }

.post-card-body { padding: 1.25rem 1.5rem 1.5rem; flex: 1; display: flex; flex-direction: column; }
.post-card-body .date { color: var(--muted); font-size: 0.85rem; font-style: italic; margin-bottom: 0.3rem; }
.post-card-body h2 { margin: 0.1rem 0 0.6rem; font-size: 1.3rem; line-height: 1.3; color: var(--ink); }
.post-card-body h2 a { color: var(--ink); }
.post-card-body h2 a:hover { color: var(--accent); text-decoration: none; }
.post-card-body .excerpt { color: var(--muted); font-size: 0.97rem; margin: 0 0 1rem; flex: 1; }

.tag, .tags .tag {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--soft);
  text-transform: lowercase;
  letter-spacing: 0.02em;
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
  font-style: normal;
}
.tag:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

/* ----- Post Full ----- */

.post-full { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 0 auto 3rem; }

.post-hero { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; }
.post-hero img { width: 100%; height: 100%; object-fit: cover; }

.post-body { padding: 2.5rem 2.5rem 3rem; }
.post-body .date { color: var(--muted); font-size: 0.9rem; font-style: italic; margin-bottom: 0.5rem; }
.post-body h1 { margin-bottom: 2rem; font-size: 2rem; }
.post-body p { margin-bottom: 1.1rem; }
.post-body h2 { margin: 2rem 0 1rem; font-size: 1.35rem; color: var(--accent-dark); }
.post-body h3 { margin: 1.5rem 0 0.5rem; }

.post-tags { margin-top: 2.5rem; }
.post-tags .tag { margin-right: 0.4rem; }

.post-pager {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.95rem;
}
.post-pager a { color: var(--muted); max-width: 45%; }
.post-pager a:hover { color: var(--accent); }
.post-pager .prev { text-align: left; }
.post-pager .next { text-align: right; margin-left: auto; }

.back-link { margin-top: 1.5rem; font-size: 0.95rem; }
.back-link a { color: var(--muted); }
.back-link a:hover { color: var(--accent); }

/* ----- Buchempfehlung innerhalb eines Posts ----- */

.book-recommendation {
  margin: 3rem 0 1.5rem;
  padding: 1.75rem;
  background: var(--line-soft);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
}

.book-rec-label {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--soft);
  margin-bottom: 0.75rem;
}

.book-rec-inner {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
.book-rec-cover {
  width: 90px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.book-rec-inner h3 { margin: 0 0 0.15rem; font-size: 1.1rem; color: var(--ink); }
.book-rec-author { color: var(--muted); font-size: 0.9rem; font-style: italic; margin-bottom: 0.6rem; }
.book-rec-text { color: var(--ink); font-size: 0.95rem; margin-bottom: 0.75rem; }
.book-rec-link { font-size: 0.9rem; color: var(--accent); font-weight: 500; }

.affiliate-note {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--soft);
  font-style: italic;
}

/* ----- Buch-Shop ----- */

.books-page .lede {
  font-size: 1.1rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 2rem;
  max-width: 640px;
}

.category-nav {
  margin: 1rem 0 3rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.category-nav a { color: var(--muted); margin-right: 0.25rem; }
.category-nav a:hover { color: var(--accent); }

.book-category { margin-bottom: 3.5rem; }
.book-category h2 { margin-top: 0; }
.category-desc { color: var(--muted); font-style: italic; margin-bottom: 1.5rem; max-width: 640px; }

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
}

.book-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}
.book-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.08); transform: translateY(-2px); }

.book-card-cover {
  display: block;
  padding: 1.5rem 1.5rem 0;
  text-align: center;
}
.book-card-cover img {
  max-height: 240px;
  width: auto;
  margin: 0 auto;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.cover-placeholder {
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, var(--line-soft), var(--line));
  color: var(--soft);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  font-style: italic;
  font-size: 0.95rem;
  max-width: 160px;
  margin: 0 auto;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.book-card-body { padding: 1.25rem 1.5rem 1.5rem; flex: 1; display: flex; flex-direction: column; }
.book-card-body h3 { margin: 0.5rem 0 0.25rem; font-size: 1.1rem; line-height: 1.3; }
.book-card-body h3 a { color: var(--ink); }
.book-card-body h3 a:hover { color: var(--accent); text-decoration: none; }
.book-card-subtitle { color: var(--muted); font-size: 0.85rem; font-style: italic; margin-bottom: 0.3rem; }
.book-card-author { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.75rem; }
.book-card-recommendation { color: var(--ink); font-size: 0.9rem; margin-bottom: 1rem; flex: 1; }
.book-card-link { font-size: 0.9rem; color: var(--accent); }

.affiliate-note-page {
  margin-top: 3rem;
  padding: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  text-align: center;
  border-top: 1px solid var(--line);
}

/* ----- Einzelne Buchseite ----- */

.book-page { max-width: var(--max-narrow); }
.book-detail {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  background: var(--card);
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 1rem;
}
.book-detail-cover { flex-shrink: 0; width: 200px; }
.book-detail-cover img { box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.book-detail-body { flex: 1; }
.book-detail-body h1 { margin-bottom: 0.3rem; }
.book-detail-subtitle { color: var(--muted); font-size: 1rem; font-style: italic; margin-bottom: 0.6rem; }
.book-detail-author { color: var(--muted); margin-bottom: 1.5rem; }
.book-detail-recommendation { margin-bottom: 2rem; }
.book-detail-recommendation p { color: var(--ink); margin-bottom: 1rem; }

/* ----- Newsletter-Seite ----- */

.newsletter-page .lede {
  font-size: 1.1rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 2rem;
}

.newsletter-form {
  background: var(--card);
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 2rem 0;
}
.newsletter-form label {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.newsletter-form input[type="email"] {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit;
  background: var(--bg);
  color: var(--ink);
  margin-bottom: 1rem;
}
.newsletter-form input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
}
.newsletter-form .cta { border: none; }
.form-note { font-size: 0.85rem; color: var(--muted); margin-top: 1rem; margin-bottom: 0; }

.newsletter-what { margin-top: 3rem; }
.newsletter-what ul { margin-left: 1.25rem; color: var(--muted); }
.newsletter-what li { margin-bottom: 0.4rem; }

/* ----- Kontakt ----- */

.contact-info {
  background: var(--card);
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 2rem 0;
}

/* ----- Legal Pages ----- */

.legal-page h2 { font-size: 1.2rem; margin-top: 2rem; }
.legal-page p { color: var(--ink); }
.placeholder-note {
  background: #fff6e0;
  border: 1px solid #e6c77a;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

/* ----- Footer ----- */

footer {
  border-top: 1px solid var(--line);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 5rem;
  background: var(--card);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-nav { display: flex; gap: 1.5rem; }
.footer-nav a { color: var(--muted); font-size: 0.9rem; }
.footer-nav a:hover { color: var(--accent); }

/* ----- 404 Error ----- */

.error-page { text-align: center; padding: 4rem 1.5rem; }

/* ----- Responsive ----- */

@media (max-width: 720px) {
  body { font-size: 17px; }
  main { padding: 2rem 1.25rem; }
  .hero { padding: 3rem 1.25rem 2rem; }
  .hero h1 { font-size: 1.9rem; }
  .portrait { width: 140px; height: 140px; }
  .nav { flex-direction: column; text-align: center; }
  nav ul { gap: 1rem; justify-content: center; }
  .book { flex-direction: column; align-items: center; text-align: center; padding: 1.5rem; }
  .book-cover { width: 160px; }
  .retailers { justify-content: center; }
  .book-detail { flex-direction: column; align-items: center; text-align: center; }
  .book-rec-inner { flex-direction: column; align-items: center; text-align: center; }
  .book-rec-cover { width: 100px; }
  .post-body { padding: 2rem 1.5rem; }
  .post-body h1 { font-size: 1.6rem; }
  .footer-inner { flex-direction: column; }
  .posts-grid, .books-grid { grid-template-columns: 1fr; }
}
