/* ==========================================================================
   MARRONNIER DARK THEME — REFACTORED, CLEAN
   ========================================================================== */

/* -------------------- 0. Переменные -------------------- */
:root {
  /* Цвета */
  --dark-indigo: #05051A;
  --accent-violet: #6A4CFF;
  --light-lavender: #B0B0D0;
  --white: #FFFFFF;
  --glass-border: rgba(255, 255, 255, 0.10);

  /* «Стеклянные» пресеты по умолчанию (можно менять классом-профилем) */
  --mobile-chrome-bg: rgba(5, 5, 26, 0.88);
  --mobile-chrome-blur: 10px;

  /* Features */
  --feat-gap-y: 56px;
  --feat-gap-x: 48px;
  --feat-radius: 20px;
  --feat-border: rgba(255,255,255,0.06);

  --mf-white: var(--white, #fff);
  --mf-muted: var(--light-lavender, #B0B0D0);
  --mf-border: rgba(255,255,255,0.06);
  --mf-aside-w: 320px;
  --mf-gap-x: 56px;
  --mf-gap-y: 64px;
  --mf-radius: 20px;

  /* Dropbar */
  --dropbar-gutter: 24px;

  /* Loader */
  --mrn-indigo: #050517;
  --mrn-neon-1: #ff29ff;
  --mrn-neon-2: #7f5dff;
  --mrn-neon-3: #35d4ff;
}

/* Опциональные профили */
.preset-glass-80 { --mobile-chrome-bg: rgba(5, 5, 26, 0.80); --mobile-chrome-blur: 12px; }
.preset-glass-88 { --mobile-chrome-bg: rgba(5, 5, 26, 0.88); --mobile-chrome-blur: 10px; }
.preset-glass-70 { --mobile-chrome-bg: rgba(5, 5, 26, 0.70); --mobile-chrome-blur: 7px; }

/* -------------------- 1. База -------------------- */
body,
.tm-page,
.uk-section-default {
  background: var(--dark-indigo) !important;
  color: var(--light-lavender) !important;
}

/* -------------------- 2. Хедер (десктоп) -------------------- */
/* БЛОК 1 — НЕ ТРОГАЕМ, КАК ЕСТЬ */
/* Прозрачный по умолчанию */
.tm-header .uk-navbar-container {
  background: transparent !important;
  border-bottom: none !important;
}
/* При прилипания UIkit добавляет .uk-navbar-sticky на .uk-navbar-container */
.tm-header .uk-navbar-container.uk-navbar-sticky,
.tm-header.uk-sticky-fixed .uk-navbar-container {
  background: rgba(5, 5, 26, 0.85) !important;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border) !important;
}
/* Инверсия логотипа */
.tm-header .uk-logo .uk-logo-inverse { display: block !important; }
.tm-header .uk-logo img:not(.uk-logo-inverse) { display: none !important; }
/* Цвета ссылок */
.uk-navbar-nav > li > a,
.uk-navbar-toggle {
  color: var(--white) !important;
  font-weight: 500;
}
.uk-navbar-nav > li:hover > a,
.uk-navbar-nav > li > a[aria-expanded="true"] {
  color: var(--accent-violet) !important;
}
/* Выпадающее меню (десктоп) */
.uk-navbar-dropdown {
  background: var(--dark-indigo) !important;
  border: 1px solid var(--glass-border);
  box-shadow: 0 15px 40px rgba(0,0,0,.3) !important;
}
.uk-navbar-dropdown-nav > li > a { color: var(--light-lavender) !important; }
.uk-navbar-dropdown-nav > li > a:hover,
.uk-navbar-dropdown-nav > li.uk-active > a { color: var(--white) !important; }

/* -------------------- 3. Хедер (мобайл) + «dropbar» меню -------------------- */
/* БЛОК 1 — ПРОДОЛЖЕНИЕ, НЕ УДАЛЯЕМ */
/* Вверху — прозрачный; при прилипания — «стекло» */
.tm-header-mobile .uk-navbar-container {
  background: transparent !important;
  border-bottom: none !important;
  padding-top: env(safe-area-inset-top);
  transition: background-color .25s ease, backdrop-filter .25s ease, border-color .25s ease;
}
.tm-header-mobile .uk-navbar-container.uk-navbar-sticky,
.tm-header-mobile [uk-sticky].uk-sticky-fixed .uk-navbar-container {
  background: var(--mobile-chrome-bg) !important;
  -webkit-backdrop-filter: blur(var(--mobile-chrome-blur));
  backdrop-filter: blur(var(--mobile-chrome-blur));
  border-bottom: 1px solid var(--glass-border) !important;
}

/* Если на странице есть секция с tm-header-transparent — мобильный хедер ложится поверх hero */
@media (max-width: 959px) {
  .has-header-transparent .tm-header-mobile {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
  }
  .has-header-transparent .tm-header-mobile .uk-navbar-container {
    background: transparent !important;
    border-bottom: none !important;
  }
}

/* Иконки в моб.хедере */
.tm-header-mobile .uk-navbar-toggle { color: var(--white) !important; }
.tm-header-mobile .uk-navbar-toggle:hover,
.tm-header-mobile .uk-navbar-toggle:focus { color: var(--accent-violet) !important; }

/* Мобильный dropbar */
#tm-dialog-mobile.uk-dropbar {
  background: var(--mobile-chrome-bg) !important;
  -webkit-backdrop-filter: blur(var(--mobile-chrome-blur));
  backdrop-filter: blur(var(--mobile-chrome-blur));
  border-top: 0 !important;
  box-shadow: none !important;
  padding-top: calc(env(safe-area-inset-top) + 10px);
  padding-bottom: env(safe-area-inset-bottom);
  transition: background-color .25s ease, backdrop-filter .25s ease, border-color .25s ease;
}

