:root {
  --primary-font: 'Roboto', sans-serif;
  --second-font: 'Raleway', sans-serif;
  --primary-background-white-color: #ffffff;
  --second-background-color: #2e2f42;
  --primary-accent-color: #2e2f42;
  --secondary-accent-color: #434455;
  --hover-color: #404bbf;
  --hover-background-social-footer: #31d0aa;
  --hover-background-social: #404bbf;
  --background-color-social: #4d5ae5;
  --color-icon: #f4f4fd;
}

body {
  font-family: var(--primary-font);
  color: var(--secondary-accent-color);
  background-color: var(--primary-background-white-color);
  letter-spacing: 0.02em;
  font-size: 16px;
}

/* reset */
h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

a {
  text-decoration: none;
}

ul,
ol {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

button {
  cursor: pointer;
}

img {
  display: block;
}

/* common */
.container {
  max-width: 1158px;
  padding: 0 15px;
  margin: 0 auto;
}

.section {
  padding-top: 120px;
  padding-bottom: 120px;
}

/* header */
.page-header {
  border-bottom: 1px solid #e7e9fc;
  box-shadow: 0 1px 6px 0 rgba(46, 47, 66, 0.08),
    0 1px 1px 0 rgba(46, 47, 66, 0.16), 0 2px 1px 0 rgba(46, 47, 66, 0.08);
}

.container-header {
  display: flex;
  align-items: center;
}

.header-nav {
  display: flex;
  align-items: center;
}

.header-nav-list {
  display: flex;
  align-items: center;
  gap: 40px;
}

.logo {
  font-family: var(--second-font);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #4d5ae5;
}

.header-logo {
  padding: 24px 0;
  margin-right: 76px;
}

.logo-part-header {
  color: var(--primary-accent-color);
}

.header-nav-link {
  font-weight: 500;
  position: relative;
  line-height: 1.5;
  padding: 24px 0;
  color: var(--primary-accent-color);
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.header-nav-link.current::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background-color: var(--hover-color);
  left: 0;
  bottom: -1px;
}

.header-nav-link:hover,
.header-nav-link:focus,
.header-nav-link.current {
  color: var(--hover-color);
}

.header-address {
  font-style: normal;
  margin-left: auto;
}

.header-address-list {
  display: flex;
  align-items: center;
  gap: 40px;
}

.address-link {
  line-height: 1.5;
  color: var(--secondary-accent-color);
  padding: 24px 0;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.address-link:hover,
.address-link:focus {
  color: var(--hover-color);
}

/* hero */
.section-hero {
  background-color: var(--second-background-color);
  padding: 188px 0 188px;
  background-image: linear-gradient(
      to bottom,
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url(../images/hero/people-office.jpg);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  max-width: 1440px;
  margin: auto;
}

.title-hero {
  font-weight: 700;
  max-width: 496px;
  font-size: 56px;
  line-height: 1.07;
  color: #fff;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 48px;
  text-align: center;
}

.button-hero {
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
  background: #4d5ae5;
  display: block;
  margin-left: auto;
  margin-right: auto;
  border-radius: 4px;
  min-width: 169px;
  height: 56px;
  border: none;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.button-hero:hover,
.button-hero:focus {
  background-color: var(--hover-color);
}

/* section-2 advantages */
.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;
}

.advantages-list {
  display: flex;
  align-items: center;
  gap: 24px;
}

.icon-advantages {
  border: 1px solid #8e8f99;
  border-radius: 4px;
  background: #f4f4fd;
  margin-bottom: 8px;
  height: 112px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.advantages-item {
  width: calc((100% - 72px) / 4);
}

.title-advantages {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  color: var(--primary-accent-color);
  margin-bottom: 8px;
}

.page-advantages {
  line-height: 1.5;
}

.title-section-all {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  color: var(--primary-accent-color);
  text-align: center;
  text-transform: capitalize;
}

/* section-3  Our Team */
.section-our-team {
  background-color: #f4f4fd;
}

.hero-our-team {
  margin-bottom: 72px;
}

.our-team-list {
  display: flex;
  gap: 24px;
}

.item-our-team {
  max-width: calc((100% - 72px) / 4);
  border-radius: 0 0 4px 4px;
}

.our-team-title-under-img {
  display: block;
  text-align: center;
  padding: 32px 0;
}

.title-our-team {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  text-transform: capitalize;
  color: var(--primary-accent-color);
  text-align: center;
  margin-bottom: 8px;
}

.page-our-team {
  line-height: 1.5;
  text-align: center;
  margin-bottom: 8px;
}

.item-our-team {
  background-color: var(--primary-background-white-color);
  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);
}

.mark-social-list {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.icon-team {
  width: 40px;
  height: 40px;
}

.icon-team-link {
  display: flex;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  background-color: var(--background-color-social);
  border-radius: 50%;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-team-link:hover,
.icon-team-link:focus {
  background-color: var(--hover-background-social);
}

.icon {
  fill: var(--color-icon);
}

/* section-4  Our Portfolio */
.title-portfolio {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  text-transform: capitalize;
  color: var(--primary-accent-color);
  margin-bottom: 8px;
}

.hero-our-portfolio {
  margin-bottom: 72px;
}

.our-portfolio-list {
  display: flex;
  flex-wrap: wrap;
  row-gap: 48px;
  column-gap: 24px;
}

.portfolio-item {
  max-width: calc((100% - 32px) / 3);
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item:hover,
.portfolio-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);
  transform: translatey(0);
}

.container-title-portfolio {
  padding: 32px 16px;
  border-bottom: 1px solid #e7e9fc;
  border-left: 1px solid #e7e9fc;
  border-right: 1px solid #e7e9fc;
}

.page-portfolio {
  line-height: 1.5;
}

.container-overlay {
  position: relative;
  overflow: hidden;
}

.container-overlay p {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #4d5ae5;
  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.5;
  color: #f4f4fd;
  padding: 40px 32px;
}

.portfolio-item:hover .container-overlay p {
  transform: translateY(0%);
}

/* footer */
.basement {
  background-color: var(--second-background-color);
  padding: 100px 0;
}

.container-logo {
  margin-right: 120px;
}
.page-basement {
  line-height: 1.5;
  color: #f4f4fd;
  max-width: 264px;
}

.logo-footer {
  display: inline-block;
  margin-bottom: 16px;
}

.logo-part-basement {
  color: #f4f4fd;
}

.container-basement {
  display: flex;
  align-items: baseline;
}

.footer-social-list {
  display: flex;
  gap: 16px;
}

.page-social {
  font-weight: 500;
  line-height: 1.5;
  color: #fff;
  margin-bottom: 16px;
}

.foter-icon-hover:hover,
.foter-icon-hover:focus {
  background-color: var(--hover-background-social-footer);
}
