/* === Подключение локального шрифта OpenSans-CondLight === */
@font-face {
  font-family: 'OpenSans-CondLight';
  src: url('../fonts/OpenSans-CondLight.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Uniwars';
  src: url('../fonts/uniwarsbl-regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: rgba(0, 0, 0, 0.930);
  color: #fff;
  font-family: "OpenSans-CondLight", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  overflow-y: scroll;
  height: 100vh;
  /* Курсор перекрестья по умолчанию */
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32'><line x1='0' y1='16' x2='32' y2='16' stroke='yellow' stroke-width='1'/><line x1='16' y1='0' x2='16' y2='32' stroke='yellow' stroke-width='1'/><circle cx='16' cy='16' r='2' fill='gray'/></svg>") 16 16, crosshair;
}

/* === 12 колонок (декоративные) === */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 60px;
  right: 60px;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
  background-image: repeating-linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0px,
    rgba(255, 255, 255, 0) calc((100% / 12) - 10px),
    transparent calc((100% / 12) - 10px),
    transparent calc(100% / 12)
  );
  background-size: 100% 100%;
  border-left: 2px solid rgba(49, 47, 47, 0.03);
  border-right: 2px solid rgba(49, 47, 47, 0.03);
}

/* === Минималистичный курсор прицел === */
.cyber-cursor {
  position: fixed;
  width: 60px;
  height: 60px;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  display: none;
}

.cyber-cursor .outer-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(251, 255, 41, 0.7);
  border-radius: 50%;
  box-sizing: border-box;
}
.cyber-cursor .inner-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  background: rgba(251, 255, 41, 0);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cyber-cursor .crosshair-h {
  position: absolute;
  top: 50%;
  left: -8px;
  width: 4px;
  height: 1px;
  background: rgb(251, 255, 41, 0.9);
  transform: translateY(-50%);
}
.cyber-cursor .crosshair-h-right {
  position: absolute;
  top: 50%;
  right: -8px;
  width: 4px;
  height: 1px;
  background: rgb(251, 255, 41, 0.9);
  transform: translateY(-50%);
}
.cyber-cursor .crosshair-v {
  position: absolute;
  left: 50%;
  top: -8px;
  width: 1px;
  height: 4px;
  background: rgb(251, 255, 41, 0.9);
  transform: translateX(-50%);
}
.cyber-cursor .crosshair-v-bottom {
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 1px;
  height: 4px;
  background: rgb(251, 255, 41, 0.9);
  transform: translateX(-50%);
}

/* === 3D Кубик === */
.cube-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform-style: preserve-3d;
  z-index: 1;
  pointer-events: none;
}

.cube {
  position: relative;
  width: 200px;
  height: 200px;
  transform-style: preserve-3d;
  transform: translate(-50%, -50%) rotateX(0deg) rotateY(0deg);
}

.cube-face {
  position: absolute;
  width: 200px;
  height: 200px;
  background: linear-gradient(45deg, #8a2be2, #4b0082);
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  color: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 30px rgba(150, 0, 255, 0.7),
              0 0 30px rgba(150, 0, 255, 0.5);
  opacity: 0.8;
}

.cube-face-front  { transform: translateZ(100px); }
.cube-face-back   { transform: rotateY(180deg) translateZ(100px); }
.cube-face-right  { transform: rotateY(90deg) translateZ(100px); }
.cube-face-left   { transform: rotateY(-90deg) translateZ(100px); }
.cube-face-top    { transform: rotateX(90deg) translateZ(100px); }
.cube-face-bottom { transform: rotateX(-90deg) translateZ(100px); }

/* === Сетка канвас 50x50 с подсветкой === */
#gridCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 2;
  display: block;
  background-color: transparent;
}

/* === Контент === */
.content {
  position: relative;
  width: 100%;
  z-index: 10;
}

.accent {
  color: rgba(255, 149, 0, 0.89);
}

/* === Анимация текста === */
.text-animated {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.text-animated.visible {
  opacity: 1;
  transform: translateY(0);
}

.typewriter {
  overflow: hidden;
  border-right: 2px solid rgba(255, 149, 0, 0.89);
  white-space: normal;
  word-wrap: break-word;
  animation: blink-caret 0.75s step-end infinite;
  opacity: 0;
}

.typewriter.animating {
  opacity: 1;
}

.typewriter.finished {
  border-right: none;
}

/* === Плавное всплытие текста === */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 2.0s ease, transform 0.8s ease;
}

.fade-up.show {
  opacity: 1;
  transform: translateY(0);
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: rgba(255, 149, 0, 0.89); }
}

/* === Специальные классы для разных анимаций === */
.fade-in {
  opacity: 0;
  transition: opacity 2s ease-out;
}

.fade-in.show {
  opacity: 1;
}

