/* body */

body {
  font-family: 'Roboto', sans-serif;
  color: #434455;
  background-color: #ffffff;
  font-size: 16px;
  line-height: 1.5;
}

a {
  text-decoration: none;
}
/* common */
.container {
  width: 1158px;
  margin: 0 auto;
  padding: 0 15px;
}
ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.page-header {
  border-bottom: 1px solid #e7e9fc;
  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);
}

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

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

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

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

/* logo */

.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;
  margin-right: 76px;
}
.header-logo {
  padding: 24px 0;
}

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

.logo-accent-footer {
  color: #f4f4fd;
}

/* navigation */

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

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

.contact-link {
  display: block;
  padding: 24px 0;
}

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

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

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

/* hero */

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

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

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

.hero-button {
  background-color: #4d5ae5;
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  padding: 16px 32px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  border: none;
  cursor: pointer;
  min-width: 169px;
  height: 56px;
  box-shadow: 0px 4px 4px 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;
}
/* features section */
.features {
  padding: 120px 0;
}

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

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

.features-item {
  display: flex;
  flex-direction: column;
}

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

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

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

/* light */

.light {
  background-color: #f4f4fd;
  padding: 120px 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.light h2 {
  margin-bottom: 72px;
}

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

.team-card {
  background-color: #ffffff;
  width: 264px;
  border-radius: 0 0 4px 4px;
  box-shadow:
    0 2px 1px rgba(46, 47, 66, 0.08),
    0 1px 1px rgba(46, 47, 66, 0.16),
    0 1px 6px rgba(46, 47, 66, 0.08);
}

.team-card {
  background-color: #ffffff;
  border-radius: 0 0 4px 4px;
  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);
}
.team-info {
  padding: 32px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.team-social-list {
  display: flex;
  gap: 24px;
  padding: 0;
  margin: 0;
  list-style: none;
  justify-content: center;
}

.social-link-wrapper {
  display: flex;
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.team-social-link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #4d5ae5;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.team-social-link svg {
  fill: #f4f4fd;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
}

/* portfolio */

.portfolio {
  padding: 120px 0;
}

.portfolio-title {
  margin-bottom: 72px;
}

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

.portfolio-item {
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.portfolio-thumb {
  position: relative;
  overflow: hidden;
}
.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  letter-spacing: 0.02em;
  width: 100%;
  height: 100%;
  background-color: #4d5ae5;
  color: #f4f4fd;
  padding: 40px 32px;
  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

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

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

.portfolio-overlay p {
  color: #f4f4fd;
  margin: 0;
  font-size: 16px;
}

/* team card text  */
.title {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
}
.section-text {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  color: #434455;
  margin-bottom: 0;
}

/* footer  */

.footer {
  background-color: #2e2f42;
  padding: 100px 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.footer-container {
  display: flex;

  align-items: baseline;
}

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

.footer-logo-social {
  display: block;
}
.footer-social {
  max-width: 96px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #ffffff;
  margin-bottom: 0;
}

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

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

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

.social-links {
  list-style: none;
  padding: 0;
  display: flex;
}

.footer-text {
  max-width: 264px;
  height: 72px;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
}
.footer-text-social {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-left: 120px;
}

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

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

.footer-social-link svg {
  fill: #f4f4fd;
}

.footer-contact-info {
  margin-left: auto;
}

.footer-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.footer-form-row {
  display: flex;
  align-items: center;
  gap: 24px;
}
.footer-email {
  flex-grow: 1;
}

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

.footer-email::placeholder {
  color: #ffffff;
}

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

.footer-contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer-button-wrapper {
  display: flex;
  justify-content: center;
}

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

.footer-button-text {
  max-width: 77px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
  margin-bottom: 0;
  text-align: center;
}
.footer-button:hover,
.footer-button:focus {
  background-color: #31d0aa;
}

.footer-button-content {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
}

.feature-icon {
  fill: #ffffff;
  width: 64px;
  height: 64px;
}

h2 {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
}

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

/*backdrop is-open"*/

.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:not(.is-open) .modal {
  transform: translate(-50%, -50%) scale(1.5);
}

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

.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  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;
  border-radius: 4px;
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  padding: 72px 24px 24px;
}

.modal-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;

  width: 24px;
  height: 24px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  cursor: pointer;

  background-color: #e7e9fc;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;

  box-shadow:
    0 2px 1px rgba(0, 0, 0, 0.2),
    0 1px 1px rgba(0, 0, 0, 0.14),
    0 1px 3px rgba(0, 0, 0, 0.12);

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

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

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

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

/* modal content */

.modal-title {
  max-width: 360px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #2e2f42;
  text-align: center;
  margin-bottom: 16px;
}
.modal-form {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.modal-section {
  margin: 8px 0 0;
}

.modal-label {
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: rgba(142, 143, 153, 1);
  display: block;
  font-size: 12px;
}

.form-label .modal-label {
  white-space: nowrap;
}

.modal-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  display: block;
  margin-top: 4px;
}

.modal-input-cursor {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
}

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

.modal-input {
  width: 100%;
  height: 40px;
  padding-left: 38px;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  background-color: transparent;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.modal-textarea:focus {
  outline: none;
  border-color: #4d5ae5;
}

/*fieldset*/

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid transparent;
}

.form-field {
  display: flex;
  align-items: center;
  margin-top: 16px;
  max-width: 360px;
  height: 16px;
}

.custom-checkbox {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  fill: transparent;
  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);
}

.form-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.custom-checkbox svg {
  opacity: 0;
  fill: #ffffff;
}

.form-checkbox {
  width: 16px;
  height: 16px;

  margin-right: 8px;
  cursor: pointer;
}

.form-checkbox:checked + .form-label .custom-checkbox {
  background-color: #404bbf;
  border-color: none;
  fill: #f4f4fd;
}

.form-checkbox:checked + .form-label .custom-checkbox svg {
  opacity: 1;
  fill: #ffffff;
}

.form-checkbox:focus + .form-label .custom-checkbox {
  border-color: #404bbf;
}

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

.modal-input:focus + .modal-icon,
.modal-input-wrapper:focus-within .modal-icon {
  fill: #404bbf;
}

.privasy-link {
  color: #4d5ae5;
  line-height: 1.33;
  text-decoration: underline;
  text-decoration-skip-ink: none;
  cursor: pointer;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  margin-left: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  white-space: nowrap;
  clip-path: inset(50%);
  clip: rect(0 0 0 0);
  overflow: hidden;
}

/* modal button */

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

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

.modal-text {
  color: #ffffff;
  text-decoration: underline;
  margin: 0;
}
.checkbox-text-wrapper {
  display: flex;
  align-items: center;
}

.footer-button-icon {
  fill: #ffffff;
  width: 24px;
  height: 24px;
}