/* Ссылки и стрелки в dropbar */
#tm-dialog-mobile .uk-nav-default > li > a {
  color: var(--white) !important;
  font-weight: 500;
  padding: 12px 2px;
  min-height: 44px;
  display: flex;
  align-items: center;
}
#tm-dialog-mobile .uk-nav-default > li > a:hover,
#tm-dialog-mobile .uk-nav-default > li.uk-active > a {
  color: var(--accent-violet) !important;
}
#tm-dialog-mobile .uk-nav-parent-icon { color: var(--light-lavender) !important; }
#tm-dialog-mobile .uk-parent.uk-open > a .uk-nav-parent-icon { color: var(--accent-violet) !important; }
#tm-dialog-mobile .uk-nav-sub a { color: var(--light-lavender) !important; }

/* Разделители (аккуратные, одинаковые) */
#tm-dialog-mobile .uk-nav.uk-nav-divider > li {
  border-top: 0 !important;
  box-shadow: none !important;
}
#tm-dialog-mobile .uk-nav.uk-nav-divider > li + li {
  border-top: 1px solid rgba(255,255,255,0.08) !important;
  margin-top: 14px;
  padding-top: 14px;
  box-shadow: none !important;
  margin-left: 16px;
  margin-right: 16px;
}

/* Тактильный отклик при тапе на сенсорах */
@media (hover: none) {
  #tm-dialog-mobile .uk-nav-default > li > a:active {
    background: rgba(255,255,255,0.06);
  }
}

/* Фокус для доступности */
#tm-dialog-mobile a:focus-visible {
  outline: 2px solid var(--accent-violet);
  outline-offset: 2px;
}

/* Фолбэк на устройствах без blur: делаем фон плотнее */
@supports not ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))) {
  #tm-dialog-mobile.uk-dropbar,
  .tm-header-mobile .uk-navbar-container.uk-navbar-sticky,
  .tm-header-mobile [uk-sticky].uk-sticky-fixed .uk-navbar-container {
    background: rgba(5, 5, 26, 0.92) !important;
  }
}

/* Доп-настройка dropbar (гуттеры) */
#tm-dialog-mobile .uk-nav.uk-nav-divider {
  padding-left: var(--dropbar-gutter) !important;
  padding-right: var(--dropbar-gutter) !important;
}
#tm-dialog-mobile .uk-nav-default > li > a {
  padding-left: 0 !important;
  padding-right: 0 !important;
}
#tm-dialog-mobile .uk-nav-parent-icon { margin-left: auto; }
#tm-dialog-mobile .uk-nav.uk-nav-divider > li + li {
  margin-left: 0 !important;
  margin-right: 0 !important;
}
#tm-dialog-mobile .uk-nav-divider {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Инвертированный логотип в мобильном хедере */
.tm-header-mobile .uk-logo .uk-logo-inverse { display: block !important; }
.tm-header-mobile .uk-logo img:not(.uk-logo-inverse) { display: none !important; }

/* -------------------- 4. Hero (видео, оверлей, тексты) -------------------- */
#hero {
  height: 100vh;
  padding: 0 !important;
  position: relative;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: 0;
}

#hero .overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(5, 5, 26, 0.60);
}

/* Мягкий переход видео → фон секции */
#hero .overlay::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: min(22vh, 220px);
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(5,5,26,0) 0%,
    rgba(5,5,26,.48) 60%,
    var(--dark-indigo) 100%
  );
  z-index: 1;
}

/* Мобильный градиент */
@media (max-width: 959px) {
  #hero .overlay {
    background: linear-gradient(
      to bottom,
      rgba(5, 5, 26, 0.85) 0,
      rgba(5, 5, 26, 0.70) 80px,
      rgba(5, 5, 26, 0.45) 220px,
      rgba(5, 5, 26, 0.30) 100%
    ) !important;
  }
}

#hero .uk-container {
  position: relative;
  z-index: 2;
  text-align: center;
}

/* ПЕЧАТАЮЩИЙСЯ ТЕКСТ */
#typing-container {
  font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: clamp(2.6rem, 3.8vw, 3.4rem);
  line-height: 1.1;
  color: var(--white);
  min-height: 1.2em;
  padding: 0 15px;
  margin-bottom: 16px;

  position: relative;
  z-index: 3;
  opacity: 1;
  display: block;
}

/* Сам текст и курсор в одну линию */
#typing-text,
#typing-container .cursor {
  display: inline-block;
  vertical-align: baseline;
}

