:root {
  --font-family-base: 'Poppins', sans-serif;
  --font-family-heading: 'Space Grotesk', sans-serif;
  --color-heading: #222222;
  --color-text: #666666;
  --color-white: #ffffff;
  --color-accent: #2164bd;
  --color-border: rgba(255, 255, 255, 0.72);
  --container-large: 1680px;
  --container-homepage: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--color-text);
  font-family: var(--font-family-base);
  font-size: 14px;
  line-height: 1.7;
  background: var(--color-white);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color .25s ease, background-color .25s ease, border-color .25s ease, transform .25s ease;
}

a:hover,
a:focus {
  color: var(--color-accent);
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--color-heading);
  font-family: var(--font-family-heading);
  font-weight: 700;
  line-height: 1.2;
}

.text-center {
  text-align: center;
}

.container-large,
.container-homepage {
  width: min(100% - 60px, var(--container-large));
  margin-right: auto;
  margin-left: auto;
}

.container-homepage {
  width: min(100% - 60px, var(--container-homepage));
}

.btn-default {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 170px;
  min-height: 58px;
  padding: 0 50px;
  border: 1px solid var(--color-border);
  border-radius: 0;
  background: transparent;
  color: var(--color-white);
  font-family: var(--font-family-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1;
  text-transform: uppercase;
}

.btn-default:hover,
.btn-default:focus {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-white);
}

.site-hero {
  position: relative;
  min-height: 880px;
  background: linear-gradient(90deg, rgba(8, 24, 32, .36), rgba(8, 24, 32, .08)), url('../img/bg-header.jpg') center top / cover no-repeat;
}

.site-hero .container-large {
  position: relative;
  min-height: inherit;
  padding-top: 48px;
}

.logo {
  position: absolute;
  top: 48px;
  left: 50%;
  z-index: 2;
  display: inline-block;
  width: 275px;
  transform: translateX(-50%);
}

.logo img {
  width: 100%;
}

.hero-content {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
}

.hero-content h1 {
  margin-bottom: 45px;
  color: var(--color-white);
  font-size: 40px;
  line-height: 1.45;
  text-transform: uppercase;
  font-weight: 400;
}

.hero-content h1 span {
  font-weight: 700;
}

.demo-section {
  padding: 98px 0 72px;
  background: var(--color-white);
}

.title-block {
  margin: 0 auto 48px;
}

.title-block h2 {
  font-size: 30px;
  text-transform: uppercase;
}

.homepage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 56px;
  row-gap: 64px;
}

.item {
  min-width: 0;
}

.item .image {
  position: relative;
  display: block;
  height: 525px;
  overflow: hidden;
  background: #f7f7f7;
  box-shadow: 0 8px 25px rgba(0, 0, 0, .08);
}

.img-scroll {
  display: block;
  width: 100%;
  height: 100%;
  background-position: top center;
  background-repeat: no-repeat;
  background-size: 100% auto;
  transition: background-position 4s linear, transform .3s ease;
}

.image:hover .img-scroll,
.image:focus .img-scroll {
  background-position: bottom center;
}

.item h3 {
  margin-top: 25px;
  font-family: var(--font-family-base);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

.section-plugins {
  position: relative;
  padding: 100px 0;
  background: url('../img/bg-features.jpg') center center / cover no-repeat;
}

.section-plugins::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .72);
}

.section-plugins .container-homepage {
  position: relative;
  z-index: 1;
}

.plugins {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 36px;
  align-items: start;
}

.plugin-img {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 115px;
  height: 115px;
  margin: 0 auto;
  background: var(--color-white);
  box-shadow: 0 18px 60px rgba(70, 70, 70, .12);
}

.plugin h3 {
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.4;
  text-transform: uppercase;
}

.site-footer {
  display: flex;
  align-items: center;
  min-height: 740px;
  padding: 120px 0;
  background: linear-gradient(rgba(5, 13, 17, .14), rgba(5, 13, 17, .14)), url('../img/bg-footer.jpg') center center / cover no-repeat;
}

.site-footer .title-block {
  margin-bottom: 0;
}

.site-footer h2 {
  margin-bottom: 34px;
  color: var(--color-white);
  font-size: 35px;
  line-height: 1.35;
  text-transform: uppercase;
}

.back-to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 99;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--color-heading);
  background: var(--color-white);
  color: var(--color-heading);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease, background-color .25s ease, border-color .25s ease, color .25s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-white);
}

@media (min-width: 1440px) {
  :root {
    --container-homepage: 1440px;
  }

  .item .image {
    height: 960px;
  }
}

@media (max-width: 1199px) {
  .site-hero {
    min-height: 560px;
  }

  .item .image {
    height: 450px;
  }

  .plugins {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 44px;
  }
}

@media (max-width: 991px) {
  .container-large,
  .container-homepage {
    width: min(100% - 40px, var(--container-large));
  }

  .site-hero {
    min-height: 500px;
  }

  .logo {
    width: 230px;
  }

  .hero-content h1 {
    font-size: 30px;
  }

  .homepage-grid {
    column-gap: 30px;
    row-gap: 48px;
  }

  .item .image {
    height: 360px;
  }
}

@media (max-width: 767px) {
  .site-hero {
    min-height: 460px;
    background-position: center top;
  }

  .site-hero .container-large {
    padding-top: 34px;
  }

  .logo {
    top: 34px;
    width: 200px;
  }

  .hero-content {
    left: 0;
    right: 0;
    max-width: none;
    text-align: center;
  }

  .hero-content h1 {
    margin-bottom: 24px;
    font-size: 25px;
  }

  .demo-section {
    padding: 70px 0 55px;
  }

  .homepage-grid {
    grid-template-columns: 1fr;
  }

  .item .image {
    height: 460px;
  }

  .section-plugins {
    padding: 66px 0 72px;
  }

  .plugins {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px 22px;
  }

  .site-footer {
    min-height: 360px;
    padding: 90px 0;
  }

  .site-footer h2 {
    font-size: 25px;
  }
}

@media (max-width: 480px) {
  .container-large,
  .container-homepage {
    width: min(100% - 30px, var(--container-large));
  }

  .btn-default {
    min-width: 112px;
    min-height: 50px;
    padding: 0 30px;
  }

  .item .image {
    height: 380px;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 40px;
    height: 40px;
  }
}
