:root {
  --paper: #f6efe2;
  --paper-2: #efe5d2;
  --card: #fffaf0;
  --ink: #2b1d14;
  --ink-soft: #5b4a3c;
  --saddle: #5a3419;
  --leather: #3a2312;
  --rust: #a2432b;
  --brass: #b88a3b;
  --brass-dark: #8f6a26;
  --line: #d8c9ab;
  --serif: "Libre Caslon Text", "Iowan Old Style", Palatino, Georgia, serif;
  --label: "Oswald", "Arial Narrow", Impact, sans-serif;
  --radius: 4px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--rust); text-underline-offset: 3px; }
a:hover { color: var(--saddle); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); }
.center { text-align: center; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-soft); }
.muted-light { color: #cdbb9d; }

/* Header */
.site-header { background: var(--leather); border-bottom: 3px solid var(--brass); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; flex-wrap: wrap; }
.wordmark { text-decoration: none; display: flex; flex-direction: column; line-height: 1.1; }
.wordmark-main { font-size: 1.35rem; font-weight: 700; color: #f6e7c8; }
.wordmark-sub { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.22em; font-size: 0.68rem; color: var(--brass); margin-top: 4px; }
.site-header nav { display: flex; gap: 24px; }
.site-header nav a { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.85rem; color: #e9d9b8; text-decoration: none; }
.site-header nav a:hover { color: #fff; }

/* Buttons */
.btn {
  display: inline-block; font-family: var(--label); text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 0.9rem; padding: 12px 24px; border-radius: var(--radius); border: 2px solid transparent;
  cursor: pointer; text-decoration: none; transition: background 0.15s, color 0.15s;
}
.btn-brass { background: var(--brass); color: #1f1208; border-color: var(--brass); }
.btn-brass:hover { background: #cb9c48; color: #1f1208; }
.btn-ghost { color: #f6e7c8; border-color: #f6e7c8; }
.btn-ghost:hover { background: #f6e7c8; color: var(--leather); }
.btn-dark { background: var(--leather); color: #f6e7c8; }
.btn-dark:hover { background: var(--saddle); color: #fff; }
.btn-lg { font-size: 1.05rem; padding: 15px 34px; }
.btn[disabled] { opacity: 0.6; cursor: wait; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .chip:focus-visible {
  outline: 3px solid var(--rust); outline-offset: 2px;
}

/* Hero */
.hero {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 14px),
    linear-gradient(180deg, #4a2b14, #2f1a0c);
  color: #f6e7c8; text-align: center; padding: clamp(56px, 10vw, 120px) 0;
}
.hero h1 { font-size: clamp(2.2rem, 6vw, 4rem); letter-spacing: 0.01em; margin-bottom: 0.35em; }
.eyebrow { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.28em; font-size: 0.8rem; color: var(--brass); margin-bottom: 1.2em; }
.lede { max-width: 640px; margin: 0 auto 1.8em; font-size: 1.2rem; font-style: italic; color: #ecdcbc; }
.cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.strip { background: var(--saddle); color: #f6e7c8; }
.strip-row { display: flex; justify-content: space-around; gap: 20px; padding: 18px 0; text-align: center; flex-wrap: wrap; }
.strip strong { display: block; font-size: 1.9rem; color: var(--brass); line-height: 1.1; }
.strip span { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.72rem; }

/* Sections */
.section { padding: clamp(36px, 6vw, 72px) 0; }
.section-alt { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; gap: 12px; }
.section-head h2 { margin: 0; font-size: 1.7rem; }
.page-head { background: var(--paper-2); border-bottom: 1px solid var(--line); padding: 34px 0 22px; }
.page-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 0.15em; }
.split { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.signup-box { background: var(--card); border: 1px solid var(--line); padding: 26px; border-radius: var(--radius); }
.signup-box h3 { font-size: 1.25rem; }
.prose-lead { font-size: 1.2rem; }
.h-small { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.85rem; color: var(--rust); margin: 1.8em 0 0.6em; font-weight: 500; }

/* Grid + cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform 0.15s, box-shadow 0.15s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(58, 35, 18, 0.18); color: var(--ink); }
.card-cover { aspect-ratio: 3 / 4; background: var(--paper-2); }
.card-cover img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.card h3 { font-size: 1.02rem; margin: 6px 0 0; }
.card-author { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }
.card-price { font-weight: 700; margin: auto 0 0; padding-top: 8px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; min-height: 22px; }
.badge { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.68rem; padding: 2px 8px; border: 1px solid var(--brass-dark); color: var(--brass-dark); border-radius: 2px; background: rgba(184, 138, 59, 0.1); }
.badge-signed { border-color: var(--rust); color: var(--rust); background: rgba(162, 67, 43, 0.08); }
.badge-hold { border-color: var(--ink-soft); color: var(--ink-soft); background: transparent; }

/* Generated cover tile (used until you add a photo) */
.cover-tile {
  height: 100%; background: var(--tile, var(--saddle)); color: #f6e7c8; padding: 20px 18px;
  display: flex; flex-direction: column; justify-content: space-between; text-align: center;
  box-shadow: inset 0 0 0 6px var(--tile, var(--saddle)), inset 0 0 0 7px rgba(214, 170, 82, 0.8), inset 0 0 0 11px var(--tile, var(--saddle)), inset 0 0 0 12px rgba(214, 170, 82, 0.45);
}
.tile-author { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.74rem; color: #e3c27a; padding: 4px 8px 0; }
.tile-title { font-size: clamp(1rem, 2.2vw, 1.3rem); font-weight: 700; line-height: 1.2; padding: 0 8px; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.tile-ed { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.66rem; color: #e3c27a; padding-bottom: 4px; }

/* Catalog filters */
.filters { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; margin-bottom: 14px; }
.filters input[type="search"] { flex: 1 1 240px; min-width: 0; font: inherit; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8rem; padding: 9px 16px; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; cursor: pointer; }
.chip.is-active { background: var(--leather); color: #f6e7c8; border-color: var(--leather); }
.sort { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8rem; display: flex; align-items: center; gap: 8px; }
.sort select { font: 1rem var(--serif); padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); text-transform: none; letter-spacing: 0; }
.empty { text-align: center; padding: 40px 0; }

/* Book page */
.crumbs { margin-bottom: 20px; font-size: 0.95rem; }
.book { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: clamp(24px, 5vw, 56px); align-items: start; }
.book-media { display: grid; gap: 14px; }
.book-media > .cover-tile { aspect-ratio: 3 / 4; border-radius: var(--radius); }
.book-media img { border: 1px solid var(--line); border-radius: var(--radius); }
.book-info h1 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin-top: 10px; }
.by { font-size: 1.15rem; font-style: italic; color: var(--ink-soft); }
.buybox { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--brass); border-radius: var(--radius); padding: 20px 22px; margin: 18px 0 8px; }
.price { font-size: 2rem; font-weight: 700; margin: 0 0 10px; line-height: 1.1; }
.fine { font-size: 0.85rem; color: var(--ink-soft); margin: 10px 0 0; }
.notice { margin: 0; }
.buy-msg { color: var(--rust); margin: 8px 0 0; min-height: 1.2em; font-size: 0.95rem; }
.details { border-collapse: collapse; width: 100%; font-size: 0.97rem; }
.details th { text-align: left; width: 34%; font-weight: 400; color: var(--ink-soft); padding: 7px 12px 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.details td { padding: 7px 0; border-bottom: 1px solid var(--line); }

/* Forms */
.inquiry { display: grid; gap: 14px; max-width: 560px; }
.inquiry label { display: grid; gap: 4px; font-size: 0.95rem; }
input, textarea, select { font: inherit; }
.inquiry input, .inquiry textarea { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); width: 100%; }
.signup { display: flex; gap: 10px; flex-wrap: wrap; }
.signup input[type="email"] { flex: 1 1 200px; min-width: 0; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); }

/* Footer */
.site-footer { background: var(--leather); color: #f6e7c8; padding: 36px 0; border-top: 3px solid var(--brass); margin-top: 20px; }
.footer-row { display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.footer-row p { margin: 0 0 6px; }
.footer-name { font-weight: 700; font-size: 1.1rem; }
.site-footer a { color: #e9d9b8; }

@media (max-width: 760px) {
  body { font-size: 17px; }
  .split, .book { grid-template-columns: 1fr; }
  .header-row { justify-content: center; text-align: center; }
  .wordmark { align-items: center; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .card-body { padding: 10px 12px 14px; }
  .book-media { max-width: 340px; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .btn { transition: none; }
  .card:hover { transform: none; }
}