/* Курсор‑прямоугольник */
#typing-container .cursor {
  background: none;
  width: auto;
  height: auto;
  border-radius: 0;
  color: #fff;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

#typing-container .cursor {
  position: relative;
  top: -4px; /* или -2px, если нужно чуть выше */
  left: 6px;
}



/* Мобильные (не слишком огромный, чтобы не ломать верстку) */
@media (max-width: 767px) {
  #typing-container {
    font-size: 28px;
    line-height: 1.2;
  }

  .hero-content {
    padding-top: 170px; /* под Telegram */
  }
}

/* Позиционирование контента в hero на десктопе */
@media (min-width: 768px) {
  .hero-content {
    padding-top: 22vh; /* подстрой по вкусу: 18–30vh */
  }
}

.main-offer {
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity .8s ease, transform .8s ease, visibility 0s .8s;
}

.main-offer.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: .2s;
}

.main-offer h1 {
  color: var(--white) !important;
  font-weight: 700;
}

.main-offer p {
  color: var(--light-lavender);
  max-width: 600px;
  margin: 20px auto 40px;
}

@media (min-width: 768px) {
  .main-offer {
    margin-top: -10vh;
  }
}


/* -------------------- 5. Футер -------------------- */
.border-bottom.uk-section-default {
  background: var(--dark-indigo);
  border-top: 1px solid var(--glass-border);
  border-bottom: none !important;
  border-image: none !important;
}
.border-bottom .uk-panel.uk-text-muted { color: var(--light-lavender) !important; }
.border-bottom .uk-panel a {
  color: var(--accent-violet) !important;
  text-decoration: none;
}
.border-bottom .uk-panel a:hover {
  color: var(--white) !important;
  text-decoration: underline;
}

/* -------------------- 6. Форма (PWebContact) -------------------- */
#pwebcontact99_container {
  background: rgba(15, 15, 35, 0.90) !important;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border) !important;
}
#pwebcontact99_form h2,
#pwebcontact99_form label,
#pwebcontact99_text-1 span {
  color: var(--white) !important;
}
#pwebcontact99_form a { color: var(--accent-violet) !important; }
#pwebcontact99_form input[type="text"],
#pwebcontact99_form input[type="email"],
#pwebcontact99_form textarea {
  background: rgba(0,0,0,0.20) !important;
  border: 1px solid var(--glass-border) !important;
  color: var(--white) !important;
  box-shadow: none !important;
}
#pwebcontact99_form input[type="text"]:focus,
#pwebcontact99_form input[type="email"]:focus,
#pwebcontact99_form textarea:focus {
  border-color: var(--accent-violet) !important;
}
#pwebcontact99_form button.btn {
  background: linear-gradient(90deg, var(--accent-violet) 0%, #A076F9 100%) !important;
  color: var(--white) !important;
  border: none !important;
  box-shadow: none !important;
}
#pwebcontact99_form button.btn:hover {
  box-shadow: 0 5px 15px rgba(106,76,255,.4) !important;
}

/* ========= Features (правый заголовок + нумерация + анимация) ========= */
/* БЛОК 2 */

/* Общая сетка: слева контент, справа заголовок */
.mrn-features .features-grid {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 320px);
  gap: 24px;
  align-items: start;
}

/* Заголовок справа */
.mrn-features .features-title {
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
  font-size: clamp(26px, 2.4vw, 36px);
  margin: 0;
  position: sticky;
  top: 120px;
  text-align: right;
  opacity: 0.95;
}

/* Список фич: авто-нумерация + шахматка */
.mrn-features .features-list { counter-reset: feat; }

.mrn-features .feature-row {
  counter-increment: feat;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--feat-gap-x);
  align-items: center;
  margin-bottom: var(--feat-gap-y);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

/* Большие номера (01/02/...) */
.mrn-features .feature-row::before {
  content: counter(feat, decimal-leading-zero);
  position: absolute;
  left: -48px;
  top: 6px;
  color: rgba(255,255,255,0.18);
  font-weight: 800;
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1;
}
.mrn-features .feature-row.feature-row--rev::before {
  left: auto;
  right: -48px;
}

/* Сдвиг по оси X */
.mrn-features .feature-row:nth-child(odd) {
  transform: translate(-20px, 30px);
}
.mrn-features .feature-row:nth-child(even) {
  transform: translate(20px, 30px);
}

/* Когда попали в зону видимости */
.mrn-features .feature-row.in-view {
  opacity: 1;
  transform: translate(0, 0);
}

/* Текст: капс */
.mrn-features .feature-text h4 {
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.35;
  margin: 0;
  text-align: center;
  opacity: 0.92;
}

/* Медиа-рамка (первая версия — пригодна для фоновой подсветки) */
.mrn-features .media-frame {
  position: relative;
  border-radius: var(--feat-radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.mrn-features .media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--feat-radius);
  box-shadow: inset 0 0 0 1px var(--feat-border);
  pointer-events: none;
}
.mrn-features .media-frame img,
.mrn-features .media-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateZ(0);
}

