/* A photographic composition with actions contained by its physical setting. */
.home-polished .living-art{grid-area:art;position:relative;width:106%;max-width:750px;margin:0 -3%;justify-self:center;min-width:0}
.living-stage{position:relative;aspect-ratio:1;isolation:isolate;perspective:1600px;touch-action:pan-y;--open:1;--settle:1;--light-x:48%;--shadow-x:3%;--exposure:1;--cloth-y:0px;--drift:0px;--vista-x:0px;--vista-y:0px;--turn-x:0deg;--turn-y:0deg}
.living-world{position:absolute;inset:0;transform:translateY(var(--drift)) rotateX(var(--turn-x)) rotateY(var(--turn-y));transform-origin:50% 70%;transform-style:preserve-3d}
.living-stage img{user-select:none;pointer-events:none;display:block;max-width:none;position:absolute;object-fit:contain}
/* Reveal the original composition at its native proportions. No folded photo planes. */
.living-stage--codex{--city-rise:1;--city-visible:1;--city-edge:-12%;--water-ripple:0}
.codex-base,.codex-complete{inset:0;width:100%;height:100%}
.living-stage--codex .living-world,.living-stage--press .living-world{transform:translateY(var(--drift))}
.codex-theatre{
 position:absolute;inset:0;pointer-events:none;opacity:var(--city-visible);
 -webkit-mask-image:linear-gradient(to bottom,transparent calc(var(--city-edge) - 5%),#000 calc(var(--city-edge) + 5%));
 mask-image:linear-gradient(to bottom,transparent calc(var(--city-edge) - 5%),#000 calc(var(--city-edge) + 5%));
}
.codex-water{position:absolute;inset:0;width:100%;height:100%;opacity:var(--water-ripple);mix-blend-mode:screen;transform-origin:55.5% 48.5%;transform:scale(calc(.7 + var(--city-rise)*.3));pointer-events:none}
.home-polished .living-art--ai{width:100%;max-width:650px;margin:0}
.living-stage--mind{--crown-lift:1;--mind-reveal:1;--crown-visible:1;--neural-awake:1;--neural-pulse:0;--crown-tip:0deg;--crown-roll:0deg;--crown-shadow:.08}
.living-stage--mind .living-world{transform:none;transform-style:flat}
/* Intact closed endpoint; the independent crown keeps its real carved underside. */
.mind-portrait,.mind-closed,.mind-front,.mind-core{inset:0;width:100%;height:100%}
.mind-closed{z-index:6;opacity:calc(1 - var(--mind-reveal));mask-image:linear-gradient(#000 30%,transparent 34%);-webkit-mask-image:linear-gradient(#000 30%,transparent 34%)}
.mind-portrait{z-index:0;opacity:1;mask-image:linear-gradient(rgb(0 0 0 / var(--mind-reveal)) 30%,#000 34%);-webkit-mask-image:linear-gradient(rgb(0 0 0 / var(--mind-reveal)) 30%,#000 34%)}
.mind-crown-motion{position:absolute;inset:0;transform:translateY(calc((1 - var(--crown-lift))*16.9%));opacity:var(--crown-visible);pointer-events:none}
/* One source and one transform: rear cavity < core < near shell < front hair. */
.mind-crown-motion--rear{z-index:1}
.mind-crown--rear{clip-path:url(#mind-crown-cavity)}
.mind-core{z-index:2;opacity:var(--mind-reveal);clip-path:url(#mind-neural-core)}
.mind-crown-motion--front{z-index:4}
.mind-crown--front{clip-path:url(#mind-crown-shell)}
.living-stage .mind-crown{width:44%;height:auto;left:29.5%;top:-.4%;transform-origin:50% 85%;transform:perspective(900px) rotateX(var(--crown-tip)) rotateZ(var(--crown-roll));filter:saturate(.74);backface-visibility:hidden}
.mind-cavity-shadow{position:absolute;z-index:3;left:38%;top:20%;width:28%;height:8.5%;border-radius:50%;background:radial-gradient(ellipse,#111b3a9c,transparent 72%);opacity:var(--crown-shadow);transform:rotate(-8deg);pointer-events:none}
/* The near scalp covers the seated shell; the core remains inside its hollow opening. */
.mind-front{z-index:5;opacity:1;clip-path:url(#mind-front-rim)}
.mind-occlusion{position:absolute;pointer-events:none}
.mind-light{position:absolute;inset:0;z-index:3;width:100%;height:100%;pointer-events:none;mix-blend-mode:screen}
.mind-aura{opacity:calc(var(--neural-awake)*.22 + var(--neural-pulse)*.45)}
.mind-connections{stroke-dasharray:1;stroke-dashoffset:calc(1 - var(--neural-awake));opacity:calc(var(--neural-awake)*.65)}
.mind-sparks{opacity:var(--neural-pulse)}
.venture-base{inset:0;width:100%;height:100%}
/* Image registration: the keystone's final lower edge meets the 619–650px crown gap. */
.living-stage .venture-hand{width:55%;height:55%;left:25%;top:9.1%;transform-origin:46% 56%;transform:translate(calc((1 - var(--settle))*2.2%),calc((1 - var(--settle))*-23%)) rotate(calc((1 - var(--settle))*-5deg));filter:drop-shadow(0 5px 4px #383d4610)}
.venture-contact{position:absolute;left:47.8%;top:39.6%;width:5%;height:1%;border-radius:50%;background:radial-gradient(ellipse,#2d333b55,transparent 70%);opacity:var(--settle);pointer-events:none}
.living-stage--venture .living-world{transform-origin:50% 83%}
/* Only the unprinted region of the sheet changes: the machine remains registered. */
.home-polished .living-art--press{width:100%;max-width:690px;margin:0}
.living-stage--press{--print-reveal:1}
.press-master,.press-blank{inset:0;width:100%;height:100%}
.press-paper{
 position:absolute;inset:0;pointer-events:none;
 clip-path:polygon(
  calc(27.2% - var(--print-reveal)*16.27%) calc(32.45% + var(--print-reveal)*38.44%),
  calc(60.53% - var(--print-reveal)*11.49%) calc(36.28% + var(--print-reveal)*41.55%),
  49.04% 77.83%,10.93% 70.89%
 );
}
@media(max-width:800px){.home-polished .living-art{width:104%;max-width:580px;margin:22px -2% 0}.home-polished .living-art--press{width:96%;max-width:520px;margin:22px 2% 0}.living-world{transform:translateY(calc(var(--drift)*.5))}}
@media(prefers-reduced-motion:reduce){.living-world,.venture-hand,.codex-theatre{transform:none!important}}
.reduced-motion .living-world,.reduced-motion .venture-hand,.reduced-motion .codex-theatre{transform:none!important}

@media(max-width:800px){.home-polished .living-art--ai{width:96%;margin:50px 2% 4px;max-width:500px}}

@media(prefers-reduced-motion:reduce){.press-paper,.mind-sparks,.codex-water{display:none}}
.reduced-motion .mind-sparks,.reduced-motion .codex-water{display:none}

/* The completed image also stands alone if motion is disabled before JS starts. */
@media(prefers-reduced-motion:reduce){.codex-theatre{opacity:1;mask-image:none;-webkit-mask-image:none}.press-paper{display:none}}
.reduced-motion .codex-theatre{opacity:1;mask-image:none;-webkit-mask-image:none}
.reduced-motion .press-paper{display:none}

/* A registered hand and glass panel slide along the portal's sill. */
.home-polished .living-art--portal{width:100%;max-width:690px;margin:0}
.living-stage--portal{--portal-slide:0%}
.living-stage--portal .living-world{transform:none;transform-style:flat}
.portal-world,.portal-hand{inset:0;width:100%;height:100%}
.portal-hand-motion{position:absolute;inset:0;transform:translateX(var(--portal-slide));pointer-events:none;will-change:transform}
@media(max-width:800px){.home-polished .living-art--portal{width:100%;margin:24px 0 0;max-width:540px}}
@media(prefers-reduced-motion:reduce){.portal-hand-motion{transform:none!important}}
.reduced-motion .portal-hand-motion{transform:none!important}
