/* The five petals lead into the keepsake at the centre of the bloom. */
.book-reveal,
.book-reveal.is-active {
  width: min(1180px, calc(100% - 88px));
  top: 52%;
  display: grid;
  grid-template-columns: .85fr 1.25fr;
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  text-align: left;
  opacity: var(--finale);
  visibility: hidden;
  transform: translate(-50%, -50%) scale(calc(.72 + var(--finale) * .28));
  transform-origin: 58% 50%;
}
.book-reveal.is-active { visibility: visible; }
.book-reveal-copy { position: relative; z-index: 2; }
.book-reveal .eyebrow { font-size: .64rem; letter-spacing: .13em; }
.book-reveal h2 {
  margin-top: 20px;
  font-size: clamp(2.6rem, 4.8vw, 4.7rem);
  line-height: .98;
}
.book-reveal-copy > p {
  max-width: 37ch;
  margin-top: 23px;
  color: var(--ink-soft);
  font-size: clamp(.93rem, 1.25vw, 1.08rem);
}
.book-reveal-copy > .book-reveal-tier {
  margin-top: 16px;
  color: var(--rose);
  font: italic .9rem/1.4 "Fraunces", serif;
}
.book-reveal .hero-cta { justify-content: flex-start; gap: 12px; margin-top: 26px; }
.book-reveal .btn { font-size: .88rem; padding: 14px 21px; }
.book-preview-art {
  position: relative;
  height: min(65svh, 540px);
  min-height: 330px;
  isolation: isolate;
}
.book-preview-art::before {
  content: "";
  position: absolute;
  inset: 12% -12% -10%;
  z-index: -1;
  background: radial-gradient(ellipse, rgba(250, 243, 221, .9), transparent 70%);
}
.book-preview-art figure { margin: 0; }
.book-sample-spread,
.book-sample-back { position: absolute; width: 100%; right: 0; }
.book-sample-back { top: 8%; transform: rotate(-7deg); opacity: .85; }
.book-sample-spread { top: 25%; transform: rotate(3deg); }
.book-sample-spread a { display: block; border-radius: 2px; }
.book-sample-spread img,
.book-sample-back img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(92, 63, 44, .13);
  border-radius: 2px;
  box-shadow: 0 2px 0 #ede0d2, 0 4px 0 #d6c4b1, 0 22px 46px rgba(58, 34, 24, .19);
}
.book-sample-spread figcaption {
  margin-top: 13px;
  text-align: right;
  font: 500 .62rem/1.4 "JetBrains Mono", monospace;
  color: var(--ink-soft);
}
.book-app-cover {
  position: absolute;
  left: -5%;
  bottom: 1%;
  width: min(26%, 142px);
  transform: rotate(-7deg);
}
.book-app-cover img {
  display: block;
  width: 100%;
  height: auto;
  border: 4px solid #3a2e25;
  border-radius: 18px;
  box-shadow: 0 18px 34px rgba(58, 34, 24, .24);
}
.book-app-cover figcaption {
  margin-top: 10px;
  text-align: center;
  color: var(--ink-soft);
  font: italic .77rem/1.3 "Fraunces", serif;
}
.bloom-journey.is-book .bloom-orbit { opacity: calc(1 - var(--finale) * .95); }
.bloom-journey.is-book .centre-caption { opacity: 0; }

@media (max-width: 700px) {
  .book-reveal,
  .book-reveal.is-active {
    top: 52%;
    width: calc(100% - 40px);
    grid-template-columns: minmax(0, 1fr);
    gap: 15px;
    text-align: center;
    transform-origin: center;
  }
  .book-reveal .eyebrow { font-size: .53rem; letter-spacing: .1em; }
  .book-reveal h2 { margin-top: 11px; font-size: clamp(2.3rem, 9vw, 3.1rem); }
  .book-reveal h2 br { display: none; }
  .book-reveal-copy > p { margin: 12px auto 0; font-size: .86rem; line-height: 1.45; }
  .book-reveal-copy > .book-reveal-tier { margin-top: 9px; font-size: .8rem; }
  .book-reveal .hero-cta { justify-content: center; flex-direction: row; gap: 8px; margin-top: 15px; }
  .book-reveal .btn { min-height: 44px; padding: 11px 13px; font-size: .72rem; }
  .book-reveal .apple-glyph { width: 15px; height: 15px; }
  .book-preview-art { width: 94%; margin: 0 auto; height: min(35svh, 300px); min-height: 210px; }
  .book-sample-back { top: 5%; }
  .book-sample-spread { top: 20%; }
  .book-sample-spread figcaption { margin-top: 10px; font-size: .49rem; }
  .book-app-cover { left: -2%; bottom: 0; width: 23%; }
  .book-app-cover img { border-width: 2px; border-radius: 11px; }
  .book-app-cover figcaption { font-size: .58rem; margin-top: 7px; }
}

@media (max-height: 650px) and (min-width: 701px) {
  .book-reveal h2 { font-size: 2.8rem; }
  .book-reveal-copy > p { font-size: .85rem; margin-top: 14px; }
  .book-reveal .hero-cta { margin-top: 15px; }
  .book-preview-art { min-height: 270px; height: 65svh; }
  .book-app-cover { width: 22%; max-width: 108px; }
}

@media (max-height: 700px) and (max-width: 700px) {
  .book-reveal,
  .book-reveal.is-active { gap: 10px; }
  .book-reveal h2 { font-size: 2.15rem; }
  .book-reveal-copy > p { font-size: .78rem; }
  .book-preview-art { min-height: 175px; height: 31svh; width: 85%; }
  .book-reveal .hero-cta { margin-top: 10px; }
}

@media (max-height: 500px) {
  .book-reveal,
  .book-reveal.is-active {
    top: calc(50% + 28px);
    max-height: calc(100svh - 100px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 8px 28px;
    scrollbar-width: thin;
  }
}

/* The finished book remains available without scroll animation. */
@media (prefers-reduced-motion: reduce) {
  .bloom-journey { height: auto; }
  .bloom-stage { height: auto; min-height: 0; overflow: visible; }
  .journey-intro { position: relative; left: auto; top: auto; width: min(660px, calc(100% - 48px)); margin: 0 auto; padding: 80px 0 40px; transform: none; }
  .scroll-cue { display: none; }
  .book-reveal,
  .book-reveal.is-active { position: relative; left: auto; top: auto; margin: 30px auto 60px; transform: none; opacity: 1; visibility: visible; pointer-events: auto; max-height: none; overflow: visible; }
}
html:not(.js) .bloom-journey { height: auto; }
html:not(.js) .bloom-stage { height: auto; min-height: 0; overflow: visible; }
html:not(.js) .journey-intro { position: relative; left: auto; top: auto; margin: 0 auto; padding: 80px 0 40px; transform: none; }
html:not(.js) .chapter,
html:not(.js) .bloom-orbit,
html:not(.js) .scroll-cue,
html:not(.js) .journey-progress { display: none; }
html:not(.js) .book-reveal { position: relative; left: auto; top: auto; margin: 30px auto 60px; transform: none; opacity: 1; visibility: visible; pointer-events: auto; max-height: none; overflow: visible; }
