/* --------------------- */
/* General */
/* --------------------- */

body {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 2%;
  color: #434455;
  background-color: #ffffff;
}

h1, h2, h3, h4, h5, h6 {
  color: #2e2f42;
  margin: 0;
}

p {
  margin: 0;
}

a {
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 4%;
  text-decoration: none;
}

ul {
  list-style-type: none;
  margin: 0;
  padding-left: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.container { 
  max-width: 1158px;
  padding: 0 15px;
  margin: 0 auto;
}

.section {
  padding: 120px 0;
}

/* --------------------- */
/* Header */
/* --------------------- */

.header-flex {
  display: flex;
  gap: 40px;
}

.header {
  display: flex;
  justify-content: space-between;
}

.page-header {
  border-bottom: 1px solid #e7e9fc;
  padding: 24px 0;
  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);
}

.nav {
  display: flex;
  align-items: center;
  gap: 76px;
}

.logo {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  color: #4d5ae5;
  text-transform: uppercase;
}

.logo-header {
  margin-right: 76px;
}

.logo-right {
  color: #2e2f42;
}

.nav-section {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #2e2f42;
  font-weight: 500;
  padding: 24px 0;
}

.nav-section:hover,
.nav-section:focus {
  color: #404bbf;
}

.studio {
  position: relative;
  color: #404bbf;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.studio::after {
  color: #404bbf;
  content: "";
  width: 100%;
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 4px;
  background-color: #404bbf;
  border-radius: 2px;
}

.studio:active {
  text-decoration: underline;
}

.contacts {
  color: #434455;
  font-style: normal;
}