/* Мобайл — макет №2 */
@media (max-width: 959px) {
  .mrn-features .features-grid {
    grid-template-columns: 1fr;
  }
  .mrn-features .features-aside {
    order: -1;
    margin-bottom: 16px;
  }
  .mrn-features .features-title {
    position: static;
    text-align: left;
    font-size: 22px;
    letter-spacing: 0.06em;
    margin-left: 2px;
  }

  .mrn-features .feature-row {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 28px;
  }
  .mrn-features .feature-row::before { display: none; }

  .mrn-features .feature-text h4 {
    font-size: 14px;
    text-align: left;
    opacity: .95;
  }
}

/* =========================================================
   MRN Features (заголовок слева, шахматка справа) — основная реализация
   ========================================================= */
.mrn-features .feature-group { margin-bottom: 96px; }
.mrn-features .feature-group__grid {
  display: grid;
  grid-template-columns: minmax(220px, var(--mf-aside-w)) 1fr;
  gap: 24px;
  align-items: start;
}

/* Заголовок слева (sticky) */
.mrn-features .feature-aside { position: relative; }
.mrn-features .feature-title {
  position: sticky;
  top: 120px;
  margin: 0;
  color: var(--mf-white);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
  font-size: clamp(26px, 2.4vw, 36px);
  opacity: 0.96;
  text-align: left;
}

/* Список пунктов (шахматка) */
.mrn-features .feature-list {}

/* Сетка */
.mrn-features .feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--mf-gap-x);
  margin-bottom: var(--mf-gap-y);
}

/* Шахматный порядок */
.mrn-features .feature-row:nth-child(even) .feature-text { order: 2; }
.mrn-features .feature-row:nth-child(even) .feature-media { order: 1; }

/* Тексты */
.mrn-features .feature-text h3 {
  margin: 0 0 8px 0;
  color: var(--mf-white);
  font-weight: 700;
  font-size: clamp(20px, 1.8vw, 24px);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.35;
}
.mrn-features .feature-text p {
  margin: 0;
  color: var(--mf-muted);
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.55;
}

/* Медиа (вторая версия) */
.mrn-features .media-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--mf-radius);
  aspect-ratio: 16 / 9;
}
.mrn-features .media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--mf-radius);
  box-shadow: inset 0 0 0 1px var(--mf-border);
  pointer-events: none;
}
.mrn-features .media-frame img,
.mrn-features .media-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateZ(0);
}

/* Мобайл — одна колонка */
@media (max-width: 959px) {
  .mrn-features .feature-group__grid {
    grid-template-columns: 1fr;
  }
  .mrn-features .feature-title {
    position: static;
    top: auto;
    text-align: left;
    font-size: 22px;
    margin-bottom: 12px;
  }
  .mrn-features .feature-row {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 28px;
  }
  .mrn-features .feature-row .feature-text { order: 1; }
  .mrn-features .feature-row .feature-media { order: 2; }
}

/* Очень широкие экраны */
@media (min-width: 1400px) {
  .mrn-features { --mf-gap-x: 72px; --mf-gap-y: 72px; --mf-aside-w: 360px; }
}

/* Kill switch нумерации */
.mrn-features .feature-list,
.mrn-features .feature-row {
  counter-reset: none !important;
  counter-increment: none !important;
}
.mrn-features .feature-row::before,
.mrn-features .feature-row::after,
.mrn-features .feature-text::before,
.mrn-features .feature-text::after {
  content: none !important;
}

/* Mobile fix: гарантированный порядок текст → медиа */
@media (max-width: 959px) {
  .mrn-features .feature-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-areas: "text" "media" !important;
    gap: 12px !important;
  }
  .mrn-features .feature-row > .feature-text {
    grid-area: text !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    order: 0 !important;
  }
  .mrn-features .feature-row > .feature-media {
    grid-area: media !important;
    grid-column: 1 !important;
    grid-row: 2 !important;
    order: 0 !important;
  }
  .mrn-features .feature-row:nth-child(even) > .feature-text,
  .mrn-features .feature-row:nth-child(even) > .feature-media {
    order: 0 !important;
  }
}

