/* #region Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  background-color: rgb(255, 255, 255);
}

body:has(.backdrop.is-open) {
  overflow: hidden;
}
/* #endregion */

/* #region Reset */

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

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

a {
  text-decoration: none;
  color: currentColor;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
}

address {
  font-style: normal;
}

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

/* #endregion */

/* #region Common */

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

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

.section-size {
  padding: 120px 0;
}

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

/* #endregion */

/* #region Logo */
.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 .logo-dark {
  color: #2e2f42;
}

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

/* #endregion */

/* #region Header */

.header {
  position: sticky;
  top: 0px;
  z-index: 666;
  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: #fff;
}

.header-logo {
  padding: 24px 0;
  margin-right: 76px;
}

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

.header-nav-list {
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.02em;
  color: #2e2f42;
  display: flex;
  align-items: center;
  gap: 40px;
}

.header-nav-item {
}

.header-nav-link {
  display: block;
  padding: 24px 0;
  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);
}

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

.header-nav-link.current {
  position: relative;
}

.header-nav-link.current::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  bottom: -1px;
  border-radius: 2px;
  width: 100%;
  height: 4px;
  background-color: #404bbf;
}

.header-address {
  font-style: normal;
  margin-left: auto;
}
.contacts-list {
  display: flex;
  gap: 40px;
  align-items: center;
}
.contacts-item {
}
.contacts-link {
  line-height: 1.5;
  letter-spacing: 0.02em;
  font-style: normal;
  color: #434455;
  display: block;
  padding: 24px 0;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.contacts-link:hover,
.contacts-link:focus {
  color: #404bbf;
}
/* #endregion */

/* #region Hero */

.hero {
  background-color: #2e2f42;
  background-image: linear-gradient(
      to bottom,
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url("../images/bgr/bgr-hero.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  max-width: 1440px;
  margin: 0 auto;
}

.hero-container {
  padding: 188px 0;
}

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

.hero-btn {
  display: block;
  margin: 0 auto;
  padding: 16px 32px;
  border: none;
  border-radius: 4px;
  min-width: 169px;
  text-align: center;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
  background-color: #4d5ae5;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* #endregion */

/* #region Benefits */

.benefits {
}

.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;
  /* row-gap: 34px; */
  align-items: center;
  /* flex-wrap: wrap; */
}

.benefits-item {
  width: calc((100% - 24px * 3) / 4);
  /* flex: 1 1 220px; 
  min-width: 200px;
  max-width: 264px; */
}

.benefits-item-icon {
  width: 100%;
  height: 112px;
  border: 1px solid #8e8f99;
  border-radius: 4px;
  background-color: #f4f4fd;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
}
.benefits-icon {
  width: 64px;
  height: 64px;
}
.icon-antenna {
}
.icon-clock {
}
.icon-diagram {
}
.icon-astronaut {
}
.benefits-item-subtitle {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
  margin-bottom: 8px;
}

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

/* #endregion */

/* #region Team */
.team {
  background-color: #f4f4fd;
}

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

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

.team-item-img {
}

.team-cards {
  padding: 32px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.team-item-caption {
  margin-bottom: 8px;
  color: #2e2f42;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
}

.team-item-content {
  color: #434455;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  margin-bottom: 8px;
}

.team-cards-soc {
}

.team-soc-list {
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: center;
}

.team-soc-item {
  display: flex;
  width: 40px;
  height: 40px;
}

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

.team-icon {
  width: 16px;
  height: 16px;
  stroke-width: 0;
  stroke: currentColor;
  fill: #f4f4fd;
}

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

/* #endregion */

/* #region Portfolio */

.portfolio {
}

.portfolio-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 48px;
  column-gap: 24px;
}

.portfolio-item {
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

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

.portfolio-box {
  position: relative;
  overflow: hidden;
  width: 360px;
  height: 300px;
}

.portfolio-item-img {
  width: 360px;
  object-fit: cover;
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #4d5ae5;

  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 32px;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
}

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

/* .portfolio-overlay-content {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
} */

.portfolio-cards {
  border-bottom: 1px solid #e7e9fc;
  border-left: 1px solid #e7e9fc;
  border-right: 1px solid #e7e9fc;
  padding: 32px 16px;
  width: 360px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
}

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

.portfolio-item-content {
  color: #434455;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}
/* #endregion */

/* #region Footer */

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

.footer-container {
  display: flex;
  justify-content: flex-start;
  align-content: flex-start;
  flex-wrap: wrap;
  align-items: baseline;
}
.footer-content {
  display: flex;
  flex-direction: column;
  max-width: 264px;
  margin-right: 120px;
}

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

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

.footer-soc {
  display: flex;
  flex-direction: column;
  align-content: flex-start;
  max-width: 208px;
}

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

.footer-soc-list {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

.footer-soc-item {
  display: flex;
}

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

.footer-icon {
  width: 24px;
  height: 24px;
  stroke-width: 0;
  stroke: currentColor;
  fill: #f4f4fd;
}

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

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

.footer-sub-title {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #fff;

  margin-bottom: 16px;
}

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

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

  font-size: 12px;
  line-height: 2;
  color: #fff;
  letter-spacing: 0.04em;

  color: #fff;
  background-color: transparent;
  border-radius: 4px;
  border: 1px solid #fff;

  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  outline: none;

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

.footer-form-input::placeholder {
  color: #fff;
}

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

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

.footer-form-btn {
  min-width: 165px;
  height: 40px;
  padding: 8px 24px;

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

  color: #fff;

  border-radius: 4px;
  background: #4d5ae5;

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

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

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

/* #endregion */

/* #region MW */
.backdrop {
  width: 100%;
  height: 100%;

  background-color: rgba(46, 47, 66, 0.4);

  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

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

.backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: initial;
}

.modal {
  width: 408px;
  min-height: 584px;
  padding: 72px 24px 24px 24px;

  border-radius: 4px;
  background-color: #fcfcfc;
  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);

  position: absolute;
  top: 50%;
  left: 50%;

  transform: translateX(-50%) translateY(-50%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.backdrop:not(.is-open) .modal {
  transform: translateX(-50%) translateY(-50%);
}

.modal-btn {
  width: 24px;
  height: 24px;
  padding: 0;

  color: #2e2f42;
  background-color: #e7e9fc;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);

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

  position: absolute;
  top: 24px;
  right: 24px;

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

.modal-btn:hover,
.modal-btn:focus {
  fill: #ffffff;
  background-color: #404bbf;
  border: none;
}

.modal-btn-icon {
  /* fill: currentColor; */
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

  max-width: 360px;
  margin-bottom: 16px;
}

.modal-form {
}
.modal-form-field {
  margin-bottom: 8px;
}

.modal-form-label {
  display: block;

  margin-bottom: 4px;

  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
}

.modal-form-wrapper {
  position: relative;
}

.modal-form-input {
  display: block;

  width: 100%;
  height: 40px;
  padding: 8px 38px;

  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;

  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-form-input:focus {
  border-color: #4d5ae5;
}

.modal-form-icon {
  position: absolute;

  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  pointer-events: none;
  fill: #2e2f42;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.textarea {
  margin-bottom: 16px;
}

.modal-form-message {
  display: block;
  resize: none;
  width: 100%;
  height: 120px;
  padding: 8px 16px;

  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;

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

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

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

.modal-form-message::placeholder {
  color: rgba(46, 47, 66, 0.4);
}

.form-accept {
  margin-bottom: 24px;
}
.input-checkbox {
}

.label-checkbox {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;

  cursor: pointer;
}

.accept-checkbox {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-right: 8px;
  width: 16px;
  height: 16px;

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

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

input[type="checkbox"]:checked + .label-checkbox > .accept-checkbox {
  fill: #f4f4fd;
  border: none;
  background-color: #404bbf;
}

.accept-checkbox-icon {
}

.accept-checkbox-link {
  line-height: 1.33333;
  text-decoration: underline;
  text-decoration-skip-ink: none;
  color: #4d5ae5;
}

.modal-form-btn {
  display: block;
  min-width: 169px;
  height: 56px;
  padding: 16px 32px;
  margin: 0 auto;

  border-radius: 4px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background: #4d5ae5;

  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-align: center;
  color: #fff;

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

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

/* #endregion */
