/* Dream layer for Yogi's quiz and main site (the app has its own copy in app.css). Glows, twinkles and sparks behind the page. Colors come from the page's own --page, --ink and --shadow. */
#dream { --g1: 10%; --g2: 26%; --g3: 7%; position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
#dream[data-n] { --g1: 30%; --g2: 30%; --g3: 18%; }
#dream .orb { position: absolute; border-radius: 50%; will-change: transform; }
#dream .o1 { width: 90vmax; height: 90vmax; left: -34vmax; top: -38vmax; background: radial-gradient(circle, color-mix(in srgb, var(--ink) var(--g1), transparent), transparent 66%); animation: drift1 38s ease-in-out infinite alternate; }
#dream .o2 { width: 80vmax; height: 80vmax; right: -34vmax; bottom: -30vmax; background: radial-gradient(circle, color-mix(in srgb, var(--shadow) var(--g2), transparent), transparent 66%); animation: drift2 46s ease-in-out infinite alternate; }
#dream .o3 { width: 60vmax; height: 60vmax; left: 20vmax; top: 30vh; background: radial-gradient(circle, color-mix(in srgb, var(--ink) var(--g3), transparent), transparent 66%); animation: drift3 54s ease-in-out infinite alternate; }
@keyframes drift1 { from { transform: translate(0, 0) scale(1); } to { transform: translate(16vmax, 12vmax) scale(1.18); } }
@keyframes drift2 { from { transform: translate(0, 0) scale(1.1); } to { transform: translate(-14vmax, -10vmax) scale(.92); } }
@keyframes drift3 { from { transform: translate(0, 0) scale(.9); } to { transform: translate(-12vmax, 10vmax) scale(1.15); } }
#dream .st { position: absolute; border-radius: 50%; background: var(--ink); opacity: .1; animation: twinkle 5s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: .08; transform: scale(.8); } 50% { opacity: .7; transform: scale(1.25); } }
#dream .sp { position: absolute; bottom: -24px; border-radius: 50%; background: var(--ink); opacity: 0; animation: spark 24s linear infinite; }
@keyframes spark { 0% { transform: translate(0, 0); opacity: 0; } 12% { opacity: .32; } 50% { transform: translate(var(--x), -55vh); } 88% { opacity: .22; } 100% { transform: translate(var(--x2), -112vh); opacity: 0; } }

/* Header lets the glow through */
.top { background: color-mix(in srgb, var(--page) 74%, transparent) !important; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }

/* Cards float like they rest on water (translate, so hover and press still work) */
.card { animation: float 8s ease-in-out infinite; }
.card:nth-child(2n) { animation-duration: 9.5s; animation-delay: -2s; }
.card:nth-child(3n) { animation-duration: 7.2s; animation-delay: -4s; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
.brand img, .logo { animation: bob 6s ease-in-out infinite; }
.portrait, .about-photo { animation: breathe2 9s ease-in-out infinite alternate; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -3px; } }
@keyframes breathe2 { from { transform: scale(1); } to { transform: scale(1.025) translateY(-4px); } }
.hero .btn:not(.flip), .res .btn:not(.share) { animation: halo2 3.4s ease-out infinite; }
@keyframes halo2 { 0% { outline: 0 solid color-mix(in srgb, var(--ink) 40%, transparent); outline-offset: 0; } 70%, 100% { outline: 14px solid transparent; outline-offset: 4px; } }

/* Things float in: a soft blur clears as they rise (quiz: on load; main site: as they scroll into view) */
#app .rise { animation: rise .75s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }
#top .rise { filter: blur(6px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1), filter .8s ease; }
#top .rise.in { filter: blur(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; }
}
