/* Duchovní knihy – Stylesheet */
:root {
  --ink: #1e1b3a;
  --ink-2: #4b4766;
  --muted: #7a7690;
  --bg: #faf9fc;
  --card: #ffffff;
  --line: #e9e6f2;
  --brand: #4338ca;
  --brand-dark: #312e81;
  --accent: #0d9488;
  --gold: #f5c04a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(30,27,58,.06), 0 4px 14px rgba(30,27,58,.06);
  --shadow-lg: 0 10px 30px rgba(30,27,58,.16);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; font: 16px/1.6 var(--sans); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h2 { font-family: var(--serif); font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 600; }
.wrap { width: min(1240px, 100% - 2.5rem); margin-inline: auto; }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--brand-dark); }
.brand__text { font-family: var(--serif); font-weight: 700; font-size: 1.25rem; color: var(--ink); }
.brand__text small { color: var(--muted); font-weight: 400; font-size: .8em; }
.nav { display: flex; gap: .25rem; align-items: center; }
.nav a { text-decoration: none; padding: .55rem .9rem; border-radius: 999px; font-weight: 500; color: var(--ink-2); transition: background .15s; }
.nav a:hover { background: #f1effa; color: var(--ink); }
.nav .nav__cta { background: var(--brand); color: #fff; }
.nav .nav__cta:hover { background: var(--brand-dark); color: #fff; }
.burger { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; }
.burger span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; color: #fff; background: #3f74c4; padding: 5rem 0 4rem; }
/* Wolkenbild: Ebene 140 % gross, damit sie auch bei 75 % Zoom den Balken füllt */
.hero__bg { position: absolute; inset: -20%; z-index: -2; background: url("../img/wolken.jpg") center / cover no-repeat;
  transform: scale(.75); animation: clouds 20s ease-in-out infinite alternate; will-change: transform; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(30,27,58,.38) 0%, rgba(30,27,58,.18) 55%, rgba(30,27,58,.42) 100%); }
@keyframes clouds { from { transform: scale(.75); } to { transform: scale(1.75); } }
.hero h1, .hero__lead { text-shadow: 0 2px 18px rgba(20,18,40,.35); }
.hero__inner { position: relative; text-align: center; }
.hero__eyebrow { display: inline-block; font-size: .85rem; letter-spacing: .02em; background: rgba(30,27,58,.28); backdrop-filter: blur(4px); padding: .35rem .9rem; border-radius: 999px; margin: 0 0 1.2rem; }
.hero h1 { font-family: var(--serif); font-size: clamp(2.2rem, 5.4vw, 3.8rem); font-weight: 600; letter-spacing: -.01em; }
.hero h1 span { color: var(--gold); }
.hero__lead { max-width: 620px; margin: 0 auto 2rem; font-size: 1.1rem; opacity: .92; }
.search { display: flex; align-items: center; gap: .7rem; max-width: 720px; margin: 0 auto; background: #fff; color: var(--muted);
  border-radius: 999px; padding: .4rem .6rem .4rem 1.3rem; box-shadow: 0 12px 36px rgba(0,0,0,.25); }
.search input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 1.05rem; padding: .85rem 0; color: var(--ink); background: transparent; }
.search kbd { font: 600 .8rem var(--sans); border: 1px solid var(--line); border-radius: 6px; padding: .2rem .5rem; color: var(--muted); margin-right: .5rem; }
.hero__chips { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5rem; margin-top: 1.4rem; font-size: .9rem; }
.hero__chips > span { opacity: .8; margin-right: .2rem; }

/* ---------- Chips & buttons ---------- */
.chip { font: 500 .92rem var(--sans); border: 1px solid var(--line); background: #fff; color: var(--ink-2); padding: .5rem 1rem; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: all .15s; }
.chip b { font-weight: 600; color: var(--muted); margin-left: .25rem; font-size: .85em; }
.chip:hover { border-color: #cfc9e6; color: var(--ink); }
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.is-active b { color: rgba(255,255,255,.7); }
.chip--ghost { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: #fff; }
.chip--ghost:hover { background: rgba(255,255,255,.22); color: #fff; border-color: rgba(255,255,255,.5); }
.btn { display: inline-flex; align-items: center; gap: .5rem; font: 600 1rem var(--sans); background: var(--brand); color: #fff; border: 0; padding: .8rem 1.4rem; border-radius: 10px; text-decoration: none; cursor: pointer; transition: background .15s, transform .15s; }
.btn:hover { background: var(--brand-dark); }
.btn--outline { background: #fff; color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand); }
.btn--outline:hover { background: #f1effa; }
.btn--light { background: #fff; color: var(--ink); padding: .6rem 1.1rem; font-size: .92rem; }
.round { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--ink-2); }
.round:hover { background: #f1effa; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); font-weight: 600; text-decoration: none; cursor: pointer; }
.link:hover { text-decoration: underline; }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--accent); background: #e6f6f4; padding: .25rem .6rem; border-radius: 6px; }

/* ---------- Sections ---------- */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.section-head h2 { margin: 0; }
.section-head small { font: 500 .95rem var(--sans); color: var(--muted); margin-left: .4rem; }

/* Featured scroller */
.featured { padding: 3rem 0 1rem; }
.scroller-nav { display: flex; gap: .4rem; }
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(380px, 1fr); gap: 1.2rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .8rem; scrollbar-width: thin; }
.feature { scroll-snap-align: start; display: grid; grid-template-columns: 130px 1fr; gap: 1.1rem; padding: 1rem; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; transition: transform .2s, box-shadow .2s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature img { width: 130px; aspect-ratio: 3/4; object-fit: cover; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.feature h3 { font-family: var(--serif); font-size: 1.2rem; margin: .5rem 0 .3rem; }
.feature p { margin: 0; color: var(--ink-2); font-size: .93rem; }

/* Catalog */
.catalog { padding: 2.5rem 0 4rem; }
.sort { font-size: .92rem; color: var(--muted); display: flex; align-items: center; gap: .4rem; }
.sort select { font: inherit; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: .45rem .6rem; background: #fff; }
.filters { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .5rem; margin-bottom: 1.6rem; scrollbar-width: none; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2rem 1.4rem; }
.grid--small { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.card { display: flex; flex-direction: column; animation: fade .35s ease both; }
.card[hidden] { display: none; }
.card__cover { position: relative; display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 3/4; background: #ece9f5;
  box-shadow: 0 2px 6px rgba(30,27,58,.12), 0 10px 24px rgba(30,27,58,.10); transition: transform .25s, box-shadow .25s; }
.card__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card__cover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card__cover:hover img { transform: scale(1.04); }
.card__overlay { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding: 1rem;
  background: linear-gradient(to top, rgba(30,27,58,.65), transparent 55%); opacity: 0; transition: opacity .2s; }
.card__cover:hover .card__overlay, .card__cover:focus-visible .card__overlay { opacity: 1; }
.badge { position: absolute; top: .7rem; left: .7rem; background: var(--gold); color: var(--ink); font-size: .75rem; font-weight: 700; padding: .2rem .55rem; border-radius: 6px; }
.card__body { padding-top: .8rem; }
.card__body h3 { font-size: 1rem; font-weight: 600; margin: 0 0 .15rem; }
.card__body h3 a { text-decoration: none; }
.card__body h3 a:hover { color: var(--brand); }
.card__author { margin: 0 0 .6rem; color: var(--muted); font-size: .88rem; }
.card__dl { display: flex; gap: .4rem; }
.pill { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 600; text-decoration: none; padding: .3rem .65rem; border-radius: 999px; background: #f1effa; color: var(--brand-dark); transition: background .15s; }
.pill:hover { background: #e2defa; }
.empty { text-align: center; color: var(--muted); padding: 3rem 0; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

/* Band sections */
.band { background: #fff; border-block: 1px solid var(--line); padding: 4rem 0; }
.band--soft { background: linear-gradient(180deg, #f4f2fb, #faf9fc); }
.two-col { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: start; }
.two-col p { color: var(--ink-2); }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.facts li { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1rem; text-align: center; }
.facts b { display: block; font-family: var(--serif); font-size: 2rem; color: var(--brand); }
.facts span { font-size: .88rem; color: var(--muted); }
.notice { margin-top: 2rem; padding: 1rem 1.3rem; background: #fff8e6; border: 1px solid #f6dfa3; border-radius: 10px; color: #6b4e0a; }

.dozwil { padding: 4rem 0; }
.dozwil__card { position: relative; padding: 3rem; border-radius: 22px; color: #fff; overflow: hidden;
  background: radial-gradient(circle at 85% 20%, rgba(245,192,74,.35), transparent 45%), linear-gradient(135deg, #1e1b3a, #312e81); }
.dozwil__card p { max-width: 640px; opacity: .9; }
.dozwil__card address { font-style: normal; margin-top: 1.2rem; padding-left: 1rem; border-left: 3px solid var(--gold); opacity: .9; }


/* Modal & detail page */
.modal { border: 0; padding: 0; border-radius: 20px; width: min(860px, 94vw); max-height: 90vh; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.modal::backdrop { background: rgba(20,18,40,.6); backdrop-filter: blur(3px); }
.modal[open] { animation: pop .25s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal__close { position: absolute; top: .8rem; right: .8rem; width: 38px; height: 38px; border-radius: 50%; border: 0; background: #f1effa; font-size: 1.5rem; cursor: pointer; z-index: 2; }
.modal__inner, .detail { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; padding: 2rem; }
.modal__inner img, .detail__cover { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 10px; box-shadow: var(--shadow-lg); }
.modal h2, .detail h1 { font-family: var(--serif); font-size: 1.9rem; margin: .6rem 0 .2rem; }
.modal__author { color: var(--muted); margin: 0 0 1rem; }
.modal__text { color: var(--ink-2); }
.modal__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.4rem 0 1rem; }
.page { padding: 2rem 0 4rem; }
.back { display: inline-block; margin-bottom: 1rem; }
.detail { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 2.2rem; }
.small { font-size: .85rem; color: var(--muted); }
.related-h { margin-top: 3rem; }

/* Footer */
.footer { background: var(--ink); color: rgba(255,255,255,.75); padding: 2.5rem 0; font-size: .9rem; }
.footer__inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer strong { color: #fff; font-family: var(--serif); font-size: 1.1rem; }
.footer p { margin: .3rem 0; }

/* Responsive */
@media (max-width: 860px) {
  .two-col, .modal__inner, .detail { grid-template-columns: 1fr; }
  .modal__inner img, .detail__cover { max-width: 220px; }
  .burger { display: block; }
  .nav { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: #fff; border-bottom: 1px solid var(--line); padding: .8rem; display: none; }
  .nav.is-open { display: flex; }
  .scroller { grid-auto-columns: 85%; }
  .search kbd { display: none; }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; }
  .facts { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 96px 1fr; }
  .feature img { width: 96px; }
  .dozwil__card { padding: 2rem 1.4rem; }
  .sort { display: none; }
}
@media (prefers-reduced-motion: reduce) { .hero__bg { transform: scale(.75) !important; } * { animation: none !important; transition: none !important; } }
