/*=======RESET=======*/
h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

img {
  display: block;
}

a {
  display: block;
}

.list {
  list-style: none;
}

.link {
  text-decoration: none;
}
/*=======END RESET=======*/

/*=======ANIMATION=======*/
@keyframes hero {
  0% {
    opacity: 0;
    transform: scale(0);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.5);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}
/*=======END ANIMATION=======*/

:root {
  --primary-text-color: rgba(0, 0, 0, 0.8);
  --title-text-color: #000000;
  --accent-color: #18a0fb;
  --white-color: #ffffff;
  --bgc-color: #f5f5f5;
}

body {
  background-color: var(--white-color);
  color: var(--primary-text-color);

  font-family: Montserrat, sans-serif;
  letter-spacing: -0.015em;
  font-size: 18px;
  line-height: 1.67;
}

/*=======COMPONENT=======*/
.container {
  width: 1440px;
  padding-left: 20px;
  padding-right: 20px;
  margin: 0 auto;
}
.section {
  padding-top: 120px;
  padding-bottom: 120px;
}
/* Section title */
.section-title {
  color: var(--title-text-color);

  font-weight: 400;
  font-size: 48px;
  line-height: 1.5;
  text-align: center;
}
/* Section subtitle */
.section-subtitle {
  color: var(--title-text-color);

  font-weight: 700;
  font-size: 24px;
  line-height: 1.5;
}

/* section text */
.section-text {
  font-size: 36px;
  line-height: 1.39;
  text-align: center;
}
/* Button */
.button {
  display: inline-block;
  border-radius: 6px;
  padding: 11px 30px;
  min-width: 130px;
  height: 40px;

  color: var(--title-text-color);
  background-color: var(--white-color);

  font-weight: 500;
  font-size: 15px;
  line-height: 1.2;
  text-align: center;

  cursor: pointer;
}
.button.primary {
  color: var(--white-color);
  background-color: var(--accent-color);
  border: 1px solid transparent;
}
.button.secondary {
  color: var(--accent-color);
  background-color: var(--white-color);
  border: 1px solid var(--accent-color);
}
.visually-hidden {
  position: absolute !important;
  clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
  clip: rect(1px, 1px, 1px, 1px);
  padding: 0 !important;
  border: 0 !important;
  height: 1px !important;
  width: 1px !important;
  overflow: hidden;
}
/*=======END COMPONENT=======*/

/*=======HEADER=======*/
.logo {
  color: var(--title-text-color);
  font-family: Comfortaa, cursive;
  font-size: 28px;
  line-height: 1.14;

  margin-right: 70px;

  animation-duration: 1000ms;
  /* animation-iteration-count: 2; */
  animation-delay: 2000ms;

  transition: color 250ms linear;
}
.logo:hover,
.logo:focus {
  color: var(--accent-color);
}

/* Site nav */
.flex-container {
  display: flex;
  align-items: center;
}
.navigation {
  display: flex;
  align-items: center;
}
.logo {
  display: flex;
  align-items: center;

  padding: 14px 0;
}
.logo-img {
  margin-right: 12px;
}
.nav-link {
  color: var(--accent-color);
  transition: color 250ms linear;

  animation-duration: 300ms;
  animation-delay: 3000ms;

  font-size: 15px;
  line-height: 1.2px;
  font-weight: 500;

  padding: 21px 0;
}
.nav-link:hover,
.nav-link:focus {
  color: var(--title-text-color);
}
.nav-link.link.current {
  color: var(--title-text-color);
}
.nav-item:not(:last-child) {
  margin-right: 40px;
}
.site-nav {
  display: flex;
}
.auth-nav {
  display: flex;
  margin-left: auto;
}
.auth-item:not(:last-child) {
  margin-right: 12px;
}
.header .button.secondary,
.header .button.primary {
  animation-duration: 1000ms;
  animation-delay: 3300ms;
}
/*=======END HEADER=======*/

