/* =========================================================
   Matthias-Johannes Fischer — Autorenwebsite
   Design: Nacht & Ewigkeit — zwischen Untergang und Unsterblichkeit
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,500;0,8..60,600;1,8..60,400&family=Jost:wght@400;500&display=swap');

:root {
  --ink:        #0b0e14;
  --ink-soft:   #161b25;
  --paper:      #f6f1e7;
  --paper-dim:  #ece4d3;
  --brick:      #c4402e;
  --brick-deep: #98301f;
  --gold:       #d4a857;
  --gold-soft:  #e8cf9c;
  --sage:       #8a9a8e;

  --display: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --body: 'Source Serif 4', Georgia, serif;
  --utility: 'Jost', sans-serif;

  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

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

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

::selection { background: var(--brick); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- texture ---------- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ---------- header ---------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 14, 20, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(212, 168, 87, 0.18);
}

header.site .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  max-width: var(--max);
  margin: 0 auto;
}

.brand {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--paper);
}

.brand span {
  color: var(--gold);
  font-style: italic;
  font-weight: 400;
}

nav.main {
  display: flex;
  gap: 36px;
  font-family: var(--utility);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

nav.main a {
  position: relative;
  padding-bottom: 4px;
  color: rgba(246, 241, 231, 0.75);
  transition: color 0.25s ease;
}
nav.main a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.3s ease;
}
nav.main a:hover, nav.main a:focus-visible { color: var(--paper); }
nav.main a:hover::after, nav.main a:focus-visible::after { width: 100%; }

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(212,168,87,0.4);
  color: var(--paper);
  font-family: var(--utility);
  font-size: 0.8rem;
  padding: 8px 14px;
  letter-spacing: 0.06em;
  cursor: pointer;
}

@media (max-width: 760px) {
  nav.main {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--ink-soft);
    border-bottom: 1px solid rgba(212,168,87,0.18);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }
  nav.main.open { max-height: 320px; }
  nav.main a { padding: 16px 32px; display: block; }
  nav.main a::after { display: none; }
  .menu-toggle { display: block; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 82px 32px 90px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 18% 20%, rgba(196, 64, 46, 0.16), transparent 60%),
    radial-gradient(ellipse 50% 45% at 85% 75%, rgba(212, 168, 87, 0.14), transparent 60%);
  pointer-events: none;
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

.eyebrow {
  font-family: var(--utility);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::before {
  content: '';
  width: 30px; height: 1px;
  background: var(--gold);
}

.hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(3rem, 5.4vw, 4.8rem);
  line-height: 1.06;
  margin: 0 0 26px;
  color: var(--paper);
}

.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold-soft);
}

.hero p.lead {
  font-size: 1.13rem;
  color: rgba(246, 241, 231, 0.82);
  max-width: 46ch;
  margin: 0 0 36px;
}

.hero-cta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--utility);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 28px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-block;
  transition: all 0.25s ease;
}
.btn-primary {
  background: var(--brick);
  color: var(--paper);
  border-color: var(--brick);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--brick-deep);
  border-color: var(--brick-deep);
}
.btn-ghost {
  border-color: rgba(212,168,87,0.5);
  color: var(--paper);
}
.btn-ghost:hover, .btn-ghost:focus-visible {
  border-color: var(--gold);
  background: rgba(212,168,87,0.08);
}

/* portrait-ish frame placeholder built from a triptych of covers (used on home hero) */
.hero-art {
  position: relative;
  height: 440px;
}
.hero-art .stack-card {
  position: absolute;
  width: 168px;
  border: 1px solid rgba(246,241,231,0.12);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6);
  transition: transform 0.4s ease;
}
.hero-art .stack-card img { width: 100%; height: 100%; object-fit: cover; }
.hero-art .c1 { top: 0; left: 10px; transform: rotate(-8deg); z-index: 1; }
.hero-art .c2 { top: 26px; left: 140px; transform: rotate(5deg); z-index: 2; }
.hero-art .c3 { top: 120px; left: 260px; transform: rotate(-3deg); z-index: 4; }
.hero-art .c4 { top: 150px; left: 0; transform: rotate(4deg); z-index: 3; }
.hero-art .stack-card:hover { transform: translateY(-8px) rotate(0deg); z-index: 5; }

@media (max-width: 1080px) {
  .hero-art .c3 { left: 190px; }
}

@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { height: 320px; margin-top: 20px; }
}

