/* ============================================================
   autorenmagazin.de — main.css
   Mobile-First Editorial-Layout, DSGVO-tight (System-Fonts)
   ============================================================ */

:root {
  /* Farben */
  --bg: #fafaf7;
  --bg-card: #ffffff;
  --bg-soft: #f0eef0;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --accent: #6d3ac7;
  --accent-soft: #f1ebfa;
  --rule: #e5e7eb;
  --pr-tint: #fff8e6;
  --pr-border: #f0c674;

  /* Typografie */
  --font-serif: "Iowan Old Style", "Apple Garamond", Georgia, Baskerville, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Spacing — 8-Punkt-Grid */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-6: 1.5rem;
  --s-8: 2rem;
  --s-12: 3rem;
  --s-16: 4rem;
  --s-24: 6rem;

  /* Container */
  --measure-text: 38rem;
  --measure-wide: 68rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Typografie */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 var(--s-4);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.125rem); margin-top: var(--s-12); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); margin-top: var(--s-8); }
p { margin: 0 0 var(--s-4); }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

/* Layout-Bausteine */
.container { max-width: var(--measure-wide); margin: 0 auto; padding: 0 var(--s-4); }
.prose { max-width: var(--measure-text); margin: 0 auto; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--bg-card);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(150%) blur(8px);
  background: rgba(255,255,255,0.92);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: var(--s-4);
}
.brand {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}
.brand .dot { color: var(--accent); }
nav.primary {
  display: none;
}
nav.primary a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  padding: var(--s-2) var(--s-3);
  border-radius: 4px;
}
nav.primary a:hover { background: var(--bg-soft); }
.menu-toggle {
  background: none;
  border: 1px solid var(--rule);
  padding: var(--s-2) var(--s-3);
  border-radius: 4px;
  font: inherit;
  cursor: pointer;
  min-height: 44px;
}
@media (min-width: 960px) {
  nav.primary { display: flex; gap: var(--s-1); }
  .menu-toggle { display: none; }
}

/* Mobile-Menu (Detail/Summary-Fallback) */
.mobile-menu { display: block; padding: 0 var(--s-4) var(--s-4); border-bottom: 1px solid var(--rule); background: var(--bg-card); }
.mobile-menu[hidden] { display: none; }
.mobile-menu a {
  display: block;
  padding: var(--s-3) 0;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  min-height: 44px;
}
@media (min-width: 960px) { .mobile-menu { display: none !important; } }

/* Hero (Startseite) */
.hero {
  padding: var(--s-16) 0 var(--s-12);
  text-align: center;
}
.hero h1 { max-width: 22ch; margin-left: auto; margin-right: auto; }
.hero .lead {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  color: var(--text-muted);
  max-width: 38rem;
  margin: 0 auto;
}

/* Rubriken-Grid */
.rubriken {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: 1fr;
  margin: var(--s-12) 0 var(--s-16);
}
@media (min-width: 640px) { .rubriken { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .rubriken { grid-template-columns: repeat(3, 1fr); } }
.rubrik-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  min-height: 44px;
  overflow: hidden;
}
.rubrik-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(109, 58, 199, 0.12); }
.rubrik-card .image-wrap {
  aspect-ratio: 16 / 10;
  background: var(--bg-soft);
  overflow: hidden;
  position: relative;
}
.rubrik-card .image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.rubrik-card:hover .image-wrap img { transform: scale(1.03); }
.rubrik-card .body { padding: var(--s-6); display: flex; flex-direction: column; gap: var(--s-2); }
.rubrik-card .label { font-size: 0.8125rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; }
.rubrik-card h3 { margin: 0; font-size: 1.25rem; }
.rubrik-card p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

/* Rubriken-Hero auf Hub-Seiten */
.rubrik-hero {
  aspect-ratio: 21 / 9;
  background: var(--bg-soft);
  overflow: hidden;
  margin-top: var(--s-4);
  border-radius: 6px;
  max-width: var(--measure-wide);
  margin-left: auto;
  margin-right: auto;
}
.rubrik-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Featured Image im Artikel */
.featured-image {
  max-width: var(--measure-wide);
  margin: 0 auto var(--s-8);
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg-soft);
}
.featured-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.featured-image figcaption {
  padding: var(--s-2) var(--s-4);
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border-top: 1px solid var(--rule);
}

