/* ==========================================================
   Anleitung für den Gebrauch zu Weihnachten – Hörbuch
   ========================================================== */

@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/barlow-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }

:root {
  --green: #1D6A44;
  --green-dark: #164F33;
  --gold: #CFA23D;          /* Originalfarbe Umschlag */
  --gold-btn: #E3B955;      /* Buttons (mehr Kontrast) */
  --gold-light: #F1D27F;    /* Überschriften auf Grün */
  --cream: #F6F0E1;         /* Fließtext */
  --cream-dim: #E9DFC4;
  --line: rgba(241, 210, 127, .25);
  --sans: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cond: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 19px;
  line-height: 1.65;
  color: var(--cream);
  background-color: var(--green);
  background-image: url("img/pattern.png");
  background-size: 516px 200px;
  background-repeat: repeat;
}

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

a { color: var(--gold-light); }
a:hover { color: #FFF3D1; }

:focus-visible { outline: 3px solid #FFF3D1; outline-offset: 3px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Hero ---------- */
.hero {
  display: flex; flex-direction: column; align-items: center; gap: 36px;
  padding: clamp(56px, 10vw, 112px) 24px clamp(40px, 6vw, 72px);
  text-align: center;
}
.hero__logo { width: min(640px, 100%); display: block; }
.hero__sub {
  margin: 0;
  font-family: var(--cond); font-weight: 600;
  font-size: clamp(17px, 2.2vw, 22px);
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-light);
}
.hero__icons { width: 150px; display: block; }

/* ---------- Typo ---------- */
.h-script, .h-section {
  margin: 0;
  font-family: var(--cond); font-weight: 700; line-height: 1.08;
  color: var(--gold-light);
}
.h-script { font-size: clamp(36px, 5vw, 48px); margin-bottom: 8px; }
.h-section { font-size: clamp(30px, 4vw, 40px); }

/* ---------- Intro ---------- */
.intro {
  max-width: 720px; margin: 0 auto;
  padding: 24px 24px clamp(56px, 8vw, 88px);
}
.intro p { margin: 0 0 20px; }
.intro strong { font-weight: 600; color: var(--gold-light); }

/* ---------- Kapitel ---------- */
.chapters { max-width: 880px; margin: 0 auto; padding: 0 24px clamp(64px, 9vw, 96px); }

.chapters__head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 16px 24px; padding-bottom: 20px; border-bottom: 1px solid rgba(241, 210, 127, .45);
}

.btn-all {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 8px 20px;
  border: 2px solid var(--gold-btn); border-radius: 999px;
  background: transparent; color: var(--gold-light);
  font-family: var(--cond); font-weight: 600; font-size: 18px;
  letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.btn-all svg { width: 16px; height: 16px; fill: currentColor; }
.btn-all:hover { background: var(--gold-btn); color: var(--green-dark); }

.chapter-list { list-style: none; margin: 0; padding: 0; }

.chapter {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) auto;
  grid-template-areas:
    "btn info time"
    "btn bar  bar";
  column-gap: 24px; row-gap: 8px; align-items: center;
  padding: 18px 16px;
  border-bottom: 1px solid var(--line);
  transition: background-color .2s ease;
}
.chapter:hover { background-color: rgba(255, 243, 209, .05); }
.chapter.is-active { background-color: rgba(241, 210, 127, .12); }
.chapter.is-missing { opacity: .55; }

.chapter__btn {
  grid-area: btn;
  width: 60px; height: 60px; border-radius: 50%; border: 0; padding: 0;
  background: var(--gold-btn); color: var(--green-dark); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s ease, background-color .15s ease;
}
.chapter__btn:hover { transform: scale(1.06); background: var(--gold-light); }
.chapter__btn:disabled { cursor: not-allowed; transform: none; background: var(--cream-dim); }
.chapter__btn svg { width: 24px; height: 24px; fill: currentColor; }
.chapter__btn .i-play { margin-left: 3px; }
.chapter__btn .i-pause, .chapter__btn .i-load { display: none; }
.chapter.is-playing .chapter__btn .i-play { display: none; }
.chapter.is-playing .chapter__btn .i-pause { display: block; }
.chapter.is-loading .chapter__btn .i-play,
.chapter.is-loading .chapter__btn .i-pause { display: none; }
.chapter.is-loading .chapter__btn .i-load { display: block; animation: spin 1s linear infinite; }

