/* ==========================================================================
   sections.css – Seiten-Sektionen
   Hero (Start/Seite/Buch) · Bücher-Block · Author-Bio · Newsletter ·
   Synopsis · Behind-the-Scenes · Page-Hero · Legal
   ========================================================================== */

/* ====================== HERO – STARTSEITE ============================= */
.hero {
  position: relative;
  isolation: isolate;
  background-color: var(--color-bg);   /* Basis = Body-Farbe, nahtloser Bildübergang */
  padding-block: clamp(3rem, 7vw, 4.5rem);
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* Bildfläche an die zentrierte Container-Breite koppeln (NICHT an den Viewport),
     sonst wandert das contain-Motiv bei großen Breiten nach rechts hinters Cover. */
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  height: 100%;
  object-fit: contain;        /* ganzes Bild zeigen, KEIN Beschnitt */
  object-position: 66% center; /* etwas aus der Mitte nach rechts – jetzt relativ zum Container */
  scale: 0.92;                /* Bildgröße */
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(10, 14, 19, 0.8) 0%, rgba(10, 14, 19, 0.42) 55%, rgba(10, 14, 19, 0.12) 100%);
}
.hero__inner { position: relative; z-index: 2; }

/* Hero-Hintergrund je nach Gerät stärker abdunkeln */
@media (max-width: 1024px) {
  .hero::after {
    background:
      linear-gradient(90deg, rgba(10, 14, 19, 0.9) 0%, rgba(10, 14, 19, 0.62) 60%, rgba(10, 14, 19, 0.45) 100%);
  }
}
@media (max-width: 600px) {
  .hero::after {
    background: rgba(10, 14, 19, 0.82);   /* Smartphone: BG nur noch zart durchschimmernd */
  }
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  min-height: min(70vh, 620px);
}
.hero__content { max-width: 38rem; }

/* Roofline: Autorinnenname – Roboto Bold 20px */
.hero__kicker {
  font-family: "Roboto", var(--font-body);
  font-weight: 700;
  font-size: 1.25rem;                /* 20px */
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

/* Headline: zwei Zeilen in Oswald, fluide skalierend (Desktop-Maxwerte 84/53px) */
.hero__title {
  font-family: "Oswald", var(--font-display);
  display: flex;
  flex-direction: column;
  text-transform: uppercase;
  line-height: 1.02;
  letter-spacing: 0.01em;
  margin-block: var(--space-2) var(--space-3);
}
.hero__title-line1 {
  font-size: clamp(2.5rem, 9vw, 5.25rem);     /* max 84px */
  font-weight: 400;
  color: #ffffff;
}
.hero__title-line2 {
  font-size: clamp(1.55rem, 5.7vw, 3.3125rem); /* max 53px */
  font-weight: 400;
  color: rgb(180, 180, 180);
}
.hero__lead {
  font-size: var(--fs-500);
  color: #ffffff;
  max-width: 42ch;
  margin-bottom: var(--space-4);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

.hero__cover {
  justify-self: end;
  width: min(320px, 80%);
}
.hero__cover-badge {
  position: absolute;
  z-index: 2;
  top: -0.75rem;
  right: -0.75rem;
  rotate: 6deg;
}

@media (max-width: 800px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__content { max-width: none; }
  .hero__lead { margin-inline: auto; }
  .hero__actions { justify-content: center; }
  .hero__cover { order: -1; justify-self: center; width: min(220px, 60%); margin-bottom: var(--space-3); }
}

/* ====================== BÜCHER-BLOCK (Home) ========================== */
.featured-book {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  background: linear-gradient(120deg, var(--color-panel) 0%, var(--color-bg-alt) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 4vw, 2.5rem);
  margin-bottom: var(--space-6);
}
.featured-book__cover {
  width: clamp(150px, 22vw, 210px);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-cover);
}
.featured-book__title { font-size: var(--fs-700); margin-block: var(--space-2) var(--space-3); }
.featured-book__desc { max-width: 60ch; margin-bottom: var(--space-4); }
.featured-book__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

@media (max-width: 640px) {
  .featured-book { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .featured-book__actions { justify-content: center; }
}

.section-foot { margin-top: var(--space-5); text-align: center; }

/* ====================== AUTHOR-BIO =================================== */
.author-bio {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}
.author-bio__media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.author-bio__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.author-bio__body { display: flex; flex-direction: column; gap: var(--space-3); }
.author-bio__quote { margin-block: var(--space-2); }

@media (max-width: 800px) {
  .author-bio { grid-template-columns: 1fr; }
  .author-bio__media { max-width: 360px; }
}

/* ====================== PAGE-HERO (Autorin u.a.) ===================== */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(3rem, 8vw, 5.5rem);
}
.page-hero__bg {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; object-position: center;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(10,14,19,0.7), rgba(10,14,19,0.85) 70%, var(--color-bg));
}
.page-hero__inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: center;
}
.page-hero__title { font-size: var(--fs-800); margin-block: var(--space-2) var(--space-3); }
.page-hero__title .accent { color: var(--color-accent); display: block; }
.page-hero__lead { font-size: var(--fs-500); color: var(--color-text); max-width: 46ch; }
.page-hero__portrait {
  justify-self: end;
  position: relative;
  width: min(280px, 70%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
}
.page-hero__portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 800px) {
  .page-hero__inner { grid-template-columns: 1fr; }
  .page-hero__portrait { order: -1; justify-self: center; width: min(220px, 60%); }
}

