/* Reset CSS */
h1,
h2,
h3,
p,
ul,
li {
  margin: 0;
  padding: 0;
  border: 0;
  box-sizing: border-box;
}

ul,
ol {
  list-style: none;
}
section {
  padding: 120px 0;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
.container {
  width: 1158px;
  margin: 0 auto;
  padding: 0 15px;
}

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

/* Header Styles */
.header-container {
  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);
  background: #ffffff;
}

.header-container .container {
  display: flex;
  align-items: center;
}

nav {
  flex-grow: 1;
}

.logo {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #2e2f42;
  text-decoration: none;
}
.logo:hover,
.logo:focus {
  color: #4d5ae5;
}

.logo-web {
  color: #4d5ae5;
}

.header-nav {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #2e2f42;
  text-transform: capitalize;
  display: flex;
  gap: 40px;
  margin-right: auto;
  margin-left: 76px;
}
.header-nav .link {
  display: inline-block;
  text-decoration: none;
  color: #2e2f42;
  padding: 24px 0;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.link.main-link {
  position: relative;
  color: #404bbf;
}
.main-link::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  border-radius: 2px;
  height: 4px;

  background-color: #404bbf;
}

.header-nav .link:hover,
.header-nav .link:focus {
  color: #404bbf;
}
.address ul {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  font-style: normal;
  display: flex;
  gap: 40px;
  margin-top: 0;
  margin-bottom: 0;
}
.address-link {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #434455;
  display: inline-block;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.address-link:hover,
.address-link:focus {
  color: #404bbf;
}
/* Hero Section Styles */
.hero-section {
  max-width: 1440px;
  margin: 0 auto;
  background-color: #2e2f42;
  padding: 188px 0;
  background-image:
    linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
    url("../images/hero-bg.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.hero-container {
  display: flex;
  flex-direction: column;

  align-items: center;
  text-align: center;
}
.hero-title {
  font-size: 56px;
  line-height: 1.07;
  letter-spacing: 0.02em;
  align-items: center;
  text-align: center;
  color: #ffffff;
  max-width: 496px;
  margin-bottom: 48px;
}
.button {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
  background-color: #4d5ae5;
  cursor: pointer;
  border-radius: 4px;
  border: none;
  padding: 16px 32px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.button:hover,
.button:focus {
  background-color: #404bbf;
}
/* Features Section Styles */
.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 {
  display: flex;
  gap: 24px;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}
.features-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid #8e8f99;
  border-radius: 4px;
  width: 264px;
  height: 112px;
  margin-bottom: 8px;
  background-color: #f4f4fd;
}
.features-list {
  width: calc((100% - 72px) / 4);
}
.features-title {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
  padding-bottom: 8px;
}
.features-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}
/* Team Section Styles */
.team-section {
  background-color: #f4f4fd;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.team-main {
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  color: #2e2f42;
  text-align: center;
  margin-bottom: 72px;
}
.team-list {
  display: flex;
  gap: 24px;
}
.team-title {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
  text-align: center;
  margin-bottom: 8px;
}
.team-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
  text-align: center;
}

.team-wrapper {
  padding: 32px 16px;
}

.team-card {
  background-color: #ffffff;
  display: block;
  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);
  width: calc((100% - 72px) / 4);
}
.social-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 8px;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;

  background-color: #4d5ae5;

  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.social-icon:hover,
.social-icon:focus {
  background: #404bbf;
}

.team-icon {
  fill: #f4f4fd;
}

