:root {
  --paper: #f4f0e7;
  --paper-deep: #e8e0d2;
  --ink: #171a1f;
  --muted: #5d5d59;
  --rust: #a4462f;
  --blue: #173d57;
  --line: rgba(23, 26, 31, 0.18);
  --max: 76rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { color: var(--rust); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--rust); outline-offset: 4px; }

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 20;
  padding: .7rem 1rem;
  background: var(--ink);
  color: white;
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.4rem 2rem;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 240, 231, .94);
  backdrop-filter: blur(14px);
}

.wordmark {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.2rem, 3vw, 1.65rem);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -.025em;
}

.menu-button {
  display: none;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  padding: .55rem .8rem;
  font: inherit;
}

.site-nav { display: flex; align-items: center; gap: 1.35rem; }
.site-nav a { font-size: .9rem; font-weight: 650; text-decoration: none; }
.site-nav a { position: relative; }
.site-nav a::after { content: ""; position: absolute; right: 0; bottom: -.35rem; left: 0; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-nav a[aria-current="page"] { color: var(--rust); }

main { min-height: 65vh; }

.hero, .page-head, .section, .split, .manifesto {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(17rem, .65fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: end;
  padding-top: clamp(4rem, 10vw, 9rem);
  padding-bottom: clamp(4rem, 9vw, 7rem);
}

.kicker {
  margin: 0 0 1rem;
  color: var(--rust);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.08;
  letter-spacing: -.035em;
}

h1 { max-width: 15ch; margin: 0; font-size: clamp(3rem, 8vw, 7.4rem); font-weight: 500; }
.page-head h1 { font-size: clamp(3.1rem, 7vw, 6rem); }
h2 { margin: 0 0 1.3rem; font-size: clamp(2rem, 4vw, 3.7rem); font-weight: 500; }
h3 { margin: 0 0 .55rem; font-size: clamp(1.35rem, 2vw, 1.8rem); }

.hero-note { padding-bottom: .8rem; color: var(--muted); font-size: 1.08rem; }
.hero-note p:first-child { color: var(--ink); font-family: Georgia, serif; font-size: 1.35rem; line-height: 1.45; }

.page-head { padding-top: clamp(4rem, 10vw, 8rem); padding-bottom: 3.5rem; }
.page-head .intro { max-width: 42rem; margin-top: 1.6rem; font-size: clamp(1.12rem, 2vw, 1.35rem); }

.ink-band { background: var(--blue); color: #f8f3e9; }
.ink-band a:hover { color: #f2b49c; }

.section { padding-top: clamp(4rem, 8vw, 7rem); padding-bottom: clamp(4rem, 8vw, 7rem); }
.section-intro { max-width: 44rem; font-size: 1.15rem; }

.split {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  gap: clamp(3rem, 8vw, 8rem);
  padding-top: clamp(4rem, 8vw, 7rem);
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

.split > :first-child { color: var(--muted); }
.split > :last-child > p:first-child { margin-top: 0; }

.work-list { border-top: 1px solid var(--line); }
.work {
  display: grid;
  grid-template-columns: minmax(11rem, .45fr) minmax(0, 1.2fr);
  gap: 2rem;
  padding: 2.2rem 0;
  border-bottom: 1px solid var(--line);
}
.work p { margin: 0; }
.work .meta { margin-top: .6rem; color: var(--muted); font-size: .92rem; }

.title-wall {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 2.5rem;
  background: var(--line);
  border: 1px solid var(--line);
}
.title-wall article { min-height: 13rem; padding: 1.7rem; background: var(--paper); }
.title-wall article:nth-child(3n+2) { background: var(--paper-deep); }
.title-wall p { color: var(--muted); }

.manifesto { padding-top: 4rem; padding-bottom: 4rem; border-top: 1px solid var(--line); }
.manifesto blockquote { max-width: 35ch; margin: 0; font-family: Georgia, serif; font-size: clamp(1.7rem, 4vw, 3rem); line-height: 1.3; }

.text-link { display: inline-block; margin-top: 1rem; font-weight: 750; }

.books-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 3rem; align-items: end; }
.books-head .kicker, .books-head h1 { grid-column: 1; }
.books-head .intro { grid-column: 1; }
.catalogue-count { grid-column: 2; grid-row: 2 / 4; align-self: end; margin: 0 0 .4rem; padding: .6rem .85rem; border: 1px solid var(--line); color: var(--muted); font-size: .82rem; font-weight: 700; letter-spacing: .04em; }
.catalogue { padding-top: 1rem; }
.catalogue-group { display: grid; grid-template-columns: minmax(10rem, .35fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); padding: 3.5rem 0; border-top: 1px solid var(--line); }
.catalogue-group > h2 { font-size: clamp(1.45rem, 2.2vw, 2rem); }
.book-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3rem 2rem; }
.book-card { display: grid; grid-template-columns: minmax(7.2rem, .7fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.book-cover-link { display: block; background: var(--paper-deep); box-shadow: 0 12px 28px rgba(23, 26, 31, .12); transition: transform .2s ease, box-shadow .2s ease; }
.book-cover-link:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(23, 26, 31, .18); }
.book-cover { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.book-category { margin: 0 0 .5rem; color: var(--rust); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.book-card h3 { font-size: clamp(1.2rem, 1.6vw, 1.55rem); }
.book-card h3 a { text-decoration: none; }
.book-card p:not(.book-category) { color: var(--muted); font-size: .92rem; line-height: 1.55; }
.book-more { font-size: .83rem; font-weight: 750; text-decoration: none; }

.book-detail { display: grid; grid-template-columns: minmax(16rem, .72fr) minmax(0, 1.28fr); gap: clamp(3rem, 8vw, 8rem); align-items: start; max-width: var(--max); margin: 0 auto; padding: clamp(4rem, 8vw, 7rem) 2rem; }
.book-detail-cover { position: sticky; top: 7rem; justify-self: center; width: min(100%, 24rem); padding: 1.1rem; background: var(--paper-deep); box-shadow: 0 24px 54px rgba(23, 26, 31, .16); transform: rotate(-.6deg); }
.book-detail-cover img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.book-detail-copy { padding-top: 1rem; }
.book-detail-copy h1 { max-width: 12ch; font-size: clamp(2.8rem, 6vw, 5.5rem); }
.back-link { display: inline-block; margin-bottom: 4rem; color: var(--muted); font-size: .85rem; font-weight: 700; text-decoration: none; }
.book-description { max-width: 42rem; margin: 2rem 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.15rem, 2vw, 1.38rem); line-height: 1.65; }
.book-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.primary-action, .secondary-action { display: inline-block; padding: .78rem 1rem; border: 1px solid var(--ink); font-size: .9rem; font-weight: 750; text-decoration: none; }
.primary-action { background: var(--ink); color: var(--paper); }
.primary-action:hover { background: var(--rust); border-color: var(--rust); color: white; }
.secondary-action:hover { border-color: var(--rust); }
.edition-note { max-width: 38rem; margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.edition-note h2 { margin-bottom: .5rem; font-size: 1.35rem; }
.edition-note p { margin: 0; color: var(--muted); }

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.3rem 2rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .88rem;
}
.site-footer p { margin: .25rem 0; }

@media (max-width: 900px) {
  .hero, .split { grid-template-columns: 1fr; gap: 2.4rem; }
  .hero { align-items: start; }
  .title-wall { grid-template-columns: repeat(2, 1fr); }
  .site-header { align-items: flex-start; }
  .menu-button { display: block; }
  .site-nav { display: none; position: absolute; top: 4.6rem; right: 1rem; left: 1rem; z-index: 10; flex-direction: column; align-items: stretch; gap: 0; padding: .8rem; background: var(--paper); border: 1px solid var(--ink); box-shadow: 0 1rem 2rem rgba(0,0,0,.15); }
  .site-nav[data-open="true"] { display: flex; }
  .site-nav a { padding: .75rem; }
  .site-nav a::after { display: none; }
  .catalogue-group { grid-template-columns: 1fr; gap: 1.5rem; }
  .book-detail { grid-template-columns: minmax(13rem, .62fr) minmax(0, 1fr); gap: 3rem; }
}

@media (max-width: 620px) {
  .site-header, .hero, .page-head, .section, .split, .manifesto, .site-footer { padding-left: 1.2rem; padding-right: 1.2rem; }
  .hero { padding-top: 4.5rem; }
  .work { grid-template-columns: 1fr; gap: .5rem; }
  .title-wall { grid-template-columns: 1fr; }
  .books-head { display: block; }
  .catalogue-count { display: inline-block; margin-top: 1.25rem; }
  .book-grid { grid-template-columns: 1fr; }
  .book-card { grid-template-columns: 7.5rem minmax(0, 1fr); }
  .book-detail { grid-template-columns: 1fr; padding-left: 1.2rem; padding-right: 1.2rem; }
  .book-detail-cover { position: static; width: min(78%, 19rem); }
  .back-link { margin-bottom: 2.5rem; }
  h1 { font-size: clamp(2.8rem, 15vw, 4.8rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  .menu-button, .site-nav { display: none; }
  body { background: white; color: black; }
}