/* Schmaler Page-Hero (Bücher, Lesungen, Kontakt, Legal) */
.page-head { padding-block: clamp(2.5rem, 6vw, 4rem) var(--space-4); }
.page-head__title { font-size: var(--fs-800); margin-top: var(--space-2); }
.page-head__lead { margin-top: var(--space-3); max-width: 60ch; color: var(--color-text-muted); }

/* ====================== TEXTBLOCK (prose) ============================ */
.prose { max-width: 68ch; }
/* Rechtsseiten (Impressum/Datenschutz): Textblock bündig zur H1 und volle Breite
   der schmalen Container-Box statt eingerückter, schmaler 68ch-Spalte. */
.container--narrow.prose { max-width: var(--container-narrow); }
.prose p + p { margin-top: var(--space-3); }
.prose h2 { margin-top: var(--space-5); margin-bottom: var(--space-3); }
.prose h3 { margin-top: var(--space-4); margin-bottom: var(--space-2); }
.prose a { color: var(--color-accent); text-decoration: underline; text-underline-offset: 3px; }
.prose ul { margin: var(--space-3) 0; padding-left: 1.25rem; color: var(--color-text-muted); }
.prose li { margin-bottom: var(--space-1); }

.text-cols {
  columns: 2;
  column-gap: clamp(2rem, 5vw, 4rem);
}
.text-cols p { margin-bottom: var(--space-3); break-inside: avoid; }
@media (max-width: 700px) { .text-cols { columns: 1; } }

/* ====================== BEHIND THE SCENES =========================== */
.behind {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: center;
}
.behind__media { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.behind__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.behind__features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-4);
}
@media (max-width: 800px) { .behind { grid-template-columns: 1fr; } }

/* ====================== BUCH-DETAIL HERO ============================= */
.book-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(2.5rem, 7vw, 5rem);
}
.book-hero__bg {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; opacity: 0.25;
}
.book-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(10,14,19,0.85), var(--color-bg));
}
.book-hero__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.book-hero__cover {
  width: clamp(200px, 28vw, 300px);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}
.book-hero__subtitle {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  font-size: var(--fs-500);
  margin-bottom: var(--space-3);
}
.book-hero__desc { max-width: 56ch; margin-bottom: var(--space-4); }

.book-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  margin-bottom: var(--space-4);
  padding-block: var(--space-3);
  border-block: 1px solid var(--color-border);
}
.book-meta__item { display: flex; flex-direction: column; gap: 2px; }
.book-meta__label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-dim);
}
.book-meta__value { color: var(--color-text); font-weight: 600; font-size: 0.9375rem; }
.book-hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
/* Kauf-Block mit Formatauswahl (Label „Jetzt kaufen" + Buttons je Format) */
.book-buy { margin-top: var(--space-4); }
.book-buy__label { margin-bottom: var(--space-2); }

@media (max-width: 760px) {
  .book-hero__inner { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .book-hero__cover { width: min(220px, 60%); }
  .book-meta { justify-content: center; }
  .book-hero__actions { justify-content: center; }
}

/* ====================== NEWSLETTER-BAND ============================== */
.newsletter {
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--color-accent) 12%, var(--color-bg-alt)) 0%, var(--color-bg-alt) 60%);
  border-block: 1px solid var(--color-border);
}
.newsletter__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: center;
}
.newsletter__title { font-size: var(--fs-600); margin-block: var(--space-1) var(--space-2); }
.newsletter__form { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: start; }
.newsletter__form .field { flex: 1 1 180px; }
.newsletter__form .btn { flex: 0 0 auto; }
.newsletter__form .form-message { flex-basis: 100%; }
.newsletter__consent {
  flex-basis: 100%;
  font-size: var(--fs-300);
  color: var(--color-text-dim);
}
.newsletter__consent a { color: var(--color-text-muted); text-decoration: underline; }
@media (max-width: 800px) { .newsletter__inner { grid-template-columns: 1fr; } }

