@import url("./assets/normalize.css");
@import url("./assets/fonts.css");

/* Common styles */

html {
  scroll-behavior: smooth;
}

.root {
  display: grid;

  box-sizing: border-box;
  width: 100%;
  height: 100%;

  color: var(--color-dark);
  background-color: var(--color-dark);

  font: normal 20px/2 "Inter", Arial, sans-serif;

  --color-dark: #000;
  --color-decoration: #bdae82;
  --color-light: #fff;
  -webkit-font-smoothing: antialiased;
  grid-template-columns: 1fr;
  justify-items: center;
  --main-width: 1440px;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: auto;
  -moz-text-size-adjust: auto;
  -ms-text-size-adjust: auto;
}

.common-width {
  display: grid;

  width: 100%;
  padding: 0 20px;
}

@media screen and (max-width: 1024px) {
  .common-width {
    padding: 0 40px;
  }
}
@media screen and (max-width: 768px) {
  .common-width {
    padding: 0 60px;
  }
}

@media screen and (max-width: 568px) {
  .common-width {
    padding: 0 40px;
  }
}

@media screen and (max-width: 480px) {
  .common-width {
    padding: 0 20px;
  }
}

.section {
  display: grid;

  width: 100%;
  padding-top: 100px;

  grid-template-columns: 1fr;
  justify-items: center;
}

@media screen and (max-width: 1024px) {
  .section {
    padding-top: 90px;
  }
}
@media screen and (max-width: 768px) {
  .section {
    padding-top: 80px;
  }
}

@media screen and (max-width: 568px) {
  .section {
    padding-top: 50px;
  }
}

.section__title {
  position: relative;

  overflow: hidden;

  width: calc(var(--main-width) / 2 - 20px);
  margin: 0 0 60px 0;

  text-align: center;

  color: var(--color-decoration);
  background-image: linear-gradient(
    to top,
    var(--color-dark) 39px,
    var(--color-decoration) 39px,
    var(--color-decoration) 41px,
    var(--color-dark) 41px
  );

  font-family: Merriweather;
  font-size: 40px;
  font-weight: 700;
}

@media screen and (max-width: 1024px) {
  .section__title {
    width: calc(50% - 20px);
    margin-bottom: 50px;

    font-size: 36px;
  }
}
@media screen and (max-width: 768px) {
  .section__title {
    font-size: 32px;
    line-height: 2.5;
  }
}

@media screen and (max-width: 568px) {
  .section__title {
    width: calc(80% - 20px);
    margin-bottom: 30px;

    font-size: 24px;
  }
}

.section__title-cover {
  padding: 0 20px;

  pointer-events: none;

  background-color: var(--color-dark);
}

@media screen and (max-width: 1024px) {
  .section__title-cover {
    font-size: 36px;
  }
}
@media screen and (max-width: 768px) {
  .section__title-cover {
    font-size: 32px;
  }
}

.hover-effect {
  cursor: pointer;
  transition: 0.3s ease-in-out;
}

.hover-effect:hover {
  opacity: 0.9;
}

.icon {
  fill: var(--color-light);
}

.icon:hover {
  fill: var(--color-decoration);
}

.logo__icon {
  width: 50px;
  height: 50px;
}

.button {
  box-sizing: border-box;
  width: 220px;
  height: 55px;
  padding: 0;

  color: var(--color-dark);
  border: 1px solid var(--color-decoration);
  background-color: var(--color-decoration);
}

.button:hover {
  color: var(--color-light);
}

.link {
  text-decoration: none;

  color: var(--color-light);
}

.list {
  margin: 0;
  padding: 0;

  list-style-type: none;
}

/* Header */

.header {
  align-items: center;
  justify-content: space-between;

  box-sizing: border-box;
  max-width: var(--main-width);
  height: 90px;

  background: url(./assets/img/header-background.jpg);
  background-repeat: no-repeat;
  background-position: center 0;

  gap: 31px;
  grid-template-areas: "logo navigation switcher theme";
  grid-template-columns: max-content 1fr max-content;
}

@media screen and (max-width: 1024px) {
  .header {
    background-size: auto 720px;
  }
}

@media screen and (max-width: 768px) {
  .header {
    background-position: -5px -30px;
    background-size: auto 620px;

    grid-template-areas: "logo switcher theme navigation";
  }
}

@media screen and (max-width: 568px) {
  .header {
    background-size: auto 520px;

    gap: 15px;
  }
}

