:root {
  --bookshelf-black: var(--brand-black, #000000);
  --bookshelf-white: var(--brand-white, #ffffff);
  --bookshelf-secondary-off-white: var(--brand-secondary-off-white, #f7f6f2);
  --bookshelf-divider: var(--brand-divider, #e5e5e5);
  --bookshelf-ink: var(--brand-type-ink, #000000);
  --bookshelf-muted: var(--brand-type-muted, #555555);
  --bookshelf-bronze: var(--brand-bronze, #8a6a3e);
  --bookshelf-display: var(--brand-logo-font, "Helvetica Neue", "Helvetica Now Display", Arial, "Inter Tight", system-ui, sans-serif);
  --bookshelf-ui: var(--font-ui, Inter, "Helvetica Neue", Arial, system-ui, sans-serif);
  --bookshelf-serif: var(--font-serif, "Cormorant Garamond", Georgia, serif);
}

body.bookshelf-page {
  background: var(--bookshelf-white);
  color: var(--bookshelf-ink);
}

body.bookshelf-page main {
  padding: 0;
}

.bookshelf-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: clamp(24rem, 44svh, 34rem);
  flex-direction: column;
  justify-content: center;
  padding: clamp(4rem, 8vw, 7rem) clamp(1.35rem, 7vw, 7.5rem);
  overflow: hidden;
  background: var(--bookshelf-black);
  color: var(--bookshelf-white);
}

.bookshelf-hero-video,
.bookshelf-hero-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bookshelf-hero-video {
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: var(--bookshelf-black);
}

.bookshelf-hero-scrim {
  z-index: -1;
  background: rgba(0, 0, 0, .28);
}

.bookshelf-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 42rem;
}

.bookshelf-hero h1,
.bookshelf-catalogue-head h2,
.bookshelf-empty h2 {
  margin: 0;
  color: currentColor;
  font-family: var(--bookshelf-display);
  font-weight: 500;
  letter-spacing: .025em;
}

.bookshelf-hero h1 {
  max-width: 12ch;
  font-size: clamp(1.9rem, 4.5vw, 4.2rem);
  line-height: .98;
}

.bookshelf-hero p,
.bookshelf-catalogue-head p,
.bookshelf-empty p {
  margin: clamp(.9rem, 1.6vw, 1.35rem) 0 0;
  font-family: var(--bookshelf-ui);
  font-size: clamp(.95rem, 1.1vw, 1.05rem);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
}

.bookshelf-hero p {
  max-width: 26rem;
  color: rgba(255, 255, 255, .74);
}

.bookshelf-room {
  margin: 0;
  padding: clamp(3.25rem, 6vw, 6rem) clamp(1.35rem, 7vw, 7.5rem) clamp(4rem, 7vw, 7rem);
  background: var(--bookshelf-white);
  color: var(--bookshelf-ink);
}

.bookshelf-catalogue-head {
  max-width: 62rem;
  margin: 0 auto clamp(1.75rem, 3.4vw, 3.5rem);
}

.bookshelf-catalogue-section + .bookshelf-catalogue-section {
  margin-top: clamp(3.5rem, 6vw, 6.5rem);
}

.bookshelf-catalogue-head h2 {
  font-size: clamp(1.85rem, 3.8vw, 3.8rem);
  line-height: 1;
}

.bookshelf-catalogue-head p {
  max-width: 18rem;
  color: var(--bookshelf-muted);
}

.bookshelf-catalogue {
  display: grid;
  gap: clamp(.95rem, 1.75vw, 1.85rem);
  max-width: 62rem;
  margin: 0 auto;
}

.bookshelf-title-row {
  display: grid;
  grid-template-columns: auto minmax(0, 39rem);
  gap: clamp(1.05rem, 2vw, 1.8rem);
  align-items: center;
  justify-content: center;
  padding: clamp(.8rem, 1.5vw, 1.35rem) 0;
}

.bookshelf-title-row.no-cover {
  grid-template-columns: minmax(0, 39rem);
}

.bookshelf-title-body {
  display: grid;
  gap: .8rem;
  min-width: 0;
}

.bookshelf-title-main,
.bookshelf-title-cover-link {
  color: inherit;
  text-decoration: none;
}

.bookshelf-title-cover {
  display: block;
  width: clamp(7.6rem, 10vw, 11.4rem);
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--bookshelf-black);
}

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

.bookshelf-title-copy {
  display: grid;
  gap: .55rem;
  min-width: 0;
}

.bookshelf-title-name {
  display: block;
  font-family: var(--bookshelf-serif);
  font-size: clamp(1.3rem, 1.85vw, 2.05rem);
  font-weight: 600;
  line-height: .98;
  letter-spacing: .005em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bookshelf-title-description {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--bookshelf-muted);
  font-family: var(--bookshelf-ui);
  font-size: clamp(.9rem, .95vw, 1rem);
  font-weight: 400;
  line-height: 1.48;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bookshelf-title-commerce {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem 1rem;
  align-items: center;
  justify-content: flex-start;
  color: var(--bookshelf-ink);
}

.bookshelf-title-price {
  font-family: var(--bookshelf-ui);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .12em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.bookshelf-title-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: .85rem;
}

.bookshelf-title-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.45rem;
  color: var(--bookshelf-ink);
  font-family: var(--bookshelf-ui);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
}

.bookshelf-title-actions .bookshelf-title-buy {
  min-width: 4.65rem;
  padding: .78rem 1.05rem;
  background: var(--bookshelf-black);
  color: var(--bookshelf-white);
}

.bookshelf-title-actions .bookshelf-title-view {
  min-width: auto;
  padding: 0;
}

.bookshelf-title-row.is-paper .bookshelf-title-price {
  color: var(--bookshelf-bronze);
}

.bookshelf-title-row,
.bookshelf-title-main,
.bookshelf-title-cover-link,
.bookshelf-title-cover,
.bookshelf-title-actions a {
  transition:
    background-color 220ms ease,
    color 220ms ease,
    opacity 220ms ease,
    transform 220ms ease;
}

.bookshelf-title-row:hover .bookshelf-title-main,
.bookshelf-title-main:focus-visible {
  color: var(--bookshelf-bronze);
}

.bookshelf-title-row:hover .bookshelf-title-cover,
.bookshelf-title-cover-link:focus-visible .bookshelf-title-cover {
  transform: translateY(-.18rem);
}

.bookshelf-title-actions a:hover,
.bookshelf-title-actions a:focus-visible {
  opacity: .72;
}

.bookshelf-title-main:focus-visible,
.bookshelf-title-cover-link:focus-visible,
.bookshelf-title-actions a:focus-visible {
  outline: 2px solid var(--bookshelf-bronze);
  outline-offset: 5px;
}

.bookshelf-empty {
  max-width: 42rem;
  margin: 0 auto;
  color: var(--bookshelf-ink);
}

.bookshelf-empty h2 {
  font-size: clamp(1.85rem, 3.8vw, 3.8rem);
  line-height: 1;
}

.bookshelf-empty p {
  color: var(--bookshelf-muted);
}

.paper-viewer-hero {
  padding: clamp(4rem, 8vw, 7rem) clamp(1.35rem, 7vw, 7.5rem) clamp(2rem, 4vw, 3.5rem);
  background: var(--bookshelf-white);
  color: var(--bookshelf-ink);
}

.paper-viewer-hero .eyebrow {
  margin: 0 0 1rem;
  color: var(--bookshelf-bronze);
  font-family: var(--bookshelf-ui);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  line-height: 1.2;
  text-transform: uppercase;
}

.paper-viewer-hero h1 {
  max-width: 14ch;
  margin: 0;
  font-family: var(--bookshelf-serif);
  font-size: clamp(2.6rem, 7vw, 6.4rem);
  font-weight: 600;
  letter-spacing: 0;
  line-height: .92;
}

.paper-viewer-hero p {
  max-width: 45rem;
  margin: clamp(1rem, 2vw, 1.6rem) 0 0;
  color: var(--bookshelf-muted);
  font-family: var(--bookshelf-ui);
  font-size: clamp(1rem, 1.2vw, 1.16rem);
  line-height: 1.55;
}

.paper-viewer-meta,
.paper-viewer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem 1.2rem;
  align-items: center;
  margin-top: clamp(1.3rem, 2.4vw, 2rem);
  font-family: var(--bookshelf-ui);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .13em;
  line-height: 1.4;
  text-transform: uppercase;
}

.paper-viewer-meta {
  color: var(--bookshelf-muted);
}

.paper-viewer-actions a {
  color: var(--bookshelf-ink);
  text-decoration: none;
}

.paper-viewer-actions a:hover,
.paper-viewer-actions a:focus-visible {
  color: var(--bookshelf-bronze);
}

.paper-viewer-actions a:focus-visible {
  outline: 2px solid var(--bookshelf-bronze);
  outline-offset: 5px;
}

.paper-viewer-shell {
  padding: 0 clamp(1.35rem, 7vw, 7.5rem) clamp(4rem, 7vw, 7rem);
  background: var(--bookshelf-white);
}

.paper-viewer-frame {
  display: block;
  width: 100%;
  height: min(78rem, 82svh);
  border: 0;
  background: var(--bookshelf-secondary-off-white);
}

@media (max-width: 860px) {
  .bookshelf-catalogue-head {
    margin-bottom: 1.85rem;
  }

  .bookshelf-title-row {
    grid-template-columns: auto minmax(0, 1fr);
    justify-content: center;
  }

  .bookshelf-title-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .bookshelf-hero,
  .bookshelf-room,
  .paper-viewer-hero,
  .paper-viewer-shell {
    padding-right: 1.25rem;
    padding-left: 1.25rem;
  }

  .bookshelf-hero {
    min-height: clamp(18rem, 34svh, 26rem);
  }

  .bookshelf-room {
    padding-top: 3rem;
  }

  .bookshelf-title-row {
    align-items: start;
    gap: .9rem;
    grid-template-columns: 1fr;
    padding: 1rem 0 1.25rem;
  }

  .bookshelf-title-row.no-cover {
    grid-template-columns: 1fr;
  }

  .bookshelf-title-cover {
    width: clamp(7rem, 32vw, 9rem);
  }

  .bookshelf-title-description {
    font-size: .92rem;
  }

  .bookshelf-title-commerce {
    display: grid;
    gap: .75rem;
    margin-left: 0;
  }

  .bookshelf-title-row.no-cover .bookshelf-title-commerce {
    margin-left: 0;
  }

  .paper-viewer-hero {
    padding-top: 3.25rem;
  }

  .paper-viewer-frame {
    height: 72svh;
  }
}

@media (max-width: 440px) {
  .bookshelf-title-cover {
    width: clamp(6.75rem, 38vw, 8.5rem);
  }

  .bookshelf-title-commerce {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bookshelf-hero-video {
    display: none;
  }

  .bookshelf-title-row,
  .bookshelf-title-main,
  .bookshelf-title-cover,
  .bookshelf-title-actions a {
    transition: none;
  }
}
