/* ОмниГласс — лендинг. Палитра проекта + согласованный фон «вариант Д» и тёмная зона «вариант В». */

:root {
  --slate: #46525E;
  --ink: #3D4854;
  --teal: #0E5E70;
  --teal-mid: #2E8FA3;
  --turq: #7CC4D8;
  --sky: #BBD9EA;
  --cream: #F2F0EA;
  --white: #FFFFFF;
  --line: #D4D4D8;
  --shadow: 0 10px 30px rgba(70, 82, 94, .12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--cream);
  min-height: 100vh;
}

/* === ФОН «ВАРИАНТ Д» (согласован): блики из Б + вуаль 10% + цикл 5 с + зерно 6% === */
body::before {
  content: '';
  position: fixed;
  inset: -50%;
  z-index: -2;
  background:
    linear-gradient(rgba(255, 255, 255, .10), rgba(255, 255, 255, .10)),
    radial-gradient(32% 48% at 25% 30%, rgba(46, 143, 163, .34), transparent 70%),
    radial-gradient(30% 45% at 75% 35%, rgba(124, 196, 216, .55), transparent 70%),
    radial-gradient(36% 52% at 55% 80%, rgba(187, 217, 234, .60), transparent 70%);
  animation: drift-fast 5s ease-in-out infinite alternate;
  will-change: transform;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url('assets/img/noise-feral.png');
  background-size: 256px 256px;
  image-rendering: pixelated;
  mix-blend-mode: overlay;
  opacity: .08;
  pointer-events: none;
}
@keyframes drift-fast {
  from { transform: translate3d(-6%, -4%, 0) scale(1.05) rotate(-2deg); }
  to   { transform: translate3d(6%, 4%, 0) scale(1.25) rotate(3deg); }
}
@keyframes drift {
  from { transform: translate3d(-4%, -3%, 0) scale(1) rotate(0deg); }
  to   { transform: translate3d(4%, 3%, 0) scale(1.14) rotate(2deg); }
}

img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { color: var(--slate); line-height: 1.2; }
h1 { font-size: clamp(34px, 5vw, 54px); font-weight: 700; }
h2 { font-size: clamp(28px, 4vw, 38px); font-weight: 700; }
h3 { font-size: 22px; font-weight: 600; }

.section { padding: 88px 0; }
.section-muted {
  background: rgba(255, 255, 255, .58);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  backdrop-filter: blur(14px) saturate(1.25);
  border-top: 1px solid rgba(70, 82, 94, .08);
  border-bottom: 1px solid rgba(70, 82, 94, .08);
}
.section-sub { font-size: 20px; color: #5B6771; margin: 12px 0 40px; max-width: 640px; }

/* === Кнопки === */
.btn {
  display: inline-block;
  min-height: 52px;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 19px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--teal); color: var(--white); }
.btn-primary:hover { background: #0B4C5B; }
.btn-telegram {
  background: rgba(255, 255, 255, .45);
  color: var(--teal);
  border-color: var(--teal);
  -webkit-backdrop-filter: blur(10px) saturate(1.25);
  backdrop-filter: blur(10px) saturate(1.25);
}
.btn-telegram:hover { background: rgba(255, 255, 255, .72); }

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--teal-mid);
  outline-offset: 2px;
  border-radius: 4px;
}

/* === Шапка === */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(242, 240, 234, .38);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  backdrop-filter: blur(14px) saturate(1.25);
  border-bottom: 1px solid rgba(70, 82, 94, .1);
  transition: box-shadow .3s;
}
/* зерно «светлые искры»: текстура noise-light.png — белые частицы,
   альфа задана яркостью исходного шума (тёмное вырезано -> прозрачно) */
