:root {
  --paper: #f5f0e7;
  --paper-deep: #e9e0d1;
  --ink: #17211e;
  --muted: #5e655f;
  --forest: #173f38;
  --forest-light: #2a5a51;
  --clay: #a64c32;
  --gold: #c9943c;
  --line: rgba(23, 33, 30, 0.18);
  --white: #fffdf8;
  --wood: #71452d;
  --wood-light: #99694b;
  --shadow: 0 18px 45px rgba(31, 34, 28, 0.12);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 4%, rgba(201, 148, 60, 0.12), transparent 22rem),
    var(--paper);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 0.12em;
}

:focus-visible {
  outline: 3px solid #e2a849;
  outline-offset: 4px;
}

::selection {
  color: var(--white);
  background: var(--clay);
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--white);
  background: var(--forest);
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 240, 231, 0.94);
  backdrop-filter: blur(14px);
}

.header-inner,
.hero,
.bookshelf-section,
.catalog-section,
.about-section,
.footer-inner {
  width: min(100% - 2rem, 1180px);
  margin-inline: auto;
}

.header-inner {
  display: flex;
  min-height: 5.4rem;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--forest);
  text-decoration: none;
}

.wordmark-mark {
  flex: none;
}

.wordmark span {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.wordmark strong {
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.wordmark small {
  margin-top: 0.28rem;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.4rem);
}

nav a {
  position: relative;
  font-size: 0.86rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-decoration: none;
  text-transform: uppercase;
}

nav a::after {
  position: absolute;
  right: 0;
  bottom: -0.35rem;
  left: 0;
  height: 2px;
  background: var(--clay);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

nav a:hover::after,
nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.hero {
  display: grid;
  min-height: 43rem;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.33fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 8rem);
  padding-block: clamp(5rem, 10vw, 8rem);
}

.hero-copy {
  max-width: 54rem;
}

.eyebrow {
  margin: 0 0 1.1rem;
  color: var(--clay);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
.catalog-body h3,
.about-intro h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 14ch;
  margin-bottom: 2rem;
  font-size: clamp(3.5rem, 8vw, 7.2rem);
  line-height: 0.92;
}

h1 em {
  color: var(--clay);
  font-weight: 400;
}

.hero-intro {
  max-width: 43rem;
  margin-bottom: 2.2rem;
  color: #3f4944;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.42rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.button {
  display: inline-flex;
  min-height: 3.3rem;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.25rem;
  border: 1px solid transparent;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: var(--white);
  background: var(--forest);
  box-shadow: 0 10px 25px rgba(23, 63, 56, 0.22);
}

.button-primary:hover {
  background: var(--forest-light);
}

.text-link {
  color: var(--forest);
  font-size: 0.86rem;
  font-weight: 750;
  text-decoration-color: rgba(23, 63, 56, 0.32);
}

.hero-note {
  position: relative;
  padding: 2rem 0 2rem 2rem;
  border-left: 1px solid var(--line);
}

.hero-note::before {
  position: absolute;
  top: -0.25rem;
  left: -0.25rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--clay);
  content: "";
}

.note-number {
  display: block;
  color: var(--forest);
  font-family: var(--serif);
  font-size: 6rem;
  line-height: 0.8;
}

.note-label {
  display: block;
  margin: 1rem 0 1.6rem;
  color: var(--clay);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero-note p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.bookshelf-section {
  padding-block: clamp(5rem, 9vw, 8rem);
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.52fr);
  align-items: end;
  gap: 3rem;
  margin-bottom: 4rem;
}

.section-heading h2,
.about-intro h2 {
  margin-bottom: 0;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1;
}

.section-heading > p {
  margin: 0;
  color: var(--muted);
}

.shelf {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4rem clamp(1rem, 2.6vw, 2rem);
}