/* --- EmailOctopus-Formular: Anpassungen an unser Design --------------- */
/* Eingabetext lesbar machen (EmailOctopus setzt #495057 auf dunklem Feld) */
.newsletter .emailoctopus-form input,
.newsletter .form-control {
  color: #e8eaed !important;
}
.newsletter .emailoctopus-form input::placeholder,
.newsletter .form-control::placeholder {
  color: #9aa3ad !important;
}
/* Mobil: Formular volle Breite & linksbündig (statt 316px, rechts Lücke) */
@media (max-width: 800px) {
  .newsletter .inline-container,
  .newsletter .eo-form-wrapper,
  .newsletter .form-container,
  .newsletter .emailoctopus-form-wrapper,
  .newsletter .emailoctopus-form {
    max-width: none !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  /* Karten-Optik (Padding/Rahmen/BG) der inline-container auf Mobil entfernen,
     damit die Eingabe bündig links mit dem Text fluchtet (höhere Spezifität
     gegen EmailOctopus' inline <style>). */
  .newsletter .newsletter__inner .inline-container {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }
}

/* ====================== KONTAKT ===================================== */
.page-head--center { text-align: center; }
.page-head--center .page-head__lead { margin-inline: auto; }

.contact-cta {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem);
}
.contact-cta__title { font-size: var(--fs-600); margin-block: var(--space-1) var(--space-3); }
.contact-cta__lead { color: var(--color-text-muted); max-width: 48ch; margin: 0 auto var(--space-4); }
.contact-cta__mail { margin-top: var(--space-3); }
.contact-cta__mail a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.contact-social__lead { color: var(--color-text-muted); max-width: 52ch; margin: var(--space-2) auto var(--space-5); }

/* ====================================================================
   WCAG-KONTRAST-TEST  –  ZUM ZURÜCKSETZEN DIESEN GESAMTEN BLOCK LÖSCHEN
   --------------------------------------------------------------------
   Testweise barrierearme Farben (Ziel AA: kleiner Text ≥ 4.5:1,
   UI-Rahmen ≥ 3:1). Liegt bewusst am Dateiende, damit es die obigen
   Werte überschreibt und in einem Rutsch entfernt werden kann.
   ==================================================================== */
:root {
  /* hellere Graustufen für muted/dimmed Text */
  --color-text-muted: #b3bcc6;   /* vorher #9aa3ad */
  --color-text-dim:   #9aa3ad;   /* vorher #6b7480 (war ~4.1:1) */
  /* Standard-Text-Rot auf dunklem Seiten-BG; Buttons bleiben dunkelrot #d62b2b */
  --wcag-red: #e92f2f;           /* ≈ 4.53:1 auf #0a0e13 */
}

/* Auf Karten/Panels (hellerer Grund) etwas helleres Rot, damit auch dort AA
   (≈4.86:1) erreicht wird. Wirkt nur auf rote Texte INNERHALB dieser Komponenten. */
.card,
.review,
.contact-cta,
.featured-book {
  --wcag-red: #f24a44;
}

/* Rot als Text/Links → nutzt --wcag-red (kontextabhängig) */
.section-label,
.hero__kicker,
.link-arrow,
.quote__cite,
.card__kicker,
.review__stars,
.prose a,
.contact-cta__mail a {
  color: var(--wcag-red);
}
.link-arrow:hover { color: var(--wcag-red); }
.site-footer__nav a:hover { color: var(--wcag-red); }

/* Ghost-Button: Rahmen deutlich sichtbar (≥3:1), Hover-Text helleres Rot */
.btn--ghost { border-color: color-mix(in srgb, var(--color-text) 70%, transparent); }
.btn--ghost:hover { color: var(--wcag-red); border-color: var(--wcag-red); }

/* Formular-Hinweise/-Fehler in hellerem Rot */
.form-message.is-error,
.field__error { color: var(--wcag-red); }
/* ===================== ENDE WCAG-KONTRAST-TEST ===================== */
