/* PT Pustaka Wiyata Sahwahita — public site. From PWS 002 v3 (mockup), site tokens.
   One light look on purpose: a publisher's record, printed-page feel. Fonts are
   self-hosted (SIL OFL) so the site makes no third-party requests. */

@font-face { font-family: "Literata"; font-weight: 400; font-display: swap;
  src: url("../fonts/literata-latin-400-normal.a1e47c1196a7.woff2") format("woff2"); }
@font-face { font-family: "Literata"; font-weight: 600; font-display: swap;
  src: url("../fonts/literata-latin-600-normal.1761fd55ed1a.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 400; font-display: swap;
  src: url("../fonts/plus-jakarta-sans-latin-400-normal.503e7cbdb484.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 600; font-display: swap;
  src: url("../fonts/plus-jakarta-sans-latin-600-normal.79e62f3332cd.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 700; font-display: swap;
  src: url("../fonts/plus-jakarta-sans-latin-700-normal.5b629bd8abb4.woff2") format("woff2"); }

:root {
  --bg: #FBFBF8; --ink: #1A221D; --muted: #58645C; --line: #E1E4DD;
  --bamboo: #2F5B36; --bamboo-ink: #FFFFFF; --bamboo-soft: #E5EEE3; --husk: #8A6420;
  --ok: #24733A; --ok-soft: #E2F2E5; --warn: #8A5A00; --warn-soft: #FBF0DA;
  --f-display: "Literata", Georgia, "Times New Roman", serif;
  --f-body: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 var(--f-body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--bamboo); }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--bamboo); outline-offset: 3px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
h1 { font-family: var(--f-display); font-weight: 600; font-size: clamp(26px, 3.6vw, 36px); line-height: 1.2; }
h2 { font-family: var(--f-display); font-weight: 600; font-size: 21px; line-height: 1.3; }
h3 { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
p { margin: 0; }
[hidden] { display: none !important; }

.wrap { max-width: 1080px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* header */
.s-head { border-bottom: 1px solid var(--line); }
.s-head-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding-block: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand b { font-family: var(--f-display); font-weight: 600; font-size: 16px; line-height: 1.2; display: block; }
.brand small { display: block; font-size: 11.5px; color: var(--muted); }
.mark { width: 30px; height: 30px; border-radius: 4px; background: var(--bamboo); display: grid; place-items: center; flex: none; }
.mark::before { content: ""; width: 4px; height: 18px; background: var(--bamboo-ink); border-radius: 2px;
  box-shadow: -7px 3px 0 var(--bamboo-ink), 7px 3px 0 var(--bamboo-ink); }
.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; font-weight: 600; }
.nav a { text-decoration: none; color: var(--muted); padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--bamboo); }
.nav .lang { font-size: 12px; border: 1px solid var(--line); border-radius: 3px; padding: 3px 7px; }

/* main */
.s-main { padding-block: 36px 48px; display: grid; gap: 32px; }
.series { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--husk); font-weight: 700; margin-bottom: 6px; }
.lead { font-size: 16px; color: var(--muted); max-width: 62ch; }
.lead p + p, .work p + p, .txt p + p, .order p + p { margin-top: .7em; }
.note { font-size: 13px; color: var(--muted); font-style: italic; }
.btn { display: inline-flex; align-items: center; gap: 8px; font: 600 14px var(--f-body); background: var(--bamboo); color: var(--bamboo-ink);
  border-radius: 4px; padding: 11px 18px; text-decoration: none; }
.btn:hover { filter: brightness(1.08); }
.abroad { font-size: 14px; color: var(--muted); border-left: 3px solid var(--husk); padding: 6px 12px; max-width: 46ch; }
.abroad b { color: var(--ink); }

.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 36px; align-items: center; }
.hero-text { display: grid; gap: 18px; }
.work { max-width: 68ch; display: grid; gap: 12px; }

/* shelf: the covers stand on a bamboo shelf (PWS 002a, direction A) */
.shelf { display: flex; justify-content: center; align-items: flex-end; gap: 14px;
  padding: 26px 22px 0; background: var(--bamboo-soft); border-radius: 6px; border-bottom: 6px solid var(--husk); }
.shelf a { flex: 1 1 0; min-width: 0; max-width: 150px; }
.shelf img, .shelf-card img { border-radius: 2px 4px 4px 2px; box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.band { display: grid; gap: 18px; padding-top: 26px; border-top: 1px solid var(--line); }
.band-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; }
.band-head a { font-size: 13.5px; font-weight: 600; text-decoration: none; }
.band-head a:hover { text-decoration: underline; }
#catalogue-shelf { display: grid; gap: 28px; }
.shelf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 250px)); gap: 28px; }
.shelf-card { display: grid; gap: 5px; align-content: start; text-decoration: none; color: var(--ink); }
.shelf-card img { margin-bottom: 10px; }
.shelf-card:hover .card-title { text-decoration: underline; }
.card-series { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--husk); font-weight: 700; }
.card-title { font-family: var(--f-display); font-weight: 600; font-size: 17px; line-height: 1.25; }
.card-line { font-size: 13px; color: var(--muted); }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px; }
.card-meta .price { font-size: 17px; }
.book-cover { scroll-margin-top: 16px; }

