:root {
  --second-family: "Raleway", sans-serif;
  --iris: #4d5ae5;
  --ocean: #404bbf;
  --navy-blue: #2e2f42;
  --green: #31d0aa;
  --slate: #434455;
  --light-slate: #8e8f99;
  --cornflower: #e7e9fc;
  --cloud: #f4f4fd;
  --navy-blue-modal: rgba(46, 47, 66, 0.4);
  --grey: rgba(46, 47, 66, 0.7);
  --white: #fff;
  --dairy: #fcfcfc;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  white-space: nowrap;
  clip-path: inset(100%);
  clip: rect(0 0 0 0);
  overflow: hidden;
}
.container {
  width: 100%;
  max-width: 1158px;
  padding-left: 15px;
  padding-right: 15px;
  margin-left: auto;
  margin-right: auto;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Roboto", sans-serif;
  color: var(--slate);
}
a {
  text-decoration: none;
  color: currentColor;
  list-style: none;
  font-style: normal;
}
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
  padding: 0;
}
section {
  padding-bottom: 120px;
  padding-top: 120px;
}
img {
  max-width: 100%;
  height: auto;
}
/* -------------------HEADER---------------- */
.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;

  border-bottom: 1px solid var(--cornflower);
}
.header-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header-logo {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.16;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--navy-blue);
  font-family: var(--second-family);
}
.header-span {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.16;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--iris);
}

.header-list {
  display: flex;
  gap: 40px;
}
.header-item {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--navy-blue);
}

.header-item-link {
  padding-top: 24px;
  padding-bottom: 24px;
  display: inline-block;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--navy-blue);
  position: relative;
}

.header-item-link:hover::after,
.header-item-link:hover::after {
  content: "";
  width: 100%;
  height: 4px;
  position: absolute;
  background-color: var(--ocean);
  left: 0;
  bottom: 0;
  border-radius: 2px;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.header-item-link:hover,
.header-item-link:focus {
  color: var(--ocean);
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.header-contact-list {
  display: flex;
  gap: 40px;
}

.header-contact-link {
  padding-top: 24px;
  padding-bottom: 24px;

  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--slate);
}
.header-contact-link:hover,
.header-contact-link:focus {
  color: var(--ocean);
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
/* -------------------HERO---------------- */

.hero {
  background-color: var(--navy-blue);
  padding: 188px 0; /* только сверху и снизу */
  background-image: linear-gradient(
      to bottom,
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url(../images/hero-bg-min.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
}
.hero-title {
  max-width: 496px;
  margin-bottom: 48px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;

  font-weight: 700;
  font-size: 56px;
  line-height: 1.07;
  letter-spacing: 0.02em;
  color: var(--white);
}
.hero-btn {
  display: block;
  margin-left: auto;
  margin-right: auto;
  text-align: center;

  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--white);
  border: none;
  border-radius: 4px;
  width: 169px;
  height: 56px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background: var(--iris);
  cursor: pointer;
}

.hero-btn:hover,
.hero-btn:focus {
  background-color: var(--ocean);
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
/* -------------------BENEFITS---------------- */
.benefits {
  padding-left: 156px;
  padding-right: 156px;
  text-align: left;
}

.benefits-list {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.benefits-icon {
  border: 1px solid var(--light-slate);
  border-radius: 4px;
  width: 264px;
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.benefits-item {
  flex-basis: calc((100% - 72px) / 4);
}
.benefits-title {
  margin-bottom: 8px;

  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--navy-blue);
}
.benefits-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--slate);
}
/* -------------------TEAM---------------- */
.team {
  background-color: var(--cloud);
  padding-left: 156px;
  padding-right: 156px;
}
.team-title {
  margin-bottom: 72px;
  text-align: center;

  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--navy-blue);
}
.team-list {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-bottom: 32px;
  margin-left: auto;
  margin-right: auto;
  flex-wrap: wrap;
}
.team-item {
  flex-basis: calc((100% - 72px) / 4);
  padding-bottom: 32px;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 2px 1px 0 rgba(46, 47, 66, 0.08),
    0 1px 1px 0 rgba(46, 47, 66, 0.16), 0 1px 6px 0 rgba(46, 47, 66, 0.08);
  background: var(--white);
}
.benefits-item-card {
  margin-bottom: 32px;
}
.team-card-title {
  margin-bottom: 8px;

  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--navy-blue);
}
.team-card-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--slate);
  margin-bottom: 8px;
}
.team-soc-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
.team-soc-item {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--iris);
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.team-soc-item:hover,
.team-soc-item:focus {
  background-color: var(--ocean);
}
/* -------------------GALLERY---------------- */
.gallery {
  padding-left: 156px;
  padding-right: 156px;
}
.gallery-title {
  margin-bottom: 72px;
  text-align: center;

  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--navy-blue);
}
.gallery-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 40px 19px;
}
.gallery-item {
  width: calc((100% - 48px) / 3);
}
.gallery-text-group {
  position: relative;
  overflow: hidden;
  width: 360px;
  height: 300px;
}
.cover-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding-top: 40px;
  padding-left: 32px;
  padding-right: 32px;
  background-color: var(--iris);
  transform: translateY(100%);
  transition: transform 300ms ease;
}
.gallery-item:hover,
.gallery-item:focus {
  box-shadow: 0 2px 1px 0 rgba(46, 47, 66, 0.08),
    0 1px 1px 0 rgba(46, 47, 66, 0.16), 0 1px 6px 0 rgba(46, 47, 66, 0.08);
}
.gallery-item:hover .cover-text,
.gallery-item:focus .cover-text {
  transform: translateY(0);
  transition: transform 300ms ease;
}
.text-bottom {
  border-bottom: 1px solid var(--cornflower);
  border-left: 1px solid var(--cornflower);
  border-right: 1px solid var(--cornflower);
  padding: 32px 16px;
}

.gallery-card-title {
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--navy-blue);
}
.gallery-card-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--slate);
}
/* -------------------FOOTER---------------- */
.footer {
  padding-top: 100px;
  padding-bottom: 100px;
  text-align: start;
  background-color: var(--navy-blue);
}
.footer-container {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
}
.footer-text-group {
  display: flex;
  justify-content: flex-start;
  flex-direction: column;
  align-items: flex-start;
  margin-right: 120px;
}
.footer-text-group .footer-logo {
  display: inline-block;
  margin-bottom: 16px;

  font-family: var(--second-family);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.16;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--cloud);
}
.footer-span {
  color: var(--iris);
}
.footer-text {
  max-width: 264px;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--cloud);
}
.footer-soc {
  display: flex;
  justify-content: center;
  flex-direction: column;
}
.footer-soc-title {
  margin-bottom: 16px;

  align-items: center;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--white);
}

.footer-soc-item {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--iris);
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.footer-soc-item:hover,
.footer-soc-item:focus {
  background-color: #31d0aa;
}
