/* Круг — «бумажный архив / библиотечная картотека», светлая тема.
   Токены: --paper фон, --ink текст/рамки, --accent единственный акцент. */

:root {
  --paper: #f6f1e7;
  --ink: #1c1a17;
  --accent: #c8371e;
  --line: #1c1a17;
  --sans: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "Cascadia Mono", "JetBrains Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}

.serif { font-family: var(--serif); font-weight: 400; }
.mono { font-family: var(--mono); }

a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--ink); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 780px; }
.block { padding: 44px 22px 8px; }
main { min-height: 60vh; }

.kicker {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 10px;
}
.kicker a { color: var(--accent); }

h1 { font-size: clamp(34px, 6vw, 54px); line-height: 1.08; font-weight: 400; margin-bottom: 18px; }
h2 { font-size: 26px; font-weight: 400; margin-bottom: 14px; }

/* ---------- header ---------- */
.site-head { border-bottom: 1px solid var(--line); background: var(--paper); }
.head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 20px; }
.brand { text-decoration: none; color: var(--ink); display: flex; align-items: baseline; gap: 12px; }
.brand-name { font-size: 30px; letter-spacing: 0.02em; }
.brand-sub { font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--accent); }
.site-nav { display: flex; gap: 20px; }
.site-nav a {
  font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink); text-decoration: none; border-bottom: 1px solid transparent; padding-bottom: 3px;
}
.site-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- hero ---------- */
.hero { padding-top: 64px; padding-bottom: 20px; }
.hero h1 { max-width: 21ch; }
.hero-text { max-width: 640px; display: grid; gap: 14px; margin-bottom: 26px; }
.hero-text p { font-size: 17px; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block; border: 1px solid var(--line); background: var(--ink); color: var(--paper);
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 12px 22px; text-decoration: none; border-radius: 0;
}
.btn:hover { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.btn-ghost { background: var(--paper); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* ---------- новинки (строки) ---------- */
.rows { border-top: 1px solid var(--line); }
.row {
  display: flex; align-items: baseline; gap: 16px;
  padding: 13px 4px; border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--ink);
}
.row:hover { background: var(--ink); color: var(--paper); }
.row:hover .row-title { color: var(--paper); }
.row-inv { font-size: 12px; white-space: nowrap; }
.row-new {
  font-size: 10px; letter-spacing: 0.12em; color: var(--accent);
  border: 1px solid var(--accent); padding: 1px 5px; white-space: nowrap;
}
.row:hover .row-new { color: var(--paper); border-color: var(--paper); }
.row-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.row-title { font-size: 19px; line-height: 1.25; color: var(--ink); }
.row-meta { font-size: 12px; }
.row-price { font-size: 15px; color: var(--accent); white-space: nowrap; }
.row:hover .row-price { color: var(--paper); }
.empty { padding: 16px 0; font-size: 14px; }

/* ---------- жанры ---------- */
.genres { list-style: none; border-top: 1px solid var(--line); max-width: 640px; }
.genres li { border-bottom: 1px solid var(--line); padding: 10px 2px; font-size: 14px; }
.genres li span { color: var(--ink); }

/* ---------- каталог ---------- */
.cat-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; padding-top: 44px; }
.search { display: flex; gap: 8px; }
.search input {
  font-family: var(--mono); font-size: 14px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); padding: 9px 12px; min-width: 240px;
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.search button {
  font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em;
  border: 1px solid var(--line); background: var(--ink); color: var(--paper); padding: 9px 16px; cursor: pointer;
}
.search button:hover { background: var(--accent); border-color: var(--accent); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.chips a {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em;
  text-decoration: none; color: var(--ink); border: 1px solid var(--line); padding: 6px 12px;
}
.chips a:hover { background: var(--ink); color: var(--paper); }

.count { margin: 20px 0 18px; font-size: 13px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; padding-bottom: 56px; }
.card {
  display: flex; flex-direction: column; gap: 8px; position: relative;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  padding: 18px 16px 16px; text-decoration: none;
}
.card:hover, .card:focus-visible { background: var(--ink); color: var(--paper); }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.inv { position: absolute; top: 12px; right: 14px; font-size: 11px; letter-spacing: 0.06em; }
.card-t { font-size: 19px; line-height: 1.28; padding-right: 58px; }
.meta { font-size: 12px; }
.p { font-size: 16px; color: var(--accent); }
.card:hover .p, .card:focus-visible .p { color: var(--paper); }
.d { font-size: 13.5px; line-height: 1.45; }

.empty-block { border: 1px solid var(--line); padding: 26px; display: grid; gap: 8px; margin-bottom: 56px; }
.empty-block p:first-child { font-size: 22px; }

/* ---------- карточка товара («библиотечная карточка») ---------- */
.crumbs { font-size: 12px; margin: 26px 0 14px; }
.crumbs:last-of-type { display: inline-block; margin-top: 26px; }
.crumbs a { color: var(--accent); }

.doc { border: 1px solid var(--line); }
.doc-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 18px;
  border-bottom: 1px solid var(--line); padding: 20px 22px;
}
.doc-head h1 { font-size: clamp(24px, 4vw, 36px); margin: 0; }
.doc-inv { font-size: 13px; white-space: nowrap; }
.doc-cols { display: grid; grid-template-columns: 1.6fr 1fr; }
.doc-main { padding: 0 22px 22px; }
.doc-side { border-left: 1px solid var(--line); padding: 0 22px 22px; }

