/* Only loaded by Books & Resources. Shelf artwork remains decorative. */
.bookshelf-page {
  --paper: #e8e2d3;
  --ink: #333629;
  --olive: #424b32;
  --muted: #68604f;
  --line: #cdbb9d;
  --rose: #9b6056;
  background: var(--paper);
  color: var(--ink);
}
.bookshelf-main {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  background: var(--paper);
}
.shelf-scene {
  position: relative;
  display: flex;
  align-items: center;
  height: clamp(380px, 35.15625vw, 506px);
  background-image: none;
  background-repeat: no-repeat;
  background-size: 100% 426.6667%;
  isolation: isolate;
}
.shelf-hero {
  height: clamp(420px, 39.0625vw, 562px);
  background-size: 100% 384%;
  background-position: center top;
}
.shelf-books {
  background-position: center 34.0136%;
}
.shelf-printables {
  background-position: center 64.6259%;
}
.shelf-guides {
  background-position: center 95.2381%;
}
.shelf-copy {
  width: 31%;
  padding: 26px 0 48px;
  margin-left: 6.5%;
  position: relative;
  z-index: 1;
}
.shelf-copy h1 {
  font-size: clamp(3rem, 6.2vw, 5.8rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin: 18px 0 22px;
}
.shelf-copy h2 {
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  max-width: 350px;
}
.shelf-copy h1::after,
.shelf-copy h2::after {
  content: '';
  display: block;
  width: 54px;
  height: 2px;
  background: #a86c5c;
  margin-top: 22px;
}
.shelf-copy p {
  max-width: 290px;
  font-size: clamp(1rem, 1.65vw, 1.35rem);
  line-height: 1.5;
  margin: 0 0 22px;
  text-align: left;
}
.shelf-copy .eyebrow {
  font-weight: 400;
  letter-spacing: 0.22em;
  color: #5c604e;
}
.shelf-dot {
  color: #a86c5c;
}
.shelf-browse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 48px;
  padding: 12px 24px;
  background: #39412c;
  color: #fffaf0;
  border: 1px solid #39412c;
  border-radius: 2px;
  cursor: pointer;
  font:
    400 1rem/1.3 system-ui,
    sans-serif;
  line-height: 1.3;
}
.shelf-browse:hover {
  background: #4a5539;
}
.shelf-browse:focus-visible,
.bookshelf-page summary:focus-visible {
  outline: 3px solid #99635a;
  outline-offset: 5px;
}
.shelf-browse[hidden],
.shelf-collection[hidden] {
  display: none;
}
.shelf-collection {
  padding: 40px max(26px, 6.5%);
  background: linear-gradient(135deg, #eee0c8, #f6eddd 60%, #e8d7ba);
  border-bottom: 1px solid #d4c8b5;
}
.shelf-collection-intro {
  max-width: 760px;
  margin-bottom: 28px;
}
.shelf-collection-intro p {
  text-align: justify;
  hyphens: auto;
}
.bookshelf-page .resources-card-grid .printable-resource,
.bookshelf-page .resources-card-grid .resource-overview {
  background: #faf1e1;
  border-color: var(--line);
}
.bookshelf-page .resources-card-grid .resource-overview h3 {
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  margin: 0 0 20px;
}
.bookshelf-page .resource-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.bookshelf-page .site-footer {
  background: #e2d2b6;
}
@media (max-width: 900px) and (min-width: 601px) {
  .shelf-copy {
    width: 38%;
    margin-left: 5%;
  }
  .shelf-copy h1 {
    font-size: 3.6rem;
  }
  .shelf-copy h2 {
    font-size: 2.6rem;
  }
  .shelf-copy p {
    max-width: 250px;
    font-size: 1rem;
  }
}
@media (max-width: 600px) {
  .shelf-scene {
    height: auto;
    min-height: 500px;
    align-items: flex-start;
    background-size: auto 250%;
    background-position-x: right;
  }
  .shelf-scene::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(
      to bottom,
      #f3e9d8 0%,
      rgba(243, 233, 216, 0.97) 40%,
      rgba(243, 233, 216, 0.15) 67%,
      transparent 80%
    );
  }
  .shelf-hero {
    min-height: 550px;
    background-size: auto 290%;
  }
  .shelf-copy {
    width: auto;
    margin: 0;
    padding: 32px 26px 250px;
  }
  .shelf-copy h1 {
    font-size: clamp(3rem, 12vw, 4rem);
    margin-top: 12px;
  }
  .shelf-copy h2 {
    font-size: 2.5rem;
    margin-bottom: 18px;
    max-width: none;
  }
  .shelf-copy h1::after,
  .shelf-copy h2::after {
    margin-top: 16px;
  }
  .shelf-copy p {
    max-width: 320px;
    font-size: 1rem;
    margin-bottom: 18px;
  }
  .shelf-browse {
    min-height: 46px;
    font-size: 0.95rem;
  }
  .shelf-collection {
    padding: 26px 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bookshelf-page {
    scroll-behavior: auto;
  }
}

/* Parchment, olive cloth and brass details echo the vintage shelf artwork. */
.bookshelf-page .site-header {
  border-bottom-color: rgba(126, 99, 62, 0.22);
}
.bookshelf-page .nav a[aria-current='page'] {
  background: #dfd2b9;
  box-shadow: 0 0 0 4px #dfd2b9;
}
.bookshelf-page .nav a:hover {
  background: #e7dbc5;
  box-shadow: 0 0 0 4px #e7dbc5;
}
.bookshelf-page .shelf-copy h1,
.bookshelf-page .shelf-copy h2 {
  color: #343a28;
}
.bookshelf-page .shelf-copy p {
  color: #414132;
}
.bookshelf-page .shelf-browse,
.bookshelf-page .button {
  border: 1px solid #414930;
  border-radius: 2px;
  background: #414930;
  color: #fff5e2;
  box-shadow:
    inset 0 0 0 3px #414930,
    inset 0 0 0 4px #a59b72;
  padding: 14px 24px;
}
.bookshelf-page .shelf-browse:hover,
.bookshelf-page .button:hover {
  background: #303923;
  border-color: #303923;
  box-shadow:
    inset 0 0 0 3px #303923,
    inset 0 0 0 4px #b3a77d;
}
.bookshelf-page .shelf-collection {
  padding-block: clamp(32px, 5vw, 64px);
  border-top: 1px solid #c3a77d;
  box-shadow: inset 0 8px 16px -12px #725635;
}
.bookshelf-page .shelf-collection-intro {
  padding-left: 20px;
  border-left: 2px solid #ac7864;
  color: #59503f;
}
.bookshelf-page .shelf-collection-intro p,
.bookshelf-page .resources-card-grid p {
  text-align: left;
}
.bookshelf-page .resources-card-grid {
  gap: clamp(20px, 3vw, 36px);
}
.bookshelf-page .resources-card-grid > article,
.bookshelf-page .resources-card-grid > section {
  border-radius: 2px;
  border-top: 3px solid #7a805d;
  box-shadow: 0 5px 14px rgba(82, 61, 33, 0.07);
}
.bookshelf-page .resources-card-grid > :nth-child(even) {
  border-top-color: #ad7767;
}
.bookshelf-page .resources-card-grid .tag {
  width: fit-content;
  padding: 4px 10px;
  border: 1px solid #c6b48e;
  background: #ece1ca;
  color: #565438;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
}
.bookshelf-page .resource-preview summary {
  color: #424b32;
}
.bookshelf-page .resource-preview[open] summary {
  color: #794b40;
}
.bookshelf-page .booklet-pages {
  padding: 12px;
  background: #e8dbc3;
  border: 1px solid #cdbb9d;
  scrollbar-color: #8c795b #e8dbc3;
}
.bookshelf-page .booklet-pages img,
.bookshelf-page .poster-preview {
  border-color: #c6b48e;
  box-shadow: 0 3px 9px rgba(82, 61, 33, 0.12);
}
.bookshelf-page .resource-actions {
  gap: 8px 20px;
}
.bookshelf-page .resource-actions a,
.bookshelf-page .text-link {
  color: #654b33;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.bookshelf-page .resource-actions a:hover,
.bookshelf-page .text-link:hover {
  color: #804f43;
}
.bookshelf-page .site-footer {
  border-top: 1px solid #c3ad88;
}
.bookshelf-page .site-footer .social-icon {
  border-color: #b7a484;
  background: #eee2cc;
}
@media (max-width: 850px) {
  .bookshelf-page .nav {
    background: #f2e6d2;
    border-color: #cdbb9d;
  }
}

/* Match Vintage Books & Resources Page.png with live text and controls. */
.bookshelf-page {
  position: relative;
  padding: 7px;
  background: #e8e2d3;
}
.bookshelf-page::after {
  content: '';
  position: fixed;
  inset: 3px;
  z-index: 40;
  pointer-events: none;
  border: 2px solid rgba(66, 58, 40, 0.7);
  border-radius: 24px;
  box-shadow:
    inset 0 0 0 3px rgba(232, 226, 211, 0.8),
    inset 0 0 0 5px rgba(87, 76, 53, 0.35),
    inset 0 0 18px rgba(66, 58, 40, 0.3);
}
.bookshelf-page .bookshelf-main {
  max-width: 1440px;
}
.bookshelf-page .shelf-scene::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url('../assets/bookshelf-background.png');
  background-repeat: no-repeat;
  background-size: inherit;
  background-position: inherit;
  filter: saturate(0.42) sepia(0.16) brightness(0.94);
}
.bookshelf-page .shelf-copy h1,
.bookshelf-page .shelf-copy h2 {
  color: #303426;
  letter-spacing: -0.035em;
}
.bookshelf-page .shelf-copy p {
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  font-size: clamp(1rem, 1.65vw, 1.3rem);
  font-weight: 350;
  line-height: 1.55;
}
.bookshelf-page .shelf-copy .eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: #686657;
}
.bookshelf-page .shelf-browse,
.bookshelf-page .button {
  background: #383d2b;
  border-color: #383d2b;
  border-radius: 5px;
  box-shadow: none;
  color: #f4efe3;
  font-weight: 400;
}
.bookshelf-page .shelf-browse:hover,
.bookshelf-page .button:hover {
  background: #4b5039;
  border-color: #4b5039;
  box-shadow: none;
}
.bookshelf-page .shelf-collection {
  background: #e8e2d3;
}
.bookshelf-page .resources-card-grid .printable-resource,
.bookshelf-page .resources-card-grid .resource-overview {
  background: #f0ebdf;
}
.bookshelf-page .site-footer {
  background: #ded7c6;
}
@media (min-width: 901px) {
  .bookshelf-page .shelf-copy h2 {
    font-size: clamp(2.1rem, 3.8vw, 3.5rem);
  }
}
@media (min-width: 601px) and (max-width: 900px) {
  .bookshelf-page .shelf-copy {
    width: 32%;
    margin-left: 5%;
  }
  .bookshelf-page .shelf-copy h1 {
    font-size: clamp(2.6rem, 6vw, 3.6rem);
  }
  .bookshelf-page .shelf-copy h2 {
    font-size: 2.2rem;
  }
}
@media (max-width: 600px) {
  .bookshelf-page {
    padding: 5px;
  }
  .bookshelf-page::after {
    border-radius: 14px;
  }
  .bookshelf-page .shelf-copy {
    width: 100%;
  }
  .bookshelf-page .shelf-scene::before {
    background: linear-gradient(
      to bottom,
      #e8e2d3 0%,
      rgba(232, 226, 211, 0.97) 40%,
      rgba(232, 226, 211, 0.15) 70%,
      transparent 85%
    );
  }
}
