/* ═══════════════════════════════════════════════════════════
   Rocket CDN · запасной сценарий, оформление

   Всё под селектором html.rc-reduced. Правило простое: движение
   выключено, содержимое остаётся целиком, стекло остаётся, но
   запечённое - без размытия фона, потому что именно оно стоит
   дороже всего на слабых устройствах.
   ═══════════════════════════════════════════════════════════ */

/* ── Кадр раскадровки вместо живой сцены ─────────────────── */
.rc-frame {
  position: relative; margin: 0 auto clamp(26px, 4vw, 48px);
  max-width: var(--maxw); width: min(100% - 2 * var(--pad), var(--maxw));
  border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -34px rgba(4, 12, 22, .9);
  background: var(--bg-2);
}
.rc-frame img { display: block; width: 100%; height: auto; }
/* Низ кадра уводим в фон страницы, чтобы картинка не выглядела наклейкой */
.rc-frame::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 34%;
  background: linear-gradient(to bottom, transparent, var(--bg) 96%);
  pointer-events: none;
}
html:not(.rc-reduced) .rc-frame { display: none; }

/* ── Что выключено ───────────────────────────────────────── */
html.rc-reduced #rocketCanvas,
html.rc-reduced #spaceBg,
html.rc-reduced .hero-globe,
html.rc-reduced .rc-pkt-layer,
html.rc-reduced .rc-int-layer { display: none !important; }

html.rc-reduced *,
html.rc-reduced *::before,
html.rc-reduced *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .25s !important;
  scroll-behavior: auto !important;
}

/* Появления только по прозрачности, без сдвигов */
html.rc-reduced .rv { opacity: 0; transform: none !important; transition: opacity .25s linear; }
html.rc-reduced .rv.on { opacity: 1; }
html.rc-reduced .sec-h .w > i,
html.rc-reduced .hero h1 .w > i { transform: none !important; opacity: 1 !important; }

/* Наклонов и парения нет */
html.rc-reduced .card,
html.rc-reduced .viz-card,
html.rc-reduced .dc,
html.rc-reduced .prod-card,
html.rc-reduced .case {
  transform: none !important; rotate: 0deg !important; translate: 0 !important;
  animation: none !important;
}

/* ── Стекло остаётся, но запечённое ──────────────────────── */
html.rc-reduced .card,
html.rc-reduced .viz-card,
html.rc-reduced .dc,
html.rc-reduced .glass,
html.rc-reduced .hdr,
html.rc-reduced .btn-g {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html.rc-reduced .hdr { background: var(--bg-2); }
html.rc-reduced .card,
html.rc-reduced .viz-card,
html.rc-reduced .dc { background: var(--bg-3); }
html[data-theme="light"].rc-reduced .card,
html[data-theme="light"].rc-reduced .viz-card,
html[data-theme="light"].rc-reduced .dc { background: var(--bg-2); }

/* ── Доступность ─────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}
.rc-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Подсказка «листайте дальше» из rc-motion.js ──────────── */
.rc-hint {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(10px);
  z-index: 40; padding: 9px 16px; border-radius: var(--r-full);
  background: var(--surface-2); border: 1px solid var(--line-2);
  color: var(--tx-2); font-size: 13px; font-weight: 600;
  opacity: 0; pointer-events: none;
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.rc-hint.on { opacity: 1; transform: translateX(-50%); }
html.rc-reduced .rc-hint { display: none; }

/* ── Ступени деградации из rc-motion.js ──────────────────────
   Снимаем украшения по одному, а не всё сразу: так падение
   качества почти незаметно, а кадры возвращаются.

   Правило на все ступени: снимается только УКРАШЕНИЕ - то, что
   стоит кадров и чего человек не досчитается. Содержание - ракета,
   планета, звёздное небо, карточки, текст - остаётся на любой
   ступени. Ступень отвечает на вопрос «чем пожертвовать ради
   кадров», а не «что выключить». */
html[data-degrade="1"] .rc-pkt-layer,
html[data-degrade="1"] .sep-line i { display: none; }
html[data-degrade="2"] .card,
html[data-degrade="2"] .viz-card,
html[data-degrade="2"] .dc,
html[data-degrade="2"] .hdr {
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
html[data-degrade="2"] .float-3d { animation: none; box-shadow: var(--shadow); }
/* Наклоны и сдвиги карточек - самое дорогое из оставшегося: каждый
   такой слой браузер держит отдельно и пересобирает на прокрутке. */
html[data-degrade="3"] .card,
html[data-degrade="3"] .viz-card,
html[data-degrade="3"] .dc { rotate: 0deg !important; translate: 0 !important; }
/* Здесь стояло «html[data-degrade="3"] #spaceBg { opacity: .35 }».
   Правило убрано: приглушённое небо не экономит ни одного кадра -
   холст того же размера рисуется и накладывается ровно так же, -
   зато на слабом устройстве, где ступень как раз и включается,
   звёзды пропадали почти целиком. Ровно та жалоба, с которой
   пришёл заказчик: «планета и всё исчезает». Кадры на третьей
   ступени экономят rc-space (меньше звёзд и метеоров) и rc-world
   (мир на треть силы) - там это настоящая работа, а не яркость. */

/* ── Быстрая прокрутка: мелочь не рисуем ─────────────────── */
html.rc-fast .rc-pkt-layer { display: none; }
html.rc-fast .card,
html.rc-fast .viz-card,
html.rc-fast .dc,
html.rc-fast .prod-card { transition: none !important; rotate: 0deg !important; }
html.rc-hyper #rocketCanvas { filter: blur(1.5px); }


/* Motion-safe 3D: preference calms repetition, never removes the
   rocket, cockpit, world or flight controls. */
html.rc-calm-motion .rc-pkt-layer,
html.rc-calm-motion .sep-line i { display: none; }
html.rc-calm-motion .float-3d { animation-duration: 12s !important; }
html.rc-calm-motion #rocketCanvas,
html.rc-calm-motion .rc-flight,
html.rc-calm-motion .rc-cockpit { visibility: visible !important; }

/* True no-WebGL fallback: retain a moving physical cockpit instead
   of the blank egress frame. It is a background only; the real CTA
   and legal links remain ordinary accessible HTML above it. */
html.rc-reduced.rc-no-webgl #epilogue {
  position: relative;
  overflow: hidden;
  background: #050c15;
}
html.rc-reduced.rc-no-webgl #epilogue > .rc-fallback-flight {
  display: block !important;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  pointer-events: none;
  z-index: 0;
  opacity: .9;
}
html.rc-reduced.rc-no-webgl #epilogue > .wrap {
  position: relative;
  z-index: 2;
  opacity: 1 !important;
  visibility: visible !important;
}

