/* V32 Metamorphosis — physically staged shell breakup, independent head/wing reveals.
   This is a cinematic layered-animation prototype, NOT true 3D morph geometry. */
.v31-trial {border-color:#e7c88b88;background:linear-gradient(135deg,#161b2d,#272035 60%,#15283a)}
.v31-trial-eyebrow {color:#ffe4b0}
.v31-evo-veil .v31-evo-main {overflow:visible}
.v31-evo-veil .v31-evo-strobe {pointer-events:none}
.v32-chrysalis {position:absolute;inset:0;z-index:8;opacity:0;pointer-events:none;transition:opacity .6s ease;filter:drop-shadow(0 0 22px var(--v31-accent))}
.v32-chrysalis>img {position:absolute;inset:0;width:100%;height:100%;object-fit:contain;transform:translateZ(0) scale(.85);will-change:transform,opacity;filter:drop-shadow(0 0 16px var(--v31-accent));transition:transform 1.65s cubic-bezier(.1,.54,.1,1),opacity .8s ease,filter .5s ease}
.v32-chrysalis .v32-seam {position:absolute;left:50%;top:43%;transform:translate(-50%,-50%) scale(.3);font:700 60px Georgia,serif;color:#fff7d2;text-shadow:0 0 24px var(--v31-accent);opacity:0;transition:transform 1s,opacity 1s}
.v31-evo-veil[data-phase="fracture"] .v32-chrysalis {opacity:.28}
.v31-evo-veil[data-phase="cocoon"] .v32-chrysalis,.v31-evo-veil[data-phase="silence"] .v32-chrysalis {opacity:1}
.v31-evo-veil[data-phase="cocoon"] .v32-chrysalis img,.v31-evo-veil[data-phase="silence"] .v32-chrysalis img {transform:scale(1.03)}
.v31-evo-veil[data-phase="cocoon"] .v32-seam {opacity:.7;transform:translate(-50%,-50%) scale(1)}
.v31-evo-veil[data-phase="silence"] .v32-seam {opacity:.1;transform:translate(-50%,-50%) scale(.8)}
.v31-evo-veil[data-phase="silence"] .v31-evo-energy-ring,.v31-evo-veil[data-phase="silence"] .v31-evo-iris,.v31-evo-veil[data-phase="silence"] .v31-evo-aura {opacity:.1;animation-play-state:paused!important}
.v31-evo-veil[data-phase="silence"] .v31-evo-particles {opacity:.08}
.v31-evo-veil[data-phase="silence"] .v31-evo-atmosphere {filter:brightness(.25)}
.v31-evo-veil[data-phase="shatter"] .v32-chrysalis {opacity:1}
.v31-evo-veil[data-phase="shatter"] .v32-shell-left,.v31-evo-veil[data-phase="morph"] .v32-shell-left {transform:translate(-39%,-15%) rotate(-31deg) scale(1.14);opacity:0}
.v31-evo-veil[data-phase="shatter"] .v32-shell-right,.v31-evo-veil[data-phase="morph"] .v32-shell-right {transform:translate(41%,-16%) rotate(33deg) scale(1.13);opacity:0}
.v31-evo-veil[data-phase="shatter"] .v32-seam {opacity:1;transform:translate(-50%,-50%) scale(3.2)}
.v31-evo-veil[data-phase="morph"] .v32-chrysalis,.v31-evo-veil[data-phase="reveal"] .v32-chrysalis,.v31-evo-veil[data-phase="complete"] .v32-chrysalis {opacity:0}
/* During the cocoon the old form bends and disappears behind a sculpted chrysalis. */
.v31-evo-veil[data-phase="cocoon"] img.v31-evo-before {transform:scale(.68) translateY(9%)!important;filter:brightness(.2) saturate(.2)!important}
.v31-evo-veil[data-phase="silence"] img.v31-evo-before {opacity:.05!important;transform:scale(.68)!important;filter:brightness(.03)!important}
.v31-evo-veil[data-phase="shatter"] img.v31-evo-before {opacity:0!important;transform:scale(.75) rotate(-3deg)!important}
.v31-evo-veil[data-phase="morph"] img.v31-evo-before,.v31-evo-veil[data-phase="reveal"] img.v31-evo-before,.v31-evo-veil[data-phase="complete"] img.v31-evo-before {opacity:0!important}
.v31-evo-veil[data-phase="morph"] img.v31-evo-after {opacity:1!important;transform:scale(.87)!important;filter:brightness(.06) contrast(1.45) drop-shadow(0 0 42px var(--v31-accent))!important}
.v31-evo-veil[data-phase="reveal"] img.v31-evo-after {opacity:1!important;transform:scale(.97)!important;filter:brightness(1.02) contrast(1.14) drop-shadow(0 0 36px var(--v31-accent))!important;transition:transform 1.6s cubic-bezier(.11,.77,.23,1),filter 1.55s ease}
.v31-evo-veil[data-phase="complete"] img.v31-evo-after {opacity:1!important;transform:scale(1)!important;filter:brightness(1.04) contrast(1.12) drop-shadow(0 0 20px var(--v31-accent))!important}
.v31-evo-veil[data-phase="shatter"] .v31-evo-impact {animation:v31-crack 1.5s ease-out both}
.v31-evo-veil[data-phase="reveal"] .v31-evo-strobe {animation:v31-flare .75s ease-out both}
.v31-evo-veil[data-phase="complete"] .v31-evo-strobe {animation:none}
.v32-impact-ripple {position:absolute;left:50%;top:48%;aspect-ratio:1;width:min(97vw,64vh);border:3px solid var(--v31-accent);box-shadow:inset 0 0 28px var(--v31-accent),0 0 60px var(--v31-accent);border-radius:50%;z-index:12;opacity:0;transform:translate(-50%,-50%) scale(.1);pointer-events:none}
.v31-evo-veil[data-phase="shatter"] .v32-impact-ripple,.v31-evo-veil[data-phase="reveal"] .v32-impact-ripple {animation:v32-wave 1.2s ease-out both}
@keyframes v32-wave {0%{opacity:0;transform:translate(-50%,-50%) scale(.08)}12%{opacity:.9}100%{opacity:0;transform:translate(-50%,-50%) scale(2)}}
/* The sprite parts preserve face identity: these images are cut from the accepted art. */
.v32-parts-stage {position:absolute;z-index:7;top:50%;left:50%;height:100%;max-width:100%;aspect-ratio:1122/1402;transform:translate(-50%,-50%);opacity:0;pointer-events:none;transition:opacity .4s}
.v31-evo-main .v32-parts-stage img.v32-part {inset:auto!important;left:var(--v32-x)!important;top:var(--v32-y)!important;width:var(--v32-w)!important;height:var(--v32-h)!important;opacity:1;filter:drop-shadow(0 0 5px #fff4)!important;transform:rotate(0deg);transition:none!important}
.v32-part {position:absolute;display:block;max-width:none!important;max-height:none!important;object-fit:fill!important;opacity:1;filter:drop-shadow(0 0 7px #fff4)!important;transform:rotate(0deg);will-change:transform}
.v31-evo-veil[data-phase="reveal"] .v32-parts-stage,.v31-evo-veil[data-phase="complete"] .v32-parts-stage {opacity:1}
.v31-evo-veil[data-phase="reveal"] .v32-part-headMiddle {animation:v32-head-summon .7s .05s both,v32-head-life 3.4s 1s ease-in-out infinite alternate}
.v31-evo-veil[data-phase="reveal"] .v32-part-headLeft {animation:v32-head-summon .7s .65s both,v32-head-life 3.2s 1.6s ease-in-out infinite alternate}
.v31-evo-veil[data-phase="reveal"] .v32-part-headRight {animation:v32-head-summon .7s 1.05s both,v32-head-life 3.7s 2.1s ease-in-out infinite alternate}
.v31-evo-veil[data-phase="complete"] .v32-part-headLeft {animation:v32-head-left 3.2s ease-in-out infinite alternate}
.v31-evo-veil[data-phase="complete"] .v32-part-headMiddle {animation:v32-head-life 3.4s ease-in-out infinite alternate}
.v31-evo-veil[data-phase="complete"] .v32-part-headRight {animation:v32-head-right 3.7s ease-in-out infinite alternate}
.v31-evo-veil[data-phase="reveal"] .v32-part-wingLeft,.v31-evo-veil[data-phase="complete"] .v32-part-wingLeft {animation:v32-wing-left 2.9s ease-in-out infinite alternate}
.v31-evo-veil[data-phase="reveal"] .v32-part-wingRight,.v31-evo-veil[data-phase="complete"] .v32-part-wingRight {animation:v32-wing-right 2.9s ease-in-out infinite alternate}
.v31-evo-veil[data-phase="reveal"] .v32-part-head,.v31-evo-veil[data-phase="complete"] .v32-part-head {animation:v32-head-life 3.4s ease-in-out infinite alternate}
@keyframes v32-head-summon {0%{opacity:0;transform:scale(.64) translateY(35%);filter:brightness(.08) drop-shadow(0 0 19px var(--v31-accent))}100%{opacity:1;transform:scale(1) translateY(0);filter:brightness(1.07) drop-shadow(0 0 8px var(--v31-accent))}}
@keyframes v32-head-life {from{transform:rotate(-2deg) translateY(0)}to{transform:rotate(2.8deg) translateY(-1.6%)}}
@keyframes v32-head-left {from{transform:rotate(-5deg) translateY(0)}to{transform:rotate(4deg) translateY(-1.5%)}}
@keyframes v32-head-right {from{transform:rotate(3deg) translateY(0)}to{transform:rotate(-5deg) translateY(-2%)}}
@keyframes v32-wing-left {from{transform:perspective(600px) rotateY(12deg) rotate(-6deg)}to{transform:perspective(600px) rotateY(-20deg) rotate(6deg)}}
@keyframes v32-wing-right {from{transform:perspective(600px) rotateY(-12deg) rotate(6deg)}to{transform:perspective(600px) rotateY(20deg) rotate(-6deg)}}
/* Keep longer reveal accessible to the user rather than forcing the image offscreen. */
.v31-evo-veil[data-phase="reveal"] .v31-evo-narrative {background:linear-gradient(180deg,transparent,#050913b8 45%,#050913ed)}
.v31-evo-veil .v31-evo-actions .v31-evo-skip {background:#131a2cdd}
.v31-evo-veil[data-phase="reveal"] .v31-evo-iris {opacity:.65}
.v31-evo-veil[data-phase="complete"] .v31-evo-narrative {padding-top:12px}
@media(max-height:710px){.v31-evo-veil .v31-evo-main{top:14%;bottom:26%}.v31-evo-veil .v31-evo-narrative{bottom:calc(72px + env(safe-area-inset-bottom))}}
@media(prefers-reduced-motion:reduce){.v32-chrysalis>img,.v32-parts-stage,.v32-part,.v32-impact-ripple{animation-duration:.01ms!important;transition-duration:.01ms!important}}

.v31-evo-main .v32-chrysalis>img {opacity:1;filter:drop-shadow(0 0 22px var(--v31-accent))!important;max-width:100%!important;max-height:100%!important;transition:transform 1.65s cubic-bezier(.1,.54,.1,1),opacity .8s ease!important}
