/* Concept B Animated — живое поле.
   Анимации: transform / opacity / box-shadow / background-position.
   Сетка и ореол реагируют на курсор. */

.theme-cb-anim {
  --bn-ink: #0B263A;
  --bn-muted: #3d5a73;
  overflow-x: clip;
}

html:has(.theme-cb-anim) {
  overflow-x: clip;
}

.theme-cb-anim [id] {
  scroll-margin-top: calc(var(--studio-bar-h) + var(--header-h) + 12px);
}

.theme-cb-anim .bn-header.site-header--dark {
  background: rgba(7, 24, 40, 0.9);
}

.theme-cb-anim .cb-stack > * {
  transition: opacity 0.28s ease, visibility 0s linear 0.28s;
}
.theme-cb-anim .cb-stack > *.is-on {
  z-index: 1;
  transition: opacity 0.28s ease, visibility 0s;
}

body.has-studio-bar.theme-cb-anim .bn-hero {
  position: relative;
  min-height: calc(100svh - var(--studio-bar-h));
  padding-top: calc(var(--studio-bar-h) + var(--header-h) + 36px);
  padding-bottom: 56px;
  overflow: hidden;
}

.bn-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.bn-grid-shift {
  position: absolute;
  inset: -24px;
  will-change: transform;
}

.bn-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(125, 211, 252, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: bn-grid 32s linear infinite;
}

.bn-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
}

.bn-orb--a {
  width: 300px;
  height: 300px;
  left: 6%;
  top: 12%;
  background: rgba(125, 211, 252, 0.16);
  animation: bn-orb-a 16s ease-in-out infinite;
}

.bn-orb--b {
  width: 240px;
  height: 240px;
  right: 10%;
  bottom: 8%;
  background: rgba(91, 184, 232, 0.12);
  animation: bn-orb-b 20s ease-in-out infinite;
}

.bn-glow {
  position: absolute;
  width: 440px;
  height: 440px;
  left: 0;
  top: 0;
  margin: -220px 0 0 -220px;
  background: radial-gradient(circle, rgba(125, 211, 252, 0.2) 0%, transparent 68%);
  transform: translate3d(var(--px, 50%), var(--py, 40%), 0);
  will-change: transform;
}

.bn-spark {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cin-glow);
  left: calc(10% + var(--i) * 14%);
  top: calc(18% + var(--i) * 9%);
  opacity: 0.35;
  animation: bn-spark 6s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.7s);
}

.bn-hero__layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.theme-cb-anim .bn-hero .section__eyebrow { color: var(--cin-glow); }
.theme-cb-anim .bn-hero .hero__title { color: #fff; }
.theme-cb-anim .bn-hero .section__lead {
  color: rgba(255, 255, 255, 0.78);
}

.bn-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--cin-text-muted-on-dark);
}

.bn-stats strong {
  color: var(--cin-glow);
  font-size: 20px;
}

.bn-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--cin-glow);
  animation: bn-dot 2.2s ease-in-out infinite;
}

.bn-stats li:nth-child(2) .bn-dot { animation-delay: 0.4s; }
.bn-stats li:nth-child(3) .bn-dot { animation-delay: 0.8s; }

.bn-frame {
  position: relative;
  margin: 0;
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.35);
  background: rgba(0, 0, 0, 0.35);
  animation: bn-frame 5s ease-in-out infinite;
}

.bn-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  will-change: transform;
  transition: transform 0.35s ease;
}

