/* #region Base */
body {
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  color: #434455;
  background-color: #fff;
}
/* #endregion */

/* #region Reset */

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

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

a {
  text-decoration: none;
}

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

button {
  border: none;
  padding: 0;
  cursor: pointer;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

/* #endregion */

/* #region Common */
.container {
  max-width: 1158px;
  margin: 0 auto;
  padding: 0 15px;
}

.team-titel,
.portfolio-titel {
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
}

.benefits-subtitle,
.team-subtitel,
.portfolio-subtitel {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
}

.benefits-text,
.team-text,
.portfolio-text,
.footer-text,
.footer-caption,
.modal-caption {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}

.social-link {
  display: flex;
  justify-content: center;
  align-items: center;

  padding: 12px;
  width: 40px;
  height: 40px;
  background-color: #4d5ae5;
  border-radius: 50%;

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

.btn {
  display: flex;
  margin-left: auto;
  margin-right: auto;
  border-radius: 4px;

  min-width: 165px;

  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
  background-color: #4d5ae5;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  cursor: pointer;

  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.btn:hover,
.btn:focus,
.btn:active {
  background-color: #404bbf;
}

/* #endregion */

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

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

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

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

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

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

.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 .logo-part {
  color: #2e2f42;
}

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

.nav-link {
  position: relative;
  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::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background-color: #404bbf;
  opacity: 0;
  transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover:after,
.nav-link:focus:after,
.nav-link.current::after {
  opacity: 1;
}

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

.contacts-link {
  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;
}

/* #endregion */

/* #region Hero */
.hero {
  background-color: #2e2f42;
  max-width: 1440px;
  margin: 0 auto;
  padding: 188px 0;
  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 {
}

.hero-titel {
  max-width: 496px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 48px;

  font-size: 56px;
  line-height: 1.07;
  letter-spacing: 0.02em;
  text-align: center;
  color: #fff;
}

.hero-button {
  display: block;
  margin-left: auto;
  margin-right: auto;
  border-radius: 4px;
  padding: 16px 32px;
  min-width: 169px;
  height: 56px;

  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
  background-color: #4d5ae5;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* #endregion */

/* #region Benefits */
.benefits {
  padding: 120px 0;
}

.benefits-titel {
}

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

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

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

.benefits-icon {
}

.benefits-subtitle {
  margin-bottom: 8px;
}

/* #endregion */

/* #region Team */
.team {
  padding: 120px 0;
  background-color: #f4f4fd;
}

.team-titel {
  margin: 0 0 72px;
  text-transform: capitalize;
}

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

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

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

.team-subtitel {
  margin-bottom: 8px;
  text-align: center;
}

.team-text {
  text-align: center;
  margin-bottom: 8px;
}

.social-list {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.social-item {
}

.social-link {
}

.social-icons {
}

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

/* #endregion */

/* #region Portfolio */
.portfolio {
  padding: 120px 0;
}

.portfolio-titel {
  margin: 0 0 72px;
  text-transform: capitalize;
}

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

.portfolio-item {
  width: calc((100% - 48px) / 3);
  background-color: #fff;
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.portfolio-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-wrapper {
  position: relative;
  overflow: hidden;
}

.portfolio-img {
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;

  width: 100%;
  height: 100%;
  padding: 40px 32px;

  letter-spacing: 0.02em;
  line-height: 1.5;
  color: #f4f4fd;
  background-color: #4d5ae5;

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

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

.portfolio-name {
  padding: 32px 16px;

  border-bottom: 1px solid #e7e9fc;
  border-left: 1px solid #e7e9fc;
  border-right: 1px solid #e7e9fc;
}

.portfolio-subtitel {
  margin-bottom: 8px;
}

/* #endregion */

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

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

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

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

.footer-text {
  max-width: 264px;
  color: #f4f4fd;
}

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

.footer-caption {
  font-weight: 500;
  color: #fff;
  margin-bottom: 16px;
}

.footer-social-list {
  display: flex;
  justify-content: center;
  gap: 16px;
}
.footer-social-item {
  width: 40px;
  height: 40px;
}
.footer-social-link {
  padding: 8px;
}
.footer-social-icons {
}

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

.footer-subscribe {
  margin-left: auto;
}

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

.footer-form-label {
  margin-bottom: 0;
}

.footer-form-input {
  width: 264px;
  height: 40px;

  padding-left: 16px;

  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: #ffffff;

  border: 1px solid #fff;
  border-radius: 4px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background-color: transparent;
}

.footer-form-input::placeholder {
  font-weight: 400;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.footer-button {
  justify-content: center;
  align-items: center;
  height: 40px;
}

.footer-button-icon {
  margin-left: 16px;
  fill: #fff;
}
/* #endregion */

/* #region Modal Backdrop */
.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;
  padding: 72px 24px 24px 24px;
  top: 50%;
  left: 50%;

  width: 408px;
  min-height: 584px;

  border-radius: 4px;
  transform: translate(-50%, -50%);

  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;

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

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

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

  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  width: 24px;
  height: 24px;
  background-color: #e7e9fc;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  cursor: pointer;

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

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

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

.modal-button:hover .modal-button-icon,
.modal-button:focus .modal-button-icon {
  fill: #fff;
}

.modal-caption {
  width: 360px;
  font-weight: 500;
  text-align: center;
  color: #2e2f42;
  margin-bottom: 16px;
}

.modal-form {
  /* padding: 0 24px; */
}
.modal-form-field {
  display: block;
  margin-bottom: 8px;
}

.modal-form-label {
  display: block;
  margin-bottom: 4px;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
}
.modal-form-wrapper {
  position: relative;
}
.modal-form-input {
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  width: 100%;
  height: 40px;
  padding: 8px 38px;
  background-color: transparent;

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

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

.modal-form-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);

  fill: #2e2f42;

  pointer-events: none;
  transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  transition-property: fill;
}

.modal-form-input:focus + .modal-form-icon {
  fill: #4d5ae5;
}
.modal-comment {
  margin-bottom: 16px;
}

.modal-form-comment {
  width: 100%;
  height: 120px;
  padding: 8px 16px;

  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  outline: transparent;
  resize: none;
  background-color: transparent;

  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: rgba(46, 47, 66, 0.4);

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

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

.modal-form-comment::placeholder {
  color: rgba(46, 47, 66, 0.4);
}

.modal-form-privacy {
  margin-bottom: 24px;
}

.modal-form-privacy-text {
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
  user-select: none;
}

.modal-form-checkbox {
  position: relative;

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

  margin-right: 8px;
  width: 16px;
  height: 16px;

  fill: transparent;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 2px;

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

input[type='checkbox']:checked
  + .modal-form-privacy-text
  > .modal-form-checkbox {
  border: none;
  background-color: #404bbf;
  fill: #f4f4fd;
}

.modal-form-checkbox-icon {
  opacity: 0;
  transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  transition-property: opacity;
}

input[type='checkbox']:checked
  + .modal-form-privacy-text
  > .modal-form-checkbox
  > .modal-form-checkbox-icon {
  opacity: 1;
}
input[type='checkbox']:focus-visible
  + .modal-form-privacy-text
  > .modal-form-checkbox {
  outline: 2px solid #404bbf;
  outline-offset: 2px;
}

.modal-form-privacy-link {
  text-decoration: underline;
  color: #4d5ae5;
}

.button-accent {
  display: block;
  border-radius: 4px;
  margin: 0 auto;
  padding: 16px 32px;
  min-width: 169px;
  height: 56px;
  color: #ffffff;

  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background-color: #4d5ae5;
  border: none;
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* #endregion */
