html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: #fff;
  color: #2e2f42;
  letter-spacing: 0.02em;
  line-height: 1.5;
  font-size: 16px;
  font-weight: 400;
}

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

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

img {
  display: block;
}

a {
  text-decoration: none;
  color: #2e2f42;
}

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

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

.section {
  padding: 120px 0;
}

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

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

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

.link {
  padding: 24px 0;
  display: block;
}

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

.email-phone {
  display: flex;
  gap: 40px;
}

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

.page-logo {
  font-family: 'Raleway', sans-serif;
  text-transform: uppercase;
  color: #4d5ae5;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.17;
}

.nav-option {
  position: relative;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.current {
  color: #404bbf;
}

.nav-option::after {
  position: absolute;
  content: '';
  display: block;
  width: 100%;
  height: 4px;
  bottom: -1px;
  border-radius: 2px;
  background-color: #404bbf;
  opacity: 0;
  transform: translateX(-25%);
  transition:
    transform 250ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-option:hover::after,
.nav-option:focus::after,
.nav-option.current::after {
  transform: translateX(0);
  opacity: 1;
}

address {
  font-style: normal;
}

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

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

.hero-sec {
  padding: 188px 0;
  background-image:
    linear-gradient(rgba(46, 47, 66, 0.7)), url('../images/hero-banner.jpg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  max-width: 1440px;
  margin: 0 auto;
}

.main-heading {
  color: #fff;
  font-weight: 700;
  font-size: 56px;
  line-height: 1.07;
  letter-spacing: 0.02em;
  text-align: center;
  max-width: 496px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 48px;
}

.order-btn {
  display: block;
  margin: 0 auto;
  cursor: pointer;
  background-color: #4d5ae5;
  color: #fff;
  border: none;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 16px 32px;
  border-radius: 4px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.order-btn:hover,
.order-btn: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;
}

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

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

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

.features-list .sub-subheading {
  margin-bottom: 8px;
}

.sub-subheading {
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  font-weight: 500;
}

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

.team {
  background-color: #f4f4fd;
}

.our-members {
  display: flex;
  gap: 24px;
  justify-content: center;
}

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

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

.social-link .icon,
.soc-link .icon {
  fill: #fdfdfd;
}

.text {
  padding: 32px 16px;
  display: flex;
  flex-direction: column;
  row-gap: 8px;
}

.subheading {
  text-align: center;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.11;
  letter-spacing: 0.02em;
  margin-bottom: 72px;
}

.member {
  background-color: #fff;
  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);
  text-align: center;
  flex-basis: calc((100% - 72px) / 4);
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}

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

.cases {
  display: flex;
  column-gap: 24px;
  row-gap: 48px;
  justify-content: center;
  flex-wrap: wrap;
}

.cases .text {
  border-bottom: 1px solid #e7e9fc;
  border-right: 1px solid #e7e9fc;
  border-left: 1px solid #e7e9fc;
}

.case {
  flex-basis: calc((100% - 48px) / 3);
  background-color: #fff;
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.case-wrapper {
  position: relative;
  overflow: hidden;
}

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

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

.case:hover .overlay {
  transform: translateY(0);
}

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

.page-footer .logo-studio {
  color: #f4f4fd;
}

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

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

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

.page-footer .container div:first-child {
  margin-right: 120px;
}

.page-footer .container div:last-child {
  margin-left: auto;
}

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

.soc-links {
  display: flex;
  gap: 16px;
}

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

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

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

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

.subscribe-input::placeholder {
  color: #fff;
  font-weight: 400;
  font-size: 12px;
  line-height: 200%;
  letter-spacing: 0.04em;
}

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

.subscribe-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  background-color: #4d5ae5;
  color: #fff;
  border: none;
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.04em;
  padding: 8px 24px;
  border-radius: 4px;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(46, 47, 66, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;

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

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

.modal {
  position: relative;
  border-radius: 4px;
  width: 100%;
  max-width: 408px;
  max-height: 584px;
  background-color: #fcfcfc;
  padding: 72px 24px 24px 24px;
  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 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay:not(.is-open) .modal {
  transform: translateY(-300%);
}

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

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

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

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

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

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

.modal-input {
  max-height: 40px;
  width: 100%;
  padding: 12px 16px 12px 38px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  background-color: transparent;
  color: #2e2f42;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.17;
  letter-spacing: 0.04em;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-input:hover,
.modal-input:focus {
  border-color: #4d5ae5;
  outline: none;
}

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

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

.input-wrapper:hover .input-icon,
.input-wrapper:focus-within .input-icon {
  fill: #4d5ae5;
}

#comment {
  display: block;
  width: 100%;
  resize: none;
  height: 120px;
  margin-bottom: 16px;
  padding: 8px 16px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  background-color: transparent;
  color: #2e2f42;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.17;
  letter-spacing: 0.04em;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

#comment:hover,
#comment:focus {
  border-color: #4d5ae5;
  outline: none;
}

#comment::placeholder {
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  color: rgba(46, 47, 66, 0.4);
  letter-spacing: 0.04em;
}

.checkbox {
  display: block;
  margin-bottom: 24px;
  cursor: pointer;
}

.custom-checkbox {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  transition:
    background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.checkbox:hover .custom-checkbox,
.accept:focus + .custom-checkbox {
  border-color: #4d5ae5;
  outline: none;
}

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

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

.accept:checked + .custom-checkbox .check-icon {
  opacity: 1;
}

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

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

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