/* Fonts */
@font-face {
  font-display: swap;
  font-family: "Epilogue";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/epilogue-v17-latin-regular.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Epilogue";
  font-style: normal;
  font-weight: 600;
  src: url("../fonts/epilogue-v17-latin-600.woff2") format("woff2");
}

/* Global styles */
html {
  font-size: 60%;
  box-sizing: border-box;
}

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

body {
  font-family: "Epilogue", sans-serif;
  font-weight: 400;
  font-size: 1.8rem;
  line-height: 2.8rem;
  color: #2d2d2d;
  height: 100vh;
}

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

img {
  width: 100%;
  transition: filter 0.5s;
}

.lazy-img {
  filter: blur(20px);
}

.wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4.4rem 2.5rem;
}

.button {
  background-color: #000;
  color: #fff;
  font-size: 2.1rem;
  font-weight: 600;
  line-height: 3.1rem;
  text-decoration: none;
  padding: 2.5rem 6.7rem;
  display: inline-block;
  border: none;
  transition: all 0.5s;
}

.button:hover,
.button:focus {
  background-color: #009379;
}

.section {
  transition: transform 1s, opacity 1s;
}

.section-hidden {
  opacity: 0;
  transform: translateY(9rem);
}

.title {
  font-size: 3.3rem;
  font-weight: 600;
  line-height: 4.4rem;
  margin-bottom: 4.4rem;
}

/* Header styles start */
.header__wrapper {
  min-height: 78px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 4.4rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
}

.sticky {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  z-index: 11;
  animation: move 0.5s ease-out;
}

@keyframes move {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

.header__list {
  display: flex;
  flex-wrap: wrap;
}

.header__item {
  margin-right: 2.4rem;
}

.header__item:last-child {
  margin-right: 0;
}

.header__link {
  text-decoration: none;
  line-height: 2.8rem;
  color: #2d2d2d;
}
/* Header styles end */

/* Intro styles start */
.intro__wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4.4rem 4.4rem;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
}

.intro__info {
  flex: 1;
}

.intro__title {
  font-size: 7.1rem;
  font-weight: 600;
  line-height: 7.3rem;
  margin-bottom: 2.5rem;
}

.intro__subtitle {
  font-size: 2.1rem;
  font-weight: 600;
  line-height: 3.1rem;
  margin-bottom: 2.5rem;
}

.intro__text {
  margin-bottom: 5rem;
}

.intro__pic {
  flex: 1;
  overflow: hidden;
  max-width: 100%;
}

.intro__pic-item {
  max-width: 100%;
  object-fit: cover;
}

/* Слайдер */
.slider {
  max-width: 130rem;
  height: 59rem;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  transition: transform 1s;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider__btn {
  position: absolute;
  top: 50%;
  z-index: 10;
  border: none;
  background: none;
  font-family: inherit;
  color: #2d2d2d;
  font-size: 6rem;
}

.slider__btn-left {
  left: 5%;
  transform: translate(-50%, -50%);
}

.slider__btn-right {
  right: 5%;
  transform: translate(50%, -50%);
}

.dots {
  display: flex;
  justify-content: center;
  margin-bottom: 4.4rem;
}

.dots__dot {
  padding: 0;
  border: none;
  background-color: #2d2d2d;
  opacity: 0.7;
  height: 1.2rem;
  width: 1.2rem;
  border-radius: 50%;
  margin-right: 1.75rem;
  transition: all 0.5s;
}

.dots__dot:last-child {
  margin: 0;
}

.dots__dot-active {
  background-color: #000;
  opacity: 1;
}
/* Intro styles end */

/* Skills styles start */
.skills__wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4.4rem 2.5rem;
}

.skills__cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4.4rem 2.5rem;
}

.skills__card {
  padding: 6.7rem 4.4rem;
  display: flex;
}
.skills__card-pic {
  margin-right: 4.4rem;
}

.skills__card-title {
  font-size: 2.8rem;
  font-weight: 600;
  line-height: 4.4rem;
  margin-bottom: 1.3rem;
}
/* Skills styles end */

/* Latest styles start */
.latest__wrapper {
  text-align: center;
}