/* Portfolio Section Styles */
.portfolio {
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  color: #2e2f42;
  text-align: center;
  margin-bottom: 72px;
}
.portfolio-list {
  display: flex;
  flex-wrap: wrap;
  column-gap: 24px;
  row-gap: 48px;
  padding: 0;
  margin: 0;
}
.portfolio-image-wrapper {
  position: relative;
  overflow: hidden;
}
.portfolio-item {
  border-radius: 4px;
  width: calc((100% - 48px) / 3);
  background: #ffffff;
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.portfolio-item: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);
  cursor: pointer;
}
.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #4d5ae5;
  color: #f4f4fd;
  padding: 40px 32px;
  text-align: center;
  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.portfolio-item:hover .portfolio-overlay {
  transform: translateY(0);
}
.portfolio-title {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
  margin-bottom: 8px;
}
.portfolio-wrapper {
  padding: 32px 16px;
  border: 1px solid #e7e9fc;
  border-radius: 4px;
  border-top: none;
}
.portfolio-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
  margin: 0;
}

/* Footer Section Styles */
.footer {
  background-color: #2e2f42;
  padding: 100px 0;
  color: #f4f4fd;
}

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

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

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

.logo-studio {
  color: #f4f4fd;
}

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

.footer-social {
  display: flex;
  flex-direction: column;
}

.media-text {
  margin-bottom: 16px;
  font-weight: 500;
  color: #ffffff;
  line-height: 150%;
  letter-spacing: 0.02em;
}

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

.footer-links {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #4d5ae5;

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

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

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

.footer-icon {
  fill: #f4f4fd;
}
.footer-label {
  display: block;
  margin-bottom: 16px;

  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;

  color: #ffffff;
}

.footer-subscribe {
  margin-left: auto;
}

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

.footer-input {
  border: 1px solid #ffffff;
  border-radius: 4px;
  width: 264px;
  height: 40px;
  background-color: transparent;
  padding-left: 16px;
  padding-right: 12px;
  color: #ffffff;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.footer-input::placeholder {
  font-size: 12px;
  line-height: 2;
  color: rgba(255, 255, 255, 0.8);
}
.footer-input:hover {
  border: 1px solid #31d0aa;
  outline: none;
}
.footer-btn:hover {
  background-color: #31d0aa;
}
.footer-btn {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  padding: 8px 24px;
  letter-spacing: 0.04em;
  min-width: 165px;
  height: 40px;
  background-color: #4d5ae5;
  border: none;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.icon-send {
  fill: #ffffff;
}
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  background-color: rgba(46, 47, 66, 0.4);
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal {
  position: absolute;
  width: 408px;
  min-height: 584px;
  padding: 72px 24px 24px 24px;
  background-color: #fcfcfc;
  border-radius: 4px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

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

.modal-close:hover {
  background-color: #4d5ae5;
  fill: #ffffff;
}
.close-icon {
  stroke-width: 1px;
  stroke: rgba(0, 0, 0, 0.1);
}

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

.modal-title {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  margin-bottom: 16px;
  max-width: 360px;
  padding-top: 24px;
}
.modal-field {
  margin-bottom: 8px;
  width: 100%;
}
.modal-label {
  display: block;
  margin-bottom: 4px;

  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
}
.modal-input-wrapper {
  position: relative;
}
.modal-input {
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  height: 40px;
  width: 100%;
  background-color: transparent;
  padding-left: 38px;
  padding-right: 24px;
  outline: transparent;
}

.modal-icon {
  fill: #2e2f42;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 16px;
}
.modal-input:focus + .modal-icon {
  fill: #4d5ae5;
}
.modal-input:focus {
  border: 1px solid #4d5ae5;
}
.modal-text-area {
  height: 120px;
  width: 100%;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  background-color: transparent;
  resize: none;
  padding-left: 16px;
  padding-top: 8px;
}
.modal-input,
.modal-text-area {
  box-sizing: border-box;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  background-color: transparent;
  outline: transparent;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-checkbox-label {
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  margin-top: 0;
}
.modal-check {
  width: 16px;
  height: 16px;
}
.modal-check:checked + .modal-checkbox-label .custom-check {
  background-color: #404bbf;
  border: none;
  fill: #f4f4fd;
}

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

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

.modal-submit {
  display: block;

  width: 169px;
  margin: 0 auto;
}
.check-text {
  line-height: 1.17;
}
