* {
  margin: 0;
  padding: 0;
  list-style-type: none;
  box-sizing: border-box;
}

:root {
  --index: calc(1vw + 1vh);
  --color-header: #f4efec;
  --color-text: #cdc6c3;
  --gallery-gap: calc(var(--index) * 4);
}

@font-face {
  font-family: raleway-c;
  src: url(../fonts/raleway-regular.woff2);
}

@font-face {
  font-family: outfit-c;
  src: url(../fonts/outfit-regular.woff2);
}

/*will-change*/
.content,
.hero,
.main-header,
.gallery__right,
.gallery__left {
  will-change: transform;
}

.main {
  background-image: url('../img/bg.jpg');
  background-size: 50px;
  color: #fafafa;
  font-family: raleway-c;
  overflow-x: hidden;
}

.hero {
  position: absolute;
  width: calc(var(--index) * 36);
  left: 37vw;
  top: 8vh;
  z-index: -1;
}

.container {
  padding: 0 7vw;
}

.gallery {
  display: flex;
  padding: calc(var(--index) * 4) 0;
}

.gallery__right,
.gallery__left {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery__item {
  max-width: 506px;
  max-height: 285px;
  margin-bottom: var(--gallery-gap);
  border-radius: 8px;
  position: relative;
  display: inline-block;
}

.gallery__item:hover .gallery__details {
  opacity: 1;
}

.gallery__image {
  border-radius: 8px;
}

.gallery__details {
  position: absolute;
  top: 0;
  left: 0;
  width: 506px;
  height: 285px;
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.8);
  opacity: 0;
  -webkit-transition: all 0.4s;
  -o-transition: all 0.4s;
  transition: all 0.4s;
}

.gallery__text {
  text-align: center;
  padding: 40px 10px;
  font-size: 20px;
  line-height: 26px;
  font-weight: 500;
}

.gallery__buttons {
  text-align: center;
}

.gallery__icon {
  vertical-align: middle;
}

.gallery__link {
  color: inherit;
  font-family: inherit;
  text-transform: uppercase;
  padding: 7px;
  border: 1px solid var(--color-text);
  border-radius: 4px;
  text-decoration: none;
}

.gallery__left {
  margin-top: calc(var(--gallery-gap) * 1.75);
}

.gallery__right .item {
  margin: 0;
  margin-top: calc(var(--gallery-gap));
}

.text-block__title {
  position: relative;
  font-size: calc(var(--index) * 1.6);
  line-height: 1.1;
  color: var(--color-header);
  margin-bottom: 1.5rem;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
}

.gallery__link-contact {
  border: none;
  line-height: 1.75;
}

.text-block__animation {
  animation: typewriter 4s steps(50) 1s 1 normal both, textCursor 500ms steps(40) infinite normal;
}

@keyframes typewriter {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

.promo {
  margin: 30px;
}

.promo__title {
  margin-bottom: 12px;
  font-size: calc(var(--index) * 2.2);
  line-height: 1.3;
}

.promo__about {
  margin-bottom: 10px;
  margin-top: 10px;
  font-size: calc(var(--index) * 1.6);
  line-height: 1.1;
}

.promo__item {
  padding-bottom: 5px;
  font-size: 1.2rem;
  color: #9f9996;
}

.gallery__git {
  padding-left: 0;
}