/* catalogue */
.cat-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.cat-head .lead { margin-top: 8px; }
#catalogue-list { display: grid; }
.book-entry { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 26px; padding-block: 28px; border-top: 1px solid var(--line); }
.book-cover img { border-radius: 2px 4px 4px 2px; box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.cover-cap { font-size: 11px; color: var(--muted); font-style: italic; margin-top: 8px; text-align: center; }
.book-main { display: grid; gap: 14px; min-width: 0; align-content: start; }
.book-title a { color: var(--ink); text-decoration: none; }
.book-title a:hover { text-decoration: underline; }
.under { color: var(--muted); margin-top: 4px; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13.5px; color: var(--muted); }
.facts b { color: var(--ink); font-weight: 600; }
.buyline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.price { font-family: var(--f-display); font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; }
.status { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border-radius: 3px; padding: 3px 8px;
  background: var(--warn-soft); color: var(--warn); }
.status.avail { background: var(--ok-soft); color: var(--ok); }
.isbn { font-size: 13px; border: 1px solid var(--line); border-radius: 3px; padding: 3px 8px; color: var(--muted); font-variant-numeric: tabular-nums; }
.isbn.issued { color: var(--ok); border-color: var(--ok); }
.more { font-size: 13.5px; font-weight: 600; text-decoration: none; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.txt { display: grid; gap: 6px; align-content: start; max-width: 70ch; }
.as-printed { border-left: 2px solid var(--line); padding-left: 12px; margin-top: 6px; color: var(--muted); font-size: 14px; }
.as-printed-label { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 4px; }
.empty { padding: 28px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 16px; }
.order { border: 1px solid var(--line); border-radius: 6px; padding: 20px 22px; display: grid; gap: 10px; max-width: 760px; }
.contacts { display: flex; flex-wrap: wrap; gap: 4px 24px; font-weight: 600; }

/* detail */
.crumbs { font-size: 13px; color: var(--muted); }
.detail { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; align-items: start; }
.detail-main { display: grid; gap: 18px; min-width: 0; }
.spec { width: 100%; max-width: 640px; border-collapse: collapse; font-size: 14px; }
.spec th { text-align: left; font-weight: 500; color: var(--muted); width: 34%; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec td { padding: 8px 0; border-bottom: 1px solid var(--line); }

/* profile, contact */
.identity { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px 32px; margin: 0; }
.identity dt { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.identity dd { margin: 4px 0 0; }
/* profile and contact: details on a plate, books or ordering beside it (PWS 002a step 3) */
.page-split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px 44px; align-items: start; }
.page-split > :only-child { grid-column: 1 / -1; }
.page-main, .page-aside { display: grid; gap: 22px; min-width: 0; align-content: start; }
.page-aside { gap: 14px; }
.page-aside h2 { font-size: 17px; }
.page-aside .shelf { justify-content: flex-start; padding: 18px 16px 0; }
.page-aside .shelf a { max-width: 110px; }
.page-aside .order { max-width: none; background: var(--bg); }
.identity.plate { background: var(--bamboo-soft); border-radius: 6px; padding: 20px 22px; border-left: 4px solid var(--bamboo); }
.message { display: grid; gap: 14px; padding-block: 24px; max-width: 60ch; }

/* footer: publisher identity on every page (P3–P6) */
.s-foot { border-top: 1px solid var(--line); background: var(--bamboo-soft); }
.s-foot-in { padding-block: 24px; display: grid; gap: 6px; font-size: 13.5px; color: var(--muted); }
.s-foot .legal { font-family: var(--f-display); font-weight: 600; font-size: 15px; color: var(--ink); }
.s-foot .row { display: flex; flex-wrap: wrap; gap: 4px 24px; }

@media (max-width: 820px) {
  .hero, .detail, .two, .page-split { grid-template-columns: minmax(0, 1fr); }
  .detail .book-cover { max-width: 220px; }
}
@media (max-width: 560px) {
  .shelf-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .shelf-card { grid-template-columns: 96px minmax(0, 1fr); column-gap: 14px; }
  .shelf-card img { grid-row: span 5; margin-bottom: 0; }
  .book-entry { grid-template-columns: minmax(0, 1fr); }
  .book-entry .book-cover { max-width: 160px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