/* No-WebGL is a hardware exception, not a cheap static version.
   The same eight film plates become full-width moving scene windows:
   no card border, no pasted-photo radius and no black 34% fade. Only
   the plate currently near the viewport is animated. */
html.rc-reduced.rc-no-webgl .rc-frame {
  position: relative;
  width: 100%;
  max-width: none;
  height: clamp(280px, 43vw, 620px);
  margin: 0 0 clamp(34px, 5vw, 76px);
  border: 0;
  border-radius: 0;
  overflow: hidden;
  isolation: isolate;
  background: #071321;
  box-shadow: 0 24px 90px -52px rgba(68, 221, 255, .62);
}
html.rc-reduced.rc-no-webgl .rc-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 48%;
  transform: translate3d(-1.2%, 0, 0) scale(1.045);
  filter: saturate(1.09) contrast(1.08) brightness(1.06);
  will-change: transform;
  animation-name: rc-fallback-drift !important;
  animation-duration: 18s !important;
  animation-timing-function: ease-in-out !important;
  animation-iteration-count: infinite !important;
  animation-direction: alternate !important;
  animation-play-state: paused !important;
}
html.rc-reduced.rc-no-webgl .rc-frame.rc-live img {
  animation-play-state: running !important;
}
html.rc-reduced.rc-no-webgl .rc-frame::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  z-index: 2;
  background: linear-gradient(90deg, transparent 3%, rgba(83, 230, 255, .62) 28%, rgba(191, 121, 255, .48) 72%, transparent 97%);
  box-shadow: 0 0 24px rgba(67, 219, 255, .34);
  pointer-events: none;
}
html.rc-reduced.rc-no-webgl .rc-frame::after {
  inset: auto 0 0;
  height: 14%;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--bg) 72%, transparent));
}
html.rc-reduced.rc-no-webgl .rc-frame-04 img,
html.rc-reduced.rc-no-webgl .rc-frame-05 img {
  filter: saturate(1.18) contrast(1.1) brightness(1.15);
}
@keyframes rc-fallback-drift {
  0% { transform: translate3d(-1.2%, 0, 0) scale(1.045); }
  55% { transform: translate3d(.4%, -.45%, 0) scale(1.07); }
  100% { transform: translate3d(1.25%, .25%, 0) scale(1.055); }
}
@media (max-width: 680px) {
  html.rc-reduced.rc-no-webgl .rc-frame {
    height: clamp(220px, 71vw, 350px);
    margin-bottom: clamp(26px, 8vw, 48px);
  }
  html.rc-reduced.rc-no-webgl .rc-frame img { object-position: 50% 50%; }
  html.rc-reduced.rc-no-webgl .rc-frame-01 img,
  html.rc-reduced.rc-no-webgl .rc-frame-02 img,
  html.rc-reduced.rc-no-webgl .rc-frame-07 img { object-position: 58% 50%; }
}