/* === Управление текстами отдельно === */
.text-header {
  font-size: 1.5vw;
  text-align: center;
  margin: 60px 20px 20px;
  color: rgba(255, 149, 0, 0.826);
  font-family: 'OpenSans-CondLight', sans-serif;
}

.text-intro {
  font-size: 1.5vw;
  text-align: center;
  padding: 10px 5vw 20px;
  color: rgba(253, 216, 193, 0.628);
  font-family: 'OpenSans-CondLight', sans-serif;
}

.text-details {
  font-size: 1.5vw;
  text-align: center;
  padding: 0 5vw 60px;
  color: rgba(253, 216, 193, 0.667);
  font-family: 'OpenSans-CondLight', sans-serif;
}

/* === Герой-секция с видео и оверлеем === */
.hero-section {
  position: relative;
  width: calc(100% - 120px); /* 60px с каждой стороны */
  margin: 20px auto 0;
  max-width: 2800px; /* 1920 - 120 = 1800 */
}

/* Контейнер для видео */
.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 42.25%; /* 751/1780 ≈ 42.25% (примерное соотношение 16:9) */
  overflow: hidden;
  border-radius: 0px;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 50px;
  opacity: 0.3;
  cursor: none; /* Убираем стандартный курсор */
  border: 3px solid rgb(77, 77, 77); /* Толстая оранжевая рамка */
}

/* Контейнер для оверлея */
.hero-overlay-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0%; /* 160px/1780px ≈ 8.99% отступы со всех сторон */
  box-sizing: border-box;
  pointer-events: none; /* Позволяет событиям проходить через оверлей */
}

.hero-overlay-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  opacity: 0.5;
  cursor: none; /* Убираем стандартный курсор */
  pointer-events: auto; /* Включаем события для изображения */
}

/* === Новые текстовые блоки под видео === */
.new-video-texts {
  text-align: center;
  margin: 20px auto;
  max-width: 1200px;
  position: relative;
  z-index: 7;
}

.new-video-text-header {
  font-size: 1.5vw;
  margin: 20px 20px 10px;
  color: rgba(255, 149, 0, 0.826);
  font-family: 'OpenSans-CondLight', sans-serif;
}

.new-video-text-intro {
  font-size: 1.5vw;
  padding: 10px 5vw 20px;
  color: rgba(253, 216, 193, 0.628);
  font-family: 'OpenSans-CondLight', sans-serif;
}

/* === Сетка блоков услуг === */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 80px;
  padding: 300px 5vw;
  max-width: 2800px;
  margin: 0 auto;
}

.service-block {
  background: rgba(37, 0, 54, 0.3);
  border: 2px solid rgba(255, 149, 0, 0.3);
  padding: 30px;
  text-align: center;
  transition: all 0.3s ease;
  transform-origin: center;
}

.service-block:hover {
  border-color: rgba(255, 149, 0, 0);
  transform: scale(1.2);
}