@media screen and (max-width: 480px) {
  .header {
    background-position-x: center;
  }
}

.header__logo {
  width: 50px;
  height: auto;

  grid-area: logo;
}

.header__link {
  display: flex;
  align-content: center;
}

.header__navigation {
  grid-area: navigation;
  justify-self: right;
}

.header__menu {
  display: flex;

  gap: 30px;
}

@media screen and (max-width: 768px) {
  .header__menu {
    position: fixed;
    z-index: 1;
    top: 0;
    right: -620px;

    visibility: hidden;
    flex-direction: column;

    box-sizing: border-box;
    width: 100%;
    max-width: 620px;
    height: 100vh;
    padding: 134px 0 0 127px;

    transition: 0.5s;

    opacity: 0;
    background-color: var(--color-dark);

    font-size: 35px;

    gap: 20px;
  }
}

@media screen and (max-width: 480px) {
  .header__menu {
    padding-left: 50px;
  }
}

@media screen and (max-width: 768px) {
  .header__menu_opened {
    right: 0;

    display: flex;
    visibility: visible;

    transition: 0.5s;

    opacity: 1;
  }
}

@media screen and (max-width: 768px) {
  .header__menu:before {
    position: absolute;
    top: 0;
    left: -100%;

    display: block;

    width: 100%;
    height: 100vh;

    content: "";

    opacity: 0.5;
    background: var(--color-dark);
  }
}

.header__menu-button {
  display: none;

  width: 50px;
  height: 50px;

  border: none;
  background-color: transparent;
}

.header__menu-button:hover {
  filter: invert(26%) sepia(15%) saturate(638%) hue-rotate(7deg) brightness(92%)
    contrast(87%);
}

@media screen and (max-width: 768px) {
  .header__menu-button {
    display: flex;

    background: no-repeat 50% url("./assets/svg/menu-open-icon.svg");
  }
}

@media screen and (max-width: 768px) {
  .header__menu-button_opened {
    position: fixed;
    z-index: 2;
    top: 20px;
    right: 60px;

    display: flex;

    background: no-repeat 50% url("./assets/svg/menu-close-icon.svg");
  }
}

@media screen and (max-width: 568px) {
  .header__menu-button_opened {
    right: 40px;
  }
}

@media screen and (max-width: 480px) {
  .header__menu-button_opened {
    right: 20px;
  }
}

.header__menu-link:hover {
  color: var(--color-decoration);
}

.header__theme-button {
  width: 45px;
  height: 45px;

  border: none;
  background: no-repeat 50% url("./assets/svg/theme-switcher-light-icon.svg");
  background-color: transparent;

  grid-area: theme;
}

.header__theme-button.active {
  background: no-repeat 50% url("./assets/svg/theme-switcher-dark-icon.svg");
}

.header__theme-button:hover {
  filter: invert(26%) sepia(15%) saturate(638%) hue-rotate(7deg) brightness(92%)
    contrast(87%);
}

.header__switcher {
  display: flex;

  color: var(--color-light);

  font-weight: bold;

  gap: 18px;
  grid-area: switcher;
  justify-self: right;
}

.header__switcher-item {
  padding-left: 9px;

  list-style: "/";
}

.header__switcher-item:first-of-type {
  padding-left: 0;

  list-style-type: none;
}

.header__switcher-button {
  text-decoration: none;

  color: var(--color-light);
  border: none;
  background: transparent;
}

.header__switcher-button:hover {
  color: var(--color-decoration);
}

.header__switcher-button.active {
  color: var(--color-decoration);
}

/* Main */
/* Hero */
.main {
  display: grid;

  width: 100%;

  grid-template-columns: 1fr;
  justify-items: center;
}

.hero {
  position: relative;

  display: grid;

  box-sizing: border-box;
  width: 100%;
  max-width: var(--main-width);
  height: 100%;
  max-height: 820px;

  background-image: url("./assets/img/header-background.jpg");
  background-repeat: no-repeat;
  background-position: center -90px;

  grid-template-columns: 1fr;
  grid-template-rows: minmax(500px, 820px);
}

@media screen and (max-width: 1024px) {
  .hero {
    max-height: 600px;

    background-size: auto 720px;
  }
}
@media screen and (max-width: 768px) {
  .hero {
    max-height: 500px;

    background-position: -5px -120px;
    background-size: auto 620px;
  }
}

@media screen and (max-width: 568px) {
  .hero {
    max-height: 400px;

    background-size: auto 520px;
  }
}

