/**
 * AS-PRO Glass — фоны (prod = preview DM-018c)
 */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #020508;
}

.ambient__hero {
  position: absolute;
  inset: -6%;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
}

.ambient--landing .ambient__hero {
  background-image: url("/static/images/glass/bg-landing-sphere.png");
  filter: brightness(0.38) saturate(0.85) contrast(1.08);
}

.ambient--workspace .ambient__hero {
  background-image: url("/static/images/glass/bg-workspace-sphere.png");
  filter: brightness(0.32) saturate(0.9) contrast(1.1);
  transition: filter 0.55s ease;
}

.ambient--workspace.ambient--scene-cubes .ambient__hero {
  background-image: url("/static/images/glass/bg-ubd-objects-cubes.png");
  filter: brightness(0.28) saturate(1.05) contrast(1.08);
}

.ambient--workspace.ambient--scene-cubes .ambient__russia,
.ambient--workspace.ambient--scene-cubes .ambient__label {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease;
}

.ambient__darken {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 85% 70% at 50% 40%, rgba(2, 5, 8, 0.25) 0%, rgba(2, 5, 8, 0.82) 72%),
    linear-gradient(180deg, rgba(2, 5, 8, 0.55) 0%, rgba(2, 5, 8, 0.35) 40%, rgba(2, 5, 8, 0.75) 100%);
}

.ambient__russia {
  position: absolute;
  left: 50%;
  top: 44%;
  width: min(58vw, 720px);
  transform: translate(-50%, -50%);
  z-index: 2;
  opacity: 0.35;
  filter: drop-shadow(0 0 16px rgba(56, 189, 248, 0.25)) drop-shadow(0 0 40px rgba(56, 189, 248, 0.12));
}

.ambient--landing .ambient__russia,
.ambient--landing .ambient__label {
  display: none;
}

.ambient__russia img {
  width: 100%;
  height: auto;
  display: block;
}

.ambient__nodes {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.18;
  background-image:
    radial-gradient(circle at 22% 35%, rgba(94, 234, 212, 0.5) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 72% 55%, rgba(56, 189, 248, 0.45) 0 1.5px, transparent 2.5px);
}

.ambient__vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: radial-gradient(ellipse 95% 85% at 50% 50%, transparent 20%, rgba(0, 0, 0, 0.72) 100%);
}

.ambient__label {
  position: absolute;
  left: 50%;
  top: 58%;
  transform: translateX(-50%);
  z-index: 4;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(200, 220, 235, 0.45);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .ambient__hero { transform: none; }
}

/* Светлая тема: плоский фон — детали в aspro-theme-light.css */
[data-workspace-theme="light"] .ambient,
[data-theme="light"] .ambient {
  background: #f1f5f9;
}
