/* Tony draft: the browser owns the stationary photo and sticky lettering. */
body.page-id-4722 .tc-anniversary {
    --tca-viewport: 100vh;
    --tca-header: 84px;
    --tca-usable: calc(var(--tca-viewport) - var(--tca-header));
    position: relative;
    isolation: isolate;
    aspect-ratio: 402 / 721;
    height: auto;
    max-height: none;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    background: #24242e;
}

/* Stable viewport height avoids jumps when mobile browser controls retract. */
@supports (height: 100svh) {
    body.page-id-4722 .tc-anniversary { --tca-viewport: 100svh; }
}

body.page-id-4722 .tc-anniversary__scene {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

body.page-id-4722 .tc-anniversary__photo,
body.page-id-4722 .tc-anniversary__photo img {
    display: block;
    width: 100%;
    height: 100%;
}

body.page-id-4722 .tc-anniversary__photo img {
    object-fit: contain;
    object-position: center;
}

body.page-id-4722 .tc-anniversary__lettering {
    position: absolute;
    inset: 50% auto auto 50%;
    width: min(260%, calc(var(--tca-usable) * 1.4496532594));
    max-width: none;
    height: auto;
    object-fit: contain;
    /* Center the ink and signature within the supplied transparent PNG. */
    transform: translate(-50%, -54.47295%);
}

/* Clip the viewport-fixed photo and the sticky lettering to this section.
   Unlike overflow:hidden, overflow:clip leaves native sticky scrolling intact. */
body.page-id-4722 .tc-anniversary.is-parallax {
    aspect-ratio: auto;
    /* A short 10% hold lets the next section enter soon after the graphic centers. */
    height: calc(var(--tca-usable) * 1.10);
    overflow: clip;
    -webkit-clip-path: inset(0);
    clip-path: inset(0);
}

body.page-id-4722 .tc-anniversary.is-parallax .tc-anniversary__scene {
    bottom: auto;
    /* Let the section's clip cover the lettering before sticky can release. */
    height: calc(100% + var(--tca-usable) * 2);
}

body.page-id-4722 .tc-anniversary.is-parallax .tc-anniversary__photo {
    position: fixed;
    top: var(--tca-header);
    left: 0;
    right: 0;
    height: var(--tca-usable);
    transform: translateZ(0);
}

body.page-id-4722 .tc-anniversary.is-parallax .tc-anniversary__photo img {
    object-fit: cover;
    object-position: center top;
}

body.page-id-4722 .tc-anniversary.is-parallax .tc-anniversary__lettering {
    display: block;
    position: -webkit-sticky;
    position: sticky;
    inset: auto;
    margin-left: 50%;
    top: calc(var(--tca-header) + var(--tca-usable) / 2);
    margin-top: calc(var(--tca-usable) / 2);
    z-index: 1;
    will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
    body.page-id-4722 .tc-anniversary .tc-anniversary__lettering {
        will-change: auto;
    }
}
