/* Импорт шрифтов */
@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@400..900&display=swap');

@font-face {
  font-family: 'PT root UI';
  src: url('/assets/PTRootUIRegular.ttf') format('truetype');
  font-weight: 400;
}

@font-face {
  font-family: 'PT root UI';
  src: url('/assets/PTRootUIMedium.ttf') format('truetype');
  font-weight: 500;
}

/* Обнуление */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body, h1, h2, h3, h4, p, ul, ol, li,
figure, blockquote, dl, dd {
  margin: 0;
}

ul, ol {
  list-style: none;
}

img, picture, video, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input, textarea, select, button {
  font: inherit;
}

/* Переменные и базовая типографика */
:root {
  --black: #000000;
  --white: #ffffff;
  --gray: #f6f6f6;
  --dark-gray: #a9a9a9;
  --blue: #007AFF;

  font-size: 1em;
  line-height: 1.3em;

  font-family: 'PT root UI', 'Golos Text', Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--white);
}

/* Типографика */
h1, h2, h3, p {
  color: var(--black);
  max-width: 900px;
}

h1, h2, h3 {
  font-weight: 500;
  line-height: 0.9em;
}

h1 {
  font-size: 4em;
  letter-spacing: -0.05em;
}

h2 {
  font-size: 2.5em;
  line-height: 1em;
  max-width: 960px;
  letter-spacing: -0.05em;
}

h3, .inline-heading {
  font-weight: 500;
  font-size: 1.375em;
  line-height: 1.3;
}

p {
  font-size: 1.125em;
  line-height: 1.3;
}

a {
  color: var(--black);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--dark-gray);
  text-underline-offset: .175em;
}

a:hover {
  text-decoration-color: var(--black);
}

/* Отступы между элементами */
p + p   { margin-top: 0.3125em; }
h1 + p  { margin-top: 1.25em; }
h2 + p  { margin-top: 0.9375em; }

/* Текстовые утилиты */
.lead {
  font-size: 1.375em;
  letter-spacing: -0.03em;
  font-weight: 500;
}

.caption {
  color: var(--dark-gray);
}

.factoid-number {
  font-size: 6em;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--blue);
}

.factoid-number + p {
  margin-top: 0.625em;
  width: 0;
  min-width: 100%;
}

.light-background {
  color: var(--black) !important; 
}

/* Лейаут */
.layoutContainer {
  max-width: 1480px;
  margin-left: max(40px, calc((100vw - 1480px) / 2));
  margin-right: max(40px, calc((100vw - 1480px) / 2));
}

.block {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 40px;
  row-gap: 40px;
  margin-top: 200px;
}

.block:first-child {
  margin-top: 200px;
}

.hero-wrapper + .block {
  margin-top: 100px;
}

.hero-wrapper {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.hero-wrapper spline-viewer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero {
  margin-top: 0;
  position: relative;
  z-index: 1;
  min-height: 100vh;
  align-content: end;
  padding-bottom: 60px;
  color: var(--white);
}

.hero h1, .hero p {
  color: var(--white);
}

/* Ширина элемента в колонках */
.w-1 { grid-column: span 1; }
.w-2 { grid-column: span 2; }
.w-3 { grid-column: span 3; }
.w-4 { grid-column: span 4; }

/* Старт с определённой колонки */
.from-1 { grid-column-start: 1; }
.from-2 { grid-column-start: 2; }
.from-3 { grid-column-start: 3; }
.from-4 { grid-column-start: 4; }

/* Выравнивание по вертикали */
.align-top    { align-self: start; }
.align-middle { align-self: center; }
.align-bottom { align-self: end; }

/* Выравнивание по горизонтали */
.align-left   { justify-self: start; }
.align-center { justify-self: center; }
.align-right  { justify-self: end; }

.two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.four-col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

img {
  width: 100%;
}

/* Шапка */
header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: transparent;
}

.logo {
  fill: var(--black);
}

header a {
  color: var(--black);
  text-decoration-color: transparent;
}

nav a {
  text-decoration-style: dotted;
}

a.selected {
  pointer-events: none;
  color: var(--dark-gray);
  text-decoration: none;
}

/* Хедер поверх хироу */
header.on-hero {
  background: transparent;
}

header.on-hero .logo {
  fill: var(--white);
}

header.on-hero a {
  color: var(--white);
}

/* Компоненты */
.factoids {
  display: flex;
  flex-direction: row;
  gap: 40px;
  flex-wrap: wrap;
}

.factoid {
  width: fit-content;
  min-width: 300px;
}