/*=======HERO=======*/
.hero .container {
  width: 1440px;
  height: 960px;
  padding-left: 20px;
  padding-right: 20px;
  margin: 0 auto;
  text-align: center;
  padding-top: 632px;
}
.hero {
  max-width: 1600px;
  height: 960px;
  margin: 0 auto;
  background-image: linear-gradient(
      to right,
      rgba(47, 48, 58, 0.4),
      rgba(47, 48, 58, 0.4)
    ),
    url('../images/hero/hero-img.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-color: #cccccc;

  animation-name: hero;
  animation-duration: 1000ms;
  animation-timing-function: linear;
  /* animation-iteration-count: 2; количество повторений */
  /* animation-direction: alternate; меняет направления - с ним можно делать анимацию туда/обратно */
  /* animation-fill-mode: forwards; запоминает первый либо последгий кадр */
}
.hero-title {
  color: var(--title-text-color);
  animation-duration: 1000ms;

  font-weight: 400;
  font-size: 56px;
  line-height: 1.43;

  margin-bottom: 40px;
}
.hero .button {
  min-width: 192px;
  height: 52px;

  animation-duration: 1000ms;
  animation-delay: 1000ms;
}
/*=======END HERO=======*/

/*=======QUOTES=======*/
.quotes-title-container {
  max-width: 750px;
  height: 144px;
  margin-bottom: 60px;
}
.quotes .section-title {
  text-align: start;
}
.quotes-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;

  margin-right: -148px;
  margin-bottom: -60px;
}
.quotes-item {
  flex-basis: calc(100% / 2 - 148px);
  margin-right: 148px;
  margin-bottom: 60px;
}
.quotes .section-subtitle {
  margin-bottom: 20px;
}
.quotes .description {
  margin-bottom: 32px;
}
/*=======END QUOTES=======*/

/*=======EXAMPLES=======*/
.examples-item {
  display: flex;
  align-items: center;
  padding-bottom: 80px;
  padding-top: 80px;
}
.flex-text {
  padding-left: 40px;
}
.examples-item.dark-team .examples-img {
  transform: translate(100%);
}
.examples-item.dark-team .flex-text {
  transform: translate(-100%);
  padding-right: 40px;
  padding-left: 0px;
}
.examples .section-subtitle {
  margin-bottom: 24px;
}
.wrapper.dark-team:nth-child(even) {
  background-color: var(--bgc-color);
}
.thumb-img {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
}
.overlay {
  position: absolute;
  top: 0;
  right: 0;

  width: 100%;
  height: 100%;

  padding: 20px;
  background-color: rgba(24, 160, 251, 0.4);
  color: #fff;

  overflow: scroll;

  transform: translateY(100%);
  transition: transform 250ms linear;
}
.thumb-img:hover .overlay,
.thumb-img:hover .overlay {
  transform: translateY(0);
}

/*=======END EXAMPLES=======*/

/*=======TESTIMONIAL=======*/
.testimonial .section-title {
  margin-bottom: 30px;
}
.testimonial .section-text {
  margin-bottom: 80px;
}
.testimonial-container-img {
  margin: 0 auto;
  max-width: 945px;
}
.testimonial-list {
  display: flex;
  flex-wrap: wrap;

  margin-right: -84px;
  margin-bottom: -64px;
}
.testimonial-item {
  flex-basis: calc(100% / 4 - 84px);
  margin-right: 84px;
  margin-bottom: 64px;
}
.testimonial-link {
  border-radius: 6px;
  overflow: hidden;

  transform: scale(1);
  transition: transform 500ms linear;
}
.testimonial-link:hover,
.testimonial-link:focus {
  transform: scale(1.9);
  overflow: visible;
}
/*=======END TESTIMONIAL=======*/

/*=======SIGNUP=======*/
.signup .container {
  display: flex;
  align-items: center;
}
.signup-list {
  display: flex;
}
.signup {
  background-color: var(--bgc-color);
}
.signup .section-text {
  text-align: start;
  max-width: 945px;
  margin-right: 20px;
}
.signup .button.primary {
  margin-right: 30px;
}
.signup-list {
  margin-left: auto;
}
/*=======END SIGNUP=======*/

/*=======FOOTER=======*/
.footer-link {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.6;
  color: var(--title-text-color);
}
.footer-link:hover,
.footer-link:focus {
  text-decoration: underline;
}
.top-side {
  display: flex;
  justify-content: space-between;
  margin-bottom: 60px;
}
.footer-list {
  display: flex;
  align-items: center;
}
.footer-item:not(:last-child) {
  margin-right: 20px;
}
.footer .logo {
  margin: 0 143px;
}
/*=======END FOOTER=======*/

