:root {
  --primary-text-color: #434455;
  --hero-title-color: #ffffff;
  --title-text-color: #2e2f42;
  --accent-color: #4d5ae5;
  --background-color: #f4f4fd;
  --timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  --timing-duration: 250ms;
}

body {
  color: var(--primary-text-color);
  background-color: var(--hero-title-color);
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.11;
  letter-spacing: 0.72px;
}
h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
}

img {
  display: block;
}

address {
  font-style: normal;
}

.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 {
  max-width: 1158px;
  padding: 0 15px;
  margin: 0 auto;
}

/* button*/
.button {
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.64px;
  color: var(--hero-title-color);
  background-color: var(--accent-color);
  text-align: center;
  cursor: pointer;
}
/* ================ 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);
}

.header-container {
  display: flex;
  align-items: center;
  max-width: 1158px;
  padding: 0 15px;
  margin: 0 auto;
}

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

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

.logo {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent-color);
}

.logo-part {
  color: var(--title-text-color);
}

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

.nav-link {
  display: block;
  padding: 24px 0;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--title-text-color);
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link.current {
  position: relative;
}

.nav-link.current::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 4px;
  background-color: #404bbf;
  border-radius: 2px;
}

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

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

.contacts-link {
  display: block;
  padding: 24px 0;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--primary-text-color);
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover,
.nav-link:focus,
.contacts-link:hover,
.contacts-link:focus,
.nav-link.current {
  color: #404bbf;
}

/* ================ HERO ================ */
.section-hero {
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  background-image: linear-gradient(
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url(../images/icons/people-office.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  padding-top: 188px;
  padding-bottom: 188px;
  text-align: center;
  background-color: #2e2f42;
}

.hero-container {
  text-align: center;
}

.hero-title {
  font-weight: 700;
  margin: 0 auto;
  color: var(--hero-title-color);
  font-size: 56px;
  line-height: 1.07;
  letter-spacing: 0.02em;
  text-align: center;
  max-width: 496px;
}

.hero-button {
  display: block;
  border: none;
  border-radius: 4px;
  margin-top: 48px;
  margin-left: auto;
  margin-right: auto;
  min-width: 169px;
  padding: 16px 31px;
  transition-property: background-color;
  transition-duration: var(--timing-duration);
  transition-timing-function: var(--timing-function);
}
.hero-button:hover,
.hero-button:focus {
  background-color: #404bbf;
}

.section-title {
  margin-bottom: 72px;
  color: var(--title-text-color);
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.02em;
  line-height: 1.11;
  text-transform: capitalize;
}

/* Our principles*/

.section-principles {
  padding: 120px 0;
}

.principles-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
}

.principles-list-item {
  width: calc((100% - 24px * 3) / 4);
}

.principle-item-title,
.team-item-title,
.portfolio-item-title {
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  color: var(--title-text-color);
}

.principle-item-text,
.team-item-text,
.portfolio-item-text,
.footer-text {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--primary-text-color);
}

.principle-icon {
  display: flex;
  background-color: var(--background-color);
  height: 112px;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
  border-radius: 4px;
  border: 1px solid #8e8f99; 
}
/* Our Team*/
.section-team {
  padding: 120px 0;
  background: #f4f4fd;
}

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

.team-list-item {
  display: block;
  background-color: var(--hero-title-color);
  text-align: center;
  width: calc((100% - 24px * 3) / 4);
  border-radius: 0px 0px 4px 4px;
  box-shadow: 0px 2px 1px rgba(46,47,66,0.08),
              0px 1px 1px rgba(46,47,66,0.16),
              0px 1px 6px rgba(46,47,66,0.08);
}

.team-title {
  color: var(--title-text-color);
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.4px;
  font-weight: 500;
  text-align: center;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.team-item-text {
  line-height: 1.5; /* 150% */
  letter-spacing: 0.32px;
  font-weight: 500;
  margin-bottom: 8px;
}

.team-text-wrapper {
  display: block;
  padding-top: 32px;
  padding-bottom: 32px;
}

.social-item {
  width: 40px;
  height: 40px;
}

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

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

.social-icon {
  width: 16px;
  height: 16px;
  fill: #f4f4fd;
}

.social-link:hover,
.social-link:focus {
  background-color: #404bbf;
}

/* ===== OUR PORTFOLIO ===== */

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

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

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

.portfolio-list-item:hover {
  box-shadow:
    0px 1px 6px rgba(46, 47, 66, 0.08),
    0px 1px 1px rgba(46, 47, 66, 0.16),
    0px 2px 1px rgba(46, 47, 66, 0.08);
}

.portfolio-overlay-wrapper {
  position: relative;
  overflow: hidden;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 40px 32px;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--background-color);
  background-color: var(--accent-color);
  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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


.portfolio-content-wrapper {
  padding: 32px 16px;
  border: 1px solid #e7e9fc;
  border-top: none;
}
  
/* Footer */

.footer {
  background-color: var(--title-text-color);
  padding: 100px 0px;
}

.footer-content {
  display: flex;
  align-items: baseline;
}

.footer-left {
  margin-right: 120px;
}

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

.logo-footer-part {
  color: var(--hero-title-color);
}

.text-footer {
  letter-spacing: 0.02em;
  width: 264px;
  font-size: 16px;
  line-height: 1.5;
  padding-bottom: 16px;
  color: var(--background-color);
}

.text-right {
  font-weight: 500;
  color: var(--hero-title-color);
  margin-bottom: 16px
}

.footer-right {
  padding-left: 120px;
}

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

.social-item-footer {
  width: 40px;
  height: 40px;
}

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

.social-link-footer:hover,
.social-link-footer:focus {
  background-color: #31d0aa;
}

.social-icon-footer {
  fill: #f4f4fd;
}
