:root {
  color-scheme: light;
  --ink: #242124;
  --muted: #6d6168;
  --paper: #fff8f5;
  --panel: #ffffff;
  --line: #eadbd8;
  --rose: #b14c65;
  --plum: #563347;
  --gold: #bf7c2a;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Montserrat, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 248, 245, 0.97);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max);
  min-height: 92px;
  margin: 0 auto;
  padding: 14px 24px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
}

.brand-monogram {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d8b8b3;
  border-radius: 50%;
  background: #fffdfb;
  color: var(--plum);
  font-family: "Roboto Slab", Georgia, serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-wordmark {
  color: var(--plum);
  font-family: "Roboto Slab", Georgia, serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 0.95;
  text-transform: uppercase;
}

.brand-wordmark span {
  color: var(--rose);
  font-family: "Sorts Mill Goudy", Georgia, serif;
  font-size: 34px;
  font-style: italic;
  font-weight: 400;
  text-transform: none;
}

.brand-tagline {
  color: var(--muted);
  font-family: "Sorts Mill Goudy", Georgia, serif;
  font-size: 15px;
  font-style: italic;
  line-height: 1.2;
}

.primary-nav {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 6px;
}

.primary-nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 4px;
  color: var(--plum);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  background: #f2dfdd;
  color: var(--rose);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--plum);
  min-height: 40px;
  padding: 0 14px;
  font: inherit;
  font-weight: 700;
}

main {
  min-height: calc(100vh - 220px);
}

.hero,
.section,
.standard-page,
.book-page,
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.hero {
  min-height: calc(100vh - 92px);
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
  align-items: center;
  gap: 58px;
  padding-top: 56px;
  padding-bottom: 56px;
}

.hero-cover,
.book-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-cover img,
.book-cover {
  width: min(100%, 420px);
  height: auto;
  max-height: 74vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 24px 70px rgba(86, 51, 71, 0.22);
}

.hero-copy {
  max-width: 660px;
}

.eyebrow,
.post-date {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--plum);
  font-family: "Roboto Slab", Georgia, serif;
  line-height: 1.16;
}

h1 {
  margin: 0 0 22px;
  font-size: clamp(38px, 6vw, 70px);
}

h2 {
  margin: 0 0 18px;
  font-size: clamp(28px, 4vw, 46px);
}

h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

p {
  margin: 0 0 18px;
}

.button-row,
.buy-links,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--rose);
  border-radius: 4px;
  background: var(--rose);
  color: white;
  font-weight: 700;
  text-decoration: none;
}

.button.secondary,
.button:hover {
  background: transparent;
  color: var(--rose);
}

.button.secondary:hover {
  background: var(--rose);
  color: white;
}

.section {
  padding-top: 64px;
  padding-bottom: 72px;
}

.section-heading {
  margin-bottom: 28px;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.book-card {
  display: grid;
  grid-template-rows: minmax(0, auto) 1fr;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 14px 38px rgba(86, 51, 71, 0.08);
}

.cover-link {
  display: grid;
  place-items: center;
  min-height: 330px;
  padding: 24px;
  background: linear-gradient(145deg, #f5e7e3, #fffaf7);
}

.cover-link img {
  width: min(100%, 210px);
  height: auto;
  max-height: 315px;
  object-fit: contain;
  display: block;
  border-radius: 5px;
  box-shadow: 0 18px 36px rgba(36, 33, 36, 0.2);
}

.book-card-copy {
  padding: 18px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.book-card h3 {
  margin-bottom: 8px;
  font-size: 21px;
}

.book-card h3 a,
.featured-book h2 a,
.text-link,
.post-list a {
  color: var(--plum);
  text-decoration: none;
}

.book-card h3 a:hover,
.featured-book h2 a:hover,
.text-link:hover,
.post-list a:hover {
  color: var(--rose);
}

.book-card p {
  color: var(--muted);
  font-size: 14px;
}

.book-format {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.book-subtitle {
  color: var(--plum) !important;
  font-family: "Sorts Mill Goudy", Georgia, serif;
  font-size: 18px !important;
  font-style: italic;
  line-height: 1.35;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: auto 0 18px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #efd9d5;
  border-radius: 999px;
  background: #fff8f5;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.catalog-hero {
  max-width: none;
  margin: 0 auto;
  padding: 72px max(24px, calc((100vw - var(--max)) / 2)) 56px;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(430px, 1.18fr);
  gap: 48px;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(255, 248, 245, 0.96), rgba(255, 248, 245, 0.78)),
    #f7e7e4;
  border-bottom: 1px solid var(--line);
}

.catalog-hero-copy > p:not(.eyebrow) {
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
}

.catalog-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
}

.catalog-stats span {
  min-height: 82px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 13px;
}

.catalog-stats strong {
  display: block;
  color: var(--plum);
  font-family: "Roboto Slab", Georgia, serif;
  font-size: 22px;
  line-height: 1.2;
}

.catalog-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.catalog-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #e2c6c1;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--plum);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.catalog-nav a:hover {
  border-color: var(--rose);
  color: var(--rose);
}

.featured-book {
  display: grid;
  grid-template-columns: minmax(190px, 280px) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 30px;
  border: 1px solid #e6cfca;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 28px 80px rgba(86, 51, 71, 0.18);
}

.featured-cover {
  display: block;
}

.featured-cover img {
  width: 100%;
  height: auto;
  max-height: 380px;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 46px rgba(36, 33, 36, 0.22);
}

.featured-book h2 {
  margin-bottom: 10px;
  font-size: clamp(26px, 3vw, 38px);
}

.catalog-section {
  padding-top: 56px;
}

.book-shelf + .book-shelf {
  margin-top: 86px;
}

.shelf-heading {
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(260px, 0.5fr);
  gap: 28px;
  align-items: end;
}

.shelf-heading p:last-child {
  margin-bottom: 20px;
  color: var(--muted);
}

.catalog-section .book-shelf {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
}

.catalog-section .book-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 30px 22px;
}

