/* Home: device-specific hero crops from the approved photographic set. */
.mpd-module-home .mpd-home-hero-picture {
  display: block;
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
  z-index: 0;
}

.mpd-module-home .mpd-home-hero-picture .mpd-redesign-hero__photo {
  filter: saturate(.9) contrast(.98) brightness(1.01);
  height: 100%;
  inset: 0;
  object-fit: cover;
  object-position: center;
  position: absolute;
  width: 100%;
}

/* Desktop: preserve the text field while returning full colour and contrast
   before the gradient reaches the photographed subjects. */
@media (min-width: 901px) {
  .mpd-module-home .mpd-home-hero-picture .mpd-redesign-hero__photo {
    filter: none;
  }

  .mpd-module-home .mpd-redesign-hero::after {
    background: linear-gradient(
      90deg,
      #fbfbf8 0%,
      rgba(251, 251, 248, .98) calc(22.1vw + 143px),
      rgba(251, 251, 248, .96) calc(13.2vw + 357px),
      rgba(251, 251, 248, .72) calc(13vw + 461px),
      rgba(251, 251, 248, .30) calc(15.1vw + 531px),
      rgba(251, 251, 248, .08) calc(18.5vw + 568px),
      transparent calc(21.15vw + 602px)
    );
  }
}

@media (max-width: 900px) {
  .mpd-module-home .mpd-home-hero-picture {
    height: clamp(330px, 51vw, 460px);
    inset: auto;
    position: relative;
  }
}

@media (max-width: 767px) {
  .mpd-module-home .mpd-home-hero-picture {
    height: clamp(310px, 86vw, 370px);
    order: -1;
  }
}

@media (max-width: 380px) {
  .mpd-module-home .mpd-home-hero-picture {
    height: 285px;
  }
}

/* Home: retain the approved desktop prominence of the testimonial. */
@media (min-width: 1280px) {
  .mpd-module-home .mpd-redesign-testimonial {
    max-width: 1240px;
    padding: 42px 30px 96px;
  }

  .mpd-module-home .mpd-redesign-testimonial blockquote {
    gap: 18px;
    grid-template-columns: 44px minmax(0, 1fr);
    max-width: 1040px;
    padding-top: 34px;
  }

  .mpd-module-home .mpd-redesign-testimonial__mark {
    font-size: 72px;
  }

  .mpd-module-home .mpd-redesign-testimonial p {
    font-size: 32px !important;
    line-height: 1.36;
  }

  .mpd-module-home .mpd-redesign-testimonial footer {
    font-size: 12px;
    margin-top: 16px;
  }
}

/* Home: bridge the former 32px-to-18.7px drop on tablet and narrow desktop. */
@media (min-width: 768px) and (max-width: 1279px) {
  .mpd-module-home .mpd-redesign-testimonial blockquote {
    gap: 16px;
    grid-template-columns: 40px minmax(0, 1fr);
    max-width: 960px;
  }

  .mpd-module-home .mpd-redesign-testimonial__mark {
    font-size: clamp(62px, 5vw, 68px);
  }

  .mpd-module-home .mpd-redesign-testimonial p {
    font-size: clamp(24px, 2.15vw, 28px) !important;
    line-height: 1.38;
  }
}

/* Home: one restrained editorial portal for free scores and the full catalogue. */
.mpd-module-home .mpd-redesign-catalogue__grid {
  grid-template-rows: 245px 245px 184px;
}

