html {
  scroll-behavior: smooth;
}

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

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

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

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

img {
  display: block;
}

a {
  text-decoration: none;
}

.header-page {
  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-page-nav {
  display: flex;
  align-items: center;
}

.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;
}

.nav-link-logo .logo-part {
  color: #2e2f42;
}
.nav-link-logo {
  padding: 24px 0;
  margin-right: 76px;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-list-item-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-list-item-link.current {
  position: relative;
}

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

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

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

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

.contacts-list-item-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);
}

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

.main-section-text {
  margin: 0 auto;
  max-width: 496px;
  font-weight: 700;
  font-size: 56px;
  line-height: 1.07;
  letter-spacing: 0.02em;
  text-align: center;
  color: #fff;
}

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

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

.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;
}
.features-section {
  padding: 120px 0;
}

.features-section-item {
  flex-basis: calc((100% - 3 * 24px) / 4);
}

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

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

.features-section-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

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

.section-team {
  background-color: #f4f4fd;
  padding: 120px 0 120px;
}

.team-page {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  margin-bottom: 72px;
}
.team-page-list {
  display: flex;
  align-items: center;
  gap: 24px;
}
.team-page-item {
  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);
  max-width: calc((100% - 3 * 24px) / 4);
}
.team-page-card {
  padding: 32px 16px;
}
.team-page-name {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  margin-bottom: 8px;
}

.team-page-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
}
.soc-list {
  display: flex;
  gap: 24px;
  padding: 0;
  margin: 0;
  list-style: none;
  padding-top: 8px;
}

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

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

.social {
  fill: #f4f4fd;
}

.soc-icon a:hover,
.soc-icon a:focus {
  background-color: #404bbf;
}

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

.portfolio-page-list {
  display: flex;
  align-items: center;
  gap: 48px 24px;
  flex-wrap: wrap;
}

.portfolio-page-item {
  background-color: #fff;
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-page-item:hover {
  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-img-wrapper {
  position: relative;
  overflow: hidden;
}

.portfolio-page-img {
  display: block;
  width: 100%;
  height: auto;
}

.portfolio-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #4d5ae5;
  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  padding: 40px 32px;
}

.portfolio-page-item:hover .portfolio-overlay {
  transform: translateY(0);
}

.portfolio-overlay-text {
  color: #f4f4fd;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  margin: 0;
}

.portfolio-page-item svg {
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.portfolio-full-text {
  padding: 32px 16px;
  border: 1px solid #e7e9fc;
  border-top: none;
}

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

.portfolio-page-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}
.footer-page {
  background-color: #2e2f42;
  padding: 100px 0;
}

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

.footer-brand {
  max-width: 264px;
  margin-right: 120px;
}

.footer-social {
  margin-right: 80px;
}

.footer-subscribe {
  flex-shrink: 0;
  margin-left: auto;
}

.footer-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;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 16px;
}

.logo-part {
  color: #f4f4fd;
}

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

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

.soc-list-footer {
  display: flex;
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}

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

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

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

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

.subscribe-form {
  display: flex;
  gap: 24px;
  align-items: center;
}

.subscribe-input {
  width: 264px;
  height: 40px;
  padding: 8px 16px;
  border: 1px solid #fff;
  border-radius: 4px;
  background-color: transparent;
  color: #ffffff;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  outline: none;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.subscribe-input::placeholder {
  color: #ffffff;
}

.subscribe-input:focus {
  border-color: #31d0aa;
}

.subscribe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 165px;
  height: 40px;
  padding: 8px 24px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background-color: #4d5ae5;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.subscribe-icon {
  fill: #ffffff;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.subscribe-btn:hover .subscribe-icon,
.subscribe-btn:focus .subscribe-icon {
  fill: #ffffff;
}

.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%;
  width: 408px;
  min-height: 584px;
  border-radius: 4px;
  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%);
}

input,
textarea,
button {
  font-family: inherit;
  line-height: inherit;
}

textarea {
  resize: none;
}

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

.modal-close-btn:hover,
.modal-close-btn:focus {
  background-color: #404bbf;
}

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

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

.order-form {
  display: flex;
  flex-direction: column;
  padding: 72px 24px 24px 24px;
}

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

.form-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  margin-bottom: 8px;
}

.form-label:last-of-type {
  margin-bottom: 0;
}

.label-text {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
}

.input-wrapper {
  position: relative;
  display: block;
  width: 100%;
}

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

.textarea-wrapper .input-icon {
  display: none;
}

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

.form-textarea {
  padding: 11px 16px;
  height: 120px;
  resize: none;
}

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

.form-input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
  fill: #4d5ae5;
}

.checkbox-field {
  margin: 16px 0 24px 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  width: 100%;
}

.checkbox-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0 0 0 0);
}

.checkbox-custom {
  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: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.checkbox-icon {
  fill: transparent;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.checkbox-input:checked + .checkbox-custom {
  background-color: #404bbf;
  border-color: #404bbf;
}

.checkbox-input:checked + .checkbox-custom .checkbox-icon {
  fill: #f4f4fd;
}

.checkbox-input:focus + .checkbox-custom {
  border-color: #4d5ae5;
  box-shadow: 0 0 0 2px rgba(77, 90, 229, 0.3);
}

.checkbox-text {
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #8e8f99;
}

.privacy-link {
  color: #4d5ae5;
  text-decoration: underline;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.submit-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  width: 169px;
  height: 56px;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  border: none;
  border-radius: 4px;
  background-color: #4d5ae5;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.submit-btn:disabled {
  background-color: #9e9e9e;
  cursor: not-allowed;
  box-shadow: none;
}
