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

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

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

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

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

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

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

.page-header {
  border-bottom: 1px solid #e7e9fc;
  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);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

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

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

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

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

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


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

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

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

.contact-link {
  text-decoration: none;
  color: #434455;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.hero {
  max-width: 1440px;
  margin: 0 auto;
  padding: 188px 0;
  background:
    linear-gradient(rgba(47, 47, 66, 0.7), rgba(47, 47, 66, 0.7)),
    url("../images/photo-11.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  text-align: center;
}

.hero-title {
  max-width: 496px;
  margin: 0 auto 48px;
  font-size: 56px;
  line-height: 1.07;
  letter-spacing: 0.02em;
  color: #ffffff;
}

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

.hero-btn:hover,
.hero-btn:focus {
  background-color: #404bbf;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.features {
  padding: 120px 0;
}

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

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

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

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

.feature-text {
  line-height: 1.5;
  letter-spacing: 0.02em;
}

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

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

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

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

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

.team-position {
  margin-bottom: 8px;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

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

.team-social-list .social-link {
  width: 40px;
  height: 40px;
  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);
}

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

.team-social-list .social-icon {
  width: 16px;
  height: 16px;
  fill: #f4f4fd;
}

.portfolio {
  padding: 120px 0;
}

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

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

.portfolio-item:hover {
  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);
}

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

.overlay {
  position: absolute;
  inset: 0;
  background-color: #4d5ae5;
  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.overlay-text {
  padding: 40px 32px;
  color: #f4f4fd;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

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

.portfolio-type {
    line-height: 1.5;
    letter-spacing: 0.02em;
}

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

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

.footer-social-title {
  font-weight: 500;
  line-height: 1.5;
  color: #ffffff;
  margin-bottom: 16px;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.footer-group {
  display: flex;
  gap: 120px;
}

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

.footer-text {
  max-width: 264px;
  line-height: 1.5;
}

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

.footer .social-link {
  width: 40px;
  height: 40px;
  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);
}

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

.footer .social-icon {
  width: 24px;
  height: 24px;
  fill: #f4f4fd;
}

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

.subscribe-btn {
 display: flex;
  align-items: center;
  gap: 16px;

  padding: 8px 24px;

  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;

  color: #ffffff;
  background-color: #4d5ae5;

  border: none;
  border-radius: 4px;
  cursor: pointer;

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

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

.subscribe-icon {
  fill: #ffffff;
}

.form {
  display: flex;
  gap: 24px;
  align-items: flex-end;
}

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

.form-input {
  width: 264px;
  height: 40px;
  padding-left: 16px;

  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.04em;

  color: #ffffff;
  background-color: transparent;

  border: 1px solid #ffffff;
  border-radius: 4px;
  outline: none;

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

.form-input::placeholder {
  color: #ffffff;
}

.form-input:focus {
  border-color: #31d0aa;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(46, 47, 66, 0.4);

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

  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal {
  background-color: #ffffff;
  width: 408px;
  padding: 72px 24px 24px;
  border-radius: 4px;
  position: relative;

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

.modal-close {
  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: none;
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

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

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

.modal-label {
  display: block;
  margin-bottom: 8px;
}

.modal-label-text {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: #8e8f99;
}

.modal-input-wrap {
  position: relative;
  margin-bottom: 8px;
}

.modal-input {
  width: 100%;
  height: 40px;
  padding-left: 38px;

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

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

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

  text-align: center;
  margin-bottom: 16px;
}

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

.modal-input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  fill: #2e2f42;

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

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

.modal-textarea {
  width: 100%;
  height: 120px;
  resize: none;
  padding: 8px 16px;

  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  outline: none;
  transition: border-color 250ms;

  margin-bottom: 16px;
}

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

.modal-submit-btn {
  display: block;
  margin: 0 auto;

  min-width: 169px;
  height: 56px;

  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;

  color: #ffffff;
  background-color: #4d5ae5;

  border: none;
  border-radius: 4px;
  cursor: pointer;

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

.modal-submit-btn:hover,
.modal-submit-btn:focus {
  background-color: #404bbf;
}

.modal-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  cursor: pointer;
  margin-bottom: 24px;
  line-height: 1.33;
  color: #8e8f99;
}

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

.checkbox-custom {
  width: 16px;
  height: 16px;
  border: 1px solid #2e2f42;
  border-radius: 2px;

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

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

.checkbox-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox-custom {
  width: 16px;
  height: 16px;

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

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

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

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

.checkbox-custom svg {
  width: 10px;
  height: 8px;
  fill: #f4f4fd;
  opacity: 0;
}

.checkbox-input:checked + .checkbox-custom svg {
  opacity: 1;
}



