// The three first scenes: dark, soft, slow, made of gradients.
// Rules the dark scenes keep:
// no glyphs or text-sized marks; large, soft, slow shapes made of gradients (no filters, so no GPU is needed);
// the middle of the window, where the conversation sits, stays calm; the interest lives at the edges and corners.
const STILL = '@media (prefers-reduced-motion: reduce) { * { animation: none !important } }'
function open(style: string, defs: string): string {
return ``
}
/* Aurora: a night sky that is almost black in the middle, with two wide ribbons of light swaying across the top
and a low ridge along the very bottom. */
export function auroraSvg(): string {
return `${open(
`.ribbon{transform-origin:50% 0;animation:wave 44s ease-in-out infinite alternate}
.ribbon.b{animation-duration:63s;animation-direction:alternate-reverse}
.ribbon.c{transform-origin:50% 50%;animation-duration:90s}
.haze{animation:breathe 30s ease-in-out infinite alternate}
@keyframes wave{from{transform:translateX(-70px) skewX(-7deg) scaleY(0.94)}to{transform:translateX(70px) skewX(7deg) scaleY(1.08)}}
@keyframes breathe{from{opacity:0.55}to{opacity:1}}`,
`
${soft('green', '#5dffb5', 0.3)}${soft('violet', '#9f7bff', 0.26)}${soft('glow', '#3affc0', 0.2)}${soft('dusk', '#7a5cff', 0.18)}${CALM}`,
)}
${calm}`
}
/* Ember: near-black with a warm glow pooled in the two bottom corners, and a handful of large soft embers
drifting up beside the conversation. Nothing bright crosses the middle or the sidebar's rows on the far left. */
export function emberSvg(): string {
return `${open(
`.embers{animation:pulse 9s ease-in-out infinite alternate}
.embers.b{animation-duration:13s;animation-direction:alternate-reverse}
.ember{animation:lift 34s linear infinite}
@keyframes pulse{from{opacity:0.6;transform:scale(0.97)}to{opacity:1;transform:scale(1.04)}}
@keyframes lift{from{transform:translate(0,0);opacity:0}10%{opacity:0.9}70%{opacity:0.5}to{transform:translate(60px,-1100px);opacity:0}}`,
`
${soft('fire', '#ff7a2a', 0.5)}${soft('coal', '#ff3d1a', 0.34)}${soft('mote', '#ffc27a', 0.75)}${soft('dim', '#ffc27a', 0.22)}${CALM}`,
)}
${calm}`
}