/* =====================================================================
   Die Liga der Nerds – klassisches, helles Jugendbuch-Design
   ===================================================================== */

:root {
  --bg:        #faf8f3;   /* warmes Papier */
  --surface:   #ffffff;
  --ink:       #20242b;   /* dunkle Schrift */
  --muted:     #5e6671;   /* Sekundärtext */
  --accent:    #e8930c;   /* Orange (aus dem Logo) */
  --accent-dk: #c5780a;
  --green:     #1f7a4d;   /* Nerd-Grün als Zweitfarbe */
  --border:    #e6e1d6;
  --shadow:    0 6px 24px rgba(32, 36, 43, 0.10);
  --radius:    12px;
  --maxw:      1040px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

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

h1, h2, h3 {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  line-height: 1.2;
  color: var(--ink);
}
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 0 0 .6rem; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 2.2rem 0 .8rem; }
h3 { font-size: 1.2rem; margin: 0 0 .4rem; }

p { margin: 0 0 1.1rem; }

/* ---------- Layout ---------- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

main { padding: 2.5rem 0 3.5rem; }

.lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 60ch;
}

.center { text-align: center; }
.muted  { color: var(--muted); }

/* ---------- Kopfzeile / Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  padding-top: .7rem;
  padding-bottom: .7rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
}
.brand-mark { width: 38px; height: 38px; }
.brand-text {
  font-size: 1.25rem;
  letter-spacing: .2px;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .35rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: .95rem;
}
.site-nav a {
  text-decoration: none;
  color: var(--muted);
  padding: .35rem .6rem;
  border-radius: 8px;
}
.site-nav a:hover { background: #f1ede3; color: var(--ink); }
.site-nav a.shop {
  color: #fff;
  background: var(--accent);
}
.site-nav a.shop:hover { background: var(--accent-dk); color: #fff; }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--accent);
  border-radius: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  padding: .7rem 1.3rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dk); color: #fff; }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: #fff; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  align-items: center;
}

/* ---------- Hero (Startseite) ---------- */
.hero {
  text-align: center;
  padding: 3rem 0 1rem;
}
.hero .lead { margin: 0 auto 1.6rem; }
.hero-mark { width: 84px; height: 84px; margin: 0 auto .8rem; }

/* ---------- Buch-Raster (Startseite) ---------- */
.grid {
  display: grid;
  gap: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  /* Oben gerade, unten gerundet: so wird das rechteckige Cover
     an den oberen Ecken nicht "abgeschnitten". */
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card .card-body { padding: 1.1rem 1.2rem 1.3rem; }
.card h3 { margin-bottom: .15rem; }
.card .tag {
  font-family: system-ui, sans-serif;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 700;
}
/* Komplettes Cover zeigen – nichts oben/unten abschneiden */
.book-cover {
  width: 100%;
  height: auto;
  display: block;
  background: #ece8df;
}
.card p { font-size: .98rem; color: var(--muted); margin-bottom: 1rem; }

/* Platzhalter-Cover (für Bände ohne Cover-Bild) */
.cover-soon {
  width: 100%;
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  background: #efe9dc;
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 1.5rem;
}
.cover-soon img { width: 54px; height: 54px; }
.cover-soon .t { font-family: Georgia, serif; font-size: 1.4rem; font-weight: 700; color: var(--ink); }
.cover-soon .s {
  font-family: system-ui, sans-serif; font-size: .78rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}

/* ---------- Buch-Detailseite ---------- */
.book-detail {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2.4rem;
  align-items: start;
}
.book-detail .cover-col img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
}
.book-meta {
  font-family: system-ui, sans-serif;
  font-size: .9rem;
  color: var(--muted);
  margin: .2rem 0 1.2rem;
}
@media (max-width: 720px) {
  .book-detail { grid-template-columns: 1fr; }
  .book-detail .cover-col { max-width: 260px; margin: 0 auto; }
}

figure.audio { margin: 1.5rem 0; }
figure.audio figcaption {
  font-family: system-ui, sans-serif;
  font-size: .9rem;
  color: var(--muted);
  margin-bottom: .4rem;
}
audio { width: 100%; max-width: 420px; }

/* ---------- Mitglieder / Projekte ---------- */
.member-grid, .project-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.member, .project {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.3rem 1.4rem;
}
.member h3 { color: var(--green); }
.project h3 { color: var(--accent-dk); }
.project p:last-child { margin-bottom: 0; }

/* ---------- Prosa-Block (Autor, Kontakt, Impressum, Datenschutz) ---------- */
.prose { max-width: 70ch; }
.prose h2 { font-size: 1.3rem; }

/* ---------- Fußzeile ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: #f2efe7;
  font-family: system-ui, sans-serif;
  font-size: .9rem;
  color: var(--muted);
  text-align: center;
  padding: 1.6rem 1.25rem 2rem;
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.site-footer p { margin: .2rem 0; }

/* "Hacker Mode" – bewusster Terminal-Look als Easter-Egg-Link */
.hacker-mode-link {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: .95rem;
  text-decoration: none;
  color: #00ff66;
  background: #0c0f14;
  border: 1px solid #00ff66;
  border-radius: 8px;
  padding: .55rem 1rem;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.hacker-mode-link:hover {
  background: #00ff66;
  color: #0c0f14;
  box-shadow: 0 0 14px rgba(0, 255, 102, 0.5);
}
.hacker-mode-link .blink {
  width: 8px;
  height: 1em;
  background: currentColor;
  display: inline-block;
  animation: hm-blink 1s step-end infinite;
}
@keyframes hm-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hacker-mode-link .blink { animation: none; } }

/* Für Screenreader sichtbar, optisch versteckt */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
