/* General settings*/

:root {
  --background-color: #1b1917;
  --color-white: rgb(255, 255, 255);
  --color-black: #1b1917;
  --color-dark-gray: #423e3a;
}

html {
  box-sizing: border-box;
  scroll-behavior: smooth;
  overflow-x: hidden;
  overscroll-behavior: none;
}

*,
*::after,
*::before {
  box-sizing: inherit;
}

h1,
h2 {
  font-family: "Russo One", sans-serif;
  font-weight: 400; /* у Russo One только одно начертание */
  text-transform: uppercase; /* плакатный стиль — все заглавные */
  letter-spacing: 0.02em; /* лёгкая разрядка для крупных кеглей */
}

body {
  font-family: "DM Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-size: 16px;
  line-height: 1.4;
  color: #1b1917;
  background-color: #f5f1eb;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  display: inline-block;
  background-color: transparent;
  padding: 0;
  border: none;
  font-family: inherit;
  color: inherit;
}

ul,
li {
  list-style-type: none;
}

.container {
  max-width: 1300px;
  padding: 0 10px;
  margin: 0 auto;
}

.hover-btn {
  position: relative;
  display: inline-block;
  transition: opacity 0.3s ease;
  overflow: hidden;
}

.hover-btn span {
  display: block;
  transition: transform 0.4s ease;
}

.hover-btn::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-110%);
  transition: transform 0.4s ease;
}

.hover-btn:hover span {
  transform: translateY(110%);
}

.hover-btn:hover::after {
  transform: translateY(0);
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #c2551e;
  color: #fff;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 10000;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/*Header*/

.header {
  position: static;
}

.header__wrapper {
  position: fixed;
  inset: 0;
  z-index: 1;
}

.header__wrapper-inner {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin-top: 0;
}

.header__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* заполняет экран без искажений */
  z-index: 0;
}

.header__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;

  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    /* верх — прозрачный */ rgba(0, 0, 0, 0) 40%,
    /* держим светлым до 40% */ rgba(0, 0, 0, 0.8) 70%,
    /* к 70% темнее */ rgba(0, 0, 0, 1) 100% /* до низа — полностью чёрный */
  );
}

/* Видео и оверлей остаются на месте */
.header__video,
.header__overlay {
  position: absolute;
  inset: 0;
}

.header .container {
  position: relative;
  z-index: 2;
  will-change: transform; /* для плавности */
}

.header__wrapper-top,
.header__wrapper-about {
  margin-top: 20px;
}

.header__top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  margin-top: 20px;
  margin-left: 95px;
  transition: transform 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 40px;
  background-color: var(--background-color);
  color: var(--color-white);
  border-radius: 2px;
  padding: 12px 20px;
  max-width: fit-content;
  animation: menu-drop 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.3s backwards;
}

.header__logo img {
  width: 50px;
}

.header__top.hidden {
  transform: translateY(-140%);
}

.menu__list {
  display: flex;
  align-items: center;
  gap: 20px;
}

.menu__link {
  color: var(--color-white);
  font-size: 14px;
  font-weight: 400;
  line-height: 23px;
}

.header__title {
  min-height: 80vh;
  display: flex;
}

.header__title h1 {
  display: flex;
  flex-direction: column;
  align-self: flex-end;
  padding-bottom: 100px;
  font-size: 80px;
  font-weight: 300;
  color: var(--color-white);
  line-height: 88px;
}

.header__title::after {
  content: "";
  position: absolute;
  bottom: -80px;
  width: 1300px;
  height: 1px;
  opacity: 0.5;
  background-color: #fff;
  transform: scaleX(0);
  transform-origin: left;
  animation: line-grow 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.header__line {
  display: block;
  overflow: hidden;
}

.header__line:nth-child(3) {
  font-weight: 700;
}

.header__line-inner {
  display: block;
  animation: line-up 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.highlight-desc {
  position: relative;
  display: flex;
  align-items: center;
  background-color: rgb(228, 224, 217);
  border-radius: 2px;
  padding: 8px 25px;
  max-width: fit-content;
}

.highlight-desc::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 8px;
  width: 10px;
  height: 10px;
  border-radius: 100%;
  background-color: red;
  animation: pulse 2s ease-in-out infinite;
}

/*Footer*/

.footer {
  padding: 100px 0;
  position: relative;
  background-color: var(--background-color);
  z-index: 2;
  color: #fff;
}

.footer__wrapper {
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 100px;
}

.footer__logo {
  margin-right: auto;
}

.footer__logo img {
  width: 200px;
}

.footer__social li {
  margin-bottom: 15px;
}

.footer__social li:first-child {
  margin-bottom: 20px;
}

.footer__social li:last-child {
  margin-bottom: 0px;
}

.footer__nav li {
  margin-bottom: 10px;
}

.footer__nav li:first-child {
  margin-bottom: 20px;
}

.footer__nav li:last-child {
  margin-bottom: 0px;
}

.footer__contacts li {
  margin-bottom: 15px;
}

.footer__social-link {
  display: flex;
  gap: 10px;
  line-height: 1.16;
}

.footer__nav-title,
.footer__social-title {
  font-weight: 600;
  line-height: 23px;
}

/*Animation*/

.header__line:nth-child(1) .header__line-inner {
  animation-delay: 0.6s;
}
.header__line:nth-child(2) .header__line-inner {
  animation-delay: 0.8s;
}
.header__line:nth-child(3) .header__line-inner {
  animation-delay: 1s;
}

@keyframes line-up {
  from {
    transform: translateY(110%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes line-grow {
  to {
    transform: scaleX(1);
  }
}

@supports (animation-timeline: view()) {
  .about__heading h2 {
    animation: rise 1s both;
    animation-timeline: view();
    animation-range: cover 20% cover 50%; /* играет, пока блок въезжает */
  }
}

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

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
    opacity: 0.6;
  }
}

.services__panels {
  --transitions: 4; /* 5 панелей = 4 «наезда» */
  view-timeline-name: --services; /* имя таймлайна */
}

.services__panel:nth-child(1) {
  --i: 0;
  --shrink: 0.85;
}
.services__panel:nth-child(2) {
  --i: 1;
  --shrink: 0.89;
}
.services__panel:nth-child(3) {
  --i: 2;
  --shrink: 0.93;
}
.services__panel:nth-child(4) {
  --i: 3;
  --shrink: 0.97;
}

.services__panel:not(:last-child) {
  --start: calc(var(--i) / var(--transitions) * 100%);
  --end: calc((var(--i) + 1) / var(--transitions) * 100%);

  animation: panel-shrink linear forwards;
  animation-timeline: --services; /* общий «часовой механизм» */
  animation-range: contain var(--start) contain var(--end); /* свой кусок */
}

@keyframes panel-shrink {
  to {
    transform: scale(var(--shrink)); /* сжимаемся */
    filter: brightness(0.6); /* и темнеем — эффект «уходит вглубь» */
  }
}

@keyframes menu-drop {
  from {
    transform: translateY(-140%);
  }
  to {
    transform: translateY(0);
  }
}

/*Adaptive*/

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  padding-top: 10px;
  gap: 5px;
  width: 40px;
  height: 40px;
  margin-left: auto;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-white);
  border-radius: 2px;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.burger__other span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-black);
  border-radius: 2px;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.burger__other.is-active span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-white);
  border-radius: 2px;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