.header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('assets/img/noise-light.png');
  background-size: 1024px 1024px;
  filter: blur(1px);
  opacity: .28;
  pointer-events: none;
}
/* без backdrop-filter стекло заменяем плотным фоном, текст остаётся читаемым */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .header { background: rgba(242, 240, 234, .92); }
}
.header.scrolled { box-shadow: var(--shadow); }
.header-inner { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { height: 40px; width: auto; }
.brand-name { font-size: 24px; font-weight: 700; color: var(--slate); }
.nav { display: flex; gap: 24px; margin-left: auto; align-items: center; }
.nav a { color: var(--slate); text-decoration: none; font-size: 18px; font-weight: 500; padding: 8px 4px; }
.nav a:hover { color: var(--teal); }
.nav .nav-demo { color: var(--teal); font-weight: 600; }
.header-telegram { padding: 10px 20px; min-height: 46px; font-size: 17px; }
.nav-toggle { display: none; }

/* === Hero === */
.hero { padding: 96px 0 72px; }
.hero h1 { max-width: 840px; }
.lead { font-size: 22px; color: #4A5560; margin: 24px 0 36px; max-width: 720px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }
.hero-shot {
  position: relative;
  margin-top: 56px;
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  backdrop-filter: blur(14px) saturate(1.25);
}
.hero-shot img { border-radius: 6px; width: 100%; }
.hero-shot figcaption { font-size: 15px; color: #71717B; padding: 12px 8px 4px; }

/* === Метрики === */
.metrics { padding: 8px 0 64px; }
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.metric {
  position: relative;
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 12px;
  padding: 28px;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  backdrop-filter: blur(14px) saturate(1.25);
}
.metric-value { font-size: 34px; font-weight: 700; color: var(--teal); }
.metric-label { font-size: 17px; color: #5B6771; margin-top: 6px; }

/* === Шаги === */
.steps { display: grid; gap: 32px; }
.step {
  position: relative;
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 12px;
  padding: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  backdrop-filter: blur(14px) saturate(1.25);
}
.step-num { font-size: 44px; font-weight: 700; color: var(--turq); line-height: 1; margin-bottom: 12px; }
.step p { align-self: start; }
.step img { border: 1px solid var(--line); border-radius: 8px; width: 100%; }

/* === Карточки возможностей === */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.card {
  position: relative;
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 12px;
  padding: 28px;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  backdrop-filter: blur(14px) saturate(1.25);
}
.card h3 { margin-bottom: 10px; }
.card p { color: #4A5560; }

/* зерно «светлые искры» на стеклянных блоках */
.metric::after, .card::after, .step::after, .hero-shot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: url('assets/img/noise-light.png');
  background-size: 1024px 1024px;
  filter: blur(1px);
  opacity: .28;
  pointer-events: none;
}

/* фолбэк: без backdrop-filter стекло непрозрачным не делаем — плотный фон для читаемости */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .metric, .card, .step, .hero-shot, .section-muted, .cta-form { background: rgba(255, 255, 255, .92); }
  .btn-telegram { background: rgba(255, 255, 255, .92); }
}

/* === Поддерживаемые системы: плитки === */
.systems-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.system-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 12px;
  background: rgba(255, 255, 255, .55);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  backdrop-filter: blur(14px) saturate(1.25);
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.system-tile:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(70, 82, 94, .18); }
.system-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.system-body { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; padding: 16px 20px 20px; }
.system-title { font-size: 22px; font-weight: 600; color: var(--slate); }
.system-examples {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 2px solid var(--teal);
  border-radius: 8px;
  background: rgba(255, 255, 255, .45);
  color: var(--teal);
  font-size: 16px;
  font-weight: 600;
}

/* === Модальный просмотр примеров === */
.lightbox { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(61, 72, 84, .72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.lightbox-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: min(1040px, 100%);
  max-height: calc(100vh - 48px);
  background: rgba(242, 240, 234, .96);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(35, 45, 55, .35);
  overflow: hidden;
}
.lightbox-bar { display: flex; align-items: center; gap: 16px; padding: 8px 12px 8px 24px; border-bottom: 1px solid rgba(70, 82, 94, .12); }
.lightbox-title { font-size: 22px; color: var(--slate); }
.lightbox-counter { margin-left: auto; color: #5B6771; font-size: 16px; }
.lightbox-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--slate);
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(70, 82, 94, .1); }
.lightbox-figure { display: flex; align-items: center; justify-content: center; margin: 0; padding: 16px; min-height: 0; }
.lightbox-img { max-width: 100%; max-height: calc(100vh - 210px); border-radius: 8px; object-fit: contain; }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: rgba(242, 240, 234, .92);
  color: var(--slate);
  box-shadow: var(--shadow);
  cursor: pointer;
}
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

/* === Секции с текстом и медиа === */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split-text { align-self: start; }
.split-reverse .split-media { order: -1; }
.split-media { display: grid; gap: 20px; }
.split-media img { border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.benefits { list-style: none; display: grid; gap: 14px; margin-bottom: 24px; }
.benefits li { padding-left: 34px; position: relative; color: #4A5560; }
.benefits li::before {
  content: '';
  position: absolute;
  left: 0; top: 6px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--turq) 0 45%, transparent 50%);
  border: 3px solid var(--teal);
}
.key-benefit { font-weight: 600; color: var(--teal); border-left: 4px solid var(--turq); padding-left: 16px; }

/* === Демо: тёмная зона «вариант В» === */
.cta { position: relative; overflow: hidden; background: var(--slate); color: #D9E2E8; }
.cta::before {
  content: '';
  position: absolute;
  inset: -50%;
  z-index: 0;
  background:
    radial-gradient(42% 60% at 30% 35%, rgba(124, 196, 216, .30), transparent 70%),
    radial-gradient(36% 54% at 70% 30%, rgba(187, 217, 234, .18), transparent 70%),
    radial-gradient(46% 64% at 60% 78%, rgba(14, 94, 112, .45), transparent 70%);
  animation: drift 24s ease-in-out infinite alternate;
  will-change: transform;
}
.cta-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 96px 24px; align-items: center; }
.cta h2 { color: var(--white); }
.cta p { margin: 16px 0 28px; max-width: 480px; }
.cta .btn-telegram {
  color: var(--sky);
  border-color: var(--sky);
  background: rgba(255, 255, 255, .12);
}
.cta .btn-telegram:hover { background: rgba(187, 217, 234, .22); }
.cta-form {
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 12px;
  padding: 20px;
  min-height: 200px;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  backdrop-filter: blur(14px) saturate(1.25);
}

/* === Футер === */
.footer { padding: 48px 0 64px; color: #5B6771; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.footer-brand { display: flex; align-items: center; gap: 12px; max-width: 480px; }
.footer-brand .brand-mark { height: 32px; }
.footer-contacts a { color: var(--teal); font-weight: 600; text-decoration: none; }
.footer-contacts a:hover { text-decoration: underline; }
.footer-copy { font-size: 16px; }

/* === Появление при скролле === */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* === Доступность и адаптив === */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before, .cta::before { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .system-tile { transition: none; }
  .system-tile:hover { transform: none; }
}

@media (max-width: 900px) {
  .step { grid-template-columns: 1fr; }
  .split, .split-reverse, .cta-inner { grid-template-columns: 1fr; }
  .split-reverse .split-media { order: 0; }
  .nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(242, 240, 234, .78);
    -webkit-backdrop-filter: blur(14px) saturate(1.25);
    backdrop-filter: blur(14px) saturate(1.25);
    border-bottom: 1px solid rgba(70, 82, 94, .15);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px 24px 24px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 4px; border-bottom: 1px solid rgba(70, 82, 94, .08); }
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 52px; height: 52px;
    margin-left: auto;
    background: transparent;
    border: 2px solid var(--teal);
    border-radius: 8px;
    cursor: pointer;
  }
  .nav-toggle span { display: block; width: 24px; height: 3px; margin: 0 auto; background: var(--teal); border-radius: 2px; }
  .header-telegram { display: none; }
}
