/* Hans J. Hahn – Autorenwebsite
   Ruhig, warm, naturnah. Nur Systemfonts. Keine Tracker. */

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

:root {
  --gruen-dunkel: #1e3328;
  --gruen: #2f4a38;
  --gruen-hell: #3d5c47;
  --beige: #f4efe6;
  --beige-warm: #ebe3d4;
  --beige-dunkel: #d9cdb8;
  --erde: #6b5344;
  --erde-dunkel: #4a3728;
  --text: #2a241c;
  --text-hell: #5a5045;
  --weiss: #fffcf7;
  --akzent: #8a6b3e;
  --schatten: rgba(30, 51, 40, 0.12);
  --max: 960px;
  --radius: 8px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--beige);
}

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

a {
  color: var(--gruen);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover,
a:focus {
  color: var(--erde-dunkel);
}

/* Kopfzeile */
.site-header {
  background: var(--gruen-dunkel);
  color: var(--beige);
  padding: 0.75rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px var(--schatten);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.logo {
  font-size: 1.25rem;
  font-weight: normal;
  color: var(--beige);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.logo:hover,
.logo:focus {
  color: var(--beige-warm);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--beige-dunkel);
  color: var(--beige);
  padding: 0.4rem 0.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  border-radius: var(--radius);
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.site-nav a {
  color: var(--beige);
  text-decoration: none;
  font-size: 1rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus,
.site-nav a[aria-current="page"] {
  border-bottom-color: var(--beige-dunkel);
  color: var(--weiss);
}

/* Hauptinhalt */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.hero {
  background: var(--weiss);
  border: 1px solid var(--beige-dunkel);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 2px 12px var(--schatten);
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: 1.85rem;
  font-weight: normal;
  color: var(--gruen-dunkel);
  line-height: 1.3;
}

.hero p {
  margin: 0 0 1rem;
  color: var(--text-hell);
  font-size: 1.15rem;
}

.hero p:last-child {
  margin-bottom: 0;
}

h1, h2, h3 {
  font-weight: normal;
  color: var(--gruen-dunkel);
  line-height: 1.3;
}

h1 {
  font-size: 1.85rem;
  margin: 0 0 1.25rem;
}

h2 {
  font-size: 1.45rem;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--beige-dunkel);
}

h3 {
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
  color: var(--erde-dunkel);
}

.lead {
  font-size: 1.15rem;
  color: var(--text-hell);
  margin-bottom: 1.5rem;
}

/* Bücher-Karten */
.book-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 1.25rem 0 2rem;
}

@media (min-width: 640px) {
  .book-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.book-card {
  background: var(--weiss);
  border: 1px solid var(--beige-dunkel);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: 0 2px 8px var(--schatten);
}

.book-card.featured {
  border-color: var(--gruen-hell);
  box-shadow: 0 3px 14px var(--schatten);
}

.book-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  max-width: 160px;
  margin: 0 auto;
  background: linear-gradient(160deg, var(--beige-warm) 0%, var(--beige-dunkel) 55%, var(--erde) 100%);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  color: var(--erde-dunkel);
  font-size: 0.85rem;
  line-height: 1.4;
  border: 1px solid var(--beige-dunkel);
}

.book-cover span {
  opacity: 0.85;
}

.book-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.book-meta .genre {
  font-size: 0.85rem;
  color: var(--akzent);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 0;
}

.book-meta p {
  margin: 0;
  font-size: 1rem;
  color: var(--text-hell);
  flex: 1;
}

.book-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.btn {
  display: inline-block;
  background: var(--gruen);
  color: var(--beige) !important;
  text-decoration: none !important;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease;
}

.btn:hover,
.btn:focus {
  background: var(--gruen-dunkel);
  color: var(--weiss) !important;
}

.btn-secondary {
  background: transparent;
  color: var(--gruen) !important;
  border: 1px solid var(--gruen);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background: var(--gruen);
  color: var(--beige) !important;
}

.section-note {
  font-size: 0.95rem;
  color: var(--text-hell);
  margin: -0.5rem 0 1.25rem;
}

/* Neu erschienen / Neuigkeiten */
.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.news-list li {
  background: var(--weiss);
  border: 1px solid var(--beige-dunkel);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.news-list time {
  display: block;
  font-size: 0.9rem;
  color: var(--akzent);
  margin-bottom: 0.35rem;
}

/* Über mich */
.bio {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 640px) {
  .bio {
    grid-template-columns: 200px 1fr;
  }
}

.photo-placeholder {
  width: 100%;
  max-width: 200px;
  aspect-ratio: 3 / 4;
  background: linear-gradient(160deg, var(--beige-warm), var(--beige-dunkel));
  border: 1px solid var(--beige-dunkel);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-hell);
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
  margin: 0 auto;
}

/* Kontakt / Rechtliches */
.contact-box,
.legal {
  background: var(--weiss);
  border: 1px solid var(--beige-dunkel);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.legal h2 {
  border-bottom: none;
  margin-top: 1.75rem;
  font-size: 1.2rem;
}

.legal h2:first-child {
  margin-top: 0;
}

.legal ul {
  padding-left: 1.25rem;
}

address {
  font-style: normal;
}

/* Fußzeile */
.site-footer {
  background: var(--gruen-dunkel);
  color: var(--beige-dunkel);
  padding: 1.5rem 1.25rem;
  text-align: center;
  font-size: 0.95rem;
}

.site-footer a {
  color: var(--beige);
  text-decoration: none;
  margin: 0 0.5rem;
}

.site-footer a:hover,
.site-footer a:focus {
  text-decoration: underline;
}

.site-footer p {
  margin: 0.5rem 0 0;
}

/* Mobil */
@media (max-width: 639px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    width: 100%;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0 0.25rem;
  }

  .site-nav a {
    display: block;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(244, 239, 230, 0.15);
  }

  .hero {
    padding: 1.5rem 1.15rem;
  }

  .hero h1,
  h1 {
    font-size: 1.5rem;
  }
}

/* Hilfsklassen */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.placeholder-box {
  background: var(--beige-warm);
  border: 1px dashed var(--beige-dunkel);
  border-radius: var(--radius);
  padding: 1.5rem;
  color: var(--text-hell);
  text-align: center;
}

.book-cover.has-image { padding: 0; background: none; overflow: hidden; box-shadow: 0 2px 8px var(--schatten); }
.book-cover.has-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Shop */
button.btn {
  font-family: inherit;
  line-height: inherit;
  cursor: pointer;
  border: none;
}
.btn-shop {
  background: var(--erde);
}
.btn-shop:hover,
.btn-shop:focus {
  background: var(--erde-dunkel);
}
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
.cart-added {
  width: 100%;
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
  color: var(--gruen);
}
.nav-cart .cart-count {
  font-weight: bold;
}
.cart-box {
  background: var(--weiss);
  border: 1px solid var(--beige-dunkel);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: 0 2px 12px var(--schatten);
}
.cart-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--beige-warm);
}
.cart-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.qty-btn,
.cart-remove {
  font-family: inherit;
  font-size: 1rem;
  background: var(--beige);
  border: 1px solid var(--beige-dunkel);
  border-radius: var(--radius);
  padding: 0.15rem 0.6rem;
  cursor: pointer;
  color: var(--text);
}
.cart-remove {
  font-size: 0.9rem;
  color: var(--text-hell);
}
.cart-price {
  text-align: right;
  min-width: 5.5rem;
}
.cart-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 1rem;
  margin: 1.25rem 0 1rem;
}
.cart-summary dd {
  margin: 0;
  text-align: right;
}
.cart-total {
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--gruen-dunkel);
}
.cart-note {
  font-size: 0.95rem;
  color: var(--text-hell);
}
.checkout {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--beige-dunkel);
}
.shop-soon {
  background: var(--beige-warm);
  border-left: 4px solid var(--akzent);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
}
.agb-check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}
.agb-check input {
  margin-top: 0.4rem;
  width: 1.1rem;
  height: 1.1rem;
}
@media (max-width: 600px) {
  .cart-row {
    grid-template-columns: 1fr auto;
  }
}

