/* דפדוף בין עמודי הספר: העמוד הישן מתהפך ימינה, כמו בספר עברי.
   עובד ב-Chrome וב-Safari 18.2 ומעלה. בדפדפן בלי תמיכה המעבר רגיל. הכיוון נקבע ב-assets/book.js. */
@view-transition { navigation: auto; }
html[data-turn]::view-transition-old(root),
html[data-turn]::view-transition-new(root) { mix-blend-mode: normal; animation-duration: .6s; }
html[data-turn="next"]::view-transition-old(root) { z-index: 2; transform-origin: right center; animation-name: page-lift; animation-timing-function: cubic-bezier(.45, 0, .7, 1); animation-fill-mode: both; }
html[data-turn="next"]::view-transition-new(root) { z-index: 1; animation-name: page-under; animation-fill-mode: both; }
html[data-turn="prev"]::view-transition-new(root) { z-index: 2; transform-origin: right center; animation-name: page-lift; animation-direction: reverse; animation-timing-function: cubic-bezier(.3, 0, .55, 1); animation-fill-mode: both; }
html[data-turn="prev"]::view-transition-old(root) { z-index: 1; animation-name: page-under; animation-direction: reverse; animation-fill-mode: both; }
@keyframes page-lift {
  from { transform: perspective(1600px) rotateY(0); box-shadow: 0 0 0 rgba(0, 0, 0, 0); }
  85% { opacity: 1; }
  to { transform: perspective(1600px) rotateY(90deg); box-shadow: -30px 0 40px rgba(0, 0, 0, .25); opacity: 0; }
}
@keyframes page-under {
  from { filter: brightness(.82); }
  to { filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}