.contact {
  color: #434455;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;

  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.contact:hover,
.contact:focus {
  color: #404bbf;
}

/* --------------------- */
/* Hero-section */
/* --------------------- */

.hero {
  overflow: hidden;
  max-width: 1440px;
  background-color: #2e2f42;
  background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), url(../images/people-office.jpg);
  padding: 188px 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-flex {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

.hero-heading {
  max-width: 496px;
  font-size: 56px;
  text-align: center;
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.cta {
  min-width: 169px;
  height: 56px;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
  background-color: #4d5ae5;
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.cta:hover,
.cta:focus {
  background-color: #404bbf;
}

/* --------------------- */
/* Features-section */
/* --------------------- */

.features-flex {
  display: flex;
  gap: 24px;
}

.feature {
  width: calc((100% - 72px) / 4); 
  letter-spacing: 0.02em;
  font-size: 20px;
  font-weight: 500;
}

.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;
}

.features-heading {
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.feature-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}

.icon-element {
  width: 100%;
  height: 112px;
  background-color: #f4f4fd;
  border: 1px Solid #8e8f99;
  border-radius: 4px;
  margin-bottom: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.icon-feature {
  margin: 24px;
  width: 100%;
  fill: #2e2f42;
  display: block;
}

/* --------------------- */
/* About-section */
/* --------------------- */

.about-flex {
  display: flex;
  gap: 24px;
}

.about {
  background-color: #f4f4fd;
}

.about-heading {
  margin-bottom: 72px;
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-transform: capitalize;
}

.member-card {
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: calc((1158 - 3 * 0) / 4);
  border-radius: 0 0 4px 4px;
  box-shadow: 0 1px 6px rgba(46, 47, 66, 0.08), 0 1px 1px rgba(46, 47, 66, 0.16), 0 2px 1px rgba(46, 47, 66, 0.08);
}

.member-info {
  display: flex;
  flex-direction: column;
  padding: 32px 0;
}

.member-name {
  text-align: center;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.member-text {
  text-align: center;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.icon-list {
  display: flex;
  gap: 24px;
  justify-content: center;
}

.icon-social {
  color: #f4f4fd;
  fill: currentColor;
}

.icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #4d5ae5; 
  fill: #f4f4fd;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-link:hover,
.icon-link:focus {
  background-color: #404bbf;
  cursor: pointer;
}

/* --------------------- */
/* Portfolio-section */
/* --------------------- */

.portfolio {
  font-size: 36px;
  line-height: 1.11;
  text-align: center;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  margin-bottom: 72px;
}

.port-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  row-gap: 48px;
}

.port-element {
  width: calc((1158 - 5 * 0) / 6);
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.port-element:hover,
.port-element:focus {
  box-shadow: 0 1px 6px rgba(46, 47, 66, 0.08), 0 1px 1px rgba(46, 47, 66, 0.16), 0 2px 1px rgba(46, 47, 66, 0.08);
  transform: translateY(0%);
}

.port-picture {
  position: relative;
  overflow: hidden;
  transition-property: color, background-color, box-shadow;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.overlay {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  padding: 40px 32px;
  font-weight: 400;
  text-align: start;
  color: #f4f4fd;
  display: flex;
  justify-content: center;
  background-color: #4d5ae5;

  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;

  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.port-element:hover .overlay {
  transform: translateY(0);
}

.portfolio-header {
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.portfolio-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.port-card {
  display: flex;
  flex-direction: column;
  padding: 32px 16px;
  border-left: 1px solid #e7e9fc;
  border-right: 1px solid #e7e9fc;
  border-bottom: 1px solid #e7e9fc;
}

/* --------------------- */
/* Footer-section */
/* --------------------- */

.footer {
  background-color: #2e2f42;
  padding: 100px 0;
}

.footer-container {
  display: flex;
  align-items: baseline;
}

.footer-left {
  margin-right: 120px;
}

.footer-right {
  margin-left: 80px;
}

.header-footer {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #FFFFFF;
  margin-bottom: 16px;
}

.footer-social {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: start;
}

.icon-list-footer {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.logo-f {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  color: #4d5ae5;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 16px;
}

.logo-footer {
  color: #f4f4fd;
}

.footer-text {
  max-width: 264px;
  line-height: 1.5;
  color: #f4f4fd;
  letter-spacing: 0.02em;
}

.footer-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #4d5ae5; 
  fill: #f4f4fd;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-link:hover,
.footer-link:focus {
  background-color: #31d0aa;
}

.footer-sub {
  margin-bottom: 16px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.footer-form {
  display: flex;
  gap: 24px;
}

.sub-input {
  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;
}

.sub-input::placeholder {
  color: #ffffff;
}

.sub-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;
}

.sub-icon {
  margin-left: 16px;
}

/* --------------------- */
/* Modal */
/* --------------------- */

.modal-overlay {
  background-color: rgba(46, 47, 66, 0.4);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;

  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1), visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #FCFCFC;
  border-radius: 4px;
  width: 408px;
  min-height: 584px;
  padding: 72px 24px 24px 24px;
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  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);
}

.close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 24px;
  height: 24px;
  background-color: #E7E9FC;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  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);
}

.close:focus,
.close:hover {
  background-color: #404bbf;
  border: none;
}

.icon-close {
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
  fill: currentColor;
}

.close:focus .icon-close,
.close:hover .icon-close {
  fill: #ffffff;
}

.form-p {
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  letter-spacing: 0.02em;
  color: #2E2F42;
  font-size: 16px;
  margin-bottom: 16px;
}

.form-field {
  margin-bottom: 8px;
}

.form-label {
  color: #8E8F99;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 4px;
}

.input-wrapper {
  position: relative;
}

.form-input {
  font-family: inherit;
  font-size: inherit;
  height: 40px;
  width: 100%;
  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);
}

.form-input:focus {
  border-color: #4D5AE5;
}

.form-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
  color: #2E2F42;
  fill: #2e2f42;
  display: block;
}

.form-input:focus + .form-icon {
  fill: #4D5AE5;
}

.comment-field {
  margin-bottom: 16px;
}

.comment {
  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);
  
}

.comment:focus {
  border-color: #4D5AE5;
}

.custom-checkbox {
  margin-bottom: 24px;
}

.privacy-label {
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
}

.checkbox-icon {
  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;
}

.custom-checkbox:has(.checkbox-input:checked) .checkbox-icon {
  background-color: #404bbf;
  border: none;
  fill: #f4f4fd;
}

.policy-link {
  color: #4d5ae5;
  text-decoration: underline;
}

.button-send {
  min-width: 169px;
  height: 56px;
  display: block;
  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;
  justify-self: center;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}