/* ============================================================
   1xBit — 2026 Bolide Landing
   ============================================================ */

@font-face {
  font-family: 'D-DIN Condensed';
  src: url('../fonts/D-DINCondensed-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'D-DIN Condensed';
  src: url('../fonts/D-DINCondensed.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'D-DIN Condensed', 'Arial Narrow', Arial, sans-serif;
}

/* ============================================================
   РАСКЛАДКА
   ============================================================ */

.landing {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  background-image: url('../img/bg.webp');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display: flex;
  align-items: stretch;
}

/* ============================================================
   ЛЕВАЯ ЧАСТЬ
   ============================================================ */

.left {
  flex: 1;
  position: relative;
  padding-left: 160px;
  padding-top: 60px;
  display: flex;
  flex-direction: column;
}

.logo {
  display: inline-block;
  line-height: 0;
}

.logo img {
  width: 148px;
  height: auto;
  display: block;
}

/* ============================================================
   ЗАГОЛОВОК
   ============================================================ */

.headline {
  margin-top: 40px;
}

.title-main {
  font-family: 'D-DIN Condensed', 'Arial Narrow', Arial, sans-serif;
  font-weight: 700;
  font-size: 191px;
  line-height: 85%;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #fff;
}

.title-line {
  display: block;
}

.title-line--top {
  white-space: nowrap;
}

.title-bottom-row {
  display: flex;
  align-items: flex-end;
  gap: 20px;
}

.title-line--bottom {
  display: block;
  white-space: nowrap;
}

.title-sub {
  font-family: 'D-DIN Condensed', 'Arial Narrow', Arial, sans-serif;
  font-weight: 700;
  font-size: 82px;
  line-height: 94%;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #fff;
  padding-bottom: 6px;
}

/* ============================================================
   ПРАВАЯ ЧАСТЬ
   ============================================================ */

.right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 160px;
}

.form-container {
  position: relative;
  width: 348px;
  box-sizing: content-box;
  height: 618px;
  background-image: url('../img/form_bg.webp');
  background-size: 388px 618px;
  background-repeat: no-repeat;
  background-position: top center;
  display: flex;
  flex-direction: column;
  padding: 24px 20px 0;
}

/* ============================================================
   ADAPTIVE
   ============================================================ */

@media (max-width: 1740px) {
  .left {
    padding-left: 40px;
  }

  .right {
    padding-right: 40px;
  }
}

@media (max-width: 1480px) {
  .logo img {
    width: 102px;
  }

  .title-main {
    font-size: 155px;
  }

  .title-bottom-row {
    gap: 18px;
  }

  .title-sub {
    font-size: 66px;
    padding-bottom: 3px;
  }
}

@media (max-width: 1300px) {
  .left {
    padding-left: 22px;
  }

  .right {
    padding-right: 22px;
  }

  .headline {
    margin-top: 30px;
  }

  .title-main {
    font-size: 110px;
  }

  .title-bottom-row {
    gap: 14px;
  }

  .title-sub {
    font-size: 46px;
    padding-bottom: 2px;
  }
}

@media (max-width: 1024px) {
  html,
  body {
    overflow: auto;
    height: auto;
  }

  .landing {
    background-image: url('../img/bg2.webp');
    height: auto;
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
  }

  .left {
    width: 100%;
    padding-left: 0;
    padding-top: 40px;
    align-items: center;
  }

  .logo {
    display: flex;
    justify-content: center;
  }

  .logo img {
    width: 120px;
  }

  .headline {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .title-main {
    font-size: 128px;
    line-height: 85%;
    text-align: center;
  }

  .title-line--top {
    white-space: normal;
  }

  .title-bottom-row {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 16px;
    margin-left: -40px; /* двигает только нижнюю связку */
  }

  .title-line--bottom {
    white-space: normal;
  }

  .title-sub {
    font-size: 55px;
    padding-bottom: 3px;
    text-align: left;
  }

  .right {
    width: 100%;
    justify-content: center;
    padding-right: 0;
    padding-top: 120px;
    padding-bottom: 40px;
  }
    .form-container {
    width: 348px;
    height: 578px;
    background-size: 388px 570px;
  }
}

@media (max-width: 768px) {
  .logo img {
    width: 92px;
  }
  .landing {
    background-image: url('../img/bg3.webp');
  }
  .title-main {
    font-size: 64px;
  }
  .title-sub {
    font-size: 27px;
    padding-bottom: 1px;
  }
  .title-bottom-row {
    gap: 6px;
    margin-left: -10px;
  }

  .form-container {
    width: 296px;
    height: 540px;
    background-size: 316px 540px;
    padding: 12px 10px 0;
  }

  .right {
    padding-top: 200px;
   }
}
/* ============================================================
   СЛОИ СЦЕНЫ (болид + карта)
   ============================================================ */

/* Карта трассы — нижний слой */
.scene-track {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1920px;
  max-width: none;
  height: auto;
  z-index: 1;
  will-change: transform;
  pointer-events: none;
}

/* Болид — поверх карты, масштабируется с высотой */
.scene-car {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(calc(-50% - 60px));
  width: auto;
  height: 72vh;
  max-height: 612px;
  max-width: none;
  z-index: 2;
  will-change: transform;
  pointer-events: none;
}

/* Текст и форма поверх всей сцены */
.left,
.right {
  position: relative;
  z-index: 10;
}

/* ============================================================
   ПАРАЛЛАКС — фон через псевдоэлемент (десктоп + планшет)
   ============================================================ */

/* Убираем фон с самого .landing — переносим в ::before */
.landing {
  background-image: none !important;
  overflow: hidden;
}

.landing::before {
  content: '';
  position: absolute;
  inset: -5%;  /* запас для параллакса — белых краёв нет */
  background-image: url('../img/bg.webp');
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  z-index: 0;
  will-change: transform;
  transform: translate(var(--px, 0px), var(--py, 0px));
}

/* Планшет — свой фон */
@media (max-width: 1024px) {
  .landing::before {
    background-image: url('../img/bg2.webp');
  }

  .scene-car {
    height: 44vh;
    max-height: 420px;
    transform: translateX(-50%);
    bottom: 10%;
  }

  .scene-track {
    width: 100%;
  }
}

/* Мобилка — параллакс и слои отключены, фон как был */
@media (max-width: 768px) {
  .landing::before {
    display: none;
  }

  .landing {
    background-image: url('../img/bg3.webp') !important;
    background-size: cover !important;
    background-position: center bottom !important;
  }

  .scene-car,
  .scene-track {
    display: none;
  }
}

/* ============================================================
   CANVAS — частицы/искры
   ============================================================ */

#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

/* ============================================================
   REVEAL-АНИМАЦИЯ при загрузке
   ============================================================ */

.landing {
  animation: revealLanding 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes revealLanding {
  from { opacity: 0; transform: scale(1.03); }
  to   { opacity: 1; transform: scale(1); }
}

.logo {
  animation: slideUpFade 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.headline {
  animation: slideUpFade 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}

.right {
  animation: slideUpFade 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.7s both;
}

@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}