.service-block.image-block {
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-block.image-block img {
  max-width: 100%;
  height: auto;
  border: 10px solid rgba(41, 38, 36, 0.808);
}

.service-block.text-block h3 {
  font-size: 1.2vw;
  color: rgba(255, 149, 0, 0.826);
  margin-bottom: 20px;
  font-family: 'OpenSans-CondLight', sans-serif;
  opacity: 0;
}

.service-block.text-block p {
  font-size: 0.9vw;
  color: rgba(253, 216, 193, 0.667);
  font-family: "Calibri Light", sans-serif;
  line-height: 1.6;
  opacity: 0;
}

/* === Индивидуальные стили для каждого блока === */
.block-1 {
  /* Блок №1 - Текстовый блок */
  transform: scale(1.05);
  background: rgba(46, 0, 65, 0);
  border-color: rgba(56, 54, 50, 0); /* Было 0.3 - увеличиваем до 0.8 */
  text-align: left;
}

.block-2 {
  /* Блок №2 - Блок с картинкой «Компьютер» */
  transform: scale(1.1);
  padding: 1px; /* Было 30px - увеличиваем отступы */
  background: rgba(46, 0, 65, 0);
  border-color: rgba(255, 149, 0, 0); /* Было 0.3 - увеличиваем до 0.8 */
}

.block-3 {
  /* Блок №3 - Текстовый блок */
  transform: scale(1.05);
  background: rgba(46, 0, 65, 0);
  border-color: rgba(255, 149, 0, 0); /* Было 0.3 - увеличиваем до 0.8 */
  text-align: left;
}

.block-4 {
  /* Блок №4 - Блок с картинкой «Системный блок» */
  transform: scale(1.1);
  padding: 50px; /* Было 30px - увеличиваем отступы */
  background: rgba(46, 0, 65, 0);
  border-color: rgba(255, 149, 0, 0); /* Было 0.3 - увеличиваем до 0.8 */
}

.block-5 {
  /* Блок №5 - Текстовый блок */
  transform: scale(1.05);
  background: rgba(46, 0, 65, 0);
  border-color: rgba(255, 149, 0, 0); /* Было 0.3 - увеличиваем до 0.8 */
  margin-top: 20px;    /* Отступ сверху */
}

.block-6 {
  /* Блок №6 - Блок с картинкой «Ноутбук» */
  transform: scale(1.1);
  background: rgba(46, 0, 65, 0);
  border-color: rgba(255, 149, 0, 0); /* Было 0.3 - увеличиваем до 0.8 */
}

/* === Блоки-преимущества === */
.benefits {
  padding: 80px 5vw;
  text-align: center;
  margin-top: -100px;
}

.benefits .register {
  width: 400px;
  margin: 0 auto 40px;
  padding: 20px;
  border: 4px solid rgba(62, 53, 40, 0.724);
  color: rgba(253, 216, 193, 0.667);
  font-size: 0.9vw;
  font-family: "Calibri Light", sans-serif;
  background: #250036;
}

.benefits .row {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 20px;
}

.benefits .block {
  width: 400px;
  padding: 20px;
  border: 4px solid rgba(62, 53, 40, 0.724);
  color: rgba(253, 216, 193, 0.667);
  font-size: 0.9vw;
  font-family: "Calibri Light", sans-serif;
  background: #250036;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.benefits .block.show {
  opacity: 1;
}

/* === Подвал === */
.footer {
  padding: 60px 20px;
  text-align: center;
}

.footer .logo-bg {
  width: 100%;
  max-width: 1750px;
  height: 755px;
  background: rgb(84, 0, 157, 0.451);
  margin: 60px auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer .company-name {
  font-family: "Uniwars", sans-serif;
  font-size: 5.5vw;
  color: rgba(253, 216, 193, 0.667);
  text-align: center;
  line-height: 1.2;
}

.footer .final-text {
  font-size: 0.9vw;
  font-family: "Calibri Light", sans-serif;
  color: rgba(253, 216, 193, 0.667);
  max-width: 1335px;
  margin: 40px auto 0;
  line-height: 1.4;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.footer .final-text.show {
  opacity: 1;
}

/* === Адаптивность === */
@media (max-width: 1200px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .service-block.text-block h3 {
    font-size: 2vw;
  }
  
  .service-block.text-block p {
    font-size: 1.3vw;
  }
  
  .new-video-text-header,
  .new-video-text-intro {
    font-size: 2vw;
  }
}

@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .service-block.text-block h3 {
    font-size: 3.5vw;
  }
  
  .service-block.text-block p {
    font-size: 2.5vw;
  }
  
  .new-video-text-header {
    font-size: 4vw;
  }
  
  .new-video-text-intro {
    font-size: 3.5vw;
  }
  
  .text-header { font-size: 5vw; }
  .text-intro { font-size: 3.5vw; }
  .text-details { font-size: 3vw; }
  .footer .company-name { font-size: 8vw; }
}

  /* === Кнопка "На главную" === */
.hero-section-wrapper {
  position: relative;
  width: calc(100% - 120px);
  margin: 20px auto 0;
  max-width: 2800px;
}

.back-to-main {
  display: inline-block;
  padding: 10px 15px;
  background: rgba(62, 65, 23, 0.395);
  color: hsl(61, 100%, 58%);
  text-decoration: none;
  border-radius: 0 20px 0 15px; /* Скошенные углы */
  border: 5px solid rgb(23, 23, 23);
  outline: 2px solid hsl(59, 36%, 24%); /* Второй бордюр */
  font-family: 'Calibri', sans-serif;
  font-size: 0.7vw;
  transition: all 0.3s ease;
  position: absolute;
  top: 100%;
  left: 60px;
  z-index: 10;
  transform: translateY(30px);
}

.back-to-main:hover {
  background: hsl(61, 100%, 58%);
  color: hsl(0, 0%, 0%);
  border: 5px solid rgb(23, 23, 23);
  outline: 2px solid hsl(59, 36%, 24%); /* Второй бордюр */
}

  /* Добавьте в CSS файл */
.logo-overlay-link {
  position: absolute;
  top: 10px;
  left: 100px;
  z-index: 11;
  pointer-events: auto;
}

.logo-overlay {
  width: clamp(35px, 3.3vw, 90px); /* Минимум 50px, идеально 5% ширины, максимум 100px */
  height: auto;
  opacity: 0.8;
  transition: opacity 0.3s ease;
  display: block;
}

.logo-overlay-link:hover .logo-overlay {
  opacity: 1;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
  .logo-overlay-link {
    top: 10px;
    left: 10px;
  }
  
  .logo-overlay {
    width: 60px;
  }
}

/* Адаптивность для больших экранов */
@media (min-width: 1800px) {
  .logo-overlay {
    width: 80px;
  }
}