/* general */
body {
  font-family: Roboto, sans-serif;
  color: #2e2f42;
  background-color: white;
}

h1,
h2,
h3,
p {
  margin: 0;
}
a {
  margin: 0;
  padding-left: 0;
}

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

img {
  display: block;
}

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

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

.navigation-container {
  display: flex;
  align-items: center;
  gap: 76px;
  flex-grow: 1;
}

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

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

.address-container {
  display: flex;
  margin-left: auto;
  gap: 40px;
}

.web-studio {
  text-transform: uppercase;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  line-height: 1.1666666;
  font-family: Raleway;
  letter-spacing: 0.03em;
}

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

.web {
  color: #4d5ae5;
}

.navigation-list-a {
  display: block;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #2e2f42;
  position: relative;
  text-decoration: none;
  padding: 24px 0;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.navigation-list-a.active {
  color: #404bbf;
}

.navigation-list-a.active::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background-color: #404bbf;
}

.navigation-list-a:hover,
.navigation-list-a:focus {
  color: #404bbf;
}

.list-address-a {
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.02em;
  font-size: 16px;
  line-height: 1.5;
  color: #434455;
  text-decoration: none;
  padding: 24px 0;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* main: 'hero' section */
.hero-section {
  display: flex;
  justify-content: center;
  background-color: #2e2f42;
  background-image:
    linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
    url('../images/people-office.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  color: white;
  padding: 188px 0;
  max-width: 1440px;
  margin: 0 auto;
}

.hero-header-h1 {
  font-size: 56px;
  line-height: 1.071428;
  letter-spacing: 0.02em;
  text-align: center;
  max-width: 496px;
}

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

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

/* main: 'our-features', 'our team', 'our portfolio' sections */
.our-features {
  padding: 120px 0;
}

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

.our-features-li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: calc((100% - 72px) / 4);
}

.our-features-h3 {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: left;
}

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

.our-features-p {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
  text-align: left;
}

.section-title {
  text-align: center;
  font-size: 36px;
  letter-spacing: 0.02em;
  line-height: 1.111111111111;
  color: #2e2f42;
  font-size: 36px;
  line-height: 1.1111111;
}

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

.our-team-list {
  display: flex;
  gap: 24px;
  padding: 0;
  margin-top: 72px;
}

.our-team-li {
  display: block;
  border-radius: 0 0 4px 4px;
  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);
}

.our-portfio {
  display: flex;
  justify-content: center;
  padding: 120px 0;
}

.our-portfolio-list {
  display: flex;
  flex-wrap: wrap;
  row-gap: 48px;
  column-gap: 24px;
  padding: 0;
  align-content: space-between;
  margin-top: 72px;
}

.portfolio-content,
.team-content {
  display: flex;
  flex-direction: column;
  padding: 32px 16px;
  gap: 8px;
}

.portfolio-content {
  border-bottom: 1px solid #e7e9fc;
  border-left: 1px solid #e7e9fc;
  border-right: 1px solid #e7e9fc;
}

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

.image-box {
  position: relative;
  overflow: hidden;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(100%);
  background-color: #4d5ae5;
}

.our-portfolio-list-li:hover .overlay {
  transform: translateY(0);
}

.overlay-paragraph {
  padding: 40px 32px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
}

.our-portfolio-list-li: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);
}

.our-team-li {
  background-color: white;
}

.our-portfio-h3,
.our-team-h3 {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
}

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

.our-team-h3,
.our-team-text {
  text-align: center;
}

.our-portfio-h3,
.our-portfio-text {
  text-align: left;
}

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

.footer-logo-container {
  display: flex;
  flex-direction: column;
  margin-right: 120px;
}

.footer-p {
  font-size: 16px;
  line-height: 1.5;
  color: #f4f4fd;
  letter-spacing: 0.02em;
  max-width: 264px;
  margin-top: 16px;
}

.logo-footer {
  color: #f4f4fd;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-footer:hover,
.logo-footer:focus,
.logo-header:hover,
.logo-header:focus {
  color: #404bbf;
}

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

.icon {
  fill: #2e2f42;
}

.social-icons-list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 24px;
}

.social-icons-list.below {
  gap: 16px;
}

.social-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  fill: #f4f4fd;
}

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

.footer-subscribe {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-left: auto;
}

.subscribe-text {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: white;
}

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

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

.footer-email::placeholder {
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: white;
}

.footer-button {
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 16px;
  border-radius: 4px;
  padding-block: 8px;
  padding-inline: 24px;
  background-color: #4d5ae5;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-align: center;
  color: white;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.subscribe-icon {
  fill: white;
}

.footer-form {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 24px;
}

.social-media-info {
  color: white;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

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

.social-icons-item {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 40px;
  height: 40px;
}

.social-link {
  width: 40px;
  height: 40px;
  background-color: #4d5ae5;
  border-radius: 50%;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.modal {
  max-width: 408px;
  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;
  padding: 24px;
}

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

.form-container {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
}

.form-field {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 4px;
}

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

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

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

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

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

.form-textarea::placeholder {
  font-weight: 400;
  font-size: 12px;
  line-height: 1.16667;
  letter-spacing: 0.04em;
  color: #8e8f99;
}

.checkbox-label {
  font-weight: 400;
  font-size: 12px;
  line-height: 1.16667;
  letter-spacing: 0.04em;
  color: #8e8f99;
  padding: 0 24px;
}

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

.privacy-policy {
  font-weight: 400;
  font-size: 12px;
  line-height: 1.33333;
  text-decoration: underline;
  text-decoration-skip-ink: none;
  color: #4d5ae5;
}

.form-button {
  display: block;
  border-radius: 4px;
  padding-block: 16px;
  padding-inline: 32px;
  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;
  text-align: center;
  color: white;
  margin-left: auto;
  margin-right: auto;
  width: 169px;
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.form-field:nth-child(1),
.form-field:nth-child(2),
.form-field:nth-child(3) {
  margin-bottom: 8px;
}

.form-field:nth-child(4) {
  margin-bottom: 16px;
}

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

.close-button {
  display: block;
  border: none;
  border: 1px solid rgba(0, 0, 0, 0.1);
  position: relative;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  background-color: #e7e9fc;
  margin-left: auto;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.close-button:hover .close-icon,
.close-button:focus .close-icon {
  fill: white;
}

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

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

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

.wrapper-user::after {
  content: '';
  position: absolute;
  left: 38px;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25px;
  height: 18px;
  background-color: #2e2f42;
}

.modal-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;

  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(46, 47, 66, 0.4);
  opacity: 0;
  pointer-events: none;

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

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.checkbox-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 16px;
  height: 16px;
}

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

.checkbox-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  margin: 0;
  z-index: 2;
}

.checkbox-icon {
  opacity: 0;
  fill: #f4f4fd;
}

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

.checkbox-input:checked + .checkbox-box .checkbox-icon {
  opacity: 1;
  fill: #f4f4fd;
}
