/*
 * Homepage Printable Library conversion component.
 *
 * This CTA is intentionally more expressive than standard content sections,
 * while staying within the shared homepage width and flat surface system.
 */

body.isp-library-hidden .library-section {
  display: none;
}

.library-section {
  padding-block: clamp(68px, 7vw, 96px);
  background: var(--isp-home-surface-soft, #f8fbfc);
  border-block: 1px solid rgba(115, 192, 238, .07);
}

.library-cta {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(300px, .82fr) minmax(0, 1.18fr);
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
  padding: clamp(38px, 5vw, 62px);
  border: 1px solid rgba(115, 192, 238, .22);
  border-radius: 32px;
  background: linear-gradient(135deg, #f1faff 0%, #ffffff 64%, #fff8fb 100%);
  color: var(--isp-ink);
  box-shadow: 0 20px 52px rgba(68, 68, 68, .065);
}

.library-cta::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #73c0ee 0 36%, #ed73a4 36% 68%, #ebbf7a 68% 100%);
}

.library-cta::after {
  content: none;
}

.library-cta__visual {
  position: relative;
  min-height: 320px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(115, 192, 238, .16);
  border-radius: 26px;
  background: #eaf7fe;
}

.library-cta__visual::before {
  content: "";
  position: absolute;
  width: 128px;
  height: 128px;
  left: 28px;
  bottom: 24px;
  border-radius: 34px;
  background: rgba(237, 115, 164, .09);
  transform: rotate(12deg);
}

.library-cta__visual::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  right: 34px;
  top: 30px;
  border-radius: 50%;
  background: rgba(235, 191, 122, .18);
}

.library-sheet {
  position: absolute;
  width: 142px;
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  border: 7px solid #fff;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 17px 34px rgba(68, 68, 68, .13);
  transition: transform .2s ease;
  z-index: 2;
}

.library-sheet svg {
  width: 48px;
  height: 48px;
  fill: currentColor;
}

.library-sheet--one {
  left: 15%;
  top: 27%;
  color: #438fbc;
  background: #f2fbff;
  transform: rotate(-8deg);
}

.library-sheet--two {
  left: 37%;
  top: 13%;
  color: #c85886;
  background: #fff2f7;
  transform: rotate(3deg);
}

.library-sheet--three {
  left: 52%;
  top: 31%;
  color: #9a7440;
  background: #fff8e9;
  transform: rotate(9deg);
}

.library-cta:hover .library-sheet--one {
  transform: translateY(-3px) rotate(-8deg);
}

.library-cta:hover .library-sheet--two {
  transform: translateY(-5px) rotate(3deg);
}

.library-cta:hover .library-sheet--three {
  transform: translateY(-3px) rotate(9deg);
}

.library-cta__copy {
  position: relative;
  z-index: 2;
  max-width: 620px;
}

.library-cta .section-kicker--light {
  color: #438fbc;
}

.library-cta h2 {
  margin: 0 0 15px;
  max-width: 610px;
  color: var(--isp-ink);
  font-size: clamp(2.55rem, 4.8vw, 4.15rem);
  line-height: .98;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.library-cta__copy > p {
  max-width: 590px;
  margin: 0 0 23px;
  color: #686a6c;
  font-size: 1rem;
  line-height: 1.65;
}

.library-benefits {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0 0 26px;
  list-style: none;
}

.library-benefits li {
  position: relative;
  min-height: 34px;
  padding: 7px 12px 7px 38px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(68, 68, 68, .065);
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
  color: #505254;
  font-size: .91rem;
  font-weight: 750;
}

.library-benefits li::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 50%;
  width: 9px;
  height: 5px;
  border-left: 2px solid #438fbc;
  border-bottom: 2px solid #438fbc;
  transform: translateY(-65%) rotate(-45deg);
}

.library-cta .isp-button--white {
  min-height: 50px;
  padding-inline: 19px;
  border: 1px solid rgba(67, 143, 188, .12);
  border-radius: 14px;
  background: var(--isp-primary, #73c0ee);
  color: var(--isp-ink);
  box-shadow: 0 11px 26px rgba(115, 192, 238, .22);
}

.library-cta .isp-button--white:hover,
.library-cta .isp-button--white:focus-visible {
  background: #68b9e8;
}

@media (max-width: 980px) {
  .library-cta {
    grid-template-columns: minmax(260px, .75fr) minmax(0, 1.25fr);
    gap: 34px;
    padding: 36px;
  }

  .library-cta__visual {
    min-height: 290px;
  }

  .library-sheet {
    width: 124px;
  }
}

@media (max-width: 760px) {
  .library-section {
    padding-block: 52px;
  }

  .library-cta {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 26px;
    border-radius: 26px;
  }

  .library-cta__visual {
    width: 100%;
    min-height: 230px;
    border-radius: 22px;
  }

  .library-sheet {
    width: 104px;
    border-width: 6px;
    border-radius: 17px;
  }

  .library-sheet svg {
    width: 38px;
    height: 38px;
  }

  .library-sheet--one {
    left: 18%;
    top: 30%;
  }

  .library-sheet--two {
    left: 39%;
    top: 15%;
  }

  .library-sheet--three {
    left: 55%;
    top: 33%;
  }

  .library-cta h2 {
    font-size: clamp(2.35rem, 10vw, 3.2rem);
  }

  .library-cta__copy > p {
    font-size: .96rem;
  }
}

@media (max-width: 420px) {
  .library-cta {
    padding: 20px;
  }

  .library-cta__visual {
    min-height: 205px;
  }

  .library-sheet {
    width: 92px;
  }

  .library-sheet--one {
    left: 11%;
  }

  .library-sheet--two {
    left: 35%;
  }

  .library-sheet--three {
    left: 56%;
  }

  .library-benefits li {
    padding-right: 10px;
    font-size: .87rem;
  }

  .library-cta .isp-button--white {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .library-sheet {
    transition: none;
  }
}