.chapter__info { grid-area: info; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chapter__label {
  font-family: var(--cond); font-weight: 600; font-size: 16px; line-height: 1.3;
  letter-spacing: .14em; text-transform: uppercase; color: var(--gold-light);
}
.chapter__title { font-size: 20px; font-weight: 500; line-height: 1.3; color: var(--cream); }

.chapter__time {
  grid-area: time;
  font-family: var(--cond); font-weight: 500; font-size: 18px;
  color: var(--cream-dim); font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* Fortschritt / Spulen – nur beim aktiven Kapitel sichtbar */
.chapter__bar { grid-area: bar; display: none; }
.chapter.is-active .chapter__bar { display: block; }

.chapter__seek {
  --p: 0%;
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 24px; margin: 0; background: transparent; cursor: pointer;
}
.chapter__seek::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(to right, var(--gold-btn) var(--p), rgba(246, 240, 225, .25) var(--p));
}
.chapter__seek::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(246, 240, 225, .25); }
.chapter__seek::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--gold-btn); }
.chapter__seek::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px;
  border-radius: 50%; border: 0; background: var(--gold-light);
}
.chapter__seek::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; border: 0; background: var(--gold-light); }

.noscript { margin: 24px 0 0; color: var(--gold-light); }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Gedrucktes Buch ---------- */
.book {
  max-width: 1120px; margin: 0 auto; padding: 0 24px clamp(64px, 9vw, 104px);
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 40px 56px; align-items: center;
}
.book__gallery {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}
.book__img {
  display: block; width: 100%; height: 100%; aspect-ratio: 4 / 3;
  object-fit: cover; border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
}
.book__img--main { grid-column: 1 / -1; }
.book__text { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.book__text p { margin: 0; }
.book__mail {
  font-family: var(--cond); font-weight: 500; font-size: 17px;
  letter-spacing: .04em; color: var(--cream-dim); word-break: break-all;
}
.btn-mail {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 10px 26px; border-radius: 999px;
  background: var(--gold-btn); color: var(--green-dark); text-decoration: none;
  font-family: var(--cond); font-weight: 700; font-size: 20px;
  letter-spacing: .08em; text-transform: uppercase;
  transition: transform .15s ease, background-color .15s ease;
}
.btn-mail svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-mail:hover { background: var(--gold-light); color: var(--green-dark); transform: translateY(-2px); }

@media (max-width: 820px) {
  .book { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Danke / Partner ---------- */
.thanks {
  max-width: 880px; margin: 0 auto; padding: 0 24px 72px;
  display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center;
}
.thanks p { margin: 0; max-width: 620px; font-size: 18px; line-height: 1.6; }
.partners {
  list-style: none; margin: 20px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 24px 30px;
}
.partners img { display: block; width: auto; }

/* ---------- Abschluss ---------- */
.outro {
  max-width: 880px; margin: 0 auto; padding: 48px 24px 96px;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center;
}
.outro img { width: 64px; }
.outro__wish {
  margin: 0; font-family: var(--cond); font-weight: 600;
  font-size: clamp(24px, 3vw, 30px); line-height: 1.2; color: var(--gold-light);
}
.legal { display: flex; gap: 24px; font-size: 16px; }

/* ---------- Mobil ---------- */
@media (max-width: 560px) {
  body { font-size: 17px; }
  .chapter {
    grid-template-columns: 52px minmax(0, 1fr);
    grid-template-areas:
      "btn info"
      "btn time"
      "bar bar";
    column-gap: 16px; row-gap: 4px; padding: 16px 8px;
  }
  .chapter__btn { width: 52px; height: 52px; }
  .chapter__title { font-size: 18px; }
  .chapter__time { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