@media screen and (max-width: 480px) {
  .hero {
    background-position-x: center;
  }
}

.hero__container {
  position: absolute;
  top: 160px;
  left: 80px;

  display: grid;

  width: 100%;
  max-width: 470px;
  height: 330px;
  max-height: 100%;

  grid-template-columns: 1fr;
}

@media screen and (max-width: 1024px) {
  .hero__container {
    top: 120px;
    left: 70px;

    max-width: 440px;
    max-height: 300px;
  }
}

@media screen and (max-width: 768px) {
  .hero__container {
    top: 78px;
    left: 60px;

    max-width: 390px;
    max-height: 270px;
  }
}

@media screen and (max-width: 568px) {
  .hero__container {
    top: 39px;
    left: 40px;

    max-width: 320px;
    max-height: 250px;
  }
}

@media screen and (max-width: 480px) {
  .hero__container {
    left: 20px;

    max-width: 280px;
  }
}

.hero__title {
  margin: 0;

  color: var(--color-light);

  font-family: "Merriweather";
  font-size: 60px;
  font-weight: 700;
  line-height: 2;
}

@media screen and (max-width: 1024px) {
  .hero__title {
    font-size: 46px;
  }
}
@media screen and (max-width: 768px) {
  .hero__title {
    font-size: 32px;
    font-weight: 400;
  }
}

.hero__text {
  margin: 0;

  color: var(--color-light);
}

@media screen and (max-width: 1024px) {
  .hero__text {
    line-height: 1.5;
  }
}

@media screen and (max-width: 768px) {
  .hero__text {
    line-height: 1.25;
  }
}

@media screen and (max-width: 568px) {
  .hero__text {
    font-size: 16px;
  }
}

.hero__button {
  align-self: end;
}

/* Skills */

.skills__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;

  width: 100%;

  pointer-events: none;

  color: var(--color-light);

  gap: 40px;
}

@media screen and (max-width: 1024px) {
  .skills__list {
    margin-top: -5px;
    margin-bottom: 10px;
  }
}

@media screen and (max-width: 768px) {
  .skills__list {
    margin-bottom: 20px;

    gap: 21px 25px;
  }
}

@media screen and (max-width: 568px) {
  .skills__list {
    margin-bottom: 0;
  }
}

.skills__list-item {
  display: grid;

  box-sizing: border-box;
  width: 320px;
  height: 240px;
  padding: 0 20px;

  font-size: 18px;

  grid-template-columns: 1fr;
  justify-items: center;
}

@media screen and (max-width: 768px) {
  .skills__list-item {
    align-items: center;

    grid-template-rows: min-content auto auto;
  }
}

@media screen and (max-width: 480px) {
  .skills__list-item {
    width: 270px;
  }
}

.skills__icon {
  width: auto;
  height: 50px;
  margin-bottom: 35px;

  fill: var(--color-decoration);
}

@media screen and (max-width: 1024px) {
  .skills__icon {
    margin-bottom: 18px;
  }
}

@media screen and (max-width: 768px) {
  .skills__icon {
    margin-bottom: 0;
  }
}

.skills__subtitle {
  margin: 0;

  font-size: 20px;
  font-weight: 700;
}

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

  margin: 0;

  text-align: center;

  font-size: 18px;
}

@media screen and (max-width: 768px) {
  .skills__text {
    align-self: start;

    line-height: 1.2;
  }
}

/* Portfolio */

.portfolio__filter {
  display: grid;
  justify-content: center;

  width: 100%;
  margin: 0 0 60px 0;

  grid-template-columns: repeat(auto-fit, 225px);
  justify-items: center;
}

@media screen and (max-width: 1024px) {
  .portfolio__filter {
    max-width: 500px;

    gap: 5px;
  }
}

@media screen and (max-width: 568px) {
  .portfolio__filter {
    max-width: 250px;
  }
}

@media screen and (max-width: 768px) {
  .skills__icon {
    margin-bottom: 0;
  }
}

.portfolio__filter-item {
  padding: 0;
}

.portfolio__filter-button {
  cursor: pointer;

  color: var(--color-decoration);
  background-color: var(--color-dark);
}

.portfolio__filter-button:hover {
  color: var(--color-light);
  background-color: var(--color-dark);
}

.portfolio__filter-button.active {
  pointer-events: none;

  color: var(--color-dark);
  background-color: var(--color-decoration);
}