/* Inline-Bild im Body */
.article-body figure.inline-image {
  max-width: var(--measure-wide);
  margin: var(--s-8) auto;
}
.article-body figure.inline-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}
.article-body figure.inline-image figcaption {
  margin-top: var(--s-2);
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
}

/* Buchcover-Darstellung */
.book-cover {
  display: block;
  aspect-ratio: 2 / 3;
  width: 100%;
  max-width: 200px;
  background: var(--bg-soft);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(26, 26, 46, 0.18), 0 1px 3px rgba(26, 26, 46, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
a.book-cover:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(26, 26, 46, 0.22), 0 2px 5px rgba(26, 26, 46, 0.12); }
.book-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Book-Cover-Strip auf Startseite */
.cover-strip {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: repeat(2, 1fr);
  max-width: var(--measure-text);
  margin: var(--s-8) auto;
}
@media (min-width: 640px) { .cover-strip { grid-template-columns: repeat(4, 1fr); } }

/* Artikel-Detail */
.article-header {
  padding: var(--s-12) 0 var(--s-6);
}
.article-header .meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--s-4);
}
.article-header .meta .rubrik-tag {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.article-header h1 { margin-bottom: var(--s-4); }
.article-header .subtitle {
  font-size: clamp(1.125rem, 2vw, 1.3125rem);
  color: var(--text-muted);
  line-height: 1.5;
  font-family: var(--font-serif);
}

/* Artikel-Body */
.article-body p,
.article-body ul,
.article-body ol,
.article-body blockquote,
.article-body table { max-width: var(--measure-text); margin-left: auto; margin-right: auto; }
.article-body h2, .article-body h3 { max-width: var(--measure-text); margin-left: auto; margin-right: auto; }
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: var(--s-2) var(--s-6);
  margin: var(--s-8) auto;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--text);
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--s-8) auto;
  font-size: 0.95rem;
}
.article-body th, .article-body td {
  text-align: left;
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.article-body th {
  background: var(--bg-soft);
  font-family: var(--font-sans);
  font-weight: 600;
}

/* Inventar-Slots */
.slot {
  max-width: var(--measure-text);
  margin: var(--s-8) auto;
  padding: var(--s-6);
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 6px;
  position: relative;
}
.slot-label {
  position: absolute;
  top: -10px;
  left: var(--s-4);
  background: var(--bg);
  padding: 0 var(--s-2);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.slot.hero-card { background: var(--accent-soft); border-color: var(--accent); }
.slot.in-article { background: var(--bg-card); }
.slot.author-bio {
  background: var(--bg-soft);
  display: flex;
  gap: var(--s-4);
  align-items: flex-start;
}
.slot.author-bio .avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--accent-soft);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: var(--accent);
  font-weight: 600;
  overflow: hidden;
}
.slot.author-bio .avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slot h3 { margin: 0 0 var(--s-2); font-family: var(--font-sans); font-size: 1.125rem; }
.slot p { margin: 0 0 var(--s-2); font-size: 0.95rem; color: var(--text); }
.slot .cta {
  display: inline-block;
  margin-top: var(--s-2);
  padding: var(--s-2) var(--s-4);
  background: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.95rem;
  min-height: 44px;
  line-height: 28px;
}
.slot .cta:hover { background: #5a2da8; }

/* Pressemitteilungs-Label (für /neuerscheinungen/ etc.) */
.pr-disclosure {
  max-width: var(--measure-text);
  margin: var(--s-4) auto;
  padding: var(--s-3) var(--s-4);
  background: var(--pr-tint);
  border-left: 3px solid var(--pr-border);
  font-size: 0.9rem;
  color: var(--text);
}
.pr-disclosure strong { font-weight: 600; }

/* Artikel-Listen (Rubriken-Hubs) */
.article-list { display: grid; gap: var(--s-8); margin: var(--s-8) 0; }
.article-list article {
  padding-bottom: var(--s-8);
  border-bottom: 1px solid var(--rule);
  display: grid;
  gap: var(--s-4);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 640px) {
  .article-list article.with-image { grid-template-columns: 220px 1fr; gap: var(--s-6); }
}
.article-list article:last-child { border-bottom: none; }
.article-list .thumb {
  aspect-ratio: 4 / 3;
  background: var(--bg-soft);
  border-radius: 4px;
  overflow: hidden;
}
.article-list .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-list h2 { font-size: 1.5rem; margin: 0 0 var(--s-2); }
.article-list h2 a { color: var(--text); text-decoration: none; }
.article-list h2 a:hover { color: var(--accent); }
.article-list .excerpt { color: var(--text-muted); margin: 0 0 var(--s-2); }
.article-list .meta { font-size: 0.875rem; color: var(--text-muted); }
.article-list .meta .rubrik-tag { color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }

/* Footer */
.site-footer {
  background: var(--text);
  color: var(--bg);
  padding: var(--s-12) 0 var(--s-8);
  margin-top: var(--s-24);
}
.site-footer .container { display: grid; gap: var(--s-8); grid-template-columns: 1fr; }
@media (min-width: 640px) { .site-footer .container { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h4 { color: var(--bg); font-family: var(--font-sans); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; margin: 0 0 var(--s-3); }
.site-footer a { color: var(--bg); display: block; padding: var(--s-1) 0; }
.site-footer .brand-line { font-family: var(--font-serif); font-size: 1.25rem; margin-bottom: var(--s-2); }
.site-footer .meta-line { color: rgba(250,250,247,0.6); font-size: 0.875rem; margin-top: var(--s-8); border-top: 1px solid rgba(250,250,247,0.15); padding-top: var(--s-4); }

/* Skip-Link für a11y */
.skip-link {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus { position: static; width: auto; height: auto; padding: var(--s-2) var(--s-4); background: var(--accent); color: white; }

/* Legal-Pages — Container für easyrechtssicher-Widget */
body.legal-page main {
  max-width: var(--measure-text);
  margin: 0 auto;
  padding: var(--s-12) var(--s-4) var(--s-16);
}
body.legal-page main h1 { margin: 0 0 var(--s-6); }
body.legal-page main [id^="easyrecht-"] { font-size: 1rem; line-height: 1.7; }
body.legal-page main [id^="easyrecht-"] h2,
body.legal-page main [id^="easyrecht-"] h3 {
  font-family: var(--font-serif);
  margin-top: var(--s-8);
  margin-bottom: var(--s-3);
}
body.legal-page main [id^="easyrecht-"] p,
body.legal-page main [id^="easyrecht-"] ul,
body.legal-page main [id^="easyrecht-"] ol { margin-bottom: var(--s-4); }
body.legal-page main [id^="easyrecht-"] a {
  color: var(--accent);
  text-decoration: underline;
  word-break: break-word;
}

/* Standard-Content-Seiten (Über, Presse & Werbung) */
.content-page main { padding-top: var(--s-12); padding-bottom: var(--s-16); }
.content-page .lead-block {
  border-left: 3px solid var(--accent);
  padding: var(--s-2) var(--s-6);
  margin: var(--s-6) 0 var(--s-8);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--text);
}
.content-page .info-grid {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: 1fr;
  margin: var(--s-8) 0;
}
@media (min-width: 720px) { .content-page .info-grid { grid-template-columns: repeat(2, 1fr); } }
.content-page .info-card {
  padding: var(--s-6);
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 6px;
}
.content-page .info-card h3 { margin: 0 0 var(--s-2); font-size: 1.125rem; font-family: var(--font-sans); }
.content-page .info-card p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.content-page .price-tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  padding: var(--s-1) var(--s-3);
  border-radius: 4px;
  font-weight: 600;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  margin-top: var(--s-2);
}

/* Print */
@media print {
  .site-header, .site-footer, .slot { display: none; }
  body { background: white; color: black; }
}