.catalog-section .book-card {
  display: flex;
  flex-direction: column;
  border: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.catalog-section .cover-link {
  min-height: 0;
  padding: 0;
  background: transparent;
}

.catalog-section .cover-link img {
  width: min(100%, 190px);
  margin: 0 auto;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.catalog-section .book-card:hover .cover-link img {
  transform: translateY(-5px);
  box-shadow: 0 24px 48px rgba(36, 33, 36, 0.24);
}

.catalog-section .book-card-copy {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 0;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(86, 51, 71, 0.08);
}

.catalog-section .book-card h3 {
  font-size: 18px;
}

.catalog-section .book-card p:not(.book-format):not(.book-subtitle) {
  display: -webkit-box;
  min-height: 66px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.catalog-section .tag-row {
  margin-top: 4px;
}

.catalog-section .tag-row span {
  font-size: 11px;
}

.card-actions a,
.text-link {
  color: var(--rose);
  font-weight: 700;
}

.text-link {
  display: inline-block;
  margin-top: 28px;
}

.book-page {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 58px;
  padding-top: 64px;
  padding-bottom: 72px;
}

.book-aside {
  position: sticky;
  top: 130px;
  align-self: start;
  gap: 18px;
}

.article-body {
  max-width: 760px;
}

.book-detail {
  max-width: 820px;
}

.detail-subtitle {
  margin-top: -8px;
  color: var(--plum);
  font-family: "Sorts Mill Goudy", Georgia, serif;
  font-size: 26px;
  font-style: italic;
  line-height: 1.35;
}

.detail-hook {
  max-width: 760px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.55;
}

.detail-tags {
  margin: 4px 0 28px;
}

.book-detail .article-body {
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.article-body h1:first-child,
.article-body h2:first-child,
.article-body h3:first-child {
  margin-top: 0;
}

.article-body h2,
.article-body h3 {
  margin-top: 34px;
}

blockquote {
  margin: 24px 0;
  padding: 18px 22px;
  border-left: 4px solid var(--rose);
  background: var(--panel);
  color: var(--muted);
}

.standard-page {
  padding-top: 64px;
  padding-bottom: 72px;
}

.about-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: center;
}

.portrait,
.inline-image {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(86, 51, 71, 0.16);
}

.portrait {
  aspect-ratio: 1;
  object-fit: cover;
}

.inline-image {
  max-width: 420px;
  margin: 0 0 24px;
}

.post-list {
  display: grid;
  gap: 26px;
}

.post-list article {
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.post-list h2 {
  font-size: 28px;
}

.site-footer {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer p {
  margin: 4px 0 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer a {
  color: var(--plum);
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 860px) {
  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .brand {
    gap: 10px;
  }

  .brand-monogram {
    width: 38px;
    height: 38px;
    font-size: 13px;
  }

  .brand-wordmark {
    font-size: 22px;
  }

  .brand-wordmark span {
    font-size: 26px;
  }

  .brand-tagline {
    max-width: 190px;
    font-size: 13px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
  }

  .primary-nav {
    grid-column: 1 / -1;
    justify-self: stretch;
    display: none;
    flex-direction: column;
    align-items: stretch;
  }

  .primary-nav.is-open {
    display: flex;
  }

  .primary-nav a {
    padding: 0;
  }

  .hero,
  .catalog-hero,
  .book-page,
  .about-page {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
    padding-top: 40px;
  }

  .book-aside {
    position: static;
  }

  .catalog-hero {
    padding-top: 42px;
  }

  .catalog-stats,
  .featured-book,
  .shelf-heading {
    grid-template-columns: 1fr;
  }

  .featured-cover img {
    max-height: 420px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-top: 24px;
    padding-bottom: 24px;
  }
}