/* Визуальные тонкости медиа */
.mrn-features .media-frame::after {
  content: none !important;
  box-shadow: none !important;
}
.mrn-features .media-frame { background: #05051A; }
.mrn-features .media-frame > img {
  -webkit-mask-image: radial-gradient(90% 130% at 50% 55%, #000 15%, transparent 55%);
  mask-image: radial-gradient(90% 130% at 50% 55%, #000 15%, transparent 55%);
}

/* Анимация появления (JS / IntersectionObserver) */
html.js .mrn-features .feature-text,
html.js .mrn-features .feature-media {
  opacity: 0;
  filter: blur(6px);
  transform: translate3d(0, 16px, 0) scale(.985);
  transition:
    opacity 700ms cubic-bezier(.22,.91,.2,1),
    transform 700ms cubic-bezier(.22,.91,.2,1),
    filter 550ms ease-out;
  will-change: opacity, transform, filter;
}
@media (min-width: 960px) {
  html.js .mrn-features .feature-row:nth-child(odd) .feature-text  { transform: translate3d(-24px, 10px, 0) scale(.985); }
  html.js .mrn-features .feature-row:nth-child(odd) .feature-media { transform: translate3d( 24px, 10px, 0) scale(.985); }
  html.js .mrn-features .feature-row:nth-child(even) .feature-text { transform: translate3d( 24px, 10px, 0) scale(.985); }
  html.js .mrn-features .feature-row:nth-child(even) .feature-media{ transform: translate3d(-24px, 10px, 0) scale(.985); }
}
.mrn-features .feature-row.is-inview .feature-text,
.mrn-features .feature-row.is-inview .feature-media {
  opacity: 1;
  filter: blur(0);
  transform: none;
}
.mrn-features .feature-row.is-inview .feature-text  { transition-delay: 0ms; }
.mrn-features .feature-row.is-inview .feature-media { transition-delay: 140ms; }
@media (prefers-reduced-motion: reduce) {
  html.js .mrn-features .feature-text,
  html.js .mrn-features .feature-media {
    transition: none !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }
}
@media (max-width: 959px) {
  html.js .mrn-features .feature-text,
  html.js .mrn-features .feature-media {
    transform: translate3d(0, 10px, 0) scale(.992);
    transition-duration: 560ms;
  }
}

/* ==========================================================================
   MRN Cases
   ========================================================================== */
.mrn-cases {
  --cases-aside-w: var(--mf-aside-w, 320px);
  --cases-gap: 18px;
  --cases-radius: 18px;
  --cases-bg: var(--dark-indigo, #05051A);
  --cases-text: var(--white, #fff);
  --cases-muted: var(--light-lavender, #B0B0D0);
  --accent-2: #55B2FF;
}

/* Шапка */
.mrn-cases .cases-header {
  max-width: var(--cases-aside-w);
  margin: 0 0 24px 0;
}
.mrn-cases .cases-title {
  margin: 0 0 10px 0;
  color: var(--white);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: clamp(26px, 2.4vw, 36px);
}
.mrn-cases .cases-lead {
  margin: 8px 0 0 0;
  color: var(--cases-muted);
  line-height: 1.6;
}

/* Мозаика */
.mrn-cases .cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 8px;
  gap: var(--cases-gap);
}

/* Карточка */
.mrn-cases .case-card {
  position: relative;
  overflow: hidden;
  background: var(--cases-bg);
  border-radius: var(--cases-radius);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
  isolation: isolate;
  --tone: transparent;
  --sat: 1;
  --bright: 1;
}
.mrn-cases .case-card > a {
  display: block;
  position: relative;
  height: 100%;
}

/* Медиа */
.mrn-cases .case-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateZ(0);
  transition: filter 280ms ease, transform 320ms ease;
  filter: saturate(var(--sat)) brightness(var(--bright));
}

/* Тон‑оверлей */
.mrn-cases .case-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: var(--tone);
  mix-blend-mode: soft-light;
  opacity: .9;
}

/* Оверлей с текстом */
.mrn-cases .case-info {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 20px;
  color: var(--cases-text);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 260ms ease, transform 260ms ease;
  background: none;
}

/* Тексты */
.mrn-cases .case-name {
  margin: 0;
  color: var(--accent-violet);
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: clamp(16px, 1.3vw, 20px);
  position: relative;
  display: inline-block;
  padding-bottom: 6px;
}
.mrn-cases .case-name::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-violet), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 300ms ease;
  opacity: .9;
}
.mrn-cases .case-desc {
  margin: 0 0 6px 0;
  color: var(--cases-text);
  opacity: .95;
  font-size: 14px;
  line-height: 1.5;
}
.mrn-cases .btn-case {
  align-self: center;
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-violet) 0%, var(--accent-2) 100%);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(106,76,255,.35);
}

/* Hover/Focus/Tap */
.mrn-cases .case-card:hover img,
.mrn-cases .case-card:focus-within img,
.mrn-cases .case-card.is-open img {
  filter: brightness(.1) saturate(.55);
}
.mrn-cases .case-card:hover .case-info,
.mrn-cases .case-card:focus-within .case-info,
.mrn-cases .case-card.is-open .case-info {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.mrn-cases .case-card:hover .case-name::after,
.mrn-cases .case-card:focus-within .case-name::after,
.mrn-cases .case-card.is-open .case-name::after {
  transform: scaleX(1);
}

/* Неоновый всплеск */
.mrn-cases .case-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(120% 100% at 50% 55%, rgba(106,76,255,.40), rgba(106,76,255,0) 60%);
  mix-blend-mode: screen;
  transition: opacity 160ms linear;
}
.mrn-cases .case-card:hover::before,
.mrn-cases .case-card:focus-within::before,
.mrn-cases .case-card.is-open::before {
  opacity: .55;
}