.shelf-book {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.shelf-book::after {
  position: absolute;
  z-index: -1;
  right: -0.6rem;
  bottom: 4.9rem;
  left: -0.6rem;
  height: 1.1rem;
  border-radius: 3px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.18), transparent 35%),
    repeating-linear-gradient(92deg, transparent 0 38px, rgba(44, 22, 10, 0.16) 39px 41px),
    linear-gradient(90deg, var(--wood), var(--wood-light) 48%, var(--wood));
  box-shadow: 0 9px 13px rgba(36, 24, 15, 0.24), inset 0 -3px 0 rgba(42, 22, 12, 0.28);
  content: "";
}

.book-cover {
  position: relative;
  display: flex;
  width: min(100%, 11.4rem);
  aspect-ratio: 2 / 3;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 0.32rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fffaf0;
  background: #e8dfcf;
  box-shadow: -5px 4px 0 rgba(50, 30, 18, 0.2), 0 16px 20px rgba(38, 31, 22, 0.25);
  text-align: left;
  text-decoration: none;
  transform-origin: bottom;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.book-cover::before,
.book-cover::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.book-cover::before {
  inset: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.book-cover::after {
  display: none;
}

.book-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.book-cover:hover,
.book-cover:focus-visible {
  box-shadow: -5px 4px 0 rgba(50, 30, 18, 0.16), 0 22px 30px rgba(38, 31, 22, 0.3);
  transform: translateY(-0.45rem) rotate(-0.8deg);
}

.tone-forest { --cover: #214f45; }
.tone-clay { --cover: #974b35; }
.tone-gold { --cover: #a87625; }
.tone-blue { --cover: #315a68; }
.tone-plum { --cover: #68425b; }
.tone-rust { --cover: #7b3b2c; }
.tone-midnight { --cover: #24354a; }
.tone-sage { --cover: #4c6a58; }
.tone-ink { --cover: #292d31; }
.tone-rose { --cover: #845451; }

.cover-kicker,
.cover-subtitle,
.cover-author,
.cover-status {
  position: relative;
  z-index: 1;
}

.cover-kicker {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  opacity: 0.82;
  text-transform: uppercase;
}

.book-cover strong {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  font-size: clamp(1.22rem, 2vw, 1.75rem);
  font-weight: 400;
  line-height: 0.98;
}

.cover-subtitle {
  margin-top: 0.7rem;
  font-family: var(--serif);
  font-size: 0.7rem;
  font-style: italic;
  line-height: 1.25;
  opacity: 0.85;
}

.cover-author {
  position: absolute;
  right: 1rem;
  bottom: 1.7rem;
  left: 1rem;
  font-size: 0.56rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
}

.cover-status {
  position: absolute;
  right: 0.6rem;
  bottom: 0.45rem;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.43rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shelf-book h3 {
  margin: 2.1rem 0 0.15rem;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.25;
}

.shelf-book > p {
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.details-link {
  margin-top: auto;
  color: var(--clay);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.catalog-section {
  padding-block: clamp(5rem, 9vw, 8rem);
}

.catalog-heading {
  padding-top: 1rem;
  border-top: 3px solid var(--ink);
}

.catalog-list {
  border-top: 1px solid var(--line);
}

.catalog-entry {
  display: grid;
  grid-template-columns: 3.5rem minmax(8rem, 12rem) minmax(0, 1fr) auto;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding-block: clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 6rem;
}

.catalog-entry:target {
  background: linear-gradient(90deg, rgba(201, 148, 60, 0.13), transparent 62%);
}

.catalog-index {
  color: var(--clay);
  font-family: var(--serif);
  font-size: 1.6rem;
}

.catalog-cover-link {
  display: block;
  align-self: start;
  padding: 0.28rem;
  background: #e8dfcf;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.catalog-cover-link:hover,
.catalog-cover-link:focus-visible {
  box-shadow: 0 22px 50px rgba(31, 34, 28, 0.18);
  transform: translateY(-0.25rem);
}

.catalog-cover-link img {
  display: block;
  width: 100%;
  height: auto;
}

.catalog-body {
  max-width: 48rem;
}

.catalog-type {
  margin-bottom: 0.85rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.catalog-body h3 {
  max-width: 22ch;
  margin-bottom: 1.5rem;
  font-size: clamp(2.2rem, 4.6vw, 4.2rem);
  line-height: 1.02;
}

.catalog-body h3 em {
  color: var(--clay);
  font-weight: 400;
}

.catalog-summary {
  max-width: 46rem;
  margin-bottom: 2.2rem;
  color: #3f4944;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.65;
}

.metadata {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 2rem;
  border-top: 1px solid var(--line);
}

.metadata div {
  padding: 0.9rem 1rem 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.metadata div:nth-child(odd) {
  padding-right: 1.4rem;
}

.metadata div:nth-child(even) {
  padding-left: 1.4rem;
  border-left: 1px solid var(--line);
}

.metadata dt {
  margin-bottom: 0.15rem;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.metadata dd {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
}

.status-pending {
  color: #7a3e2d;
  font-weight: 700;
}

.record-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.record-links a,
.no-link {
  font-size: 0.72rem;
  font-weight: 750;
}

.record-links a {
  color: var(--forest);
}

.record-links a::after {
  content: " ↗";
  color: var(--clay);
}

.record-links .purchase-link {
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--forest);
  border-radius: 999px;
  text-decoration: none;
}

.record-links .purchase-link:hover,
.record-links .purchase-link:focus-visible {
  color: var(--paper);
  background: var(--forest);
}

.record-links .purchase-link:hover::after,
.record-links .purchase-link:focus-visible::after {
  color: #e4b96c;
}

.no-link {
  color: var(--muted);
  font-style: italic;
  font-weight: 500;
}

.back-link {
  align-self: start;
  padding-top: 0.4rem;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  white-space: nowrap;
  text-transform: uppercase;
}

.about-section {
  padding-block: clamp(5rem, 9vw, 8rem);
  border-top: 1px solid var(--line);
}

.about-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.55fr);
  align-items: end;
  gap: 3rem;
  margin-bottom: 4rem;
}

.about-intro .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: -1rem;
}

.about-intro > p:last-child {
  margin: 0;
  color: var(--muted);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 4rem;
  border: 1px solid var(--line);
  background: var(--line);
}

.about-grid article {
  min-height: 20rem;
  padding: 2rem;
  background: var(--paper);
}

.about-number {
  display: block;
  margin-bottom: 4rem;
  color: var(--clay);
  font-family: var(--serif);
  font-size: 1.5rem;
}

.about-grid h3 {
  margin-bottom: 0.8rem;
  font-family: var(--serif);
  font-size: 1.5rem;
}

.about-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.source-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(2rem, 5vw, 4rem);
  color: var(--white);
  background:
    radial-gradient(circle at 92% 30%, rgba(255,255,255,.09), transparent 16rem),
    var(--forest);
}

.source-callout .eyebrow {
  color: #e4b96c;
}

.source-callout h3 {
  margin-bottom: 0.5rem;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 400;
}

.source-callout p:last-child {
  max-width: 38rem;
  margin-bottom: 0;
  color: rgba(255,255,255,.73);
}

.button-light {
  flex: none;
  border-color: rgba(255,255,255,.45);
  color: var(--white);
}

.button-light:hover {
  color: var(--forest);
  background: var(--white);
}

.site-footer {
  color: rgba(255,255,255,.76);
  background: #102f2a;
}

.footer-inner {
  display: grid;
  min-height: 14rem;
  grid-template-columns: 0.9fr 1.4fr 1fr;
  align-items: center;
  gap: 3rem;
  padding-block: 3rem;
}

.footer-wordmark {
  color: var(--white);
}

.footer-wordmark small {
  color: rgba(255,255,255,.58);
}

.footer-inner p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.55;
}

.footer-contact {
  display: inline-block;
  color: var(--white);
  font-weight: 750;
  text-decoration-color: rgba(255,255,255,.45);
  text-underline-offset: 0.2em;
}

.footer-contact:hover,
.footer-contact:focus-visible {
  text-decoration-color: var(--white);
}

.footer-meta {
  text-align: right;
}

.legal-main {
  width: min(100% - 2rem, 900px);
  margin-inline: auto;
  padding-block: clamp(4rem, 8vw, 7rem);
}

.legal-hero {
  max-width: 48rem;
  margin-bottom: clamp(3rem, 7vw, 5rem);
}

.legal-hero h1 {
  max-width: none;
  margin-bottom: 1.5rem;
  font-size: clamp(3.4rem, 8vw, 6rem);
}

.legal-hero > p:not(.eyebrow, .legal-date) {
  color: #3f4944;
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.legal-date {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-content {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.legal-content > section,
.legal-note {
  padding: clamp(1.5rem, 5vw, 3.5rem);
  background: var(--paper);
}

.legal-content h2 {
  margin-bottom: 1rem;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 400;
}

.legal-content h3 {
  margin: 2rem 0 0.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-content p,
.legal-content li {
  color: #3f4944;
}

.legal-content ul {
  margin: 0;
  padding-left: 1.25rem;
}

.legal-content li + li {
  margin-top: 0.55rem;
}

.legal-content .button {
  margin-top: 0.75rem;
}

.legal-note {
  color: var(--white);
  background: var(--forest);
}

.legal-note p {
  color: rgba(255,255,255,.78);
}

.legal-note .text-link {
  color: var(--white);
}

@media (max-width: 980px) {
  .shelf {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .shelf-book::after {
    bottom: 4.7rem;
  }

  .catalog-entry {
    grid-template-columns: 3rem minmax(7rem, 9rem) minmax(0, 1fr);
  }

  .back-link {
    grid-column: 3;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-meta {
    grid-column: 1 / -1;
    text-align: left;
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 4.5rem;
  }

  .wordmark-mark {
    display: none;
  }

  .wordmark strong {
    font-size: 1rem;
  }

  .wordmark small {
    font-size: 0.5rem;
  }

  nav {
    gap: 0.8rem;
  }

  nav a {
    font-size: 0.65rem;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-note {
    max-width: 25rem;
  }

  .section-heading,
  .about-intro {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .about-intro .eyebrow {
    margin-bottom: 0;
  }

  .shelf {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4rem 1.25rem;
  }

  .book-cover {
    width: min(100%, 12.5rem);
  }

  .metadata {
    grid-template-columns: 1fr;
  }

  .metadata div:nth-child(even) {
    padding-left: 0;
    border-left: 0;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-grid article {
    min-height: 0;
  }

  .about-number {
    margin-bottom: 2rem;
  }

  .source-callout {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .hero,
  .bookshelf-section,
  .catalog-section,
  .about-section,
  .footer-inner {
    width: min(100% - 1.25rem, 1180px);
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
    padding-block: 0.8rem;
  }

  nav {
    width: 100%;
    justify-content: space-between;
  }

  h1 {
    font-size: clamp(3rem, 15vw, 4.7rem);
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .shelf {
    grid-template-columns: 1fr 1fr;
    gap-inline: 0.8rem;
  }

  .book-cover {
    padding-inline: 0.75rem;
  }

  .cover-kicker,
  .cover-author {
    left: 0.75rem;
  }

  .cover-author {
    right: 0.75rem;
  }

  .shelf-book h3 {
    font-size: 0.9rem;
  }

  .catalog-entry {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .catalog-index {
    font-size: 1.1rem;
  }

  .back-link {
    grid-column: 1;
  }

  .catalog-cover-link {
    width: min(11rem, 56vw);
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-meta {
    grid-column: auto;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .hero-actions,
  .back-link,
  .site-footer {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .hero {
    min-height: auto;
    padding-block: 2rem;
  }

  .book-cover,
  .source-callout {
    color: black;
    background: white;
    box-shadow: none;
  }

  .catalog-entry {
    break-inside: avoid;
  }
}
