/* Strony klienta (strona główna, kolekcja, ebook). Fonty hostowane lokalnie. */
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/figtree-400-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/figtree-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/figtree-600-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/figtree-600-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/figtree-700-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/figtree-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Literata'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/literata-500-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Literata'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/literata-500-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Literata'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/literata-700-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Literata'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/literata-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root { --accent: #1F5C54; --bg: #F7F3EC; --text: #1F1B16; --muted: #5E5548; --line: #E3DACB; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: 'Figtree', system-ui, sans-serif; line-height: 1.5; }
h1, h2 { font-family: 'Literata', Georgia, serif; font-weight: 700; margin: 0; }
.inner { max-width: 1120px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
a:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; border-radius: 6px; }
.on-accent a:focus-visible { outline-color: var(--bg); }
svg { flex: none; }

/* pasek / hero na kolorze akcentu */
.hero { background: var(--accent); color: var(--bg); }
.wordmark { font-family: 'Literata', Georgia, serif; font-weight: 700; font-size: 16px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--bg); text-decoration: none; font-weight: 600; font-size: 15px; }
.back:hover { text-decoration: underline; }
.eyebrow { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #D9E6E2; }
.hero h1 { font-size: 34px; line-height: 1.15; }
.lead { margin: 16px 0 0; max-width: 560px; font-size: 17px; line-height: 1.5; color: #E6EFEC; }
.hero-note { margin: 12px 0 0; font-size: 14px; color: #D9E6E2; }

/* hero strony głównej klienta; logo nad tekstem na telefonie, z lewej od 640 px */
.hero-inner { padding-top: 40px; padding-bottom: 40px; }
.hero-logo { display: block; width: auto; height: auto; max-width: 60%; max-height: 56px; margin-bottom: 24px; object-fit: contain; }
@media (min-width: 640px) {
  .hero-inner.has-logo { display: flex; align-items: center; gap: 32px; }
  .hero-inner.has-logo .hero-logo { flex: none; max-width: 160px; max-height: 120px; margin-bottom: 0; }
}

/* sekcje kolekcji i siatka kart */
.collection { border-bottom: 1px solid var(--line); }
.collection .inner { padding-top: 36px; padding-bottom: 36px; }
.collection h2 { font-size: 24px; line-height: 1.2; margin-bottom: 20px; }
.h2-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: inherit; text-decoration: none; }
.h2-link svg { color: var(--accent); transition: transform .15s ease; }
.h2-link:hover svg { transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) { .h2-link svg { transition: none; } .h2-link:hover svg { transform: none; } }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; list-style: none; margin: 0; padding: 0; }
.card { display: block; text-decoration: none; color: inherit; }
.card:hover .card-title { text-decoration: underline; }
.card-title { display: block; margin-top: 12px; font-size: 16px; font-weight: 600; line-height: 1.3; }
.card-author { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }

/* okładka 2:3 i zastępcza */
.cover { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; background: #DDD3C2; box-shadow: 0 1px 2px rgba(31,27,22,.18), 0 6px 14px rgba(31,27,22,.12); }
.cover-fallback { padding: 10px; background: var(--c-bg); color: var(--c-fg); }
.cover-fallback > div { height: 100%; border: 1px solid var(--c-line); border-radius: 3px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 12px; text-align: center; overflow: hidden; }
.cover-fallback i { display: block; width: 22px; height: 2px; background: var(--c-line); }
.cover-fallback b { font-family: 'Literata', Georgia, serif; font-weight: 700; font-size: 17px; line-height: 1.2; overflow-wrap: anywhere; }
.cover-fallback span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.cover-c0 { --c-bg: #7A2E2E; --c-fg: #FBF4E8; --c-line: rgba(251,244,232,.45); }
.cover-c1 { --c-bg: #2F4A6B; --c-fg: #FBF4E8; --c-line: rgba(251,244,232,.45); }
.cover-c2 { --c-bg: #B8893B; --c-fg: #231709; --c-line: rgba(35,23,9,.4); }
.cover-c3 { --c-bg: #4D5B3A; --c-fg: #FBF4E8; --c-line: rgba(251,244,232,.45); }
.cover-c4 { --c-bg: #C9763A; --c-fg: #231709; --c-line: rgba(35,23,9,.4); }
.cover-c5 { --c-bg: #6B4A3A; --c-fg: #FBF4E8; --c-line: rgba(251,244,232,.45); }

/* przyciski */
.more { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border: 2px solid var(--accent); border-radius: 8px; font-weight: 600; font-size: 16px; text-decoration: none; color: var(--accent); background: transparent; }
.more:hover { background: var(--accent); color: var(--bg); }
.collection .more { margin-top: 28px; }

/* stopka */
.site-footer .inner { padding-top: 28px; padding-bottom: 40px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.site-footer p { margin: 0; }
.site-footer p + p { margin-top: 6px; }

@media (min-width: 640px) {
  .inner { padding-left: 40px; padding-right: 40px; }
  .hero h1 { font-size: 48px; }
  .lead { font-size: 20px; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; }
  .more { display: inline-flex; }
}

/* sortowanie */
.sortbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sortbar-label { margin-right: 4px; font-size: 15px; font-weight: 600; }
.sortbtn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 2px solid var(--accent); border-radius: 8px; font-size: 15px; font-weight: 600; text-decoration: none; color: var(--accent); background: transparent; }
.sortbtn:hover { background: var(--line); }
.sortbtn.is-active, .sortbtn.is-active:hover { background: var(--accent); color: var(--bg); }

/* karta ebooka */
.book-page { padding-top: 24px; padding-bottom: 56px; }
.book-layout { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.book-cover { width: 100%; max-width: 360px; }
.book-cover .cover { box-shadow: 0 2px 4px rgba(31,27,22,.2), 0 14px 30px rgba(31,27,22,.22); }
.book-cover .cover-fallback { padding: 14px; }
.book-cover .cover-fallback > div { gap: 18px; padding: 18px; }
.book-cover .cover-fallback i { width: 32px; }
.book-cover .cover-fallback b { font-size: 28px; line-height: 1.15; }
.book-cover .cover-fallback span { font-size: 12px; letter-spacing: .1em; }
.book-info { width: 100%; }
.book-info h1 { font-size: 34px; line-height: 1.15; }
.book-author { margin: 8px 0 0; font-size: 18px; color: var(--muted); }
.book-desc { margin: 24px 0 0; font-size: 17px; line-height: 1.6; }
.book-desc + .book-desc { margin-top: 14px; }
.book-collection { margin-top: 24px; }
.book-collection p { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.tag { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid #CFC4B2; border-radius: 999px; background: #EFE8DB; color: var(--text); font-size: 15px; font-weight: 500; text-decoration: none; }
.tag:hover { background: #E6DCCB; }
.book-read { margin-top: 32px; }
.book-read p { margin: 12px 0 0; font-size: 14px; color: var(--muted); text-align: center; }
.cta { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 32px; border-radius: 8px; font-size: 18px; font-weight: 600; text-decoration: none; color: var(--bg); background: var(--accent); }
.cta:hover { filter: brightness(.9); }

@media (min-width: 640px) {
  .book-page { padding-top: 48px; }
  .book-layout { flex-direction: row; align-items: flex-start; gap: 64px; }
  .book-cover { width: 240px; max-width: none; flex: none; }
  .book-info { max-width: 600px; }
  .book-info h1 { font-size: 44px; }
  .book-desc { font-size: 19px; }
  .cta { display: inline-flex; }
}
