/* The page change: see src/components/PageTurn.astro. */
.tlh-turn { position: fixed; inset: 0; z-index: 2147483000; display: grid; grid-template-columns: repeat(4, 1fr); pointer-events: none; }
.tlh-turn i { --i: 0; margin-right: -1px; background: #5f3c91; transform: translate3d(0, 101%, 0); }
.tlh-turn i:nth-child(2) { --i: 1; }
.tlh-turn i:nth-child(3) { --i: 2; }
.tlh-turn i:nth-child(4) { --i: 3; }
.tlh-turn svg { position: absolute; left: 50%; top: 50%; width: auto; height: 64px; color: #fff; clip-path: inset(100% 0 0 0); transform: translate(-50%, -50%); }

.tlh-turn.is-out { pointer-events: auto; }
.tlh-turn.is-out i { animation: tlh-turn-cover .38s cubic-bezier(.65, 0, .35, 1) calc(var(--i) * 30ms) both; }
.tlh-turn.is-out svg { animation: tlh-turn-mark .3s cubic-bezier(.2, .7, .2, 1) .2s both; }

.tlh-turn.is-covered i { transform: none; }
.tlh-turn.is-covered svg { clip-path: inset(0); }

.tlh-turn.is-in i { animation: tlh-turn-uncover .62s cubic-bezier(.7, 0, .2, 1) calc(.08s + var(--i) * 55ms) both; }
.tlh-turn.is-in svg { animation: tlh-turn-lift .5s cubic-bezier(.6, 0, .3, 1) both; }

@keyframes tlh-turn-cover { from { transform: translate3d(0, 101%, 0); } to { transform: none; } }
/* the mark wipes in and out with the columns, never faded (no fades) */
@keyframes tlh-turn-mark { from { clip-path: inset(100% 0 0 0); transform: translate(-50%, -30%); } to { clip-path: inset(0); transform: translate(-50%, -50%); } }
@keyframes tlh-turn-uncover { from { transform: none; } to { transform: translate3d(0, -101%, 0); } }
@keyframes tlh-turn-lift { from { clip-path: inset(0); transform: translate(-50%, -50%); } to { clip-path: inset(0 0 100% 0); transform: translate(-50%, -90%); } }

@media (prefers-reduced-motion: reduce) { .tlh-turn { display: none; } }
