@import url('fonts.css');

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden; /* Предотвращаем любые скроллы */
}

.video-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh; /* Учет динамического бар-меню в мобильном Safari/Chrome */
  z-index: -1;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

#bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.content-wrapper {
  position: fixed; 
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 10; 
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  padding: calc(env(safe-area-inset-top, 0px) + 20px) 16px calc(env(safe-area-inset-bottom, 0px) + 40px) 16px;
}

.center-text {
  position: absolute;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;

  color: #FCFCFC;
  font-family: 'Helvetica Neue Cond', sans-serif;
  font-weight: 700;
  
  /* Fluid typography: плавно масштабируется от 32px до 180px в зависимости от ширины экрана */
  font-size: clamp(32px, 11vw, 180px);
  line-height: 0.85;
  letter-spacing: -0.04em;
  text-align: center;
  width: 100%;
  max-width: 100vw;
  
  margin: 0 !important; 
  padding: 0 10px !important;
  box-sizing: border-box;
  
  user-select: none !important;
  -webkit-user-select: none !important; 
  -moz-user-select: none !important;    
  -ms-user-select: none !important;     
  pointer-events: none !important; 
}

.tech-text {
  position: absolute;
  top: 88% !important; 
  left: 50% !important;
  transform: translate(-50%, -50%) !important;

  color: #FCFCFC;
  font-family: 'Times New Roman', monospace;
  font-weight: 500;
  
  /* Fluid typography: масштабируется от 13px на мобилках до 26px на десктопе */
  font-size: clamp(13px, 2.2vw, 26px);
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-align: center;
  width: 100%;
  
  margin: 0 !important;
  padding: 0 !important;

  user-select: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  pointer-events: none !important;
}

/* Планшеты (Portrait & Landscape) */
@media (max-width: 1024px) {
  .center-text {
    font-size: clamp(48px, 10.5vw, 110px);
    letter-spacing: -0.03em;
    white-space: normal; /* Разрешаем перенос дляузких экранов, если нужно */
  }
}

/* Мобильные устройства */
@media (max-width: 768px) {
  .center-text {
    font-size: clamp(34px, 11.5vw, 64px);
    letter-spacing: -0.02em;
    line-height: 0.9;
  }

  .tech-text {
    top: 85% !important;
    font-size: clamp(12px, 3.5vw, 16px);
  }
}

/* Маленькие смартфоны (iPhone SE и т.д.) */
@media (max-width: 380px) {
  .center-text {
    font-size: 30px;
  }
  
  .tech-text {
    top: 83% !important;
    font-size: 11px;
  }
}

/* Ориентация Landscape на мобилках (когда телефон повернут боком) */
@media (max-height: 500px) and (orientation: landscape) {
  .center-text {
    font-size: clamp(28px, 6vh, 48px);
  }
  .tech-text {
    top: 90% !important;
    font-size: 11px;
  }
}