.cards-scroll {
  display: flex;
  flex-direction: row;
  gap: 20px;
  overflow-x: scroll;
  scrollbar-width: none;
  margin-left: calc(-1 * max(40px, calc((100vw - 1480px) / 2)));
  margin-right: calc(-1 * max(40px, calc((100vw - 1480px) / 2)));
  padding-left: max(40px, calc((100vw - 1480px) / 2));
  padding-right: max(40px, calc((100vw - 1480px) / 2));
}

.cards-scroll::-webkit-scrollbar {
  display: none;
}

.card {
  width: 400px;
  height: 600px;
  flex-shrink: 0;
  background-color: var(--gray);
  padding: 30px 25px 50px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}

.card, .banner {
  color: var(--white);
}

.card h1, .card h2, .card h3, .card p,
.banner h1, .banner h2, .banner h3, .banner p {
  color: inherit;
}

.protector-icon {
  width: 60px;
  height: 60px;
}

.protector-icon + h3 {
  margin-top: 20px;
}

/* Карусель */
.partners-carousel {
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.carousel-track {
  display: flex;
  width: max-content;
  animation: scroll 10s linear infinite;
}

.partner-item {
  height: 60px;
  width: 120px;
  object-fit: contain;
  flex-shrink: 0;
  margin-right: 40px;
}

/* Баннер */
.banner {
  position: relative;
  width: 100%;
  height: 80vh;
  max-height: 800px;
  overflow: hidden;
  background: #000;

  display: flex;
  padding: 50px 40px;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
}

.banner video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.banner h2, .banner p {
  position: relative;
  z-index: 1;
  color: inherit;
  max-width: 600px;
}

.banner button {
  position: relative;
  z-index: 1;
  width: 200px;
  height: 40px;
  background-color: var(--black);
  color: var(--white);
  border: none;
  cursor: pointer;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Футер */
footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 200px;
  margin-bottom: 100px;
  padding-top: 40px;
}

.company-info p,
.socials p {
  margin-bottom: 0.5rem;
}

/* ============================================
   Страница контактов — contact.html
   ============================================ */

.contact-form {
  max-width: 900px;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-field + .contact-field {
  margin-top: 20px;
}

.contact-form input,
.contact-form textarea {
  background-color: var(--gray);
  border: none;
  border-radius: 0;
  width: 100%;
  padding: 0 15px;
  height: 50px;
}

.contact-form textarea {
  height: 160px;
  padding: 15px;
  resize: vertical;
}

.contact-form button {
  margin-top: 60px;
  width: 200px;
  height: 40px;
  background-color: var(--black);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.contact-form button:disabled {
  background-color: var(--gray);
  color: var(--dark-gray);
  cursor: default;
}

.hidden {
  display: none;
}

/* ============================================ */

@media (width <= 960px) {
  /* Отступы контейнера */
  .layoutContainer {
    margin-left: 20px;
    margin-right: 20px;
  }

  /* Типографика */
  h1 {
    font-size: 2.5em;
  }

  h2 {
    font-size: 1.875em;
  }

  .factoid-number {
    font-size: 3.5em;
  }

  /* Сетка */
  .block {
    grid-template-columns: 1fr;
    margin-top: 80px;
    row-gap: 0;
  }

  .hero {
    margin-top: 0;
  }

  .w-1, .w-2, .w-3, .w-4 {
    grid-column: span 1;
  }

  .from-1, .from-2, .from-3, .from-4 {
    grid-column-start: 1;
  }

  /* Отступы между элементами внутри блока */
  .block > * + * {
    margin-top: 40px;
  }

  /* Шапка */
  header {
    height: auto;
    flex-wrap: wrap;
    padding: 20px 0;
    gap: 12px;
  }

  /* Баннер */
  .banner {
    height: 70vh;
    padding: 24px 20px;
  }

  /* Фактоиды */
  .factoid {
    min-width: 160px;
  }

  /* Карточки и скролл */
  .cards-scroll {
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
  }

  /* Карточки */
  .card {
    width: 300px;
    height: 450px;
  }

  /* Футер */
  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
    margin-top: 80px;
  }
}


/* До лучших времен */
/* Залипающая кнопка */
/* .sticky-shaft {
  position: absolute;
  left: 6%;
  bottom: 150px;/* где остановится */
  /* top: 0;
  pointer-events: none;
} */

/* .sticky-content {
  background-color: var(--white);
  color: var(--black);
  position: sticky;
  top: calc(100vh - 100px); /*Дефолтное положение*/
  /* pointer-events: auto; */

/* .sticky-caption{
  position: absolute;
  bottom: -60px;
} */

/* button{
  width: 300px;
  height: 50px;
  border-radius: 0px;
  background-color: var(--gray);
  position: fixed;
  border: 0px;
  cursor: pointer;
} */
