/* /technology — Annexx3D fullscreen inline (режим 2), slite/1048?mov=1&color=0D0E13 */

:root {
  --cft-tech-scene-bg: #0d0e13;
  --cft-tech-text-panel: rgba(13, 14, 19, 0.82);
  --cft-tech-hero-panel: rgba(13, 14, 19, 0.42);
  --cft-tech-panel-pad-y: clamp(1.35rem, 2.1vw, 2.1rem);
  --cft-tech-panel-pad-x: clamp(1.5rem, 2.6vw, 2.6rem);
  --cft-tech-panel-radius: 0.55vw;
  --cft-tech-body-on-3d: #ffffff;
  --cft-tech-heading-on-3d: #ffffff;
  --cft-tech-muted-on-3d: rgba(255, 255, 255, 0.72);
}

html[data-canvas-fullscreen='1']:has(body[data-page='technology']),
html[data-canvas-fullscreen='1'] body[data-page='technology'] {
  background: var(--cft-tech-scene-bg);
}

body[data-page='technology'] #vp.canvasVP {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  pointer-events: none;
  z-index: 1;
  background: var(--cft-tech-scene-bg);
}

#ThreeJS.annexx-three-host,
#ThreeJS.annexx-three-host .viewer,
html[data-canvas-fullscreen='1'] body[data-page='technology'] #ThreeJS.annexx-three-host canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: var(--cft-tech-scene-bg);
}

body[data-page='technology'] .page-wrapper {
  position: relative;
  z-index: 2;
  /* ⛔ theme .page-wrapper даёт beige — перекрывает #vp (z-index 1) целиком */
  background: transparent !important;
}

