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

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

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

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

a {
  text-decoration: none;
}

ul {
  list-style: none;
}

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

.navigation {
  display: flex;
  align-items: center;
}

.logo-navigation {
  display: block;
  padding: 24px 0;
  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;
}

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

.menu {
  display: flex;
  gap: 40px;
}

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

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

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

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

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

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

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

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

.section {
  padding: 120px 0;
}

/* 1 секція */

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

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

.hero-button {
  background-color: #4d5ae5;
  border: none;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: white;
  cursor: pointer;
  padding: 16px 32px;
  border-radius: 4px;
  min-width: 169px;
  display: block;
  margin: 0 auto;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* 2 секція */

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

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

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

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

.feature-item {
  width: calc((100% - 72px) / 4);
  text-align: auto;
}

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

.feature-icon svg {
  display: block;
  margin: 0 auto;
}

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

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

/* 3 секція */

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

.team-socials {
  margin-top: 8px;
}

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

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

.social-link-team {
  width: 100%;
  height: 100%;
  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-link-team:hover,
.social-link-team:focus {
  background-color: #404bbf;
}

.social-icon {
  fill: #f4f4fd;
}

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

.team-item {
  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);
  width: calc((100% - 72px) / 4);
}

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

.team-info {
  padding: 32px 0;
  text-align: center;
}

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

.team-position {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  color: #434455;
  margin-bottom: 8px;
}

/* 4 секція */

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

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

.portfolio-item {
  border-bottom: 1px solid #e7e9fc;
  width: calc((100% - 48px) / 3);
  transition: box-shadow 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-overlay-wrapper {
  position: relative;
  overflow: hidden;
}

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

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

.portfolio-img {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: cover;
}

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

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

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

/* footer */

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

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

/* MODAL */

.modal {
  margin-left: 80px;
}

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

.subscribe-email {
  display: flex;
  gap: 24px;
}

.input-label {
  width: 264px;
  height: 40px;
  border: 1px solid #ffffff;
  background-color: transparent;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  padding-left: 16px;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  color: #ffffff;
}

input::placeholder {
  color: #ffffff;
}

.input-button {
  min-width: 165px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
  cursor: pointer;
  background-color: #4d5ae5;
  border: none;
  border-radius: 4px;
}

.icon-frame {
  margin-left: 16px;
}

/* кінець модалу */

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

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

.studio-footer {
  color: #f4f4fd;
}

.footer-text {
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
  max-width: 264px;
}

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

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

.icon-item {
  width: 40px;
  height: 40px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  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;
}

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

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

/* modal overlay */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(46, 47, 66, 0.4);
  transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

.modal-overlay-window {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 408px;
  min-height: 584px;
  background: #fcfcfc;
  box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.14), 0px 1px 3px rgba(0, 0, 0, 0.12),
    0px 2px 1px rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  padding: 72px 24px 24px 24px;
}

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

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

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

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

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

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

.window-form {
  margin-bottom: 8px;
}

.window-form-label {
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
  display: block;
  margin-bottom: 4px;
}

.window-input {
  position: relative;
}

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

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

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

.window-input-text:focus + .window-svg-icon {
  fill: #4d5ae5;
}

.window-comment {
  margin-bottom: 16px;
}

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

.window-textarea:focus {
  border-color: #4d5ae5;
}

.window-checkbox {
  margin-bottom: 24px;
}

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

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

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

.privacy-policy {
  color: #4d5ae5;
  text-decoration: underline;
}

.button-send {
  display: block;
  min-width: 169px;
  height: 56px;
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
  cursor: pointer;
  background-color: #4d5ae5;
  border: none;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 4px;
  margin-left: 90px;
}

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