/* Local, DOM-controlled decoration only. Existing composition and asset files stay intact. */
.scene{overflow:hidden}
.scene-plane{position:absolute;top:0;left:50%;width:1600px;height:1000px;transform:translateX(-50%);background-size:100% 100%;background-repeat:no-repeat;opacity:0;transition:opacity 900ms ease}
.scene-plane-moon{background-image:url('assets/scene-moon.svg')}
.scene-plane-city{background-image:url('assets/scene-city.svg')}
.scene-plane svg{display:block;width:100%;height:100%;overflow:hidden}
:root[data-theme=moon] .scene-plane-moon,:root[data-theme=city] .scene-plane-city{opacity:1}
body{transition:background-color 650ms ease,color 650ms ease}
.art-frame{animation:frame-drift 10s ease-in-out infinite;animation-play-state:paused}
.env-anim{animation-play-state:paused!important}
.moon-stars{animation:star-breathe 7s ease-in-out infinite;opacity:.5}
.stars-b{animation-duration:9s;animation-delay:-3s}
.stars-c{animation-duration:11s;animation-delay:-6s}
.moon-halo{animation:halo-breathe 9s ease-in-out infinite;opacity:.08}
.moon-orbit{animation:orbit-glide 56s linear infinite;animation-delay:-16s;opacity:.7}
.cable-flow{stroke-width:3.2;stroke-linecap:round;stroke-dasharray:38 962;opacity:.58;animation:cable-glide var(--flow-duration,16s) linear infinite;animation-delay:var(--flow-delay,0s)}
:root[data-motion=on][data-motion-paused=false] .art-frame,
:root[data-motion=on][data-motion-paused=false][data-theme=moon] .scene-plane-moon .env-anim,
:root[data-motion=on][data-motion-paused=false][data-theme=city] .scene-plane-city .env-anim{animation-play-state:running!important}
@keyframes frame-drift{0%,100%{translate:0 0}50%{translate:0 -6px}}
@keyframes star-breathe{0%,100%{opacity:.16}50%{opacity:.95}}
@keyframes halo-breathe{0%,100%{opacity:.035}50%{opacity:.18}}
@keyframes orbit-glide{from{stroke-dashoffset:1000}to{stroke-dashoffset:0}}
@keyframes cable-glide{from{stroke-dashoffset:1000}to{stroke-dashoffset:0}}
.motion-toggle{display:inline-flex;align-items:center;gap:6px;flex-shrink:0;min-height:40px;padding:6px 10px;border:1px solid var(--edge);border-radius:24px;background:var(--bg);color:var(--muted);font-size:12px;white-space:nowrap}
.motion-indicator{width:5px;height:5px;border:1px solid currentColor;border-radius:50%;opacity:.7}
.motion-toggle[aria-pressed=true] .motion-indicator{background:var(--accent);border-color:var(--accent)}
.motion-toggle[aria-disabled=true]{color:var(--quiet);cursor:default}
/* Nothing is hidden until JS has registered a working observer. No aria-hidden/inert. */
[data-reveal]{transition:opacity 700ms ease,translate 700ms cubic-bezier(.2,.6,.2,1);transition-delay:var(--reveal-delay,0ms)}
:root[data-reveals=on] [data-reveal=pending]{opacity:0;translate:0 16px;transition:none}
[data-reveal=shown]{opacity:1;translate:0 0}
[data-reveal]:focus-within,[data-reveal].reveal-instant{opacity:1!important;translate:0 0!important;transition:none!important}
@media(min-width:1600px){.scene-plane{left:0;transform:none;width:100%;height:auto;aspect-ratio:16/10}}
@media(max-width:1100px){.scene-plane{left:calc(60% - 864px);transform:none;width:1440px;height:900px}}
@media(max-width:700px){.scene-plane{left:calc(85% - 884px);width:1040px;height:650px}.motion-toggle{position:absolute;right:0;bottom:8px;min-height:36px;font-size:11px;padding:4px 10px}}
/* These final guards deliberately outrank running selectors and the old extensions. */
:root[data-motion=off] .env-anim,:root[data-motion=off] .art-frame,
:root[data-motion-paused=true] .env-anim,:root[data-motion-paused=true] .art-frame,
:root.page-hidden .env-anim,:root.page-hidden .art-frame{animation-play-state:paused!important}
:root[data-motion=off] [data-reveal],:root.page-hidden [data-reveal]{opacity:1!important;translate:0 0!important;transition:none!important}
:root.page-hidden *, :root.page-hidden *::before, :root.page-hidden *::after{animation-play-state:paused!important;transition:none!important}
@media(prefers-reduced-motion:reduce){
 :root:not([data-motion-preference=on]){scroll-behavior:auto!important}
 :root:not([data-motion-preference=on]) *,:root:not([data-motion-preference=on]) *::before,:root:not([data-motion-preference=on]) *::after{animation:none!important;transition:none!important}
 :root:not([data-motion-preference=on]) [data-reveal]{opacity:1!important;translate:0 0!important}
}

/* An explicit pause affects all visual transitions, not the audio state. */
:root[data-motion=off]{scroll-behavior:auto}
:root[data-motion=off] *,:root[data-motion=off] *::before,:root[data-motion=off] *::after{animation:none!important;transition:none!important}