/* ---------- section scaffolding ---------- */
section { padding: 90px 0; }
.section-head { max-width: 640px; margin: 0 0 56px; }
.section-head .eyebrow { margin-bottom: 16px; }
.section-head h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.1rem, 3.6vw, 3.1rem);
  margin: 0 0 14px;
  color: var(--paper);
}
.section-head p {
  color: rgba(246,241,231,0.72);
  font-size: 1.04rem;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,168,87,0.35), transparent);
  margin: 0;
}

/* ---------- bookshelf (signature element) ---------- */
.shelf-section { background: var(--ink-soft); }

.shelf {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  align-items: end;
}

@media (max-width: 1080px) {
  .shelf { grid-template-columns: repeat(2, 1fr); gap: 40px 28px; }
  .shelf-board { display: none; }
}

.shelf-board {
  grid-column: 1 / -1;
  height: 14px;
  background: linear-gradient(180deg, #2a1d14, #1a120c);
  border-radius: 2px;
  box-shadow: 0 14px 30px -10px rgba(0,0,0,0.6), inset 0 2px 0 rgba(255,255,255,0.05);
  margin-top: -4px;
}

.book {
  position: relative;
  display: block;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  transform-origin: bottom center;
  transition: transform 0.45s cubic-bezier(.2,.8,.2,1), box-shadow 0.45s ease;
  box-shadow: -6px 0 0 rgba(0,0,0,0.25), 0 18px 34px -16px rgba(0,0,0,0.55);
}

.book:hover, .book:focus-visible {
  transform: translateY(-14px) rotate(-1.2deg);
  box-shadow: -6px 0 0 rgba(0,0,0,0.3), 0 32px 50px -16px rgba(0,0,0,0.65);
}

.book-cover {
  aspect-ratio: 230 / 327;
  overflow: hidden;
  position: relative;
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

.book-spine-tag {
  position: absolute;
  bottom: 0; right: 0;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--utility);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
}

.book-meta {
  padding: 20px 4px 28px;
}
.book-meta h3 {
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--ink);
}
.book-meta .sub {
  font-family: var(--body);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--brick-deep);
  margin: 0 0 12px;
}
.book-meta .facts {
  font-family: var(--utility);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: rgba(11,14,20,0.55);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}
.book-meta .more {
  margin-top: 14px;
  font-family: var(--utility);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brick-deep);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.book-meta .more svg { width: 14px; height: 14px; transition: transform 0.25s ease; }
.book:hover .more svg { transform: translateX(4px); }

@media (max-width: 820px) {
  .shelf { grid-template-columns: 1fr; gap: 56px; }
  .shelf-board { display: none; }
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 64px;
  align-items: start;
}
.about-portrait {
  position: relative;
  aspect-ratio: 4/5;
  background: var(--paper-dim);
  overflow: hidden;
  border: 1px solid rgba(212,168,87,0.2);
}
.about-portrait img { width: 100%; height: 100%; object-fit: cover; }
.about-text p { color: rgba(246,241,231,0.85); margin: 0 0 20px; }
.about-text p:first-of-type::first-letter {
  font-family: var(--display);
  font-size: 3.2em;
  float: left;
  line-height: 0.8;
  padding: 6px 8px 0 0;
  color: var(--gold);
  font-weight: 600;
}

@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-portrait { max-width: 320px; }
}

/* ---------- footer ---------- */
footer.site {
  border-top: 1px solid rgba(212,168,87,0.18);
  padding: 56px 0 40px;
  background: var(--ink-soft);
}
footer.site .foot-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}
footer.site .brand { font-size: 1rem; }
footer.site .foot-links {
  display: flex;
  gap: 28px;
  font-family: var(--utility);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: rgba(246,241,231,0.6);
}
footer.site .foot-links a:hover { color: var(--gold); }
footer.site .copyright {
  font-family: var(--utility);
  font-size: 0.75rem;
  color: rgba(246,241,231,0.4);
  margin-top: 28px;
}
footer.site .copyright a { color: rgba(246,241,231,0.55); }
footer.site .copyright a:hover { color: var(--gold); }

/* ---------- book detail page ---------- */
.book-hero {
  padding: 150px 0 80px;
  position: relative;
}
.book-hero-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 64px;
}
.book-hero-cover {
  aspect-ratio: 230/327;
  box-shadow: -8px 0 0 rgba(0,0,0,0.3), 0 30px 60px -20px rgba(0,0,0,0.65);
}
.book-hero-cover img { width: 100%; height: 100%; object-fit: cover; }