/* Static hero machine → 3D scene 1048 behind text + hot dots */
body[data-page='technology'] .techonology-machine-image,
body[data-page='technology'] .techonology-machine-mask {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body[data-page='technology'] .techonology-machine-image-container {
  pointer-events: none;
}

body[data-page='technology'] .hero.dark-theme {
  background: transparent;
}

/* Ниже hero — section.dark-theme прозрачные (3D виден); футер — тёмный непрозрачный */
body[data-page='technology'] .page-wrapper > section.dark-theme {
  background: transparent !important;
}

body[data-page='technology'] .footer,
body[data-page='technology'] .footer section.dark-theme {
  background: var(--dark-blue, #0d0e13) !important;
  opacity: 1 !important;
}

/* Overlay modal — полупрозрачное затемнение как раньше */
body[data-page='technology'] .tech-overlay.is-open,
body[data-page='technology'] .tech-overlay.active {
  background: transparent;
}

body[data-page='technology'] .tech-overlay.active::before {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  background: rgba(13, 14, 19, 0.58) !important;
}

body[data-page='technology'] .tech-overlay.active .tech-overlay-content {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  /* место под fixed-крестик у низа панели */
  padding-bottom: calc(4vw + 3.5vw + 1.25rem);
}

/*
  Крестик: theme `absolute; bottom` считается от полной высоты контента —
  при коротком окне + длинном тексте × оказывается «посередине».
  Фикс: pin к низу видимой панели (viewport).
*/
body[data-page='technology'] .tech-overlay.active .tech-overlay-close {
  position: fixed !important;
  bottom: max(0.55rem, 1.4vw);
  right: max(0.55rem, 0.85vw);
  width: 2.2vw;
  height: 2.2vw;
  min-width: 32px;
  min-height: 32px;
  font-size: 1.85vw !important;
  z-index: 2147483647;
  background: rgba(23, 23, 26, 0.88);
  border-radius: 50%;
}

@media screen and (max-width: 767px) {
  body[data-page='technology'] .tech-overlay.active .tech-overlay-close {
    bottom: max(0.45rem, 2.5vw);
    right: max(0.45rem, 2vw);
    width: 9vw;
    height: 9vw;
    min-width: 32px;
    min-height: 32px;
    font-size: 6vw !important;
  }
}

body.cft-overlay-scroll-lock[data-page='technology'] {
  overflow: hidden;
}

body.cft-overlay-scroll-lock[data-page='technology'] .tech-overlay.active .tech-overlay-content {
  touch-action: pan-y;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Окошко — заголовок как раньше (×1.2 theme), абзац 14px */
body[data-page='technology'] .tech-overlay.active .tech-overlay-number {
  color: rgba(255, 255, 255, 0.72) !important;
  font-size: clamp(11px, 0.72vw, 13px);
}

body[data-page='technology'] .tech-overlay.active .tech-overlay-title {
  color: #ffffff !important;
  font-size: 2.14vw;
  line-height: 1.3;
  font-weight: 600;
}

body[data-page='technology'] .tech-overlay.active .tech-overlay-description {
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

/* Источники в описании — родной `a` (orange underline из theme), читаемо на тёмной панели */
body[data-page='technology'] .tech-overlay.active .tech-overlay-description a {
  color: var(--orange, #c8603d) !important;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  font-size: inherit;
  line-height: inherit;
}

@media screen and (max-width: 767px) {
  body[data-page='technology'] .tech-overlay.active .tech-overlay-number {
    font-size: clamp(10px, 2.8vw, 12px);
  }

  body[data-page='technology'] .tech-overlay.active .tech-overlay-title {
    font-size: 4.2vw;
  }

  body[data-page='technology'] .tech-overlay.active .tech-overlay-description {
    font-size: 14px !important;
  }
}

body[data-page='technology'] .techonology-machine-wrapper,
body[data-page='technology'] .hero-content {
  position: relative;
  z-index: 1;
}

body[data-page='technology'] .techonology-machine-wrapper {
  margin-top: 0;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

body[data-page='technology'] .techonology-machine-image-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

body[data-page='technology'] .hero.dark-theme .hero-content {
  min-height: auto;
  padding-top: 0;
  padding-bottom: 0;
}

body[data-page='technology'] .container.technology-page {
  position: relative;
  z-index: 3;
  margin-top: 0;
  padding-top: clamp(5.5rem, 9vw, 7.5rem);
}

body[data-page='technology'] .container.technology-page .center-block {
  grid-gap: clamp(1rem, 2vw, 1.75rem);
  background: var(--cft-tech-hero-panel);
}

body[data-page='technology'] .container.technology-page .center-block > h1.cft-tech-hero-h1,
body[data-page='technology'] .container.technology-page .center-block > h1.cft-tech-hero-h1 .line,
body[data-page='technology'] .container.technology-page .center-block > h1.cft-tech-hero-h1 .char {
  font-family: 'Oswald', Arial, sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.42;
}

body[data-page='technology'] .hot-dot {
  position: absolute;
  z-index: 2;
  pointer-events: auto;
  opacity: 0 !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

body[data-page='technology'] .hot-dot::before {
  display: none !important;
}

body[data-page='technology'] .hot-dot::after {
  opacity: 0 !important;
  background: transparent !important;
}

body[data-page='technology'] .hot-dot:hover,
body[data-page='technology'] .hot-dot.active {
  opacity: 0 !important;
  transform: translate(-50%, -50%);
  box-shadow: none !important;
  border-color: transparent !important;
}

@media screen and (max-width: 767px) {
  body[data-page='technology'] .container.technology-page {
    padding-top: clamp(4.75rem, 16vw, 6rem);
  }
}

/* Текст поверх 3D — тёмная подложка + padding; body — белее и крупнее */
body[data-page='technology'] .techonlogy-features .feature-content,
body[data-page='technology'] .bottom-margin .text-cta {
  background: var(--cft-tech-text-panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: var(--cft-tech-panel-pad-y) var(--cft-tech-panel-pad-x);
  border-radius: var(--cft-tech-panel-radius);
  box-sizing: border-box;
}

body[data-page='technology'] .container.technology-page .center-block {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: var(--cft-tech-panel-pad-y) var(--cft-tech-panel-pad-x);
  border-radius: var(--cft-tech-panel-radius);
  box-sizing: border-box;
}

body[data-page='technology'] .techonlogy-features .feature-content p,
body[data-page='technology'] .container.technology-page .center-block h6,
body[data-page='technology'] .bottom-margin .text-cta p {
  color: var(--cft-tech-body-on-3d) !important;
  font-size: clamp(16px, 1.15vw, 19px) !important;
  line-height: 1.65 !important;
  font-weight: 450;
}

/* CTA «Тест-драйв»: подзаголовок размером как ссылки «Зачем?» */
body[data-page='technology'][data-home-tech='1'] .bottom-margin .text-cta {
  max-width: min(42rem, 90vw);
}

body[data-page='technology'][data-home-tech='1'] .bottom-margin .text-cta p {
  font-size: clamp(15px, 1.05vw, 17px) !important;
  line-height: 1.35 !important;
  font-weight: 500;
  margin: 0;
}

body[data-page='technology'] .techonlogy-features .feature-content h2,
body[data-page='technology'] .bottom-margin .text-cta h3 {
  color: var(--cft-tech-heading-on-3d);
}

body[data-page='technology'] .techonlogy-features .feature-content .indicator,
body[data-page='technology'] .techonlogy-features .feature-content .indicator span {
  color: var(--cft-tech-muted-on-3d);
}

/*
  Home: слоты картинок в секциях — место есть, блоки прозрачные.
  Когда добавим картинки: снять opacity с `.feature-image`.
*/
body[data-page='technology'][data-home-tech='1'] .feature-image,
body[data-page='technology'][data-home-tech='1'] .feature-image .img-block,
body[data-page='technology'][data-home-tech='1'] .tech-feature-image {
  background: transparent !important;
  opacity: 0 !important;
}

body[data-page='technology'][data-home-tech='1'] .feature-image img,
body[data-page='technology'][data-home-tech='1'] .tech-feature-image img {
  opacity: 0 !important;
}

body[data-page='technology'][data-home-tech='1'] .feature-image .img-block::after,
body[data-page='technology'][data-home-tech='1'] .techonlogy-features .feature-item .img-block::after {
  opacity: 0 !important;
  background: transparent !important;
}

/*
  Окошки (#tech-overlay): блок под картинку скрыт — иначе тёмный квадрат
  (theme/overrides `background: var(--dark-blue)`). Разметка остаётся.
  Вернуть: убрать [hidden]/data-cft-overlay-img-off и это правило.
*/
body[data-page='technology'] .tech-overlay-image[hidden],
body[data-page='technology'] .tech-overlay-image[data-cft-overlay-img-off] {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}

/* «Зачем?» — кликабельные ссылки как underline-link на главной, компактнее */
body[data-page='technology'] .cft-tech-link-box {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: clamp(0.35rem, 0.8vw, 0.65rem);
  --cft-tech-link-arrow-size: 14px;
}

body[data-page='technology'] .cft-tech-feature-link.underline-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.5rem, 1.2vw, 0.85rem);
  min-height: unset;
  height: auto;
  flex: unset;
  padding: clamp(0.55rem, 0.95vw, 0.75rem) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  opacity: 0.55;
  cursor: pointer;
  position: relative;
  transition: opacity 0.3s ease;
}

body[data-page='technology'] .cft-tech-feature-link.underline-link:hover:not(.active) {
  opacity: 0.78;
}

body[data-page='technology'] .cft-tech-feature-link.underline-link.active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 0.3rem;
  border-bottom-color: rgba(255, 255, 255, 0.22);
}

body[data-page='technology'] .cft-tech-link-label {
  display: block;
  text-align: left;
  color: #ffffff !important;
  font-size: clamp(15px, 1.05vw, 17px) !important;
  line-height: 1.35 !important;
  font-weight: 500;
}

body[data-page='technology'] .cft-tech-feature-link .arrow-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 var(--cft-tech-link-arrow-size);
  width: var(--cft-tech-link-arrow-size);
  height: var(--cft-tech-link-arrow-size);
  line-height: 0;
  box-sizing: border-box;
  vertical-align: middle;
}

body[data-page='technology'] .cft-tech-feature-link.underline-link img,
body[data-page='technology'] .cft-tech-feature-link .arrow-icon img {
  display: block;
  width: var(--cft-tech-link-arrow-size) !important;
  height: var(--cft-tech-link-arrow-size) !important;
  min-width: var(--cft-tech-link-arrow-size) !important;
  min-height: var(--cft-tech-link-arrow-size) !important;
  max-width: var(--cft-tech-link-arrow-size) !important;
  max-height: var(--cft-tech-link-arrow-size) !important;
  flex-shrink: 0;
  object-fit: contain;
}

body[data-page='technology'] .cft-tech-feature-link .underline-indicator {
  display: none;
}

body[data-page='technology'].cft-tech-panel-open .cft-tech-feature-link.underline-link:not(.active) {
  opacity: 0.42;
}

@media screen and (max-width: 767px) {
  body[data-page='technology'] .cft-tech-link-label {
    font-size: clamp(14px, 3.7vw, 16px) !important;
  }

  body[data-page='technology'] .techonlogy-features .feature-content p,
  body[data-page='technology'] .container.technology-page .center-block h6,
  body[data-page='technology'] .bottom-margin .text-cta p {
    font-size: clamp(15px, 3.8vw, 17px) !important;
  }

  body[data-page='technology'] .techonlogy-features .feature-content,
  body[data-page='technology'] .container.technology-page .center-block,
  body[data-page='technology'] .bottom-margin .text-cta {
    padding: clamp(1.1rem, 4vw, 1.35rem) clamp(1.15rem, 4.5vw, 1.5rem);
  }
}
