/* v155 — the page turn and the open book, as in the portfolio catalogue (its mm-lx.css). app.js turns the page; lv-book-v1.js
   lays the turned pages on the left of the spine.

   ---------- the page turns like a page of a book (app.js, v-flip 2) ----------
   It turns on the spine: its outer edge lifts first and swings over to the left, so the next page shows from the right and the
   words by the spine are the last to go. The page is cut into upright strips joined edge to edge, each turned a little more than
   the one before it, so the paper bends; each strip carries a soft shade at both edges that follows the angle of the paper there.
   Its back is blank paper in the colour of the pages on the left. */
.book-turn.flip{overflow:visible}
.book-turn.flip .flip-under{position:absolute;left:0;top:0;right:0;bottom:0}
.book-turn.flip .flip-ao{position:absolute;top:0;width:110px;opacity:0;pointer-events:none;background:linear-gradient(90deg,rgba(0,0,0,.17),rgba(0,0,0,.05) 40%,rgba(0,0,0,0))}
.book-turn.flip .flip-cast{position:absolute;left:0;top:0;width:120px;opacity:0;pointer-events:none;will-change:transform,opacity;background:linear-gradient(90deg,rgba(0,0,0,.16),rgba(0,0,0,.05) 30%,rgba(0,0,0,0))}
.book-turn.flip .flip-seg{position:absolute;top:0;transform-origin:0 50%;transform-style:preserve-3d;will-change:transform}
.book-turn.flip .flip-face,.book-turn.flip .flip-back{position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;-webkit-backface-visibility:hidden;backface-visibility:hidden}
.book-turn.flip .flip-back{transform:rotateY(180deg)}
.book-turn.flip .flip-dim{position:absolute;left:0;top:0;right:0;bottom:0;background:#000;opacity:0;pointer-events:none}
.book-turn.flip .flip-dim.l{background:linear-gradient(90deg,#000,rgba(0,0,0,0))}
.book-turn.flip .flip-dim.r{background:linear-gradient(90deg,rgba(0,0,0,0),#000)}
/* the new page builds while the sheet turns over it, so it lands whole (it used to land empty, then build) */
html body .book-stage.is-turning>.catalogue-page *,html body .book-stage.is-turning>.catalogue-page *::before,html body .book-stage.is-turning>.catalogue-page *::after{animation-play-state:running!important}
/* the binding is on the left in both languages: in Arabic too the page turns to the left and lies there */
html[dir="rtl"] .book-turn .spine-snap.edge-layer{left:0!important;right:auto!important}

/* ---------- the open book: the turned pages on the left (lv-book-v1.js places .lv-leaf and .lv-fold) ----------
   In a landscape window of 1200px or more the book leaves room on the left for them (72px). A smaller window or an upright tablet
   keeps the book as it was: there the page needs all its width (on a 1024px laptop the chapter lines of page 5 would not fit). */
@media screen and (min-width:1200px) and (min-aspect-ratio:5/4){
 :root{--lp:72px}
 .reader{padding-left:calc(var(--pl,33px) + var(--lp))!important}
 .book-stage{width:min(calc(100vw - var(--pl,33px) - var(--pr,66px) - var(--lp)),calc((100dvh - 62px)*2.75),1640px)!important}
}
.lv-leaf{position:fixed;left:0;pointer-events:none;background-color:#fff;
 background-image:linear-gradient(to right,rgba(0,0,0,.045),rgba(0,0,0,0) 55%),var(--lv-pimg,none)}
.lv-leaf.lv-soft{transition:background-color .6s ease}
.lv-leaf.is-dark{background-image:linear-gradient(to right,rgba(255,255,255,.025),rgba(255,255,255,0) 60%),var(--lv-pimg,none)}
.lv-leaf[hidden]{display:none}
/* the fold of the open book: one shadow from the left page, through the spine, out onto the page */
.lv-fold{position:fixed;z-index:16;pointer-events:none;
 background:linear-gradient(90deg,rgba(0,0,0,0) 0,rgba(0,0,0,.018) 14%,rgba(0,0,0,.05) 28%,rgba(0,0,0,.1) 39%,rgba(0,0,0,.17) 46%,rgba(0,0,0,.2) 50%,rgba(0,0,0,.14) 54%,rgba(0,0,0,.075) 62%,rgba(0,0,0,.03) 74%,rgba(0,0,0,.01) 86%,rgba(0,0,0,0) 100%)}
.lv-fold.is-dark{background:linear-gradient(90deg,rgba(0,0,0,0) 0,rgba(0,0,0,.08) 16%,rgba(0,0,0,.22) 30%,rgba(0,0,0,.42) 42%,rgba(0,0,0,.6) 50%,rgba(0,0,0,.4) 57%,rgba(0,0,0,.18) 68%,rgba(0,0,0,.05) 82%,rgba(0,0,0,0) 100%),
 linear-gradient(90deg,rgba(255,255,255,0) 60%,rgba(255,255,255,.035) 74%,rgba(255,255,255,0) 90%)}
.lv-fold[hidden]{display:none}
html.lv-open .edge-layer .book-crease{opacity:0!important}
@media print{.lv-leaf,.lv-fold{display:none!important}}

/* the book is a little narrower in a landscape window (it leaves room on the left for the turned pages); a kicker that sat right at
   14px there keeps to the floor */
html .lvp .gc-kicker{font-size:max(14px,.98em)}
html[lang="ar"] .lvp .gc-kicker{font-size:max(14px,1.06em)}
