/* The Beauty Palette: progressive enhancement of the public editorial scenes.
   Keep the real image in normal flow. No content or image depends on animation. */
.hero > .hero-scene {
    --tbp-motion-ready: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-self: stretch;
    justify-content: center;
    min-width: 0;
    margin: 0;
    background: #fae9e3;
    isolation: isolate;
}
.hero > .hero-scene--contact { background: #f0d7dc; }
.hero > .hero-scene--home { background: #edcdd0; }
.hero > .hero-scene--about { background: #e7d0c3; }
.hero-scene__viewport {
    display: flex;
    flex: 1 0 auto;
    align-items: center;
    min-width: 0;
    overflow: hidden;
}
.hero-scene__art {
    position: relative;
    width: 100%;
    min-width: 0;
    transform: none;
    transition: transform 320ms ease-out;
}
.hero .hero-scene__image {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    min-height: 0;
    border: 0;
    border-radius: 0;
    aspect-ratio: auto;
    opacity: 1;
}
.hero-scene__layers {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    visibility: hidden;
    pointer-events: none;
}
.hero-scene.is-playing .hero-scene__image { opacity: 0; }
.hero-scene.is-playing .hero-scene__layers { visibility: visible; }
.hero-scene.is-playing .hero-scene__layer {
    animation: tbp-scene-reveal 700ms cubic-bezier(.22, .61, .36, 1) both;
}
.hero-scene.is-playing .hero-scene__layer--background { animation-duration: 500ms; }
.hero-scene.is-playing .hero-scene__layer--first { animation-delay: 130ms; }
.hero-scene.is-playing .hero-scene__layer--second { animation-delay: 340ms; }
.hero-scene.is-playing .hero-scene__layer--third { animation-delay: 590ms; }
@keyframes tbp-scene-reveal { from { opacity: 0; } to { opacity: 1; } }

/* A reserved control row prevents layout jumps when JavaScript becomes ready. */
.hero-scene__caption {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    min-height: 4rem;
    padding: .5rem 1rem;
}
.hero .hero-scene__replay {
    gap: .45rem;
    min-width: 44px;
    min-height: 44px;
    max-width: 100%;
    padding: .55rem .85rem;
    border: 1px solid #aa7281;
    border-radius: 2rem;
    background: #fff8f4;
    color: #713248;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: normal;
}
.hero .hero-scene__replay svg { flex: 0 0 1.1rem; width: 1.1rem; height: 1.1rem; }
.hero .hero-scene__replay:hover { background: #fff; }
.hero .hero-scene__replay[aria-disabled='true'] { cursor: default; }

/* Only the completed composition responds; clipped pieces never shift. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .hero-scene.is-hovering:not(.is-playing) .hero-scene__art {
        transform: translate3d(var(--hero-shift-x, 0px), var(--hero-shift-y, 0px), 0) scale(1.015);
    }
}
@media (max-width: 850px) {
    .hero > .hero-scene { min-height: 0; }
    .hero-scene__caption { padding-inline: 1rem; }
}
:root[data-scale='150'] .hero-scene__art,
:root[data-scale='200'] .hero-scene__art { max-width: 48rem; margin-inline: auto; }
.pref-contrast .hero > .hero-scene { background: var(--soft); }
.pref-contrast .hero .hero-scene__replay {
    color: var(--accent-strong);
    border-color: var(--control);
    background: var(--white);
}
.pref-contrast .hero .hero-scene__replay:hover { background: var(--soft); }

/* CSS alone must also recover the original if motion changes mid-sequence. */
.pref-motion .hero-scene__image { opacity: 1 !important; }
.pref-motion .hero-scene__layers { display: none !important; }
.pref-motion .hero-scene__art { transform: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
    .hero-scene__image { opacity: 1 !important; }
    .hero-scene__layers { display: none !important; }
    .hero-scene__art { transform: none !important; transition: none !important; }
}
@media print {
    .hero-scene__image { opacity: 1 !important; }
    .hero-scene__layers, .hero-scene__caption { display: none !important; }
    .hero-scene__art { transform: none !important; }
}
