/*
 * Glitchy — Global crimson ambient background
 */

.site-ambience {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

#page.site {
    position: relative;
    z-index: 1;
}

.ambience-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.52;
    animation: ambienceFloat 18s ease-in-out infinite alternate;
}

.ambience-orb--1 {
    width: 420px;
    height: 420px;
    top: -8%;
    left: -6%;
    background: radial-gradient(circle, rgba(195, 0, 0, 0.55) 0%, transparent 70%);
}

.ambience-orb--2 {
    width: 360px;
    height: 360px;
    top: 35%;
    right: -10%;
    background: radial-gradient(circle, rgba(163, 0, 0, 0.45) 0%, transparent 72%);
    animation-delay: -4s;
    animation-duration: 22s;
}

.ambience-orb--3 {
    width: 300px;
    height: 300px;
    bottom: 5%;
    left: 20%;
    background: radial-gradient(circle, rgba(120, 0, 0, 0.4) 0%, transparent 70%);
    animation-delay: -8s;
}

.ambience-orb--4 {
    width: 280px;
    height: 280px;
    bottom: 20%;
    right: 25%;
    background: radial-gradient(circle, rgba(197, 40, 40, 0.35) 0%, transparent 68%);
    animation-delay: -12s;
    animation-duration: 20s;
}

.ambience-glow {
    position: absolute;
    left: 0;
    right: 0;
    height: 40%;
    opacity: 0.35;
}

.ambience-glow--top {
    top: 0;
    background: linear-gradient(180deg, rgba(163, 0, 0, 0.28) 0%, transparent 100%);
}

.ambience-glow--bottom {
    bottom: 0;
    background: linear-gradient(0deg, rgba(100, 0, 0, 0.22) 0%, transparent 100%);
}

.ambience-orb--5 {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(140, 0, 0, 0.2) 0%, transparent 70%);
    opacity: 0.35;
    animation: none;
}

.ambience-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.35) 100%);
    opacity: 0.6;
}

@keyframes ambienceFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(24px, -18px) scale(1.08); }
}

body.rtl .ambience-orb--1 {
    left: auto;
    right: -6%;
}

body.rtl .ambience-orb--2 {
    right: auto;
    left: -10%;
}

@media (prefers-reduced-motion: reduce) {
    .ambience-orb {
        animation: none;
    }
}