/*=======END COPYRITE=======*/
.bottom-side {
  display: block;
  padding-top: 60px;

  border-top: 1px solid rgba(0, 0, 0, 0.5);
}
.social-list {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}
.copy {
  font-size: 15px;
  line-height: 1.6;

  text-align: center;
}
.social-item:not(:last-child) {
  margin-right: 21px;
}
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--bgc-color);
  fill: var(--accent-color);

  transition: background-color 250ms linear;
}
.social-icon {
  transition: fill 250ms linear;
}
.social-link:hover,
.social-link:focus {
  background-color: var(--accent-color);
  fill: var(--white-color);
}
/*=======END COPYRITE=======*/

/*=======BACKDROP=======*/
.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(24, 160, 251, 0.4);
}

.modal-form {
  position: absolute;
  top: 50%;
  left: 50%;

  transform: translate(-50%, -50%);

  width: 528px;
  height: 581px;
  padding: 40px;

  background: #ffffff;
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.12), 0px 1px 1px rgba(0, 0, 0, 0.14),
    0px 2px 1px rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
.modal-close-btn {
  position: absolute;
  top: 8px;
  right: 8px;

  padding: 0;

  background-color: transparent;
  border: none;

  cursor: pointer;
}
.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}
.icon-close-btn {
  border: 1px solid var(--primary-text-color);
  border-radius: 50%;
  fill: var(--primary-text-color);

  transition: fill 250ms linear, border 250ms linear;
}
.modal-close-btn:hover .icon-close-btn,
.modal-close-btn:focus .icon-close-btn {
  fill: var(--accent-color);
  border: 1px solid var(--accent-color);
}
/*======= END BACKDROP=======*/

/*=======MAIN FORM=======*/
.main-form {
  display: flex;
  flex-direction: column;
}

/* FORM */
.form-title {
  font-size: 17px;
  line-height: 1.35;
  text-align: center;
  letter-spacing: 0.03em;
  margin-bottom: 12px;
}
.form-field {
  margin-bottom: 10px;
}
.form-label {
  display: block;
  font-size: 12px;
  line-height: 1.16;
  letter-spacing: 0.01em;

  transition: color 250ms linear;

  margin-bottom: 8px;
}
.flex-icon-container {
  position: relative;
  display: block;
}
.form-input,
.message-input {
  display: block;
  width: 100%;
  height: 40px;

  border: 1px solid rgba(33, 33, 33, 0.2);
  box-sizing: border-box;
  border-radius: 4px;

  color: var(--title-text-color);

  padding: 0 0 0 35px;
  font-size: 12px;
  transition: border 250ms linear;
}
.icon-form {
  position: absolute;
  top: 50%;
  left: 12px;

  transform: translateY(-50%);
  transition: fill 250ms linear;
}
.form-field:focus-within .form-label,
.message-field:focus-within .form-label {
  color: var(--accent-color);
}
.form-field:focus-within .icon-form {
  fill: var(--accent-color);
}
.form-input:focus-within,
.message-input:focus-within {
  border: 1px solid var(--accent-color);
  outline: none;
}

/* Message */
.message-field {
  margin-bottom: 20px;
}
.message-input {
  resize: none;
  height: 120px;

  padding: 12px 16px;
  transition: border 250ms linear;
}
.message-input::placeholder {
  font-size: 12px;
  line-height: 1.16;
  letter-spacing: 0.01em;

  color: rgba(117, 117, 117, 0.5);
}

/* checkbox */
.checkbox-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;

  font-size: 13px;
  line-height: 1.71;

  letter-spacing: 0.03em;

  margin-bottom: 30px;
}
.policy-text {
  margin-right: 4px;
}
.policy-link {
  color: var(--accent-color);
}
.checkbox-icon {
  display: block;
  width: 16px;
  height: 15px;
  border: 2px solid var(--title-text-color);
  border-radius: 3px;
  background-color: transparent;

  transition: all 250ms linear;
  margin-right: 8px;
}
.checkbox-input:checked + .checkbox-icon {
  background-color: var(--accent-color);
  background-image: url('../images/check.svg');
  background-size: cover;
  border: none;
  background-origin: border-box;
}
.checkbox-input:focus-within + .checkbox-icon {
  box-shadow: 0 0 0 0.1em var(--title-text-color);
}

/* BUTTON */
.modal-form .button {
  align-self: center;
  padding: 11px 20px;
  transition: color 250ms linear, background-color 250ms linear;
}
.modal-form .button:hover,
.modal-form .button:focus {
  background-color: var(--accent-color);
  color: var(--white-color);
}
/*=======END MAIN FORM=======*/
