/* Global Reset */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

ul,
ol {
  list-style: none;
}

a {
  text-decoration: none;
}

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

img {
  display: block;
}

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

/* Header */

.logo {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  color: #4d5ae5;
  margin-right: 76px;
  margin-bottom: 0px;
}

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

.header {
  background-color: #ffffff;
  color: #4d5ae5;
  text-align: center;
  height: 72px;
  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;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  height: 100%;
}

/* Navigation */

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

.navigation-list-item a:hover,
.navigation-list-item a:focus {
  color: #fff;
  background-color: #404bbf;
  border-radius: 4px;
  outline: none;
}

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

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

/* Contact */

.address {
  font-style: normal;
}

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

.address-link {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.navigation-list:hover,
.navigation-list:focus,
.address-link:hover,
.address-link:focus {
  color: #404bbf;
}

/* Introduction Section */

.introduction {
  text-align: center;
  background-color: #2e2f42;
  color: white;
  padding: 120px 0 120px;
}

.introduction.section {
  background-image: linear-gradient(
      to bottom,
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url(../images/introduction.jpg);
  max-width: 1440px;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-color: #2e2f42;
  padding: 188px 0;
  text-align: center;
}

.introduction-title {
  font-size: 56px;
  line-height: 1.07;
  letter-spacing: 0.02em;
  text-align: center;
  color: #fff;
  max-width: 496px;
  margin-bottom: 32px;
  margin-left: auto;
  margin-right: auto;
}

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

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

/* Features Section */

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

.features {
  padding: 120px 0;
}

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

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

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

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

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

.features-icon {
  display: block;
  fill: currentColor;
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.features-list-item:hover,
.features-list-item:focus-within {
  box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.25);
}

.features-list svg {
  fill: currentColor;
}

/* Team Section */

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

.team-card-text {
  padding: 32px 0;
}

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

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

.team-list-item {
  background-color: #ffffff;
  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);
  flex-basis: calc((100% - 3 * 24) / 4);
  text-align: center;
}

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

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

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

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

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

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

.social-media-icon {
  width: 16px;
  height: 16px;
  fill: var(--footer-text-color, #f4f4fd);
}
.icon {
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.icon:hover,
.icon:focus-within {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

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

.portfolio {
  padding: 120px 0;
}

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

.portfolio-list-item {
  flex-basis: calc((100% - 2 * 24px) / 3); /* 3 cards per row */
  background-color: #fff;
  box-shadow: 0px 2px 1px rgba(0, 0, 0, 0.08), 0px 1px 1px rgba(0, 0, 0, 0.16),
    0px 1px 6px rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-list-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-item-title {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
  margin-bottom: 8px;
}

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

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

.card-thumb {
  position: relative;
  overflow: hidden;
}

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

.portfolio-list li:hover .thumb-text,
.portfolio-item:hover .thumb-text {
  transform: translateY(0%);
}

/* Footer */

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

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

.footer-logo {
  display: inline-block;
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  color: #4d5ae5;
  margin-bottom: 16px;
}

.footer-logo-studio {
  color: #f4f4fd;
}
.footer-text {
  max-width: 264px;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
  text-align: left;
}

.social-media-container {
  display: flex;
  flex-direction: column;
}

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

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

.social-media-link {
  width: 100%;
  height: 100%;
  background-color: var(--iris, #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-media-link:hover,
.social-media-link:focus {
  background-color: #31d0aa;
}

.social-media-icon {
  width: 24px;
  height: 24px;
  fill: var(--footer-text-color, #f4f4fd);
}

.social-media-title {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--footer-text-color, #ffffff);
  margin-bottom: 16px;
}
.footer-logo-wrapper {
  margin-right: 120px;
}

/* Subscribe */
.page-text.form-title {
  margin-bottom: 16px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #ffffff;
}

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

.input-subscribe {
  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-subscribe::placeholder {
  color: #ffffff;
}

/* Subscribe button */

.subscribe-box > .form-title {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.button-subscribe {
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
  cursor: pointer;
  background-color: #4d5ae5;
  border: none;
  border-radius: 4px;
  min-width: 165px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.icon-subscribe {
  margin-left: 16px;
  fill: #ffffff;
}

/* Modal window */
.modal-window {
  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;
  pointer-events: none;
}

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

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

/* Close button */
.modal-close-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);
}

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

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

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

/* Modal form */
.box-label-modal {
  position: relative;
  margin-bottom: 8px;
}

.box-textarea-modal {
  margin-bottom: 16px;
}

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

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

.box-input-modal {
  position: relative;
}

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

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

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

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

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

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

.box-checkbox-modal {
  margin-bottom: 24px;
}

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

/* Placeholders*/

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

.box-input-modal:focus-within .placeholder-icon {
  fill: #4d5ae5;
}

.span-icon-checkbox {
  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;
  justify-content: center;
  align-items: center;
  fill: transparent;
  margin-right: 8px;
}

/* Modal button */

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

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