.latest__works {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.latest__work {
  text-align: left;
}

.latest__work-container {
  overflow: hidden;
  width: 100%;
  margin-bottom: 2.5rem;
  aspect-ratio: 16 / 13.4;
}

.latest__work-pic {
  object-fit: cover;
  transition: transform 0.3s ease-in-out;
  will-change: transform;
}

.latest__work-pic:hover {
  transform: scale(1.1);
}

.latest__work-title {
  font-size: 2.1rem;
  font-weight: 600;
  line-height: 3.1rem;
  margin-bottom: 0.9rem;
}
/* Latest styles end */

/* Testimonial styles start */
.testimonial__wrapper {
  text-align: center;
}

.testimonial__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.testimonial__card {
  background-color: #f3f3f3;
  min-height: 34.4rem;
  padding: 4.4rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: box-shadow 0.3s ease-in-out;
}

.testimonial__card:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.testimonial__text {
  font-size: 2.1rem;
  font-weight: 600;
  line-height: 3.1rem;
  margin-bottom: 1.1rem;
}

.testimonial__rating-author {
  display: flex;
  align-items: start;
}

.testimonial__image {
  width: initial;
  object-fit: none;
  margin-right: 1.7rem;
}

.testimonial__rating {
  margin-bottom: 1.1rem;
}

.testimonial__author-name {
  font-size: 2.1rem;
  font-weight: 600;
  line-height: 3.1rem;
}
/* Testimonial styles end */

/* Footer styles star */
.footer__title {
  text-align: left;
  margin-bottom: 2.5rem;
}
.footer__container {
  display: flex;
  justify-content: space-between;
}

.footer__container-left {
  width: 46%;
  display: flex;
  flex-direction: column;
}

.footer__desc {
  margin-bottom: 4.4rem;
}

.footer__social-list {
  display: flex;
  align-items: center;
}

.footer__social-item {
  margin-right: 2.5rem;
  transition: opacity 0.3s ease-in-out;
}

.footer__social-item:hover,
.footer__social-item:focus {
  opacity: 0.55;
}

.footer__social-item:last-child {
  margin-right: 0;
}

.footer__container-right {
  width: 42%;
}

.contact-form__field {
  display: block;
  width: 100%;
  background-color: #f3f3f3;
  border: none;
  padding: 1.7rem 2.5rem;
  line-height: 2.8rem;
}

.contact-form__field:first-child {
  margin-bottom: 1.2rem;
}

.contact-form__field:last-of-type {
  margin-bottom: 2.5rem;
}
/* Footer styles star */

/* Modal window*/
.modal {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  z-index: 15;
  justify-content: center;
  align-items: center;
}

.spinner {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 10px solid lightgrey;
  border-right-color: green;
  animation: rotate 1s linear infinite;
}

@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

.modal__content {
  max-width: 90rem;
  padding: 10rem 10rem 5rem 10rem;
  position: absolute;
  background-color: #f3f3f3;
  animation: move 0.5s ease-out;
  top: 50%;
  transform: translateY(-50%);
}

@keyframes move {
  from {
    transform: translateY(-200%);
  }
  to {
    transform: translateY(-50%);
  }
}

.modal__close-btn {
  position: absolute;
  top: 1.2rem;
  right: 2rem;
  font-size: 5rem;
  color: #000;
  border: none;
  background: none;
}

.modal__message {
  font-size: 3.5rem;
  font-weight: 500;
  margin-bottom: 6rem;
}

.modal__submit-btn {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.hidden {
  display: none;
}

/* Media starts */
@media (max-width: 575.98px) {
  .wrapper {
    padding: 2.5rem;
  }

  .section-hidden {
    opacity: 1;
    transform: none;
  }

  .section_title {
    font-size: 3.1rem;
    line-height: 3.3rem;
    margin-bottom: 2.5rem;
  }

  .header__wrapper {
    font-size: 1.6rem;
    padding: 2.5rem;
  }

  .header__item {
    margin-right: 1.4rem;
  }

  .intro__wrapper {
    padding: 2.5rem 2.5rem;
    flex-direction: column;
    justify-content: center;
  }

  .intro__title {
    font-size: 3.1rem;
    line-height: 3.3rem;
    margin-bottom: 2.5rem;
  }

  .intro__text {
    margin-bottom: 2.5rem;
  }

  .button {
    font-size: 1.5rem;
    line-height: 2.1rem;
    display: block;
    text-align: center;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
    width: 100%;
  }

  .slider {
    max-width: 100%;
    height: 30rem;
  }

  .slider__btn {
    font-size: 4rem;
  }

  .slider__btn-left {
    left: 3%;
  }

  .slider__btn-right {
    right: 3%;
  }

  .dots {
    margin-bottom: 2.5rem;
  }

  .dots__dot {
    height: 1rem;
    width: 1rem;
    margin-right: 1.25rem;
  }

  .skills__wrapper {
    padding: 2.5rem;
  }

  .skills__cards {
    grid-template-columns: repeat(1, 1fr);
    gap: 0;
  }

  .skills__card {
    padding: 2.5rem 1rem;
  }

  .skills__card-title {
    font-size: 2.5rem;
    line-height: 3.4rem;
  }

  .skills__card-pic {
    margin-right: 1.5rem;
  }

  .latest__works {
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
  }

  .latest__work-title {
    margin-bottom: 0.2rem;
  }

  .latest__work-desc {
    margin-bottom: 2.5rem;
  }

  .testimonial__cards {
    grid-template-columns: repeat(1, 1fr);
    gap: 1.4rem;
  }

  .testimonial__card {
    background-color: #f3f3f3;
    min-height: 30rem;
    padding: 2.5rem;
  }

  .testimonial__text {
    font-size: inherit;
    font-weight: 600;
    line-height: inherit;
  }

  .testimonial__rating {
    margin-bottom: 0;
  }

  .footer__container {
    flex-direction: column;
  }

  .footer__container-left {
    width: 100%;
  }

  .footer__container-right {
    width: 100%;
  }

  .footer__desc {
    margin-bottom: 2.5rem;
  }

  .footer__social-list {
    margin-bottom: 2.5rem;
  }

  .contact-form__field {
    padding: 0.7rem 1.5rem;
  }

  .modal__content {
    max-width: 90rem;
    padding: 6.2rem 6.2rem 2.4rem 6.2rem;
  }

  .modal__message {
    font-size: 3rem;
    margin-bottom: 5rem;
  }

  .modal__close-btn {
    top: 1.2rem;
    right: 2rem;
    font-size: 4rem;
  }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .wrapper {
    padding: 2.5rem;
  }

  .section-hidden {
    transform: none;
    opacity: 1;
  }

  .section_title {
    font-size: 3.1rem;
    line-height: 3.3rem;
    margin-bottom: 2.5rem;
  }

  .header__wrapper {
    font-size: 1.6rem;
    padding: 2.5rem;
  }

  .intro__wrapper {
    padding: 2.5rem 2.5rem;
  }

  .intro__title {
    font-size: 3.1rem;
    line-height: 3.3rem;
    margin-bottom: 2.5rem;
  }

  .intro__text {
    margin-bottom: 2.5rem;
  }

  .button {
    font-size: 1.5rem;
    line-height: 2.1rem;
    padding: 1.7rem 5rem;
    margin-bottom: 2.5rem;
  }

  .slider {
    max-width: 100%;
    height: 30rem;
  }

  .slider__btn {
    font-size: 4rem;
  }

  .slider__btn-left {
    left: 3%;
  }

  .slider__btn-right {
    right: 3%;
  }

  .dots {
    margin-bottom: 2.5rem;
  }

  .dots__dot {
    height: 1rem;
    width: 1rem;
    margin-right: 1.25rem;
  }

  .skills__wrapper {
    padding: 2.5rem;
  }

  .skills__cards {
    grid-template-columns: repeat(1, 1fr);
    gap: 0;
  }

  .skills__card {
    padding: 2.5rem 1rem;
  }

  .skills__card-title {
    font-size: 2.5rem;
    line-height: 3.4rem;
  }

  .skills__card-pic {
    margin-right: 1.5rem;
  }

  .latest__works {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.4rem;
  }

  .latest__work-title {
    margin-bottom: 0.2rem;
  }

  .latest__work-desc {
    margin-bottom: 2.5rem;
  }

  .testimonial__cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.4rem;
  }

  .testimonial__card {
    background-color: #f3f3f3;
    min-height: 30rem;
    padding: 2.5rem;
  }

  .testimonial__text {
    font-size: inherit;
    font-weight: 600;
    line-height: inherit;
  }

  .testimonial__rating {
    margin-bottom: 0;
  }
  .footer__desc {
    margin-bottom: 2.5rem;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .intro__title {
    font-size: 5.1rem;
    line-height: 5.3rem;
  }

  .section-hidden {
    transform: none;
    opacity: 1;
  }

  .skills__cards {
    gap: 0;
  }

  .skills__card {
    padding: 2.5rem;
  }

  .skills__card-pic {
    margin-right: 2.5rem;
  }

  .latest__works {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonial__cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* Media ends */
