/* ============================================================
   Kawai — улучшенный фон (слой поверх базовых стилей)
   • глубокий многослойный градиент вместо плоского --bg
   • фиолетово-синяя аурора, виньетка и мягкая сетка
   • тонкая плёночная «зернистость» (SVG-noise, без картинок)
   • отдельный слой для hero: подсветка, глубина, аккуратный стык с фоном
   Правки только по фону: вёрстка, цвета текста и компоненты не затрагиваются.
   !important нужен потому, что ax-sky.css задаёт html { background: var(--bg) !important }.
   ============================================================ */

:root {
  --kx-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
  --kx-grid: rgba(235, 232, 246, 0.035);
  --kx-aurora-a: 167, 139, 250;
  --kx-aurora-b: 96, 165, 250;
  --kx-aurora-c: 139, 92, 246;
}

/* ---------- общий фон страницы ---------- */
html {
  background-color: #08080c !important;
  background-image:
    radial-gradient(1200px 720px at 10% -10%, rgba(var(--kx-aurora-a), 0.20), transparent 62%),
    radial-gradient(980px 640px at 92% -2%, rgba(var(--kx-aurora-b), 0.13), transparent 64%),
    radial-gradient(1100px 780px at 50% 108%, rgba(var(--kx-aurora-c), 0.14), transparent 66%),
    linear-gradient(180deg, #0c0c12 0%, #0a0a10 42%, #08080c 100%),
    var(--kx-grain) !important;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat !important;
  background-size: auto, auto, auto, auto, 160px 160px !important;
  background-attachment: fixed, fixed, fixed, fixed, scroll !important;
  background-position: 0 0, 0 0, 0 0, 0 0, 0 0 !important;
}

/* мягкая виньетка и сетка — под контентом, без перехвата кликов */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(140% 110% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.42) 100%),
    linear-gradient(to right, var(--kx-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--kx-grid) 1px, transparent 1px);
  background-size: auto, 64px 64px, 64px 64px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 78%);
}

/* базовый body-градиент сайта больше не нужен — фон рисует html */
body {
  background: transparent !important;
}

/* ---------- hero: подсветка и глубина поверх фото ---------- */
#top.cx-hero {
  position: relative;
  isolation: isolate;
}

#top.cx-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background-image:
    radial-gradient(120% 85% at 50% -18%, rgba(var(--kx-aurora-a), 0.30), transparent 58%),
    radial-gradient(55% 48% at 84% 8%, rgba(var(--kx-aurora-b), 0.16), transparent 62%),
    radial-gradient(70% 60% at 12% 96%, rgba(var(--kx-aurora-c), 0.18), transparent 66%),
    linear-gradient(180deg, rgba(6, 6, 10, 0.16) 0%, rgba(6, 6, 10, 0.02) 42%, rgba(8, 8, 12, 0.40) 82%, var(--bg) 100%);
}

/* блик-«спот» в hero делаем мягче и объёмнее */
.cx-hero-glow-spot {
  filter: blur(48px) saturate(115%);
  opacity: 0.72;
}

/* ---------- светлая тема ---------- */
html[data-theme="light"] {
  --kx-grid: rgba(24, 24, 32, 0.05);
  background-color: #f6f5fb !important;
  background-image:
    radial-gradient(1200px 720px at 8% -12%, rgba(var(--kx-aurora-a), 0.16), transparent 60%),
    radial-gradient(940px 620px at 94% 0%, rgba(var(--kx-aurora-b), 0.12), transparent 62%),
    radial-gradient(1100px 760px at 50% 108%, rgba(var(--kx-aurora-c), 0.10), transparent 66%),
    linear-gradient(180deg, #fbfaff 0%, #f4f3fa 55%, #eeedf6 100%) !important;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat !important;
  background-size: auto, auto, auto, auto !important;
  background-attachment: fixed, fixed, fixed, fixed !important;
}

html[data-theme="light"] body::before {
  background-image:
    radial-gradient(140% 110% at 50% 50%, transparent 60%, rgba(20, 20, 30, 0.05) 100%),
    linear-gradient(to right, var(--kx-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--kx-grid) 1px, transparent 1px);
}

html[data-theme="light"] #top.cx-hero::after {
  background-image:
    radial-gradient(120% 85% at 50% -18%, rgba(var(--kx-aurora-a), 0.18), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, transparent 40%, var(--bg) 100%);
}

/* ---------- аккуратный стык hero с фоном на мобильных ---------- */
@media (max-width: 620px) {
  #top.cx-hero::after {
    background-image:
      radial-gradient(130% 80% at 50% -14%, rgba(var(--kx-aurora-a), 0.26), transparent 60%),
      linear-gradient(180deg, rgba(6, 6, 10, 0.12) 0%, rgba(8, 8, 12, 0.38) 86%, var(--bg) 100%);
  }
}

/* ---------- уважаем «уменьшить движение» ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    background-attachment: scroll, scroll, scroll, scroll, scroll !important;
  }
}






/* тень под текстом hero — читается на любом фоне */
.cx-hero-title,
.cx-hero-sub,
.cx-hero-eyebrow {
  text-shadow: 0 2px 18px rgba(4, 4, 10, 0.78), 0 1px 3px rgba(4, 4, 10, 0.6);
}

/* ---------- бренд: только текст, без монограммы ---------- */
.ax-logo,
.ax-header .ax-logo,
.ax-header .ax-brand .ax-logo,
.ax-footer .ax-logo,
.ax-brand::before,
.ax-header .ax-brand::before {
  display: none !important;
}

.ax-brand,
.ax-header .ax-brand > span,
.ax-footer .ax-brand > span {
  font-size: 20px !important;
  line-height: 1.1 !important;
  letter-spacing: 0.005em !important;
}

.ax-brand {
  gap: 0 !important;
  padding-right: 0 !important;
}

/* ---------- бренд: крупно в обычной шапке, прежний размер в сжатой ---------- */
.ax-header .ax-brand > span,
.ax-footer .ax-brand > span {
  font-size: 28px !important;
  line-height: 1.05 !important;
}

.ax-header.is-scrolled .ax-brand > span {
  font-size: 20px !important;
}

/* ---------- бренд: финальные размеры ---------- */
html body .ax-header .ax-brand > span,
html body .ax-footer .ax-brand > span {
  font-size: 26px !important;
  line-height: 1.05 !important;
}

html body .ax-header.is-scrolled .ax-brand > span {
  font-size: 20px !important;
}

/* бренд: сдвиг на полшага в обычной шапке (сжатая не меняется, мобилка не тронута) */
/* придвигаем Kawai к «Цены»: сокращаем зазор между брендом и навигацией вдвое */
html body .ax-header:not(.is-scrolled) .ax-brand {
  margin-left: 0 !important;
  margin-right: -19px !important;
}
