/* ==========================================================================
   Inner pages background (all except home)
   ========================================================================== */

/* ==========================================================================
   Inner pages background (all except home)
   ========================================================================== */

html {
  scrollbar-gutter: stable;
  background-color: var(--color-menu-bg);
  overflow-x: hidden;
}

body:not(.page-home) {
  position: relative;
  background-color: var(--color-menu-bg);
}

body.page-article {
  background-color: var(--color-dark-bg);
}

html:has(body.page-article) {
  background-color: var(--color-dark-bg);
}

/* Тёмная подложка только ниже viewport — видна при overscroll внизу, не добавляет блок в поток */
body:not(.page-home)::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: -100px;
  width: 100%;
  height: 500px;
  background-color: var(--color-dark-bg);
  pointer-events: none;
  z-index: -1;
}

body:not(.page-home)::before {
  content: "";
  position: absolute;
  top: -329px;
  right: -137px;
  z-index: 0;
  width: 50%;
  height: 100%;
  background-image: url("../../img/site-bg2.png");
  background-repeat: no-repeat;
  background-position: right top;
  background-size: 140%;
  mix-blend-mode: screen;
  pointer-events: none;
  will-change: auto;
}

body.page-article::before {
  display: none;
}

body:not(.page-home):not(.page-article) > *:not(.menu):not(.contact-cursor):not(.search-panel) {
  position: relative;
  z-index: 1;
}

body.page-article > *:not(.menu):not(.contact-cursor):not(main):not(footer):not(.search-panel) {
  position: absolute;
  z-index: 2;
}

@media (min-width: 768px) and (max-width: 1199px) {
  body:not(.page-home)::before {
    right: 0;
  }
}

@media (max-width: 767px) {
  body:not(.page-home)::before {
    top: -200px;
    right: 0;
    left: 0;
    width: 100%;
  }
}

@media (max-width: 575px) {
  body:not(.page-home)::before {
    top: 0;
    right: 0;
    left: auto;
    width: 60%;
  }
}
