/* The same complete cover is painted in the head and retained through arrival. */
.page-transition {
    position: fixed;
    inset: 0;
    z-index: 30000;
    display: grid;
    place-content: center;
    padding: 24px;
    box-sizing: border-box;
    background: #fdfdfd;
    color: #23434a;
    text-align: center;
    opacity: 0;
    transition: opacity 320ms ease;
}
.page-transition.is-covering { opacity: 1; }
.page-transition--title {
    background: #e6eeea;
    opacity: 1;
    clip-path: circle(0 at var(--page-origin-x, 50%) var(--page-origin-y, 50%));
    transition: clip-path 600ms cubic-bezier(.65, 0, .2, 1);
}
.page-transition--title.is-covering {
    clip-path: circle(150vmax at var(--page-origin-x, 50%) var(--page-origin-y, 50%));
}
.page-transition__label {
    /* Local fonts keep metrics identical when a destination loads web fonts. */
    position: absolute;
    left: 50vw;
    top: 50vh;
    top: 50dvh;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 0;
    max-width: calc(100vw - 48px);
    font-family: 'Yu Mincho', 'Hiragino Mincho ProN', serif;
    font-size: clamp(26px, 4vw, 52px);
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: .04em;
    white-space: nowrap;
}
.page-transition__title { display: block; }
.page-transition__character {
    display: inline-block;
    opacity: 0;
    transform: translateY(14px) rotate(4deg);
    filter: blur(3px);
}
.page-transition.is-covering .page-transition__character {
    animation: page-title-rise 420ms cubic-bezier(.2, .7, .3, 1) both;
    animation-delay: calc(140ms + var(--character-index) * 35ms);
}
.page-transition__accent {
    position: relative;
    display: block;
    width: 128px;
    height: 8px;
    margin: 18px auto 0;
}
.page-transition__accent::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 3px;
    height: 1px;
    background: linear-gradient(90deg, #7dafaa33, #4e9690);
    transform: scaleX(0);
    transform-origin: left;
}
.page-transition__accent::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4e9690;
    box-shadow: 0 0 0 5px #4e969018;
    transform: translateX(0) scale(.4);
    opacity: 0;
}
.page-transition.is-covering .page-transition__accent::before {
    animation: page-line-draw 600ms 200ms cubic-bezier(.25, .65, .3, 1) both;
}
.page-transition.is-covering .page-transition__accent::after {
    animation: page-light-travel 600ms 200ms cubic-bezier(.25, .65, .3, 1) both;
}
.page-transition__label small {
    display: block;
    margin: 16px 0 0;
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: .25em;
    opacity: 0;
}
.page-transition.is-covering .page-transition__label small {
    animation: page-subtitle-in 400ms 260ms both;
}
.page-transition.is-arriving {
    opacity: 1;
    clip-path: none;
    pointer-events: none;
    transition: opacity 600ms ease;
}
.page-transition.is-arriving .page-transition__character,
.page-transition.is-arriving .page-transition__label small {
    opacity: 1;
    transform: none;
    filter: none;
    animation: none;
}
.page-transition.is-arriving .page-transition__accent::before { transform: scaleX(1); animation: none; }
.page-transition.is-arriving .page-transition__accent::after { opacity: 1; transform: translateX(124px) scale(1); animation: none; }
.page-transition.is-revealing { opacity: 0; }
@keyframes page-title-rise { to { opacity: 1; transform: none; filter: none; } }
@keyframes page-line-draw { to { transform: scaleX(1); } }
@keyframes page-light-travel {
    15% { opacity: 1; }
    to { opacity: 1; transform: translateX(124px) scale(1); }
}
@keyframes page-subtitle-in { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .page-transition { display: none; }
}
