/* #region Base styles */

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

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

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

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

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

address {
  font-style: normal;
}

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

/* #endregion */

/* #region Common */



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

.section {
  padding: 120px 0;
}

.section-title {
  margin: 0 auto 72px;
  text-align: center;

  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
}

.accent-text {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #4d5ae5;
}

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

.logo {
  margin-right: 76px;
  display: inline-flex;
  align-items: center;
  font-family: 'Raleway', sans-serif;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

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

.logo-light {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #f4f4fd;
}

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

/* #endregion */

/* #region Socials */
.socials-list {
  display: flex;
  gap: 24px;
}

.social-media-icons {
  width: 40px;
  height: 40px;
}

.socials-link {
  display: flex;
  align-items: center;
  justify-content: center;

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

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

.socials-icon {
  fill: #f4f4fd;
}

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

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

/* #endregion */

/* #region Button */

button {
  font-family: inherit;
  font-weight: 500;
  padding: 0;
  border: 1px solid transparent;
  background-color: transparent;
  cursor: pointer;

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

button:hover,
button:focus {
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background-color: #404bbf;
}

/* #endregion */

/* #region Header */

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

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

  font-weight: 500;
}

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

.nav-item {
}

.nav-link {
  position: relative;
  display: block;
  padding: 24px 0;

  font-weight: 500;
  color: #2e2f42;

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

.nav-link.active {
  color: #404bbf;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  top: calc(100% - 3px);
  display: block;
  width: 100%;
  height: 4px;

  background-color: #404bbf;
  border-radius: 2px;
}

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

.contacts {
  display: flex;
  gap: 40px;
  margin-left: auto;
}

.contacts-item {
  display: flex;
  align-items: center;

  line-height: 1.5;
  color: #434455;
  letter-spacing: 0.02em;
}

.contacts-link {
  display: flex;
  align-items: center;

  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;

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

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

/* #endregion */

/* #region Hero */
.main {
}

.hero {
  max-width: 1440px;
  margin: 0 auto;

  background-color: #2e2f42;
  background-image:
    linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
    url('../images/people-office.jpg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  padding: 188px 0;
}

.hero-block {
  max-width: 496px;
  margin: 0 auto;
}

.btn {
  display: block;
  margin: 0 auto;
  margin-top: 48px;

  padding: 16px 32px;
  border: none;
  border-radius: 4px;

  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background-color: #4d5ae5;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
}

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

/* #endregion */

/* #region Features */
.features {
}

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

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

.features-wrapper {
  height: 112px;
  margin-bottom: 8px;

  border: 1px solid #8e8f99;
  border-radius: 4px;
  background-color: #f4f4fd;

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

.features-title {
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.features-caption {
  line-height: 1.5;
  color: #434455;
  letter-spacing: 0.02em;
}

/* #endregion */

/* #region Our Team */

.ourteam {
  background-color: #f4f4fd;
}

.ourteam-title {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
}

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

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

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

.ourteam-photo {
}

.ourteam-wrapper {
  border: 1px solid #e7e9fc;
  border-top: none;

  padding: 32px 16px;
}

.ourteam-name {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
}

.ourteam-name-caption {
  letter-spacing: 0.02em;
  line-height: 1.5;
  text-align: center;
  margin-bottom: 8px;
  color: #434455;
}

/* #endregion */

/* #region Our Portfolio */
.portfolio {
}

.ourportfolio-title {
  margin-bottom: 8px;
}

.portfolio-list {
  display: flex;
  flex-wrap: wrap;
  column-gap: 24px;
  row-gap: 48px;
  /* gap: 48px 24px */
}

.portfolio-list-item {
  background-color: #fff;
  width: calc((100% - 24px * 2) / 3);

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

.portfolio-list-item:hover,
.portfolio-list-item:focus {
  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-thumb {
  position: relative;
  overflow: hidden;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 40px 32px;
  color: #f4f4fd;
  background-color: #4d5ae5;

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

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

.portfolio-wrapper {
  border: 1px solid #e7e9fc;
  border-top: none;

  padding: 32px 16px;
}

.ourportfolio-caption {
  line-height: 1.5;
  color: #434455;
}

/* #endregion */

/* #region Footer */

.logo-footer {
  display: 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;
  color: #f4f4fd;
}

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

.footer-container {
  display: flex;
  justify-content: flex-start;
}

.footer-info {
  max-width: 264px;
  margin-right: 120px;
}

.footer-caption {
  color: #fff;
}

.footer-wrapper {
  display: flex;
  align-items: baseline;
  width: 100%;
}

.footer-contacts {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-right: 80px;
}

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

}

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


.footer-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-subscribe {
  margin-left: auto;
}
.footer-form-title {
  margin-bottom: 16px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #fff;
}
.footer-form-row {
  display: flex;
  gap: 24px;
  align-items: center;
}

.footer-form-field {
  width: 264px;
  height: 40px;
  padding: 8px 16px;

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

  border: 1px solid #fff;
  border-radius: 4px;
  background-color: transparent;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  color: #fff;
  outline: transparent;

  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.footer-form-field:focus {
  border-color: #31d0aa;
}
.footer-form-field::placeholder {
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: #fff;
}
.footer-form-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;

  border-radius: 4px;
  padding: 8px 24px;
  
  min-width: 165px;
  height: 40px;
  margin: 0;

  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.footer-form-btn:focus,
.footer-form-btn:hover {
  background-color: #31d0aa;
}

.subscribe-icon {
  fill: #fff;
  flex-shrink: 0;

}
/* #endregion */

/* #region Modal window */

.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(46, 47, 66, 0.4);

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

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

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

    transition-delay: 0ms;
}
.modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);

    width: 408px;
    min-height: 584px;
    padding: 72px 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);

    transition: opacity 300ms cubic-bezier(0.4, 0, 0.2, 1) 150ms, visibility 300ms cubic-bezier(0.4, 0, 0.2, 1) 150ms, transform 300ms cubic-bezier(0.4, 0, 0.2, 1) 150ms;

    opacity: 0;
    transform: translateX(-50%) translateY(-70%);
}

.backdrop.is-open .modal {
    opacity: 1;
    transform: translateX(-50%) translateY(-50%);
    visibility: visible;

    transition-delay: 0ms;
}

.modal-btn {
    position: absolute;
    top: 24px;
    right: 24px;

    width: 24px;
    height: 24px;
    
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
    background-color: #e7e9fc;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);

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

    cursor: pointer;
}

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

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

.modal-btn:focus .modal-close-icon,
.modal-btn:hover .modal-close-icon {
    fill: #fff;
}
.modal-slogan{
  margin-bottom: 16px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
}

/* form styles */

.feedback-wrapper {
  margin-bottom: 8px;
}
.comment-wrapper {
  margin-bottom: 16px;
}
.feedback-label {
  display: block;
  margin-bottom: 4px;

  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
}
.feedback-field {
  position: relative;
}
.feedback-input {
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  padding: 11px 38px;

  width: 100%;
  height: 40px;
  outline: transparent;

  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.feedback-input:focus {
  border-color: #4d5ae5;
}
.feedback-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  fill: #2e2f42;
  stroke: #2e2f42;
  pointer-events: none;

  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1), stroke 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.feedback-input:focus+.feedback-icon {
  stroke: #4d5ae5;
  fill: #4d5ae5;
}
.feedback-comment {
  width: 100%;
  height: 120px;
  padding: 8px 16px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;

  outline: none;
  resize: none;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.feedback-comment:focus {
  border-color: #4d5ae5;
}
.feedback-comment::placeholder {
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: rgba(46, 47, 66, 0.4);
}

.feedback-agreement {
  display: block;
  margin-bottom: 24px;

  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
}
.feedback-toggler {
  display: inline-flex;
  justify-content: center;
  align-items: center;

  width: 16px;
  height: 16px;
  margin-right: 8px;

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

  transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  transition-property: background-color, border-color;
  cursor: pointer;
  }

.feedback-checkbox:checked + .feedback-toggler {
  background-color: #404bbf;
  border-color: #404bbf;
}
.toggler-icon {
  fill: #f4f4fd;
  opacity: 0;
  transition: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.feedback-checkbox:checked + .feedback-toggler > .toggler-icon {
  opacity: 1;
}
.feedback-link {
  line-height: 1.3;
  text-decoration: underline;
  text-decoration-skip-ink: none;
  color: #4d5ae5;
}

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


/* #endregion */