/* monday press — one stylesheet. Tokens from design/README.md. */

/* EB Garamond (SIL Open Font License), served from here rather than Google
   Fonts so no visitor data leaves the site. Variable weight file covers
   400 and 500; latin-ext holds the Polish letters. */
@font-face {
  font-family: 'EB Garamond'; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url("fonts/ebgaramond-latin-ext.7de3171e0c20.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: 'EB Garamond'; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url("fonts/ebgaramond-latin.f12bc30ca94a.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: 'EB Garamond'; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/ebgaramond-italic-latin-ext.fc06c5346df3.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: 'EB Garamond'; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/ebgaramond-italic-latin.985f75b87984.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 {
  --ink: #111;
  --muted: #888;
  --hair: #e3e3e3;
  --bg: #fff;
}

html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
body {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 19px;
  line-height: 1.5;
  text-transform: lowercase;
}
a { color: inherit; text-decoration: none; transition: color .15s; }
a:hover { color: var(--muted); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; text-transform: inherit; transition: color .15s; }
button:hover { color: var(--muted); }
img { display: block; max-width: 100%; height: auto; }
h1 { margin: 0; font-size: 32px; font-weight: 400; letter-spacing: -0.01em; line-height: 1.3; }
p { margin: 0; }
select { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-transform: inherit; cursor: pointer; }

/* the script hides things with the hidden attribute; keep it winning over
   the display rules below (cells, rows, the basket form) */
[hidden] { display: none !important; }

.muted { color: var(--muted); }
.preview-note { border: 1px solid var(--ink); padding: 6px 10px; align-self: flex-start; }
.italic { font-style: italic; }
.small { font-size: 16px; }
.prose, .prose p, blockquote p { text-transform: none; text-wrap: pretty; }
.prose p + p { margin-top: 24px; }
.prose a { text-decoration: underline; text-decoration-color: var(--muted); text-underline-offset: 3px; }
.prose a:hover { color: var(--muted); }
.prose h2, .prose h3 { font-weight: 400; font-size: inherit; margin: 32px 0 8px; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 16px 0; }
.prose blockquote { margin: 24px 0; padding-left: 16px; border-left: 1px solid var(--hair); color: var(--muted); }
.prose img { margin: 24px 0; }

/* embedded players: [youtube URL], [vimeo URL], [issuu URL], [bandcamp URL],
   [soundcloud URL] in the text, or a pasted <iframe> embed code */
.embed { margin: 32px 0; }
.embed iframe, .prose iframe { display: block; width: 100%; max-width: 100%; border: 0; }
.embed-video iframe, .prose iframe[src*="youtube"], .prose iframe[src*="vimeo"] { aspect-ratio: 16 / 9; height: auto; }
.embed-issuu iframe, .prose iframe[src*="issuu"] { aspect-ratio: 4 / 3; height: auto; }
.embed-bandcamp iframe, .embed-soundcloud iframe, .prose iframe[src*="bandcamp"], .prose iframe[src*="soundcloud"] { max-width: 700px; }
.prose p + .embed, .prose .embed + p { margin-top: 32px; }
.action { border-bottom: 1px solid var(--ink); line-height: 1.2; white-space: nowrap; align-self: flex-start; }
.action:hover { border-color: var(--muted); }

/* frame: header → main → footer, footer sticks to the bottom on short pages */
.page {
  min-height: 100vh;
  box-sizing: border-box;
  padding: clamp(20px, 3vw, 36px) clamp(20px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  gap: clamp(56px, 8vw, 96px);
}
main { flex: 1; }

.site-header { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; flex-wrap: wrap; }
.brand { white-space: nowrap; }
.site-nav { display: flex; gap: 32px; flex-wrap: wrap; }
.basket-toggle { white-space: nowrap; }
.lang-switch { display: inline-flex; gap: 8px; color: var(--muted); }
.lang-switch a { color: var(--muted); }
.lang-switch a.is-active { color: var(--ink); }

.site-footer { color: var(--muted); font-size: 16px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.footer-right { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.social { display: inline-flex; gap: 16px; align-items: center; }
.social a { display: inline-flex; align-items: center; line-height: 1; }
.social a:hover { color: var(--ink); }
.social svg { display: block; }

/* newsletter: "[newsletter]" in a page's text becomes this form, no script */
.newsletter { display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; margin: 24px 0; }
.newsletter input[type=email] {
  font: inherit; color: inherit; background: none; border: 0; border-bottom: 1px solid var(--hair);
  padding: 0 0 2px; width: min(260px, 100%); text-transform: none; border-radius: 0;
}
.newsletter input[type=email]:focus { outline: none; border-bottom-color: var(--ink); }
.newsletter .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.newsletter-note { flex-basis: 100%; }

/* covers */
.cover { width: 100%; aspect-ratio: 600 / 1010; object-fit: cover; outline: 1px solid rgba(0,0,0,.08); outline-offset: -1px; }
.cover-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(135deg, #f4f4f4 0 6px, #fff 6px 12px);
  font-family: ui-monospace, monospace; font-size: 11px; color: #999; text-transform: none;
}

/* index */
.index { display: flex; flex-direction: column; gap: clamp(64px, 9vw, 112px); }
.catalogue { display: flex; flex-direction: column; gap: 40px; align-items: flex-start; }
.filters { display: flex; gap: 24px; flex-wrap: wrap; }
.filters button { color: var(--muted); }
.filters button.is-active { color: var(--ink); }
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 56px) clamp(20px, 3vw, 40px);
  align-items: start;
  width: 100%;
  max-width: 920px;
}
.cell { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cell-text { display: flex; flex-direction: column; line-height: 1.3; }
.list { display: flex; flex-direction: column; max-width: 560px; border-bottom: 1px solid var(--hair); }
.row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--hair); }
.total-row { border-top-color: var(--ink); }

/* book page */
.book { display: flex; flex-direction: column; gap: 48px; max-width: 900px; }
.book-layout { display: flex; flex-wrap: wrap; gap: 48px 80px; align-items: flex-start; }
.book-side { display: flex; flex-direction: column; gap: 20px; width: 260px; max-width: 100%; }
.book-cover { width: 100%; }
.book-side .buy-row { gap: 16px 28px; align-items: center; }
.book-details { display: flex; flex-direction: column; gap: 2px; }
/* the price as a pill: white on black */
.pill { display: inline-block; background: var(--ink); color: #fff; border-radius: 999px; padding: 3px 14px 4px; line-height: 1.3; white-space: nowrap; }
.book-side .bundle { margin-top: 8px; }
.book-text { display: flex; flex-direction: column; gap: 36px; flex: 1; min-width: min(100%, 280px); max-width: 480px; }
.book-title { line-height: 1.3; }
.buy-row { display: flex; gap: 28px; flex-wrap: wrap; align-items: baseline; }
.reviews { display: flex; flex-direction: column; gap: 24px; border-top: 1px solid var(--hair); padding-top: 32px; }
blockquote { margin: 0; }
cite { font-style: normal; display: block; }

/* covers and page images enlarge on click */
.zoom { display: block; cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 30; background: rgba(255,255,255,.97);
  display: flex; align-items: center; justify-content: center; padding: clamp(20px, 4vw, 48px); box-sizing: border-box;
  cursor: zoom-out;
}
.lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; outline: 1px solid rgba(0,0,0,.08); outline-offset: -1px; }
.lightbox-close { position: absolute; top: clamp(20px, 3vw, 36px); right: clamp(20px, 4vw, 48px); cursor: pointer; }

/* author pages and the authors index */
.author { display: flex; flex-direction: column; gap: 48px; max-width: 900px; }
.author-layout { display: flex; flex-wrap: wrap; gap: 48px 80px; align-items: flex-start; }
.author-photo { width: 260px; max-width: 100%; }
.author-photo img { width: 100%; height: auto; outline: 1px solid rgba(0,0,0,.08); outline-offset: -1px; }
.author-text { display: flex; flex-direction: column; gap: 24px; flex: 1; min-width: min(100%, 280px); max-width: 480px; }
.author-links { display: flex; gap: 20px; flex-wrap: wrap; }
.author-links a { border-bottom: 1px solid var(--ink); line-height: 1.2; }
.author-links a:hover { border-color: var(--muted); }
.author .catalogue h2 { margin: 0; font-size: inherit; font-weight: 400; }
.author-link { border-bottom: 1px solid var(--hair); }
.author-link:hover { color: var(--ink); border-color: var(--ink); }
.authors { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 32px 24px; }
.author-card { display: flex; flex-direction: column; gap: 10px; line-height: 1.3; }
.author-thumb { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; outline: 1px solid rgba(0,0,0,.08); outline-offset: -1px; }
.author-thumb-placeholder { background: repeating-linear-gradient(135deg, #f4f4f4 0 6px, #fff 6px 12px); }

/* text pages, thank-you, 404 */
.text-page { display: flex; flex-direction: column; gap: 40px; max-width: 560px; }
.images { display: flex; flex-direction: column; gap: 32px; }
figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }

/* basket drawer */
.scrim { position: fixed; inset: 0; background: rgba(255,255,255,.5); opacity: 0; transition: opacity .25s; z-index: 9; }
.scrim.is-open { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; height: 100dvh;
  width: min(360px, 100%);
  background: var(--bg); border-left: 1px solid var(--hair);
  transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.7,.2,1);
  z-index: 10;
  display: flex; flex-direction: column; gap: 32px;
  padding: 36px; box-sizing: border-box;
  overflow-y: auto;  /* the whole drawer scrolls, so the checkout button is always reachable */
  visibility: hidden;
}
.drawer.is-open { transform: translateX(0); visibility: visible; }
.qty button:disabled { color: var(--hair); cursor: default; }
.drawer-item-note { color: var(--muted); font-size: 16px; }
[data-basket-submit]:disabled { color: var(--muted); border-color: var(--hair); cursor: default; }
.drawer-head { display: flex; justify-content: space-between; }
.drawer-items { display: flex; flex-direction: column; flex: 1 0 auto; }
.drawer-item { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--hair); }
.drawer-item > span:last-child { white-space: nowrap; }  /* the line's price never wraps; the title side gives way */
.drawer-item-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.qty { display: flex; gap: 12px; color: var(--muted); }
.drawer-foot { display: flex; flex-direction: column; gap: 16px; border-top: 1px solid var(--ink); padding-top: 16px; }
.zone-row { display: flex; justify-content: space-between; gap: 16px; }
.zone-row select { text-align: right; color: var(--muted); }
.zone-row select:hover { color: var(--ink); }
.code-row input {
  font: inherit; color: var(--ink); background: none; border: 0; border-bottom: 1px solid var(--hair);
  padding: 0 0 2px; width: 140px; text-align: right; text-transform: uppercase; border-radius: 0;
}
.code-row input:focus { outline: none; border-bottom-color: var(--ink); }
.drawer-saving { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); padding: 4px 0; }
.locker-row { align-items: baseline; }
/* delivery methods: one radio row per method, price on the right */
.methods { display: flex; flex-direction: column; gap: 8px; }
.methods:empty { display: none; }
.method-row { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; cursor: pointer; }
/* Radio, name, and the delivery estimate under the name; the price never wraps. */
.method-main { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: baseline; }
.method-main .small { grid-column: 2; }
.method-row > span:last-child { white-space: nowrap; }
.method-row input { margin: 0; accent-color: var(--ink); cursor: pointer; }
.locker-choice { display: flex; gap: 12px; align-items: baseline; text-align: right; flex-wrap: wrap; justify-content: flex-end; }
.locker-choice [data-locker-label] { text-transform: none; }