/* бургер → крестик */
.burger.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.burger.is-active span:nth-child(2) {
  opacity: 0;
}
.burger.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99;
  background-color: var(--background-color);
  padding: 90px 20px 40px;
  transform: translateY(-100%);
  visibility: hidden;
  transition:
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.4s;
}

.mobile-menu.is-open {
  transform: translateY(0); /* выезжает сверху */
  visibility: visible;
  height: 100vh;
}

.mobile-menu__list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mobile-menu__link {
  color: var(--color-white);
  font-size: 24px;
  font-weight: 500;
  line-height: 32px;
}

/* ссылки выезжают каскадом (красивый штрих) */
.mobile-menu__list li {
  opacity: 0;
  transform: translateY(-10px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.mobile-menu.is-open .mobile-menu__list li {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu.is-open .mobile-menu__list li:nth-child(1) {
  transition-delay: 0.1s;
}
.mobile-menu.is-open .mobile-menu__list li:nth-child(2) {
  transition-delay: 0.15s;
}
.mobile-menu.is-open .mobile-menu__list li:nth-child(3) {
  transition-delay: 0.2s;
}
.mobile-menu.is-open .mobile-menu__list li:nth-child(4) {
  transition-delay: 0.25s;
}
.mobile-menu.is-open .mobile-menu__list li:nth-child(5) {
  transition-delay: 0.3s;
}

/* ===== БАННЕР СОГЛАСИЯ НА ПД ===== */
.privacy-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(27, 25, 23, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.privacy-banner.is-visible {
  transform: translateY(0);
}

.privacy-banner[hidden] {
  display: none;
}

.privacy-banner__container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.privacy-banner__text {
  flex: 1;
}

.privacy-banner__title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #fff;
}

.privacy-banner__description {
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.9;
}

.privacy-banner__link {
  color: #c2551e;
  text-decoration: underline;
  transition: opacity 0.3s ease;
}

.privacy-banner__link:hover {
  opacity: 0.8;
}

.privacy-banner__actions {
  display: flex;
  gap: 12px;
}

.privacy-banner__accept {
  padding: 12px 32px;
  background: #c2551e;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    transform 0.3s ease;
}

.privacy-banner__accept:hover {
  background: #a8431a;
}

.privacy-banner__accept:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ===== АДАПТИВ ===== */

@media (max-width: 1200px) {
  .header__title h1 {
    font-size: 64px;
    line-height: 72px;
  }
}

@media (max-width: 992px) {
  .header__top {
    gap: 20px;
    padding: 10px 16px;
  }

  .menu__list {
    gap: 14px;
  }

  .header__title h1 {
    font-size: 52px;
    line-height: 60px;
    padding-top: 260px;
  }

  .footer__wrapper {
    flex-wrap: wrap;
    gap: 50px;
  }
}

@media (max-width: 768px) {
  .header__wrapper-top {
    margin-top: 0;
  }

  .menu__list {
    display: none;
  }

  .burger {
    position: relative;
    z-index: 9999;
    display: flex;
  }

  .header__top {
    display: none;
  }

  .header__title h1 {
    font-size: 40px;
    line-height: 48px;
    padding-top: 200px;
  }

  .header__title::after {
    bottom: -40px;
  }

  .footer__logo img {
    width: 160px;
  }
  .career__hire-img {
    display: none;
  }

  .career {
    padding: 100px 0 0 0 !important;
  }
  .privacy-banner__container {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .privacy-banner__actions {
    width: 100%;
  }

  .privacy-banner__accept {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 576px) {
  .header__title h1 {
    font-size: 32px;
    line-height: 40px;
    padding-top: 550px;
  }

  .about__wrapper {
    gap: 40px !important;
  }

  .footer__wrapper {
    flex-direction: column;
    gap: 40px;
  }
}