.portfolio__list {
  display: grid;
  justify-content: center;

  box-sizing: border-box;
  width: var(--main-width);
  padding: 0 20px;

  gap: 25px;
  grid-template-columns: repeat(auto-fit, 450px);
}

.portfolio__list-item {
  width: 450px;
  height: 560px;
  padding: 0;
}

@media screen and (max-width: 1440px) {
  .portfolio__list {
    width: 100%;

    grid-template-columns: repeat(auto-fit, minmax(280px, 450px));
  }
}

@media screen and (max-width: 768px) {
  .portfolio__list-item {
    display: grid;

    width: 100%;
    height: auto;
  }
}

@media screen and (max-width: 768px) {
  .portfolio__photo {
    width: 100%;
    height: auto;
  }
}

/* Video */

.video__player {
  position: relative;

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

  max-width: 1400px;
}

.video__player-image {
  max-width: 100%;
  height: auto;

  object-fit: cover;
}

@media screen and (max-width: 768px) {
  .video__player-image {
    min-height: 418px;

    object-position: left -5px top 5px;
  }
}

@media screen and (max-width: 700px) {
  .video__player-image {
    min-height: auto;
    max-height: 481px;

    object-position: center;
  }
}

.video__player-button {
  position: absolute;

  width: 130px;
  height: 130px;
  padding: 0;

  border: none;
  border-radius: 50%;
  background-color: transparent;
  background-image: url(./assets/svg/play-button-icon.svg);
  background-repeat: no-repeat;
  background-size: contain;
}

@media screen and (max-width: 1024px) {
  .video__player-button {
    width: 100px;
    height: 100px;
  }
}

@media screen and (max-width: 768px) {
  .video__player-button {
    width: 65px;
    height: 65px;
  }
}

@media screen and (max-width: 568px) {
  .video__player-button {
    width: 50px;
    height: 50px;
  }
}

.video__player-button:hover {
  filter: invert(26%) sepia(15%) saturate(638%) hue-rotate(7deg) brightness(92%)
    contrast(87%);
}

/* Price */

.price__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;

  box-sizing: border-box;
  width: 100%;
  max-width: var(--main-width);
  padding: 0 20px 100px;

  color: var(--color-light);

  gap: 25px;
}

@media screen and (max-width: 768px) {
  .price__list {
    padding-bottom: 80px;

    gap: 50px;
  }
}

.price__list-item {
  display: grid;

  box-sizing: border-box;
  width: 450px;
  height: 505px;
  padding: 40px;

  border: 3px solid var(--color-decoration);

  grid-template-columns: 1fr;
  justify-items: center;
}

@media screen and (max-width: 768px) {
  .price__list-item {
    width: 420px;
  }
}

@media screen and (max-width: 480px) {
  .price__list-item {
    width: 100%;
    height: 450px;
    padding: 20px 0;
  }
}

.price__subtitle {
  margin: 0;

  pointer-events: none;

  font-family: "Merriweather";
  font-size: 28px;
  font-weight: 700;
  line-height: 2;
}

@media screen and (max-width: 480px) {
  .price__subtitle {
    font-size: 20px;
  }
}

.price__text {
  margin: 0;

  color: var(--color-decoration);

  font-family: "Merriweather";
  font-size: 24px;
  font-weight: 700;
  line-height: 2;
}

@media screen and (max-width: 480px) {
  .price__text {
    font-size: 18px;
  }
}

.price__sublist {
  display: grid;

  height: 180px;

  pointer-events: none;

  font-size: 18px;

  grid-template-columns: 1fr;
  justify-items: center;
}

@media screen and (max-width: 480px) {
  .price__sublist {
    font-size: 16px;
  }
}

.price__list-button {
  align-self: end;
}

/* Contacts */
.contacts {
  display: grid;

  width: 100%;
  max-width: var(--main-width);
  padding: 60px 0 195px;

  background: url("./assets/img/contacts-background.jpg");
  background-position: center center;
  background-size: auto 700px;

  justify-items: end;
}

@media screen and (max-width: 1024px) {
  .contacts {
    padding: 60px 0 145px;

    background-size: auto 650px;

    justify-items: center;
  }
}

@media screen and (max-width: 768px) {
  .contacts {
    padding-bottom: 110px;

    background-size: auto 600px;
  }
}

@media screen and (max-width: 568px) {
  .contacts {
    padding-top: 50px;
    padding-bottom: 70px;

    background-position-x: 30%;
  }
}

