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

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

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

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

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

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

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

.accent {
  color: #4d5ae5;
}

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

.page-header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 76px;
}

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

.page-logo-header-web {
  color: #4d5ae5;
}

.nav-list {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: row;
  gap: 40px;
}

.nav-list-item {
  font-weight: 500;
  font-size: 16px;
  color: #2e2f42;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.nav-list-item-link {
  display: block;
  padding: 24px 0px;
  position: relative;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-list-item-link:hover,
.nav-list-item-link:focus {
  color: #404bbf;
}

.nav-list-link-active {
  color: #404bbf;
}

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

.page-address {
  font-style: normal;
}

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

.address-list-link {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  display: block;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.address-list-link:hover,
.address-list-link:focus {
  color: #404bbf;
}

/* #endregion header */

/* #region hero section */

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

.hero-title {
  font-weight: 700;
  font-size: 56px;
  text-align: center;
  color: #ffffff;
  line-height: 1.07143;
  letter-spacing: 0.02em;
  width: 496px;
  margin-right: auto;
  margin-left: auto;
  margin-bottom: 48px;
}

.hero-button {
  font-weight: 500;
  font-size: 16px;
  color: #ffffff;
  background-color: #4d5ae5;
  line-height: 1.5;
  cursor: pointer;
  letter-spacing: 0.04em;
  border-radius: 4px;
  padding: 16px 32px;
  margin: 0 auto;
  display: block;
  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);
}

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

/* #endregion hero section */

/* #region about section */

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

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

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

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

.features-icon svg {
  display: block;
  margin: 24px auto;
}

.features-list-item-title {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  color: #2e2f42;
  letter-spacing: 0.02em;
  text-align: left;
  margin-bottom: 8px;
}

.features-list-item-text {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: left;
}
/* #endregion about section */

/* #region team section */

.team-section {
  background-color: #f4f4fd;
}

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

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

.team-list-card {
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  border-radius: 0 0 4px 4px;
  width: 264px;
  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);
}

.team-title-text-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  padding: 32px 16px;
}

.team-list-card-title {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  color: #2e2f42;
  text-align: center;
  letter-spacing: 0.02em;
}

.team-list-card-text {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
  letter-spacing: 0.02em;
}

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

.social-icon-link {
  width: 40px;
  height: 40px;
  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);
}

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

/* #endregion team section */

/* #region portfolio section */

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

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

.portfolio-list-card {
  display: flex;
  flex-direction: column;
  width: 360px;
  /* flex-basis: calc((100% - 1080px) / 3); */
}

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

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

.portfolio-list-card {
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-list-card:hover,
.portfolio-list-card: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);
}

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

.portfolio-card-text-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: 1px solid #e7e9fc;
  border-bottom: 1px solid #e7e9fc;
  border-left: 1px solid #e7e9fc;
  padding: 32px 16px;
}

.portfolio-list-card-title {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  color: #2e2f42;
  letter-spacing: 0.02em;
}

.portfolio-list-card-text {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: #434455;
  letter-spacing: 0.02em;
}

/* #endregion portfolio section */

/* #region footer section */
.footer-section {
  background-color: #2e2f42;
  padding-top: 100px;
  padding-bottom: 100px;
}

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

.footer-logo-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-right: 120px;
}

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

.page-logo-footer-web {
  color: #4d5ae5;
}

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

.footer-social-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-right: 80px;
}

.footer-social-text {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #ffffff;
}

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

.footer-social-icon-link {
  width: 40px;
  height: 40px;
  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);
}

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

.footer-form-container {
  width: 453px;
}

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

.footer-form-input-container {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-form-input {
  padding-left: 16px;
  padding-top: 8px;
  padding-bottom: 8px;
  width: 264px;
  background-color: #2e2f42;
  border: 1px solid #ffffff;
  font-weight: 400;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: #ffffff;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-form-input:focus,
.footer-form-input:hover {
  border-color: #31d0aa;
  outline: none;
}

.footer-form-input::placeholder {
  color: #ffffff;
}

.footer-form-btn {
  border-radius: 4px;
  height: 40px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-align: center;
  color: #ffffff;
  background-color: #4d5ae5;
  padding: 8px 24px;
  display: flex;
  gap: 16px;
  border: none;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-form-btn:hover,
.footer-form-btn:focus {
  background-color: #31d0aa;
}

/* #endregion footer section */

/* #region popup */

.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(46, 47, 66, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition:
    opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  pointer-events: none;
  user-select: none;
  visibility: hidden;
}

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

.popup-review {
  background-color: #fcfcfc;
  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);
  border-radius: 4px;
  width: 408px;
  height: 80%;
  max-height: 584px;
  overflow-y: auto;
  padding: 72px 24px 24px 24px;
  position: relative;
}

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

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

.popup-close-button:hover svg,
.popup-close-button:focus svg {
  fill: #ffffff;
}

.popup-close-icon {
  fill: #2e2f42;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.field-wrapper {
  margin-bottom: 8px;
}

.comment-field-wrapper {
  margin-bottom: 16px;
}

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

.input-wrapper {
  position: relative;
}

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

.text-field:focus {
  border-color: #4d5ae5;
  outline: none;
}

.text-field:focus ~ .input-icon {
  fill: #4d5ae5;
}

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

.comment-field {
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.16667;
  letter-spacing: 0.04em;
  color: rgba(46, 47, 66, 0.4);
  width: 100%;
  height: 120px;
  padding: 8px 10px 8px 16px;
  resize: none;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.comment-field:focus {
  border-color: #4d5ae5;
  outline: none;
}

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

.agreement-container {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
}

.input-checkbox:focus + .agreement-label .custom-checkbox {
  border-color: #404bbf;
  outline: none;
}

.input-checkbox:checked + .agreement-label .custom-checkbox {
  background-color: #404bbf;
  fill: #f4f4fd;
}

.input-checkbox:checked + .agreement-label .custom-checkbox .checked-icon {
  opacity: 1;
  visibility: visible;
}

.agreement-label {
  font-weight: 400;
  line-height: 1.33;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #8e8f99;
  display: flex;
}

.custom-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 16px;
  height: 16px;
  background-color: #ffffff;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 2px;
  margin-right: 8px;
  fill: none;
  transition:
    background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    fill 250ms cubic-bezier(0.4, 0, 0.2, 1),
    border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.checked-icon {
  position: absolute;
  opacity: 0;
  visibility: hidden;
  transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.privacy-policy {
  text-decoration: underline;
  transition: text-decoration 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.popup-btn-container {
  display: flex;
  justify-content: center;
}

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

.popup-form-btn:hover,
.popup-form-btn:focus {
  background-color: #404bbf;
}

/* #endregion popup */
