body {
  font-family: "Roboto", sans-serif;
  color: #434455;
  background-color: #ffffff;
}

/* reset  */

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

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

img {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
}

section {
  padding: 120px 0;
}

/* common */

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

/* 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;
}

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

.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: #2e2f42;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

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

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

.header-logo .logo-part {
  color: #2e2f42;
}

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

.contacts-link {
  display: block;
  padding: 24px 0;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
  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 {
  padding: 188px 0;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-color: #2e2f42;
  margin-left: auto;
  margin-right: auto;

  background-image:
    linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
    url("../images/background.jpg");
  background-size: cover;
  background-position: center;
  max-width: 1440px;
  background-repeat: no-repeat;
}

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

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

.hero-button:hover,
.hero-button:focus {
  background-color: #404bbf;
}

.advantages {
  padding: 120px 0;
}

.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;
  gap: 24px;
}

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

.advantages-subtitle {
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
}

.advantages-subtitle-item {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}

.advantages-subtitle-item:not(:last-child) {
  padding-right: 24px;
}

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

.icons-list {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 8px;
}

.icons-item {
  display: flex;
  background-color: #4d5ae5;
  height: 40px;
  width: 40px;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
}

.icon-color,
.footer-icon-color {
  fill: #f4f4fd;
  display: flex;
  justify-content: center;
}

.item-icon-item {
  width: 100%;
  height: 100%;
  background-color: #4d5ae5;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.item-icon-item:hover {
  background-color: #404bbf;
}

.item-icon-item:focus {
  background-color: #404bbf;
}

.our-team {
  padding: 120px 0;
  display: flex;
  justify-content: center;
  background: #f4f4fd;
}

.our-team-title {
  margin-bottom: 72px;
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  text-transform: capitalize;
}

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

.our-team-item {
  width: calc((100% - 72px) / 4);
  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);
  border-radius: 0 0 4px 4px;
  background-color: #ffffff;
}

.name-position {
  padding: 32px 0;
}

.our-team-subtitle {
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
}

.our-team-subtitle-item {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  color: #434455;
}

.our-portfolio {
  padding: 120px 0;
}

.our-portfolio-title {
  margin-bottom: 72px;
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  text-transform: capitalize;
}

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

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

.our-portfolio-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);
  transform: transform translateY(0%);
}

.name-category {
  padding: 32px 16px;
  border: 1px solid #e7e9fc;
  border-top: none;
}

.our-portfolio-subtitle {
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
}

.our-portfolio-subtitle-item {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}

.our-portfolio-subtitle-item:hover {
  transform: translateY(0%);
}

.thumb {
  position: relative;
  overflow: hidden;
}

.card-portfolio {
  position: relative;
  overflow: hidden;
}

.our-portfolio-item:hover .overley {
  transform: translateY(0);
}

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

.page-footer-title {
  max-width: 264px;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
}

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

.page-footer {
  padding: 100px 0;
  background-color: #2e2f42;
}

.footer-logo .logo-part {
  display: inline-block;
  color: #f4f4fd;
}

.icons-title {
  color: #fff;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}

.page-footer .container {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  align-items: baseline;
}

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

.social-media {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

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

.footer-icons .icons-item:hover {
  transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  background: #31d0aa;
}

.footer-subscribe {
  margin-bottom: 16px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #fff;
}

.footer-form {
  display: flex;
  gap: 24px;
}

.subscribe-email {
  width: 264px;
  height: 40px;
  background-color: transparent;
  font-weight: 400;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: #fff;
  border: 1px solid #fff;
  border-radius: 4px;
  width: 264px;
  height: 40px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  padding-left: 16px;
}

.subscribe-email::placeholder {
  color: #fff;
}

.subscribe-icon {
  margin-left: 16px;
}

.footer-form-button {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 40px;
  min-width: 165px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-align: center;
  color: #fff;
  cursor: pointer;
  background-color: #4d5ae5;
  border: none;
  border-radius: 4px;
}

.our-team-item .icons-item:hover {
  background: #404bbf;
}

.icons-item .item-icon {
  width: 100%;
  height: 100%;
  background-color: #4d5ae5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.item-icon:focus,
.item-icon:hover {
  background-color: #31d0aa;
}

.icons-item {
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.item-icon-item {
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(46, 47, 66, 0.4);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 4px;
  width: 408px;
  min-height: 584px;
  box-shadow:
    0 1px 1px 0 rgba(0, 0, 0, 0.14),
    0 1px 3px 0 rgba(0, 0, 0, 0.12),
    0 2px 1px 0 rgba(0, 0, 0, 0.2);
  background-color: #fcfcfc;
  transform: translate(-50%, -50%);

  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.backdrop:not(.is-open) .modal {
  transform: translate(-50%, 100%) scale(1.5);
}

.close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 24px;
  right: 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #e7e9fc;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0;
  cursor: pointer;
  transition:
    background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    border 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.close-modal {
  width: 8px;
  height: 8px;
  fill: #2e2f42;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.close-btn:hover {
  border-radius: 100%;
  background-color: #404bbf;
  border: #404bbf;
  fill: #fff;
}

.close-btn:hover .close-modal,
.close-btn:focus .close-modal {
  fill: #fff;
}

.close-btn:focus {
  background-color: #404bbf;
  border: none;
  fill: #fff;
}

.h-modal {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  margin-bottom: 16px;
}

.modal {
  padding: 72px 24px 24px 24px;
}

.form-label {
  display: block;
  margin-bottom: 4px;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.16667;
  letter-spacing: 0.04em;
  color: #8e8f99;
  line-height: 1.17;
}

.area-form-input::placeholder {
  font-weight: 400;
  font-size: 12px;
  line-height: 1.16667;
  letter-spacing: 0.04em;
  color: rgba(46, 47, 66, 0.4);
}

.checkbox {
  align-items: center;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
  flex-direction: row;
}

.input-modal-form {
  margin-bottom: 8px;
}

.input-modal {
  position: relative;
}

.form-input {
  width: 100%;
  height: 40px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  background-color: transparent;
  padding-left: 38px;
  outline: transparent;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:focus {
  border-color: #4d5ae5;
}

.form-input:focus + .icon-modal {
  fill: #4d5ae5;
}

.icon-modal {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:focus .icon-modal.person {
  fill: #4d5ae5;
}

.area-modal-form {
  margin-bottom: 16px;
}

.area-form-input {
  width: 100%;
  height: 120px;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: rgba(46, 47, 66, 0.4);
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  background-color: transparent;
  padding: 8px 16px;
  outline: transparent;
  resize: none;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.area-form-input:focus {
  border-color: #4d5ae5;
}

.check-modal {
  margin-bottom: 24px;
}

.check-icon-span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 2px;
  transition:
    background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    border 250ms cubic-bezier(0.4, 0, 0.2, 1),
    fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
  fill: transparent;
}

.visually-hidden:checked + .checkbox > .check-icon-span {
  background-color: #404bbf;
  border: none;
  fill: #f4f4fd;
}

.check-input:checked + .check-label .check-icon-span {
  background-color: #404bbf;
  border: none;
  fill: #f4f4fd;
}

.link-privacy {
  color: #4d5ae5;
}

.send-modal-btn {
  margin: 0 auto;
  display: block;
  min-width: 169px;
  height: 56px;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-align: center;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background: #4d5ae5;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  border-radius: 4px;
  padding: 16px 32px;
}

.check-icon-span {
  margin-right: 8px;
  display: inline-flex;
}
