/* font-family: "Raleway", sans-serif;
font-family: "Roboto", sans-serif; */

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

/* reset */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

h1, h2, h3, h4, h5, h6, p {
  margin: 0;
}
  
a {
  text-decoration: none;
}

section {
  padding: 120px 0;
}

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

li {
  display: list-item;
  unicode-bidi: isolate;
}

/* common */

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

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

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

.header-logo .logo-part {
  color: #2e2f42;
}

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

.nav-link {
  position: relative;
  display: block;
  padding: 24px 0;
  font-family: "Roboto", sans-serif;
  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: 0;
  height: 4px;
  border-radius: 2px;
  background-color: #404bbf;
  transition: width 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover::after,
.nav-link:focus::after,
.nav-link.current::after {
  width: 100%;
}

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

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

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

.contacts-link {
  display: block;
  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);
}

/* main */

.title-section {
  max-width: 1440px;
  display: flex;                         
  align-items: center;         
  padding: 188px 0;
  background-color: #2e2f42;
  background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), url(../images/background-people-office.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  flex-direction: column;
  justify-content: center;
  background-position: center;
  margin: 0 auto;
}

.title-section .container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 48px;
}

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

.title-button {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
  background-color: #4d5ae5;
  cursor: pointer;
  text-transform: capitalize;
  padding: 16px 32px;
  border: none;
  border-radius: 4px;
  min-width: 169px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

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

.benefits-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  justify-content: center;
  margin-bottom: 8px;
  height: 112px;
  border: 1px solid #8e8f99;
  border-radius: 4px;
  background-color: #f4f4fd;
}

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

.benefits-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.our-team {
  background-color: #f4f4fd;
}

.second-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-group {
  width: 100%;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  text-align: center;
  max-height: 428px;
}

.team-cards {
  background-color: #fff;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  width: calc((100% - 3 * 24) / 4);
  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);
}

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

.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-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
}

.social-lils {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.social-frame {
  list-style: none;
  margin-top: 8px;
  margin-bottom: 32px;
  display: flex;
  justify-content: center;
}

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

.social-frame .social-link .icon {
  fill: #F4F4FD;
}

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

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

.portfolio-list li {
  margin-bottom: 48px;
}

.portfolio-list li:nth-last-child(-n+3) {
  margin-bottom: 0;  
}

.portfolio-card {
  width: calc((100% - 2 * 24px) / 3);
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portvolio-overlay {
  position: relative;
  overflow: hidden;
}

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

.portfolio-card: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-card:hover .overlay-text {
  transform: translateY(0);
}

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

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

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

/* footer */

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

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

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

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

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

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

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

.footer-social .social-lils {
  display: flex;
  gap: 16px;
  justify-content: flex-start;
  margin: 0;
  padding: 0;
}

.footer-social .social-lils .social-frame {
  margin: 0;
}

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

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

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

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

.subscribe-input:focus {
  outline: none;
  border-color: #31d0aa;
}

.subscribe-button {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-align: center;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  border-radius: 4px;
  padding-block: 8px;
  padding-inline: 24px;
  min-width: 165px;
  height: 40px;
  background-color: #4d5ae5;
  border: none;
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.subscribe-button:hover,
.subscribe-button:focus {
 background-color: #31d0aa;
}

/* modal */

.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;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 408px;
  min-height: 584px;
  background-color: #fcfcfc;
  border-radius: 4px;
  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);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  padding: 72px 24px 24px 24px;
}

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

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

.icon.close-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  fill: #2e2f42;
  margin: 0 auto;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

.main-form {
  display: flex;
  flex-direction: column;
}

.title-button.send-bottom {
  width: 169px;
  height: 56px;
  display: block;
  margin: 0 auto;
}

.form-imput-wrapper {
  display: flex;
  flex-direction: column;
  position: relative;
  gap: 4px;
  margin-bottom: 8px;
}

.form-imput-wrapper.textarea-wrapper {
  margin-bottom: 16px;
}

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

.form-imput-icon {
  position: relative;
}

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

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

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

.form-input:focus + .form-icon {
  fill: #4d5ae5;
}

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

.form-textarea::placeholder {
  font-size: 12px;
  line-height: 1.16667;
  letter-spacing: 0.04em;
  color: rgba(46, 47, 66, 0.4);
}

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

.form-imput-wrapper.checkbox-wrapper {
  margin-bottom: 24px;
}

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

.checkbox-label {
  align-items: center;
  gap: 8px;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color:#8e8f99;
  cursor: pointer;
}

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

.checkbox-icon {
  width: 10px;
  height: 8px;
  opacity: 0;
  transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

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

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

.checkbox-input:checked + .checkbox-label .checkbox-icon {
  opacity: 1;
}

.checkbox-input:focus-visible + .checkbox-label .custom-checkbox {
  box-shadow: 0 0 0 3px rgba(64, 75, 191, 0.18);
  border-color: #404bbf;
  outline: none;
}

.checkbox-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.1667;
  letter-spacing: 0.04em;
  color: #8e8f99;
}

.policy-link {
  line-height: 1.3333;
  text-decoration: underline;
  text-decoration-skip-ink: none;
  color: #4d5ae5;
}

