/* 1.5.1 — local animated Munica atmosphere. Replaces the external texture background. */
:root{
  --munica-bg-base:#dfe6f2;
  --munica-bg-blue:#5ea3f9;
  --munica-bg-blue-deep:#367de0;
  --munica-bg-lilac:#e0d8eb;
  --munica-bg-ice:#edf5ff;
}

html,body{background:var(--munica-bg-base)}
body{isolation:isolate}

/* Explicitly disable the legacy remote texture layer in page.css. */
body::before{
  content:none!important;
  display:none!important;
  background:none!important;
  background-image:none!important;
}

.munica-ambient-bg{
  position:fixed;
  inset:-2px;
  z-index:0;
  overflow:hidden;
  pointer-events:none;
  transform:translateZ(0);
  background:
    radial-gradient(118% 102% at 50% 12%,
      rgba(244,248,255,.98) 0%,
      rgba(229,239,251,.98) 23%,
      rgba(211,228,248,.98) 47%,
      rgba(198,218,244,.98) 66%,
      rgba(208,214,237,.99) 84%,
      rgba(224,216,235,1) 100%);
}

/* Slow atmospheric blue fields; deliberately subtle so the existing art remains dominant. */
.munica-ambient-bg::before,
.munica-ambient-bg::after{
  content:"";
  position:absolute;
  width:min(78vw,1180px);
  aspect-ratio:1;
  border-radius:50%;
  filter:blur(clamp(58px,8vw,130px));
  opacity:.38;
  will-change:transform;
  transform:translate3d(0,0,0);
}
.munica-ambient-bg::before{
  top:-35%;
  left:-18%;
  background:radial-gradient(circle at 50% 50%,rgba(94,163,249,.55) 0%,rgba(94,163,249,.22) 38%,rgba(94,163,249,0) 72%);
  animation:munica-bg-drift-a 18s ease-in-out infinite alternate;
}
.munica-ambient-bg::after{
  right:-22%;
  bottom:-38%;
  background:radial-gradient(circle at 50% 50%,rgba(125,185,255,.46) 0%,rgba(103,159,232,.18) 40%,rgba(103,159,232,0) 73%);
  animation:munica-bg-drift-b 22s ease-in-out infinite alternate;
}

.munica-noise-canvas{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  pointer-events:none;
  opacity:.22;
  mix-blend-mode:soft-light;
  transform:translateZ(0) scale(1.004);
  transform-origin:center;
}

@keyframes munica-bg-drift-a{
  0%{transform:translate3d(-2%,-1%,0) scale(1)}
  50%{transform:translate3d(7%,5%,0) scale(1.07)}
  100%{transform:translate3d(2%,10%,0) scale(.98)}
}
@keyframes munica-bg-drift-b{
  0%{transform:translate3d(3%,4%,0) scale(1.03)}
  50%{transform:translate3d(-7%,-3%,0) scale(.97)}
  100%{transform:translate3d(-2%,-9%,0) scale(1.08)}
}

/* Existing page layers already carry their own z-index values; keep them untouched. */
@media(max-width:900px){
  .munica-ambient-bg::before,.munica-ambient-bg::after{opacity:.31;filter:blur(64px)}
  .munica-noise-canvas{opacity:.19}
}

@media(prefers-reduced-motion:reduce){
  .munica-ambient-bg::before,.munica-ambient-bg::after{animation:none}
}