.mpd-module-home .mpd-home-catalogue-portal {
  align-items: center;
  background:
    radial-gradient(circle at 88% 12%, rgba(177, 146, 98, .13), transparent 29%),
    linear-gradient(118deg, #f4f1ea 0%, #eee8dd 100%);
  border: 1px solid #d7cdbd;
  border-radius: 14px;
  box-shadow: 0 18px 42px -38px rgba(31, 40, 46, .62);
  display: grid;
  gap: clamp(28px, 4.4vw, 64px);
  grid-column: 1 / 11;
  grid-row: 3;
  grid-template-columns: minmax(0, 1fr) auto;
  isolation: isolate;
  margin-top: 16px;
  min-height: 0;
  overflow: hidden;
  padding: 27px 34px 27px 42px;
  position: relative;
}

.mpd-module-home .mpd-home-catalogue-portal::before {
  background: repeating-linear-gradient(180deg, transparent 0 15px, rgba(126, 108, 78, .11) 16px, transparent 17px);
  content: "";
  inset: 18px -2% 18px 53%;
  mask-image: linear-gradient(90deg, transparent, #000 20%, #000 82%, transparent);
  opacity: .74;
  pointer-events: none;
  position: absolute;
  z-index: -2;
}

.mpd-module-home .mpd-home-catalogue-portal::after {
  border: 1px solid rgba(166, 137, 90, .18);
  border-radius: 50%;
  content: "";
  height: 184px;
  pointer-events: none;
  position: absolute;
  right: 124px;
  top: -112px;
  width: 184px;
  z-index: -1;
}

.mpd-module-home .mpd-home-catalogue-portal__copy {
  min-width: 0;
  padding-left: 20px;
  position: relative;
}

.mpd-module-home .mpd-home-catalogue-portal__copy::before {
  background: linear-gradient(180deg, #b39566, rgba(179, 149, 102, .28));
  content: "";
  inset: 3px auto 3px 0;
  position: absolute;
  width: 2px;
}

.mpd-module-home .mpd-home-catalogue-portal small {
  color: #7f6946;
  display: block;
  font: 700 9px/1.4 var(--display);
  letter-spacing: .15em;
}

.mpd-module-home .mpd-home-catalogue-portal strong {
  color: #263138;
  display: block;
  font: 500 clamp(26px, 2.7vw, 36px)/1.12 var(--serif);
  letter-spacing: -.035em;
  margin-top: 4px;
  text-wrap: balance;
}

.mpd-module-home .mpd-home-catalogue-portal__free-link {
  align-items: center;
  color: #66563f;
  display: inline-flex;
  font: 650 12px/1.35 var(--display);
  gap: 8px;
  margin-top: 11px;
  text-decoration: none;
}

.mpd-module-home .mpd-home-catalogue-portal__free-link span {
  font-size: 15px;
  transition: transform .2s ease;
}

.mpd-module-home .mpd-home-catalogue-portal__free-link:hover span {
  transform: translateX(4px);
}

.mpd-module-home .mpd-home-catalogue-portal__free-link:focus-visible,
.mpd-module-home .mpd-home-catalogue-portal__button:focus-visible {
  outline: 3px solid #77613e;
  outline-offset: 4px;
}

.mpd-module-home .mpd-home-catalogue-portal__catalogue {
  align-items: center;
  align-self: stretch;
  border-left: 1px solid rgba(110, 94, 68, .18);
  display: flex;
  padding-left: clamp(28px, 3vw, 44px);
  position: relative;
  z-index: 1;
}

.mpd-module-home .mpd-home-catalogue-portal__button {
  min-height: 48px;
  white-space: nowrap;
}

@media (max-width: 1120px) {
  .mpd-module-home .mpd-home-catalogue-portal {
    gap: 28px;
    padding-inline: 34px 28px;
  }

  .mpd-module-home .mpd-home-catalogue-portal__catalogue {
    padding-left: 28px;
  }
}

@media (max-width: 900px) {
  .mpd-module-home .mpd-redesign-catalogue__grid {
    grid-template-rows: 350px 245px 245px 206px;
  }

  .mpd-module-home .mpd-home-catalogue-portal {
    grid-column: 1 / 3;
    grid-row: 4;
  }
}

@media (max-width: 620px) {
  .mpd-module-home .mpd-home-catalogue-portal {
    gap: 16px;
    grid-template-columns: minmax(0, 1fr);
    margin-top: 14px;
    padding: 22px 22px 20px 28px;
  }

  .mpd-module-home .mpd-home-catalogue-portal::before {
    inset: 20px -10% 20px 36%;
    opacity: .55;
  }

  .mpd-module-home .mpd-home-catalogue-portal::after {
    height: 150px;
    right: -34px;
    top: -86px;
    width: 150px;
  }

  .mpd-module-home .mpd-home-catalogue-portal__copy {
    padding-left: 16px;
  }

  .mpd-module-home .mpd-home-catalogue-portal strong {
    font-size: clamp(27px, 7.6vw, 31px);
  }

  .mpd-module-home .mpd-home-catalogue-portal__catalogue {
    border-left: 0;
    border-top: 1px solid rgba(110, 94, 68, .18);
    padding-left: 0;
    padding-top: 16px;
  }

  .mpd-module-home .mpd-home-catalogue-portal__button {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 380px) {
  .mpd-module-home .mpd-home-catalogue-portal {
    padding: 22px 18px 19px 24px;
  }

  .mpd-module-home .mpd-home-catalogue-portal strong {
    font-size: 25px;
  }
}

/* Home: slightly reduce composer covers on phones without changing the swipe rail. */
@media (max-width: 767px) {
  .mpd-module-home .mpd-redesign-book__cover picture {
    width: 76%;
  }
}

/* Home: keep the hero credit clearly secondary at every viewport. */
.mpd-module-home .mpd-home-shell--editorial .mpd-redesign-signature {
  font-size: 14px !important;
  line-height: 1.55;
}

@media (max-width: 767px) {
  .mpd-module-home .mpd-home-shell--editorial .mpd-redesign-signature {
    display: none !important;
  }

  /* Let the review use the full mobile measure. The decorative quotation
     mark stays attached to the first line instead of reserving a narrow
     column for the complete paragraph. */
  .mpd-module-home .mpd-redesign-testimonial blockquote {
    display: block;
    max-width: none;
    position: relative;
    width: 100%;
  }

  .mpd-module-home .mpd-redesign-testimonial__mark {
    left: 0;
    position: absolute;
    top: 7px;
  }

  .mpd-module-home .mpd-redesign-testimonial blockquote > div,
  .mpd-module-home .mpd-redesign-testimonial p {
    max-width: none;
    width: 100%;
  }

  .mpd-module-home .mpd-redesign-testimonial p {
    text-indent: 36px;
  }

  .mpd-module-home .mpd-home-catalogue-portal strong {
    font-size: clamp(25px, 6.6vw, 28px);
  }
}

/* Home colour direction: replace the near-black visual weight with one
   coherent family of ink blue, aged gold and desaturated musical accents.
   These declarations change colour only; the approved geometry and type
   scale stay untouched. */
@media screen and (forced-colors: none) {
  .mpd-module-home .mpd-home-shell--editorial {
    --gold: #8a6243;
    --ink: #294553;
    --mpd-action-primary: #28505a;
    --navy: #28505a;
  }

  .mpd-module-home .mpd-home-shell--editorial :is(
    .mpd-redesign-hero h1,
    .mpd-redesign-heading h2,
    .mpd-redesign-book h3,
    .mpd-redesign-reading__copy h2
  ) {
    color: #294553;
  }

  .mpd-module-home .mpd-home-shell--editorial :is(
    .mpd-button.mpd-ui-primary,
    .mpd-button--primary
  ) {
    background: #28505a !important;
    border-color: #28505a !important;
    box-shadow: 0 10px 22px -16px rgba(40, 80, 90, .72), inset 0 1px 0 rgba(255, 255, 255, .18);
    color: #fff !important;
  }

  .mpd-module-home .mpd-home-shell--editorial :is(
    .mpd-button.mpd-ui-primary,
    .mpd-button--primary
  ):hover {
    background: #38666b !important;
    border-color: #38666b !important;
  }

  .mpd-module-home .mpd-redesign-hero .mpd-eyebrow,
  .mpd-module-home .mpd-redesign-books > .mpd-redesign-heading .mpd-eyebrow {
    color: #8a6243;
  }

  .mpd-module-home .mpd-redesign-band--reading .mpd-eyebrow {
    color: #7f5a7d;
  }

  .mpd-module-home .mpd-redesign-catalogue > .mpd-redesign-heading .mpd-eyebrow {
    color: #4e746d;
  }

  .mpd-module-home .mpd-redesign-hero .mpd-editorial-link,
  .mpd-module-home .mpd-redesign-book__copy .mpd-editorial-link {
    color: #3b6266 !important;
    text-decoration-color: rgba(138, 98, 67, .7);
  }

  .mpd-module-home :is(
    .mpd-redesign-books,
    .mpd-redesign-testimonial,
    .mpd-redesign-catalogue
  ) {
    background: transparent;
    isolation: isolate;
    position: relative;
  }

  .mpd-module-home :is(
    .mpd-redesign-books,
    .mpd-redesign-testimonial,
    .mpd-redesign-catalogue
  )::before {
    content: "";
    height: 100%;
    left: 50%;
    pointer-events: none;
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    width: 100vw;
    z-index: -1;
  }

  .mpd-module-home .mpd-redesign-books::before {
    background:
      radial-gradient(circle at 8% 20%, rgba(129, 151, 174, .11), transparent 30%),
      radial-gradient(circle at 92% 76%, rgba(198, 146, 152, .10), transparent 29%),
      #fbfbf8;
  }

  .mpd-module-home .mpd-redesign-book:nth-child(1) .mpd-redesign-book__cover img {
    filter: drop-shadow(0 18px 22px rgba(129, 151, 174, .22));
  }

  .mpd-module-home .mpd-redesign-book:nth-child(2) .mpd-redesign-book__cover img {
    filter: drop-shadow(0 18px 22px rgba(199, 142, 109, .20));
  }

  .mpd-module-home .mpd-redesign-book:nth-child(3) .mpd-redesign-book__cover img {
    filter: drop-shadow(0 18px 22px rgba(198, 146, 152, .20));
  }

  .mpd-module-home .mpd-redesign-book:nth-child(4) .mpd-redesign-book__cover img {
    filter: drop-shadow(0 18px 22px rgba(145, 168, 156, .22));
  }

  .mpd-module-home .mpd-redesign-testimonial::before {
    background:
      radial-gradient(ellipse at 16% 48%, rgba(198, 146, 152, .13), transparent 48%),
      radial-gradient(ellipse at 76% 54%, rgba(145, 168, 156, .08), transparent 52%);
  }

  .mpd-module-home .mpd-redesign-testimonial__mark {
    color: #ae794a;
  }

  .mpd-module-home .mpd-redesign-testimonial p {
    color: #5f5663;
  }

  .mpd-module-home .mpd-redesign-band--reading {
    background:
      radial-gradient(circle at 78% 20%, rgba(127, 90, 125, .12), transparent 28%),
      radial-gradient(circle at 58% 84%, rgba(78, 116, 109, .12), transparent 32%),
      #f5f1e9;
    border-bottom-color: #ddd9cf;
  }

  .mpd-module-home .mpd-redesign-catalogue::before {
    background:
      radial-gradient(circle at 6% 18%, rgba(129, 151, 174, .08), transparent 26%),
      radial-gradient(circle at 94% 82%, rgba(199, 142, 109, .07), transparent 28%);
  }

  .mpd-module-home .mpd-redesign-category__media img {
    filter: saturate(.9) contrast(1.01);
  }

  .mpd-module-home .mpd-redesign-category:hover .mpd-redesign-category__media img {
    filter: saturate(1) contrast(1.04);
  }

  .mpd-module-home .mpd-home-catalogue-portal {
    background:
      radial-gradient(circle at 88% 12%, rgba(129, 151, 174, .20), transparent 30%),
      linear-gradient(118deg, #f4efe7 0%, #eaf0eb 100%);
  }

  .mpd-module-home .mpd-home-catalogue-portal::before {
    background: repeating-linear-gradient(180deg, transparent 0 15px, rgba(78, 116, 109, .13) 16px, transparent 17px);
  }

  .mpd-module-home .mpd-home-catalogue-portal::after {
    border-color: rgba(198, 146, 152, .25);
  }

  .mpd-module-home .mpd-home-catalogue-portal small {
    color: #4e746d;
  }

  .mpd-module-home .mpd-home-catalogue-portal strong {
    color: #315665;
  }

  .mpd-module-home .mpd-home-catalogue-portal__free-link {
    color: #6b5847;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mpd-module-home .mpd-home-catalogue-portal__free-link span {
    transition: none;
  }
}

@media (forced-colors: active) {
  .mpd-module-home .mpd-home-catalogue-portal {
    background: Canvas;
    border-color: CanvasText;
    color: CanvasText;
  }
}

@media print {
  .mpd-module-home .mpd-home-catalogue-portal {
    background: transparent;
    border: 1px solid #000;
    display: block;
    padding: 18px;
  }

  .mpd-module-home .mpd-home-catalogue-portal__catalogue {
    border: 0;
    margin-top: 14px;
    padding: 0;
  }
}