.breadcrumb {
  font-family: var(--utility);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: rgba(246,241,231,0.5);
  margin-bottom: 28px;
}
.breadcrumb a:hover { color: var(--gold); }

.book-hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.6rem, 4.6vw, 3.9rem);
  line-height: 1.1;
  margin: 0 0 10px;
  color: var(--paper);
}
.book-hero .subtitle {
  font-family: var(--body);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--gold-soft);
  margin: 0 0 30px;
}

.fact-table {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 10px 28px;
  font-family: var(--utility);
  font-size: 0.92rem;
  margin: 0 0 34px;
  padding: 26px 28px;
  background: rgba(246,241,231,0.04);
  border: 1px solid rgba(212,168,87,0.18);
  max-width: 480px;
}
.fact-table dt {
  color: rgba(246,241,231,0.5);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.74rem;
  padding-top: 2px;
}
.fact-table dd {
  margin: 0;
  color: var(--paper);
  font-family: var(--body);
}

.book-synopsis {
  max-width: 70ch;
}
.book-synopsis p { color: rgba(246,241,231,0.85); margin: 0 0 20px; font-size: 1.05rem; }
.book-synopsis h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.85rem;
  color: var(--paper);
  margin: 40px 0 18px;
}

.pull-quote {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.65rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--gold-soft);
  border-left: 2px solid var(--brick);
  padding: 4px 0 4px 28px;
  margin: 36px 0;
}

@media (max-width: 820px) {
  .book-hero-grid { grid-template-columns: 1fr; }
  .book-hero-cover { max-width: 260px; }
}

.other-books { background: var(--ink-soft); }
.other-books .shelf { grid-template-columns: repeat(3, 1fr); gap: 32px 28px; align-items: start; }
.other-books .section-head h2 { font-size: clamp(1.3rem, 2.2vw, 1.8rem); }
.other-books .book {
  background: transparent;
  box-shadow: none;
  padding: 0;
}
.other-books .book:hover,
.other-books .book:focus-visible {
  transform: translateY(-6px) rotate(-0.8deg);
  box-shadow: none;
}
.other-books .book-cover {
  max-width: 150px;
  box-shadow: -4px 4px 18px rgba(0,0,0,0.5), 4px 8px 28px rgba(0,0,0,0.35);
  transition: box-shadow 0.4s ease;
}
.other-books .book:hover .book-cover {
  box-shadow: -6px 8px 28px rgba(0,0,0,0.65), 6px 12px 40px rgba(0,0,0,0.45);
}
.other-books .book-meta { padding: 14px 0 0; }
.other-books .book-meta h3 { color: var(--paper); font-size: 1.05rem; }
.other-books .book-meta .sub { color: rgba(246,241,231,0.55); }
.other-books .book-meta .more { color: var(--gold); }
@media (max-width: 700px) { .other-books .shelf { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .other-books .shelf { grid-template-columns: 1fr; } }

/* ---------- legal pages (Impressum / Datenschutz) ---------- */
.legal-hero {
  padding: 24px 0 12px;
  border-top: 1px solid rgba(212, 168, 87, 0.18);
}
.legal-hero .breadcrumb { margin-bottom: 14px; }
.legal-hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  margin: 0 0 0;
  color: var(--paper);
}
.legal-hero + section {
  padding-top: 0;
  padding-bottom: 0;
}
.legal-body {
  padding-top: 12px;
  padding-bottom: 100px;
  max-width: 72ch;
}
.legal-body h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.6rem;
  color: var(--gold-soft);
  margin: 44px 0 14px;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body p {
  color: rgba(246,241,231,0.82);
  margin: 0 0 16px;
}
.legal-body a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.legal-body a:hover { color: var(--gold-soft); }
.legal-body ul { color: rgba(246,241,231,0.82); padding-left: 22px; margin: 0 0 16px; }
.legal-body li { margin-bottom: 6px; }
.legal-note {
  color: rgba(246,241,231,0.45);
  font-family: var(--utility);
  font-size: 0.8rem;
  margin: 0 0 28px;
}
.legal-placeholder {
  border: 1px dashed rgba(212,168,87,0.4);
  background: rgba(212,168,87,0.06);
  padding: 18px 22px;
  font-family: var(--utility);
  font-size: 0.88rem;
  color: var(--gold-soft);
  margin: 0 0 16px;
}
