// 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 `${defs}` } function soft(id: string, color: string, peak: number): string { return `` } // A hint of calm down the middle. The app lays its own veil on the text column and owns legibility; this only keeps the centre from being the busiest part. const CALM = `` const calm = '' /* Deep Water: light falling in from the top corners, slow caustic bands, a few big soft bubbles up the far edges, and one turtle as a quiet silhouette in the bottom right corner. */ export function deepWaterSvg(): string { return `${open( `.shaft{transform-origin:50% 0;animation:sway 38s ease-in-out infinite alternate} .shaft.b{animation-duration:52s;animation-direction:alternate-reverse} .band{animation:drift 70s ease-in-out infinite alternate} .band.b{animation-duration:95s;animation-direction:alternate-reverse} .bubble{animation:rise 46s linear infinite} .honu{animation:glide 80s ease-in-out infinite alternate} @keyframes sway{from{transform:skewX(-5deg)}to{transform:skewX(6deg)}} @keyframes drift{from{transform:translateX(-90px)}to{transform:translateX(90px)}} @keyframes rise{from{transform:translateY(0);opacity:0}12%{opacity:1}85%{opacity:1}to{transform:translateY(-1150px);opacity:0}} @keyframes glide{from{transform:translate(0,0) rotate(-4deg)}to{transform:translate(-70px,-26px) rotate(3deg)}}`, ` ${soft('caustic', '#9fe9f5', 0.2)} ${soft('orb', '#c9f6ff', 0.22)}${soft('glint', '#e8fdff', 0.3)}${CALM}`, )} ${calm}` } /* 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}` }