.theme-cb-anim .bn-video .section__title { color: #fff; }
.theme-cb-anim .bn-video .section__eyebrow { color: var(--cin-glow); }

.bn-tape {
  position: relative;
  overflow: hidden;
}

.bn-scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 22%;
  background: linear-gradient(transparent, rgba(125, 211, 252, 0.14), transparent);
  animation: bn-scan 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.bn-tape:hover .bn-scan {
  animation-duration: 1.4s;
}

.bn-choose {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.bn-choose__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bn-node {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(125, 211, 252, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: var(--cin-text-muted-on-dark);
  text-align: left;
  font: 600 13px/1.35 var(--font-body);
  cursor: pointer;
  overflow-wrap: break-word;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.bn-node span {
  flex: none;
  font-family: var(--font-code, monospace);
  color: var(--cin-glow);
}

.bn-node:hover {
  transform: translate3d(4px, 0, 0);
  color: #fff;
}

.bn-node.is-on {
  border-color: var(--cin-glow);
  color: #fff;
  background: rgba(125, 211, 252, 0.12);
  transform: none;
  box-shadow: inset 3px 0 0 var(--cin-glow);
}

.bn-choose__stage { display: grid; }

.bn-node-panel {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  padding: 24px;
  border: 1px solid rgba(125, 211, 252, 0.2);
  background: rgba(255, 255, 255, 0.04);
  overflow-wrap: break-word;
}

.bn-node-panel.is-on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.bn-node-panel .choose-card__title { color: #fff; }
.bn-node-panel li { color: var(--cin-text-muted-on-dark); }
.bn-node-panel .choose-card__link { color: var(--cin-glow); }

.bn-channels__tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.bn-channels__tabs button {
  position: relative;
  overflow: hidden;
  padding: 12px 14px;
  border: 1px solid rgba(125, 211, 252, 0.2);
  background: var(--cin-bg-dark);
  color: var(--cin-text-muted-on-dark);
  text-align: left;
  font: 600 13px/1.3 var(--font-body);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.bn-channels__tabs button.is-on {
  border-color: var(--cin-glow);
  color: #fff;
  background: rgba(125, 211, 252, 0.12);
}

.bn-ripple {
  position: absolute;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: rgba(125, 211, 252, 0.4);
  pointer-events: none;
  animation: bn-ripple 0.5s ease-out forwards;
}

.bn-channels__view {
  border: 1px solid rgba(125, 211, 252, 0.2);
  overflow: hidden;
  background: #fff;
}

.bn-channels__view figure { margin: 0; }

.bn-channels__view img {
  display: block;
  width: 100%;
  max-height: 440px;
  object-fit: contain;
}

.bn-channels__view figcaption {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--cin-text-muted-on-dark);
  background: var(--cin-bg-deep);
}

.bn-migrate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

.bn-migrate figure {
  margin: 0;
  border: 1px solid rgba(125, 211, 252, 0.25);
  overflow: hidden;
}

.bn-migrate img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.bn-pipe {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  font-family: var(--font-code, monospace);
  letter-spacing: 0.08em;
  color: var(--cin-glow);
}

.bn-pipe i {
  display: block;
  width: 72px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cin-glow), transparent);
  background-size: 36px 100%;
  animation: bn-flow 1.1s linear infinite;
}

.bn-pipe:hover i { animation-duration: 0.45s; }

.theme-cb-anim .cinematic-inject .section__title { color: var(--bn-ink); }
.theme-cb-anim .cinematic-inject .section--dark .section__title,
.theme-cb-anim .cinematic-inject .on-dark .section__title { color: #fff; }

.theme-cb-anim .industries-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.theme-cb-anim .advantages-grid,
.theme-cb-anim .ops-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@keyframes bn-grid {
  from { background-position: 0 0; }
  to { background-position: 48px 48px; }
}

@keyframes bn-orb-a {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(36px, 22px, 0); }
}

@keyframes bn-orb-b {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-28px, -18px, 0); }
}

@keyframes bn-spark {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.22; }
  50% { transform: translate3d(10px, -14px, 0) scale(1.35); opacity: 0.7; }
}

@keyframes bn-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.45); opacity: 0.55; }
}

@keyframes bn-frame {
  0%, 100% { box-shadow: 0 0 0 0 rgba(125, 211, 252, 0); }
  50% { box-shadow: 0 0 28px 2px rgba(125, 211, 252, 0.18); }
}

@keyframes bn-scan {
  from { transform: translate3d(0, -120%, 0); }
  to { transform: translate3d(0, 480%, 0); }
}

@keyframes bn-flow {
  from { background-position: -36px 0; }
  to { background-position: 36px 0; }
}

@keyframes bn-ripple {
  to { transform: scale(18); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .bn-grid,
  .bn-orb,
  .bn-spark,
  .bn-dot,
  .bn-frame,
  .bn-scan,
  .bn-pipe i { animation: none; }
  .bn-glow { display: none; }
}

@media (max-width: 1200px) {
  .theme-cb-anim .industries-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .bn-hero__layout,
  .bn-choose,
  .bn-migrate { grid-template-columns: 1fr; }
}