/* Размеры карточек */
.mrn-cases .case-card.w-1 { grid-column: span 1; }
.mrn-cases .case-card.w-2 { grid-column: span 2; }
.mrn-cases .case-card.w-3 { grid-column: span 3; }
.mrn-cases .case-card.h-12 { grid-row: span 12; }
.mrn-cases .case-card.h-14 { grid-row: span 14; }
.mrn-cases .case-card.h-16 { grid-row: span 16; }
.mrn-cases .case-card.h-20 { grid-row: span 20; }
.mrn-cases .case-card.h-24 { grid-row: span 24; }
.mrn-cases .case-card.h-28 { grid-row: span 28; }
.mrn-cases .case-card.h-30 { grid-row: span 30; }

/* Мобайл */
@media (max-width: 959px) {
  /* Шапка кейсов на всю ширину */
  .mrn-cases .cases-header {
    max-width: none;
    margin: 0 0 16px 0;
  }

  /* Текст под заголовком — как в описаниях фич (чуть меньше, чем body) */
  .mrn-cases .cases-lead {
    font-size: 14px;      /* как .mrn-features .feature-text p на мобиле */
    line-height: 1.55;    /* тот же ритм строки */
  }

  .mrn-cases .cases-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 8px;
    gap: 12px;
  }
  .mrn-cases .cases-grid > .case-card:first-child {
    grid-column: span 2;
  }
  .mrn-cases .case-info {
    transition-duration: 200ms;
  }
}

/* Prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .mrn-cases .case-card img,
  .mrn-cases .case-info,
  .mrn-cases .case-card::before,
  .mrn-cases .case-name::after {
    transition: none !important;
    animation: none !important;
  }
}

/* Стык секций features/cases */
.mrn-features .feature-group:last-child { margin-bottom: 0; }
.mrn-features.uk-section { padding-bottom: 48px; }
.mrn-cases.uk-section    { padding-top: 32px; }
@media (max-width: 1199px) {
  .mrn-features.uk-section { padding-bottom: 40px; }
  .mrn-cases.uk-section    { padding-top: 28px; }
}
@media (max-width: 959px) {
  .mrn-features.uk-section { padding-bottom: 32px; }
  .mrn-cases.uk-section    { padding-top: 24px; }
}

@media (max-width: 959px) {
  .mrn-cases .case-card.w-3 {
    grid-column: span 2; /* критичная строка */
  }
}



/* ==========================================================================
   Loader + блокировка контента
   ========================================================================== */
.mrn-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: var(--mrn-indigo);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.mrn-loader--active {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.45s ease;
}
.mrn-loader--hide {
  opacity: 0;
  pointer-events: none;
}
.mrn-loader__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mrn-loader__ui {
  position: relative;
  z-index: 2;
  text-align: center;
  font-family: system-ui, -apple-system, "SF Pro Text", "Segoe UI", sans-serif;
}
.mrn-loader__text {
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #050517;
  background: rgba(255,255,255,0.9);
  padding: 6px 14px;
  border-radius: 999px;
  display: inline-block;
  border: 1px solid rgba(0,0,0,0.04);
  margin-bottom: 10px;
}
.mrn-loader__bar {
  width: clamp(200px, 26vw, 320px);
  height: 3px;
  margin: 0 auto;
  background: rgba(255,255,255,.18);
  border-radius: 999px;
  overflow: hidden;
}
.mrn-loader__bar-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--mrn-neon-1),
    var(--mrn-neon-2),
    var(--mrn-neon-3)
  );
  transition: width .25s ease;
}
html.theme-light .mrn-loader__bar {
  background: rgba(0,0,0,.08);
}
@media (prefers-reduced-motion: reduce) {
  .mrn-loader__video { display: none; }
}

/* Скрываем контент страницы, пока активен лоадер */
html.mrn-is-loading .tm-page {
  opacity: 0;
  visibility: hidden;
}
.tm-page {
  transition: opacity 0.4s ease;
}

/* Блокирующий оверлей под лоадером */
html.mrn-is-loading::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  background-color: #0F0F0F;
}

/* Убедимся, что сам лоадер выше оверлея */
#mrn-loader { z-index: 10000; }

/* Каретка: выключаем, пока активен лоадер */
html.mrn-is-loading #typing-container .cursor {
  opacity: 0 !important;
  animation: none !important;
}

/* ======================================================================
   MRN Contact — эффектный финал + своя форма, без UIkit
   ====================================================================== */

.mrn-contact-section {
  padding: 56px 0 72px;
  position: relative;
  overflow: hidden;
  background: #05051a; /* общий фон как у сайта */
  --accent-violet: #6A4CFF;
  --accent-2: #55B2FF;
  --white: #ffffff;
  --light-lavender: #B0B0D0;
}

/* Простой контейнер вместо uk-container */
.mrn-contact-container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Фоновые неоновые мазки 
.mrn-contact-section::before,
.mrn-contact-section::after {
  content: "";
  position: absolute;
  inset: auto;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: .55;
  filter: blur(18px);


}
.mrn-contact-section::before {
  top: -120px;
  left: -80px;
  width: 320px;
  height: 320px;
  background:
    radial-gradient(circle at 20% 20%, rgba(106,76,255,.45), transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(85,178,255,.35), transparent 60%);
}
.mrn-contact-section::after {
  bottom: -140px;
  right: -60px;
  width: 340px;
  height: 340px;
  background:
    radial-gradient(circle at 70% 30%, rgba(255,41,255,.38), transparent 60%),
    radial-gradient(circle at 10% 80%, rgba(106,76,255,.35), transparent 60%);
}