.form__container {
  display: grid;

  box-sizing: border-box;
  width: 100%;
  max-width: 490px;
  max-height: 445px;
  padding: 0 20px;
}

@media screen and (max-width: 1024px) {
  .form__container {
    background-size: auto 650px;

    justify-items: center;
  }
}

@media screen and (max-width: 768px) {
  .form__container {
    background-size: auto 600px;
  }
}

.form__title {
  overflow: hidden;

  margin: 0 0 40px 0;

  color: var(--color-decoration);

  font-family: Merriweather;
  font-size: 40px;
  font-weight: 700;
  line-height: 2;
}

@media screen and (max-width: 768px) {
  .form__title {
    font-size: 32px;
  }
}

.form__fieldset {
  display: grid;

  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;

  border: none;

  grid-template-columns: 1fr;
}

@media screen and (max-width: 1024px) {
  .form__fieldset {
    justify-items: center;
  }
}

.form__input {
  box-sizing: border-box;
  width: 100%;
  height: 50px;
  margin-bottom: 20px;
  padding-left: 20px;

  color: var(--color-decoration);
  border: 2px solid var(--color-decoration);
  outline: none;
  background-color: rgba(0, 0, 0, 0.5);
}

.form__textarea {
  box-sizing: border-box;
  width: 100%;
  height: 100px;
  margin-bottom: 30px;
  padding: 0;
  padding: 10px 0 0 20px;

  resize: none;

  color: var(--color-decoration);
  border: 2px solid var(--color-decoration);
  outline: none;
  background-color: rgba(0, 0, 0, 0.5);

  font-size: 20px;
}

::placeholder {
  color: var(--color-decoration);

  font-size: 20px;
}

/* Footer */

.footer {
  align-items: center;
  justify-content: space-between;

  box-sizing: border-box;
  max-width: var(--main-width);
  height: 150px;

  grid-template-columns: repeat(3, max-content);
}

@media screen and (max-width: 1024px) {
  .footer {
    align-content: center;
    justify-content: center;

    height: 190px;
    padding: 20px 0 30px;

    background-color: var(--color-dark);

    gap: 27px;
    grid-template-columns: auto;
    justify-items: center;
  }
}

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

  width: 188px;
  margin: 0;

  color: var(--color-light);

  gap: 20px;
}

@media screen and (max-width: 1024px) {
  .footer__copyright {
    width: 173px;

    line-height: 1;
  }
}

.footer__social {
  display: flex;
  align-content: center;

  gap: 20px;
}

.footer__social-item {
  display: flex;
  align-content: center;
}

.footer__social-link {
  display: flex;
}

.footer__link {
  line-height: 2.5;
}

@media screen and (max-width: 1024px) {
  .footer__link {
    line-height: 1;
  }
}

@media screen and (max-width: 1024px) {
  .footer__copyright {
    line-height: 1;
  }
}

.footer__social-icon {
  width: 32px;
  height: 32px;
}

.footer__link:hover {
  color: var(--color-decoration);
}

/*Light Theme*/
.light-theme {
  color: var(--color-dark);
  background-color: var(--color-light);
}

@media screen and (max-width: 768px) {
  .light-theme__burger-menu {
    color: var(--color-dark);
    background-color: var(--color-light);
  }
}

@media screen and (max-width: 768px) {
  .light-theme__burger-menu {
    color: var(--color-dark);
    background-color: var(--color-light);
  }
}

@media screen and (max-width: 768px) {
  .light-theme__burger-menu-button {
    position: fixed;
    z-index: 2;
    top: 20px;
    right: 60px;

    display: flex;

    background: no-repeat 50% url(./assets/svg/menu-close-icon-dark.svg);
  }
}

@media screen and (max-width: 568px) {
  .light-theme__burger-menu-button {
    right: 40px;
  }
}

@media screen and (max-width: 480px) {
  .light-theme__burger-menu-button {
    right: 20px;
  }
}

.light-theme:hover {
  color: var(--color-light);
}

.light-theme__section-title {
  background-image: linear-gradient(
    to top,
    var(--color-light) 39px,
    var(--color-dark) 39px,
    var(--color-dark) 41px,
    var(--color-light) 41px
  );
}
.light-theme__portfolio-button {
  color: var(--color-dark);
  background: var(--color-light);
}

.light-theme__portfolio-button:hover {
  background: var(--color-decoration);
}

.light-theme__portfolio-button.active {
  pointer-events: none;

  color: var(--color-light);
  background: var(--color-decoration);
}
