.bpq-hero.hero::before {
  background-image:
    linear-gradient(90deg, rgba(12, 22, 36, 0.86) 0%, rgba(12, 22, 36, 0.68) 40%, rgba(12, 22, 36, 0.16) 76%),
    url("assets/generated/home/home-hero-book-printing-v2.webp");
}

/* Quote pages use the same book-printing hero treatment as the homepage. */
.page-hero.product-hero {
  min-height: 650px;
  padding: 0;
  background:
    linear-gradient(90deg, rgba(10, 25, 43, 0.9) 0%, rgba(10, 25, 43, 0.72) 46%, rgba(10, 25, 43, 0.38) 100%),
    url("assets/generated/home/home-hero-book-printing-v2.webp") center / cover;
}

.page-hero.product-hero .wrap {
  display: grid;
  min-height: 650px;
  grid-template-columns: minmax(0, 760px);
  gap: 0;
  align-content: center;
}

.page-hero.product-hero .hero-media {
  display: none;
}

@media (max-width: 760px) {
  .page-hero.product-hero,
  .page-hero.product-hero .wrap {
    min-height: 540px;
  }

  .page-hero.product-hero {
    background-position: 64% center;
  }

}

.site-proofbar {
  color: rgba(255, 255, 255, 0.76);
  background: var(--blue-2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.site-proofbar .wrap {
  display: flex !important;
  align-items: stretch;
  gap: 0;
}

.site-proofbar span {
  position: relative;
  display: grid;
  gap: 2px;
  min-height: 62px;
  padding: 13px 20px 12px 34px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  flex: 1 1 0;
  min-width: 0;
}

.site-proofbar span:last-child {
  border-right: 0;
}

.site-proofbar span::before {
  position: absolute;
  top: 20px;
  left: 17px;
  width: 7px;
  height: 7px;
  content: "";
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(200, 55, 55, 0.14);
}

.site-proofbar strong {
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-proofbar small {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  white-space: nowrap;
}

.site-header .nav-links a:not(.btn) {
  position: relative;
}

.site-header .nav-links a:not(.btn)::after {
  position: absolute;
  right: 14px;
  bottom: 7px;
  left: 14px;
  height: 2px;
  content: "";
  background: var(--red);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 160ms ease;
}

.site-header .nav-links a:not(.btn):hover::after,
.site-header .nav-links a:not(.btn).active::after {
  transform: scaleX(1);
}

/* Keep the shared mobile menu icon intact when a page has generic button styles. */
.site-header .nav-toggle {
  min-height: 42px;
  padding: 0;
  gap: 0;
  color: var(--ink);
}

.site-header .nav-toggle span {
  flex: 0 0 2px;
  background: currentColor;
}

.page-hero h1 {
  max-width: 780px;
  text-wrap: balance;
}

.page-hero .actions {
  margin-top: 28px;
}

.page-hero.product-hero {
  position: relative;
  overflow: hidden;
  min-height: 650px;
  padding: 0;
  background:
    linear-gradient(90deg, rgba(10, 25, 43, 0.9) 0%, rgba(10, 25, 43, 0.72) 46%, rgba(10, 25, 43, 0.38) 100%),
    url("assets/generated/home/home-hero-book-printing-v2.webp") center / cover;
}

.page-hero.product-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0;
  background: none;
  pointer-events: none;
}

.page-hero.product-hero .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 650px;
  grid-template-columns: minmax(0, 760px);
  align-content: center;
  align-items: center;
}

.page-hero.product-hero .hero-media {
  display: none;
}

.tile,
.product,
.book-type-card,
.resource,
.form-panel,
.quote-panel {
  box-shadow: 0 12px 30px rgba(18, 39, 70, 0.055);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.tile:hover,
.product:hover,
.book-type-card:hover,
.resource:hover {
  border-color: rgba(18, 60, 105, 0.32);
  box-shadow: 0 18px 36px rgba(18, 39, 70, 0.1);
  transform: translateY(-3px);
}

.site-footer {
  border-top: 4px solid var(--red);
}

@media (max-width: 1120px) {
  .site-header .nav {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .site-header .brand {
    min-width: 0;
  }

  .site-header .nav-toggle {
    display: inline-flex;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin-left: auto;
  }

  .site-header .nav-links {
    display: none;
  }

  .site-header .nav-links.open {
    display: flex;
  }
}

@media (max-width: 760px) {
  .page-hero.product-hero,
  .page-hero.product-hero .wrap,
  .quote-page-hero .wrap {
    min-height: 540px;
  }

  .page-hero.product-hero {
    background-position: 64% center;
  }

  .site-proofbar .wrap {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
  }

  .site-proofbar span {
    min-height: 56px;
    padding: 11px 12px 10px 28px;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
  }

  .site-proofbar span:nth-child(2n) {
    border-right: 0;
  }

  .site-proofbar span::before {
    top: 18px;
    left: 10px;
  }

  .site-proofbar strong,
  .site-proofbar small {
    font-size: 10px;
    white-space: normal;
  }
}

.text-link {
  color: var(--red);
  font-weight: 800;
}

.product-visual {
  gap: 18px;
}

.product-visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  background: var(--paper-soft);
}

.page-hero.product-hero {
  color: #fff;
  background: #102038;
}

.page-hero.product-hero .wrap {
  display: grid;
  min-height: 460px;
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 0.75fr);
  gap: 46px;
  align-items: center;
}

.page-hero.product-hero h1 {
  color: #fff;
}

.page-hero.product-hero p {
  color: rgba(255, 255, 255, 0.82);
}

.quote-page-hero .wrap {
  min-height: 650px;
}

.quote-hero-kicker {
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.68) !important;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.quote-intro-compact {
  align-items: center;
}

.quote-intro-compact h2 {
  margin-bottom: 10px;
  font-size: clamp(28px, 3vw, 40px);
}

.quote-intro-compact {
  margin: 0 0 24px;
  padding: 30px 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(18, 39, 70, 0.06);
}

.quote-intro-compact .quote-intro-facts {
  margin: 0;
}

.quote-page-hero + main {
  padding-top: 34px;
}

.quote-shell > .section-head {
  padding: 2px 4px 0;
}

.quote-shell .quote-app {
  border-radius: 8px;
  background: #fff;
}

.hero-media img,
.media-frame img {
  width: 100%;
  object-fit: cover;
}

.hero-media img {
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.quote-shell {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef3f7;
}

.quote-shell .section-head {
  margin-bottom: 18px;
}

.home-quote-section {
  background: #f2f6f9;
}

.home-quote-head {
  align-items: start;
}

.home-quote-shell {
  /* A clipping ancestor prevents the calculator's desktop quote panel from sticking. */
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef3f6;
  box-shadow: 0 18px 45px rgba(18, 39, 70, 0.08);
}

/* Keep the live quote visible while customers review long specifications. */
@media (min-width: 981px) {
  .quote-shell,
  .home-quote-shell,
  .quote-shell .quote-app,
  .home-quote-shell .quote-app {
    overflow: visible;
  }

  .quote-app.quote-page-integrated .layout {
    align-items: start;
  }

  .quote-app.quote-page-integrated .layout > #quote-panel {
    position: sticky;
    top: 84px;
    align-self: start;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

.home-quote-shell .quote-app.quote-page-integrated main {
  padding: 18px;
}

.home-quote-shell .quote-app .product-tabs {
  margin-bottom: 18px;
}

.home-product-card img {
  box-shadow: 0 12px 30px rgba(18, 39, 70, 0.1);
}

.service-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-list li {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  min-width: 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(340px, 1fr);
  gap: 28px;
  align-items: start;
}

.page-hero h1,
.section h2,
.section h3,
.section p,
.section li,
.media-frame figcaption,
.image-card figcaption {
  overflow-wrap: anywhere;
}

.contact-grid,
.contact-grid *,
.contact-form,
.contact-form * {
  min-width: 0;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  overflow-wrap: anywhere;
}

@media (max-width: 860px) {
  .page-hero.product-hero .wrap,
  .contact-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 640px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .wrap,
  .nav,
  .page-hero .wrap,
  .split > *,
  .section-head > *,
  .media-grid > *,
  .grid > *,
  .stat-grid > *,
  .process-grid > *,
  .steps > * {
    min-width: 0;
    max-width: 100%;
  }

  .page-hero h1 {
    font-size: clamp(30px, 9vw, 36px);
    line-height: 1.06;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .section h2 {
    font-size: clamp(26px, 8vw, 32px);
    word-break: break-word;
  }

  .page-hero p {
    font-size: 17px;
  }

  .proof-points div,
  .quote-panel,
  .tile,
  .step {
    min-width: 0;
  }

  .data-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Final quote-page hero override: keep the homepage image visible behind the copy. */
.page-hero.product-hero {
  min-height: 650px;
  padding: 0;
  background:
    linear-gradient(90deg, rgba(10, 25, 43, 0.9) 0%, rgba(10, 25, 43, 0.72) 46%, rgba(10, 25, 43, 0.38) 100%),
    url("assets/generated/home/home-hero-book-printing-v2.webp") center / cover;
}

.page-hero.product-hero .wrap {
  display: grid;
  min-height: 650px;
  grid-template-columns: minmax(0, 760px);
  gap: 0;
  align-content: center;
}

.page-hero.product-hero .hero-media {
  display: none;
}

@media (max-width: 760px) {
  .page-hero.product-hero,
  .page-hero.product-hero .wrap {
    min-height: 540px;
  }

  .page-hero.product-hero {
    background-position: 64% center;
  }
}

.quote-page-paperback .page-hero.product-hero {
  background:
    linear-gradient(90deg, rgba(10, 25, 43, 0.91) 0%, rgba(10, 25, 43, 0.73) 46%, rgba(10, 25, 43, 0.34) 100%),
    image-set(url("assets/generated/hero/paperback-quote-hero.webp") type("image/webp"), url("assets/generated/hero/paperback-quote-hero.jpg") type("image/jpeg")) center / cover;
}

.quote-page-hardcover .page-hero.product-hero {
  background:
    linear-gradient(90deg, rgba(10, 25, 43, 0.92) 0%, rgba(10, 25, 43, 0.74) 46%, rgba(10, 25, 43, 0.35) 100%),
    image-set(url("assets/generated/hero/hardcover-quote-hero.webp") type("image/webp"), url("assets/generated/hero/hardcover-quote-hero.jpg") type("image/jpeg")) center / cover;
}

.quote-page-wire-o .page-hero.product-hero {
  background:
    linear-gradient(90deg, rgba(10, 25, 43, 0.91) 0%, rgba(10, 25, 43, 0.72) 46%, rgba(10, 25, 43, 0.34) 100%),
    image-set(url("assets/generated/hero/wire-o-quote-hero.webp") type("image/webp"), url("assets/generated/hero/wire-o-quote-hero.jpg") type("image/jpeg")) center / cover;
}

@media (max-width: 760px) {
  .quote-page-paperback .page-hero.product-hero,
  .quote-page-hardcover .page-hero.product-hero,
  .quote-page-wire-o .page-hero.product-hero {
    background-position: 68% center;
  }
}

.quote-page-global .page-hero.product-hero {
  background-image:
    linear-gradient(90deg, rgba(6, 20, 36, 0.94) 0%, rgba(6, 20, 36, 0.82) 26%, rgba(6, 20, 36, 0.55) 52%, rgba(6, 20, 36, 0.42) 100%),
    image-set(url("assets/generated/hero/quote-all-books-factory-hero.webp") type("image/webp"), url("assets/generated/hero/quote-all-books-factory-hero.jpg") type("image/jpeg"));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@media (max-width: 760px) {
  .quote-page-global .page-hero.product-hero {
    background-position: 64% center;
  }
}

/* Keep the global quote page focused on the calculator above the fold. */
.quote-page-global .page-hero.product-hero,
.quote-page-global .page-hero.product-hero .wrap {
  min-height: 470px;
}

@media (max-width: 760px) {
  .quote-page-global .page-hero.product-hero,
  .quote-page-global .page-hero.product-hero .wrap {
    min-height: 430px;
  }
}

/* Keep each focused product calculator within reach of the first viewport. */
.quote-page-paperback .page-hero.product-hero,
.quote-page-paperback .page-hero.product-hero .wrap,
.quote-page-hardcover .page-hero.product-hero,
.quote-page-hardcover .page-hero.product-hero .wrap,
.quote-page-wire-o .page-hero.product-hero,
.quote-page-wire-o .page-hero.product-hero .wrap {
  min-height: 470px;
}

@media (max-width: 760px) {
  .quote-page-paperback .page-hero.product-hero,
  .quote-page-paperback .page-hero.product-hero .wrap,
  .quote-page-hardcover .page-hero.product-hero,
  .quote-page-hardcover .page-hero.product-hero .wrap,
  .quote-page-wire-o .page-hero.product-hero,
  .quote-page-wire-o .page-hero.product-hero .wrap {
    min-height: 430px;
  }
}