/* Шапка финального блока */
.mrn-contact__header {
  max-width: 640px;
  margin: 0 auto 32px auto;
  text-align: center;
}
.mrn-contact__kicker {
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 11px;
  color: rgba(255,255,255,.55);
}
.mrn-contact__title {
  margin: 0 0 14px 0;
  color: var(--white);
  font-weight: 800;
  font-size: clamp(28px, 3vw, 34px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.mrn-contact__lead {
  margin: 0;
  color: var(--light-lavender);
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.6;
  opacity: .95;
}

/* Обёртка формы — стеклянная карта */
.mrn-contact__form-wrap {
  max-width: 720px;
  margin: 32px auto 0 auto;
  position: relative;
}

/* Карта формы */
.mrn-contact__form {
  position: relative;
  background:
    radial-gradient(circle at 0% 0%, rgba(106,76,255,.22), transparent 55%) border-box,
    rgba(10, 10, 30, 0.94) padding-box;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow:
    0 18px 60px rgba(0,0,0,.7),
    0 0 0 1px rgba(255,255,255,0.04);
  padding: 28px 30px 26px;
  overflow: hidden;
}



/* Сетка полей верхнего ряда */
.mrn-contact__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 18px;
  margin-bottom: 18px;
}

/* Поле */
.mrn-field {
  position: relative;
  z-index: 1;
}
.mrn-field--full {
  margin-bottom: 26px; /* больше воздуха перед подвалом формы */
}

/* Лейблы */
.mrn-field__label {
  display: block;
  margin: 0 0 6px 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}

/* Подсказка под полем */
.mrn-field__hint {
  margin: 6px 0 0 0;
  font-size: 11px;
  color: rgba(255,255,255,0.48);
}

/* Инпуты / textarea — тёмные, полупрозрачные, с неоновой окантовкой */
.mrn-field__control {
  width: 100%;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background:
    radial-gradient(circle at 0% 0%, rgba(106,76,255,0.15), transparent 55%),
    rgba(4,4,18,0.96);
  color: var(--white);
  font-size: 14px;
  outline: none;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    transform 120ms ease;
}
.mrn-field__control::placeholder {
  color: rgba(255,255,255,0.42);
}
.mrn-field__control--textarea {
  resize: vertical;
  min-height: 110px;
  border-radius: 14px;
  background: rgba(3,3,14,0.96);
}

/* Фокус / hover — неоновое свечение */
.mrn-field__control:focus {
  border-color: rgba(106,76,255,0.95);
  box-shadow:
    0 0 0 1px rgba(106,76,255,0.8),
    0 0 24px rgba(106,76,255,0.7);
  background:
    radial-gradient(circle at 0% 0%, rgba(106,76,255,0.30), transparent 55%),
    rgba(7,7,28,0.98);
}
.mrn-field__control:hover:not(:focus) {
  border-color: rgba(255,255,255,0.22);
}

/* Ошибки под полями */
.mrn-field__error {
  margin: 4px 0 0 0;
  font-size: 11px;
  color: #ff6b6b;
  min-height: 14px;
}

/* Футер формы: согласие + кнопка — без полосы */
.mrn-contact__footer {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding-top: 12px;
  background: transparent;       /* было: градиент */
  border-top: 1px solid rgba(255,255,255,0.04); /* очень тонкая линия, можно убрать */
}

.mrn-contact__note {
  margin: 0;
  max-width: 360px;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  line-height: 1.4;
}


/* Кнопка */
.mrn-contact__submit {
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  background: linear-gradient(90deg, var(--accent-violet) 0%, var(--accent-2) 100%);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(106,76,255,.45);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    opacity 120ms ease;
}
.mrn-contact__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(106,76,255,.55);
}
.mrn-contact__submit:active {
  transform: translateY(0);
  box-shadow: 0 8px 20px rgba(106,76,255,.4);
  opacity: .9;
}

/* Глобальные сообщения */
.mrn-contact__global-error {
  margin: 10px 0 0 0;
  font-size: 12px;
  color: #ff6b6b;
}
.mrn-contact__success {
  margin: 10px 0 0 0;
  font-size: 12px;
  color: #7DFFB3;
}

/* Анимация появления блока */
html.js .mrn-contact__header,
html.js .mrn-contact__form-wrap {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition:
    opacity 600ms cubic-bezier(.22,.91,.2,1),
    transform 600ms cubic-bezier(.22,.91,.2,1);
  will-change: opacity, transform;
}
.mrn-contact-section.mrn-inview .mrn-contact__header {
  opacity: 1;
  transform: none;
  transition-delay: 60ms;
}
.mrn-contact-section.mrn-inview .mrn-contact__form-wrap {
  opacity: 1;
  transform: none;
  transition-delay: 180ms;
}