.fields { margin-top: 20px; }
.fr { display: grid; grid-template-columns: 150px 1fr; gap: 14px; border-top: 1px solid var(--line); }
.fr:last-child { border-bottom: 1px solid var(--line); }
.fr dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.1em; padding: 10px 0; }
.fr dd { padding: 8px 0; font-size: 15.5px; }
.fr .price { font-size: 18px; color: var(--accent); }

.sec-k { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }
.tracks { margin-top: 28px; }
.tracks-list { list-style: none; counter-reset: tr; max-width: 560px; }
.tracks-list li {
  counter-increment: tr; border-bottom: 1px solid var(--line); padding: 8px 2px;
  display: flex; gap: 14px; font-size: 15px;
}
.tracks-list li::before { content: counter(tr, decimal-leading-zero); font-family: var(--mono); font-size: 12px; color: var(--accent); }
.desc { margin-top: 28px; max-width: 640px; }
.desc p { font-size: 15.5px; }

.label-block { border: 1px solid var(--line); padding: 16px; margin-top: 20px; }
.label-name { font-size: 20px; margin-bottom: 8px; }
.label-name a { text-decoration: none; }
.label-name a:hover { text-decoration: underline; }
.label-about { font-size: 13.5px; line-height: 1.5; }
.label-link { font-size: 12px; margin-top: 10px; }
.listen { border: 1px solid var(--line); padding: 16px; margin-top: 16px; font-size: 13px; line-height: 1.55; }

/* ---------- о магазине ---------- */
.prose { display: grid; gap: 14px; max-width: 680px; margin-bottom: 30px; }
.prose p { font-size: 16.5px; }
.hours { border: 1px solid var(--line); padding: 18px 20px; max-width: 460px; }
.hours-k { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 10px; }
.hours-t { border-collapse: collapse; width: 100%; }
.hours-t td { border-top: 1px solid var(--line); padding: 8px 0; font-size: 13.5px; }
.hours-t td:last-child { text-align: right; }
.hours-note { font-size: 12px; margin-top: 12px; }

/* ---------- форма ---------- */
.order-form { display: grid; gap: 18px; max-width: 560px; margin-top: 8px; }
.field { display: grid; gap: 6px; }
.field-k { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.1em; }
.field input, .field textarea {
  font-family: var(--sans); font-size: 15px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); padding: 11px 12px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.thanks { border: 1px solid var(--accent); color: var(--accent); padding: 12px 16px; font-size: 13.5px; margin-bottom: 22px; }

/* ---------- футер ---------- */
.site-foot { border-top: 1px solid var(--line); margin-top: 64px; }
.foot-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; padding-top: 30px; padding-bottom: 18px; }
.foot-col p { font-size: 12.5px; line-height: 1.7; }
.foot-k { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 8px; }
.foot-line { border-top: 1px solid var(--line); font-size: 11.5px; padding-top: 12px; padding-bottom: 26px; }
.foot-col a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.foot-col a:hover { color: var(--accent); }

/* ---------- адаптив ---------- */
@media (max-width: 900px) {
  .doc-cols { grid-template-columns: 1fr; }
  .doc-side { border-left: none; border-top: 1px solid var(--line); }
  .fr { grid-template-columns: 120px 1fr; }
}
@media (max-width: 759px) {
  .grid { grid-template-columns: 1fr; }
  .foot-row { grid-template-columns: 1fr; gap: 18px; }
  .cat-head { align-items: stretch; flex-direction: column; }
  .search input { min-width: 0; flex: 1; }
  .search { width: 100%; }
}