/* Demnächst auf der Startseite */
.demnaechst { margin-top: 2.5rem; }
.book-card.featured-wide { grid-column: 1 / -1; }
.book-card.featured-wide .book-cover { max-width: 200px; }
.book-card.featured-wide h3 { font-size: 1.4rem; }
@media (min-width: 640px) {
  .book-card.featured-wide { flex-direction: row; align-items: flex-start; gap: 1.5rem; }
  .book-card.featured-wide .book-cover { flex: 0 0 200px; margin: 0; }
}
.demnaechst .book-meta p.genre, .demnaechst .book-meta p em { flex: 0 0 auto; }
.demnaechst .book-meta p:has(em) { flex: 0 0 auto; }

/* Porträt im Willkommensbereich */
.hero-mit-foto {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.hero-foto {
  flex: 0 0 auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center center;
  border: 3px solid var(--beige-dunkel);
  box-shadow: 0 2px 12px var(--schatten);
}
.hero-text { flex: 1 1 auto; min-width: 0; }
@media (max-width: 640px) {
  .hero-mit-foto { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .hero-foto { width: 110px; height: 110px; }
}

/* Titelbild */
.hero-banner { margin: 0 0 -3rem; border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 12px var(--schatten); }
.hero-banner img { display: block; width: 100%; height: auto; aspect-ratio: 21 / 8; object-fit: cover; object-position: 50% 50%; }
.hero-banner + .hero { position: relative; margin-left: 1.5rem; margin-right: 1.5rem; }
@media (max-width: 640px) {
  .hero-banner { margin-bottom: -1.5rem; }
  .hero-banner img { aspect-ratio: 4 / 3; }
  .hero-banner + .hero { margin-left: 0.75rem; margin-right: 0.75rem; }
}
.hero-banner.seiten-banner { margin: 0 0 1.5rem; }
/* Bücher-Banner Startseite: ganzes Bild zeigen, Willkommen-Karte nicht überlappen */
.hero-banner.buecher-banner { margin: 0 0 1.5rem; background: #3a3a3c; }
.hero-banner.buecher-banner img { aspect-ratio: auto; object-fit: contain; }
.hero-banner.buecher-banner + .hero { margin-left: 0; margin-right: 0; }

/* Laufband mit Buchcovern auf der Startseite */
@font-face {
  font-family: "Ubuntu Light Lokal";
  src: url("../fonts/ubuntu-light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
.cover-lauf {
  margin: 0 0 1.5rem;
  padding: 2rem 0 1.6rem;
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  color: #ecebe8;
  background:
    radial-gradient(ellipse 70% 85% at 50% 55%, rgba(110, 110, 112, 0.45) 0%, rgba(110, 110, 112, 0) 70%),
    linear-gradient(90deg, #121213 0%, #2c2c2d 22%, #3a3a3b 50%, #2c2c2d 78%, #141415 100%);
  box-shadow: 0 2px 12px var(--schatten);
}
.cover-lauf-fenster {
  overflow: hidden;
  padding: 0.4rem 0 1rem; /* Platz für den Schatten */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.cover-lauf-band {
  display: flex;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  animation: cover-lauf 55s linear infinite;
  -webkit-animation: cover-lauf 55s linear infinite;
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
/* Abstand per margin an jedem Eintrag, damit -50% genau eine Kopie ist */
.cover-lauf-band li { flex: 0 0 auto; margin: 0 1.6rem 0 0; padding: 0; }
.cover-lauf-band a { display: block; border-radius: 2px; }
.cover-lauf-band a:focus-visible { outline: 2px solid #c9a96a; outline-offset: 3px; }
.cover-lauf-band img {
  display: block;
  height: 150px;
  width: auto;
  border-radius: 2px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s ease;
}
.cover-lauf-band a:hover img,
.cover-lauf-band a:focus-visible img { transform: translateY(-3px); }
/* Anhalten nur am Computer mit Maus, auf dem Handy läuft das Band immer weiter */
@media (hover: hover) and (pointer: fine) {
  .cover-lauf-fenster:hover .cover-lauf-band,
  .cover-lauf-fenster:focus-within .cover-lauf-band { animation-play-state: paused; }
}
@-webkit-keyframes cover-lauf {
  from { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
  to { -webkit-transform: translate3d(-50%, 0, 0); transform: translate3d(-50%, 0, 0); }
}
@keyframes cover-lauf {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}
.cover-lauf-name,
.cover-lauf-sub {
  font-family: "Ubuntu Light Lokal", "Ubuntu Light", Ubuntu, "Segoe UI Light", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  margin: 0;
  padding: 0 1rem;
}
.cover-lauf-name {
  font-size: 2.1rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin-top: 0.6rem;
}
.cover-lauf-name::after {
  content: "";
  display: block;
  width: 80px;
  height: 1px;
  margin: 0.85rem auto 0.75rem;
  background: #b8975a;
}
.cover-lauf-sub {
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: #d6d4cf;
}
.cover-lauf + .hero { margin-left: 0; margin-right: 0; }
@media (max-width: 640px) {
  .cover-lauf { padding: 1.4rem 0 1.2rem; }
  .cover-lauf-band li { margin-right: 1rem; }
  .cover-lauf-band img { height: 100px; }
  .cover-lauf-name { font-size: 1.55rem; margin-top: 0.4rem; }
  .cover-lauf-name::after { width: 60px; margin: 0.65rem auto 0.6rem; }
  .cover-lauf-sub { font-size: 0.95rem; letter-spacing: 0.04em; }
}
/* Wenn am Handy "Bewegung reduzieren" oder Energiesparen an ist: Band läuft trotzdem, nur langsamer */
@media (prefers-reduced-motion: reduce) {
  .cover-lauf-band { animation-duration: 90s; -webkit-animation-duration: 90s; }
  .cover-lauf-band img { transition: none; }
}