/* Мобайл: компактнее и больше воздуха под кнопкой */
@media (max-width: 959px) {
  .mrn-contact-section {
    padding: 28px 0 40px;
  }

  .mrn-contact__header {
    margin-bottom: 18px;
    text-align: left;
  }

  .mrn-contact__title {
    font-size: 22px;
    letter-spacing: 0.04em;
  }

  .mrn-contact__lead {
    font-size: 14px;
    line-height: 1.5;
  }

  .mrn-contact__form-wrap {
    margin-top: 18px;
  }

  .mrn-contact__form {
    padding: 18px 14px 20px;
    border-radius: 16px;
  }

  .mrn-contact__grid {
    grid-template-columns: 1fr;
    gap: 10px 0;
    margin-bottom: 14px;
  }

  .mrn-field--full {
    margin-bottom: 18px;
  }

  .mrn-field__label {
    font-size: 11px;
    letter-spacing: 0.07em;
  }

  .mrn-field__control {
    border-radius: 10px;
    padding: 9px 11px;
    font-size: 14px;
  }

  .mrn-field__control--textarea {
    min-height: 110px;
  }

  .mrn-contact__footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.05);
    background: transparent;
  }

  .mrn-contact__note {
    font-size: 11px;
    max-width: 100%;
  }

  .mrn-contact__submit {
    width: 100%;
    text-align: center;
    padding: 11px 18px;
    font-size: 13px;
  }
}



@media (prefers-reduced-motion: reduce) {
  html.js .mrn-contact__header,
  html.js .mrn-contact__form-wrap {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Инпуты / textarea — тёмные, полупрозрачные, с неоном при фокусе */
.mrn-field__control {
  width: 100% !important;
  padding: 11px 13px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  background:
    radial-gradient(circle at 0% 0%, rgba(106,76,255,0.15), transparent 55%),
    rgba(4,4,18,0.96) !important;
  color: var(--white) !important;
  font-size: 14px !important;
  outline: none !important;
  box-shadow: none !important;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    transform 120ms ease;
}

.mrn-field__control::placeholder {
  color: rgba(255,255,255,0.42) !important;
}

.mrn-field__control--textarea {
  resize: vertical !important;
  min-height: 110px !important;
  border-radius: 14px !important;
  background: rgba(3,3,14,0.96) !important;
}

/* Фокус / hover — неоновое свечение */
.mrn-field__control:focus {
  border-color: rgba(106,76,255,0.95) !important;
  box-shadow:
    0 0 0 1px rgba(106,76,255,0.8),
    0 0 24px rgba(106,76,255,0.7) !important;
  background:
    radial-gradient(circle at 0% 0%, rgba(106,76,255,0.30), transparent 55%),
    rgba(7,7,28,0.98) !important;
}

.mrn-field__control:hover:not(:focus) {
  border-color: rgba(255,255,255,0.22) !important;
}

/* Мобайл: фикс "прилипло справа" + защита от горизонтального скролла */
@media (max-width: 959px) {
  .mrn-contact-section {
    overflow-x: clip; /* на новых браузерах, иначе будет hidden */
  }

  .mrn-contact-container {
    padding-left: 16px !important;
    padding-right: 16px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .mrn-contact__form-wrap,
  .mrn-contact__header {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }

  .mrn-contact__form {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .mrn-field__control {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

.mrn-contact-section {
  position: relative;
  overflow: hidden;
}



.mrn-contact-section {
  position: relative;
  overflow: hidden;
  background: #05051a; /* как запасной фон, когда видео ещё не загрузилось */
}

/* Видео-слой под всем контентом */
.mrn-contact-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.25;              /* насколько сильно видно видео */
  filter: blur(8px);          /* чтобы не отвлекало от текста */
  pointer-events: none;
}

/* Весь контент секции поверх видео */
.mrn-contact-container,
.mrn-contact__header,
.mrn-contact__form-wrap {
  position: relative;
  z-index: 1;
}

.mrn-contact-section {
  position: relative;
  overflow: hidden;
  background: #05051a;
}


.mrn-contact-section::before,
.mrn-contact-section::after {
  content: "";
  position: absolute;
  inset: auto;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: .35;
  filter: blur(30px); /* усилил blur, чтобы ещё сильнее размазать */
}

/* верхний левый — длинный мазок, сильно вылезает за границы */
.mrn-contact-section::before {
  top: -180px;
  left: -220px;
  width: 540px;
  height: 260px;
  background:
    radial-gradient(160% 220% at 0% 0%,
      rgba(106,76,255,0.6),
      transparent 65%)
    ;
}

/* нижний правый — широкий мягкий блик */
.mrn-contact-section::after {
  bottom: -220px;
  right: -260px;
  width: 560px;
  height: 320px;
  background:
    radial-gradient(180% 220% at 100% 100%,
      rgba(85,178,255,0.5),
      transparent 70%)
    ;
}





/* Лёгкий градиент сверху: от прозрачного к тёмному вниз */
.mrn-contact-section::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 280px; /* зона градиента, подгони по вкусу */
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(5, 5, 16, 0.0) 35%,   /* полностью прозрачно в самом верху */
    rgba(25, 25, 46, 1) 70% /* непрозрачный тёмный к низу градиента */
  );
  z-index: 0;
}