/* Paczkomat picker: full-screen panel over the drawer, list + map */
.locker-picker {
  position: fixed; inset: 0; z-index: 20; background: var(--bg);
  display: flex; flex-direction: column; gap: 20px; padding: 24px clamp(20px, 4vw, 48px); box-sizing: border-box;
}
.locker-head { display: flex; justify-content: space-between; gap: 16px; }
.locker-search { display: flex; gap: 20px; align-items: baseline; flex-wrap: wrap; }
.locker-search input {
  font: inherit; color: var(--ink); background: none; border: 0; border-bottom: 1px solid var(--hair);
  padding: 0 0 2px; width: min(360px, 100%); text-transform: none; border-radius: 0;
}
.locker-search input:focus { outline: none; border-bottom-color: var(--ink); }
.locker-body { flex: 1; min-height: 0; display: flex; gap: 32px; }
.locker-list { width: 340px; flex: none; overflow: auto; font-size: 16px; }
.locker-item { display: block; width: 100%; padding: 10px 0; border-top: 1px solid var(--hair); line-height: 1.35; }
.locker-item:hover, .locker-item.is-active { color: var(--ink); background: #f7f7f7; }
.locker-item .code { font-weight: 500; }
.locker-item .where { text-transform: none; display: block; }
.locker-map { flex: 1; min-height: 240px; background: #f4f4f4; }
.no-map .locker-list { width: min(560px, 100%); }
.locker-map .leaflet-container { font: inherit; }
.leaflet-popup-content { font: inherit; font-size: 15px; text-transform: none; }
.leaflet-popup-content button { border-bottom: 1px solid var(--ink); }
@media (max-width: 760px) {
  .locker-body { flex-direction: column-reverse; }
  .locker-list { width: auto; flex: 1; }
  .locker-map { flex: none; height: 42vh; }
}

.presale { border: 1px solid var(--ink); padding: 6px 10px; align-self: flex-start; font-size: 16px; }

/* promotions and bundles */
s { text-decoration-color: var(--muted); }
/* struck-through old price and the pill on one line, the omnibus line under them */
.price { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
/* Omnibus line under the price: a step smaller but still black and next
   to the price, as the consumer office wants it legible and adjacent */
.prior-price { display: block; flex-basis: 100%; text-transform: none; font-size: 16px; line-height: 1.4; }
.bundle { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; border-top: 1px solid var(--hair); padding-top: 24px; align-self: stretch; }
.bundle-books { display: flex; gap: 24px; flex-wrap: wrap; }
.bundle-book { display: flex; flex-direction: column; gap: 10px; width: 110px; line-height: 1.3; }

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