@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  src: url('../fonts/Montserrat/Montserrat-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  src: url('../fonts/Montserrat/Montserrat-Medium.ttf') format('truetype');
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  src: url('../fonts/Montserrat/Montserrat-Bold.ttf') format('truetype');
}

/*=============== VARIABLES CSS ===============*/                    
:root {
  --header-height: 3.5rem;
  /*========== Colors ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  --first-color: hsl(39, 100%, 59%);
  --first-color-alt: hsl(39, 90%, 45%);
  --first-color-light: hsl(39, 95%, 72%);
  --title-color: hsl(228, 8%, 98%);
  --text-color: hsl(228, 8%, 70%);
  --white-color: hsl(228, 8%, 98%);
  --black-color: hsl(228, 6%, 4%);
  --body-color: hsl(228, 6%, 8%);
  --second-color:hsl(93, 54%, 54%);
  --container-color: hsl(228, 6%, 12%);
  --shadow-img: 0 0 48px hsla(39, 100%, 59%, .4);
  --gradient-card: linear-gradient(180deg,
                                hsla(39, 20%, 12%),
                                hsla(39, 40%, 30%));


  /*========== Font and typography ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --body-font: "Montserrat", sans-serif;
  --biggest-font-size: 2.25rem;
  --h1-font-size: 1.5rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1rem;
  --normal-font-size: .938rem;
  --small-font-size: .813rem;

  /*========== Font weight ==========*/
  --font-regular: 400;
  --font-semi-bold: 600;
  --font-bold: 700;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
}

/*========== Responsive typography ==========*/
@media screen and (min-width: 1150px) {
  :root {
    --biggest-font-size: 4.25rem;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: .875rem;
  }
}

/*=============== BASE ===============*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
}

h1, h2, h3, h4 {
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

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

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 1120px;
  margin-inline: 1.5rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.section {
  padding-block: 5rem 1rem;
}

.section__title {
  font-size: var(--h1-font-size);
  font-weight: var(--font-bold);
  text-align: center;
  margin-bottom: 1rem;
}

.main {
  overflow: hidden;
}

/*=============== HEADER & NAV ===============*/
.header{
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  background-color: transparent;
  z-index: var(--z-fixed);
}

.nav{
  position: relative;
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo,
.nav__close,
.nav__toggle,
.nav__actions{
  display: flex;
  color: var(--title-color);
  cursor: pointer;
}

.nav__logo{
  font-size: 1.5rem;
  font-weight: var(--font-semi-bold);
  column-gap: .25rem;
  align-items: center;
}

.nav__logo img{
  width: 40px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(var(--shadow-img));
}

.nav__actions{
  font-size: 1.25rem;
  column-gap: .5rem;
  align-items: center;
}

/* Navigation for mobile devices */
@media screen and (max-width: 1150px){
  .nav__menu{
    position: fixed;
    top: 0;
    right: -100%;
    background-color: hsla(228, 24%, 6%, .2);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    width: 80%;
    height: 100%;
    padding: 6rem 3rem 0;
    transition: right .4s;

  }
}

.nav__list{
  display: flex;
  flex-direction: column;
  row-gap: 3rem;
}

.nav__link{
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
  transition: color .4s;
}

.nav__link:hover{
  color: var(--first-color);
}

.nav__close{
  position: absolute;
  top: 1.15rem;
  right: 1.5rem;
  font-size: 1.25rem;
}

/* Show menu */
.show-menu{
  right: 0;
}

/* Add blur header */
.blur-header::after{
  content: "";
  position: absolute;
  width: 1000%;
  height: 100%;
  background-color: hsl(228, 24%, 6%, .2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  top: 0;
  left: 0;
  z-index: -1;
}

/* Active link */
.active-link{
  color: var(--first-color);
}

/*=============== HOME ===============*/
.home__container{
  padding-top: 2.5rem;
  row-gap: 2rem;
}

.home__img{
  width: 270px;
  filter: drop-shadow(var(--shadow-img));
  justify-self: center;
}

.home__data{
  text-align: center;
}

.home__title{
  font-size: var(--biggest-font-size);
  font-weight: var(--font-bold);
  margin-bottom: 1rem;
}

.home__title span{
  color: var(--first-color);
}

.home__description{
  margin-bottom: 3rem;
}

.home__buttons{
  display: flex;
  justify-content: center;
  align-items: center;
  column-gap: 0.5rem;
}

/*=============== SLIDER ===============*/
.slider {
    width: 85px;
    height: 140px;
    margin: 5rem auto 0 auto;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transform: perspective(1000px);
    -webkit-transform: perspective(1000px);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    animation: autoRun 30s linear infinite;
    z-index: 2;
} 

@keyframes autoRun{
    from{
        transform: perspective(1000px) rotateX(-0deg) rotateY(0deg);
    }to{
        transform: perspective(1000px) rotateX(-0deg) rotateY(360deg);
    }
}

.slider .item{
    border: 2px solid var(--first-color-light);
    border-radius: 1.5rem;
    background-color: var(--body-color);
    box-shadow: 0 0 20px var(--first-color-alt);
    position: absolute;
    inset: 0 0 0 0;
    transform:  
        rotateY(calc((var(--position) - 1) * (360 / var(--quantity)) * 1deg))
        translateZ(43vw);
}

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

/*=============== BUTTON ===============*/
.button{
  background-color: var(--white-color);
  color: var(--black-color);
  font-weight: var(--font-bold);
  padding: .5rem 1.5rem .5rem .5rem;
  border-radius: 4rem;
  display: inline-flex;
  align-items: center;
  column-gap: .75rem;
}

.button span{
  background-color: var(--first-color);
  padding: .5rem;
  font-size: 1.25rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: transform .4s;
}

.button:hover span{
  transform: translateX(.15rem) rotate(-30deg);
}

.button__link{
  color: var(--white-color);
  font-weight: var(--font-bold);
  text-decoration: underline;
  transition: color .4s;
}

.button__link:hover{
  color: var(--first-color);
}

/*=============== NEWS ===============*/
.new__data{
  text-align: center;
}

.new__container{
  row-gap: 7.5rem;
}

.new__card{
  position: relative;
  width: 120px;
  padding: 1.25rem .75rem 1.25rem .75rem;
  border: 2px solid var(--first-color-light);
  border-radius: 1.5rem;
}

.new__img{
  width: 180px;
  margin: 0 auto;
  transition: transform .4s;
  border-radius: 1rem;
}

.new__card:nth-child(1){
  top: 3rem;
}

.new__card:nth-child(3){
  top: -3rem;
}

.new__card:nth-child(odd){
  rotate: -5deg;
}

.new__card:nth-child(even){
  justify-self: flex-end;
  rotate: 5deg;
}

/*=============== SHOP ===============*/
.shop__container{
  padding-top: 6.5rem;
  grid-template-columns: repeat(2, 1fr);
  gap: 6rem 1.5rem;
}

.shop__card{
  position: relative;
  padding: 1.25rem .75rem 1.25rem .75rem;
  border: 2px solid var(--first-color-light);
  box-shadow: 0 0 20px var(--first-color-alt);
  border-radius: 1rem;
  display: flex;           
  justify-content: center;   
  align-items: center;   
}

.shop__img{
  width: 130px;
  margin: 0 auto;
  transition: transform .4s;
}

.shop__card:hover .shop__img{
  transform: translateY(-.5rem);
}

/*=============== CARE ===============*/
.care__container{
  padding-top: 2rem;
  row-gap: 2rem;
}

.care__img{
  width: 270px;
  filter: drop-shadow(0 0 32px hsla(0, 100%, 50%, 0.5));
  justify-self: center;
}

.care__list{
  display: grid;
  row-gap: 1rem;
}

.care__item{
  display: flex;
  column-gap: .5rem;
  align-items: flex-start;
}

.care__item svg{
  width: 1.5rem;
  height: 1.5rem;  
  flex-shrink: 0; 
  display: block;
  color: var(--second-color);
}

/*=============== ABOUT ===============*/
.about__data{
  text-align: center;
}

.about__container{
  row-gap: 7.5rem;
}

/*=============== CONTACT ===============*/
.contact__container{
  padding-top: 2rem;
  row-gap: 2rem;
}

.contact__img{
  width: 270px;
  filter: drop-shadow(var(--shadow-img));
  justify-self: center;
}

.contact__content{
  display: grid;
  row-gap: 2rem;
  text-align: center;
}

.contact_data{
  margin-top: 1.5rem;
  text-align: center;
}

.contact__title{
  font-size: var(--h2-font-size);
  margin-bottom: .5rem;
}

.contact__social {
    display: flex;
    flex-direction: column;
    justify-content: center; 
    gap: .50rem;          
}

.contact__social a {
    display: inline-flex; 
    justify-content: center;
    align-items: center;      
    gap: 0.5rem;  
    font-size: 1.5rem;
}

.contact__info{
  font-style: normal;
}

/*=============== CONTACT FORM ===============*/
.contact form {
    width: 90%;
    margin: 3.5rem auto 4rem auto; 
    text-align: center;
}

form .input__box{
    display: flex;
    justify-content: space-between;
}

.input__box .input__field{
    width: 48.5%;
}

.field .form__item{
    width: 100%;
    padding: 18px;
    background: transparent;
    border: 2px solid var(--first-color-light);
    outline: none;
    border-radius: 6px;
    font-size: 16px;
    color: #ededed;
    margin: 12px 0;
}

.field.error .form__item{
    border: 2px solid #d93025;
}

.field .form__item::placeholder{
    color: rgb(255, 255, 255, .3);
}

.field .error__text{
    font-size: 14.5px;
    color: #d93025;
    text-align: left;
    margin: -5px 0 10px;
    display: none;
}

.field.error .error__text{
    display: block;
}

form .textarea__field .form__item {
    resize: none;
}

form .textarea__field .error__text{
    margin-top: -10px;
}

.form__button{
    padding: 12px 32px;
    background: var(--first-color-light);
    border: none;
    outline: none;
    border-radius: 6px;
    box-shadow: 0 0 10px var(--first-color-alt);
    font-size: 16px;
    color: #333;
    letter-spacing: 1px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: .5s;
}

.form__button:hover{
    box-shadow: none;
}

/*=============== FOOTER ===============*/
.footer{
  padding-block: 4rem 2rem;
}

.footer__container{
  row-gap: 4rem;
}

.footer__logo{
  display: inline-flex;
  align-items: center;
  column-gap: .5rem;
  color: var(--title-color);
  font-size: var(--h2-font-size);
  font-weight: var(--font-semi-bold);
  margin-bottom: .75rem;
}

.footer__logo img{
  width: 40px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(var(--shadow-img));
}

.footer__content{
  grid-template-columns: repeat(2, max-content);
  gap: 4rem 3rem;
}

.footer__title{
  font-size: var(--normal-font-size);
  margin-bottom: 1rem;
}

.footer__links{
  display: grid;
  row-gap: .75rem;
}

.footer__link{
  color: var(--text-color);
  transition: color .4s;
}

.footer__social{
  display: flex;
  column-gap: .75rem;
}

.footer__social-link{
  color: var(--text-color);
  font-size: 1.5rem;
  transition: color .4s;
}

.footer__link:hover,
.footer__social-link:hover{
  color: var(--first-color);
}

.footer__copy{
  display: block;
  margin-top: 6rem;
  text-align: center;
  font-size: var(--small-font-size);
}


/*=============== SCROLL BAR ===============*/
::-webkit-scrollbar{
  width: .6rem;
  background-color: hsl(228, 4%, 15%);
}

::-webkit-scrollbar-thumb{
  width: .6rem;
  background-color: hsl(228, 4%, 25%);
}

::-webkit-scrollbar-thumb:hover{
  width: .6rem;
  background-color: hsl(228, 4%, 35%);
}

/*=============== SCROLL UP ===============*/
.scrollup{
  position: fixed;
  right: 1rem;
  bottom: -50%;
  background-color: var(--container-color);
  color: var(--title-color);
  box-shadow: 0 12px 24px hsl(228, 48%, 4%, .5);
  display: inline-flex;
  padding: 6px;
  font-size: 1.25rem;
  z-index: var(--z-tooltip);
  transition: bottom .4s, transform .4s;
}

.scrollup:hover{
  transform: translateY(-.5rem);
}

/* Show Scroll Up */
.show-scroll{
  bottom: 3rem;
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 320px){
  .container{
    margin-inline: 1rem;
  }

  .slider{
    width: 80px;
    height: 130px;
    margin-top: 5rem;
    margin-bottom: 0;
  }

  .slider .item{
    transform:  
    rotateY(calc((var(--position) - 1) * (360 / var(--quantity)) * 1deg))
    translateZ(140px);
  }

  .home__title{
    font-size: 2rem;
  }

  .home__buttons{
    flex-direction: column;
    row-gap: 1.5rem;
  }

  .shop__container{
    grid-template-columns: 160px;
    justify-content: center;
  }

  .footer__content{
    grid-template-columns: max-content;
  }
}

/* For medium devices */
@media screen and (min-width: 576px){
  .home__container,
  .new__container,.care__container{
    grid-template-columns: 400px;
    justify-content: center;
  }

  .contact form{
    width: 550px;
  }
  .slider{
    width: 100px;
    height: 150px;
    margin-top: 5rem;
    margin-bottom: 2rem;
  }

  .slider .item{
    transform:  
    rotateY(calc((var(--position) - 1) * (360 / var(--quantity)) * 1deg))
    translateZ(250px);
  }
  .new__card{
  width: 160px;
  }

  .new__card:nth-child(1){
    top: 3rem;
  }

  .new__card:nth-child(3){
    top: -3rem;
  }

  .shop__container{
    grid-template-columns: repeat(2, 160px);
    justify-content: center;
  }

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

/* For large devices */
@media screen and (min-width: 768px){
  .nav__menu{
    width: 50%;
  }

  .contact form{
    width: 650px;
  }

  .slider{
    width: 130px;
    height: 190px;
    margin-top: 5rem;
    margin-bottom: 8rem;
  }

  .slider .item{
    transform:  
    rotateY(calc((var(--position) - 1) * (360 / var(--quantity)) * 1deg))
    translateZ(350px);
  }

    .new__card{
  width: 160px;
  }

  .new__card:nth-child(1){
    top: 4rem;
  }

  .new__card:nth-child(3){
    top: -4rem;
  }

  .shop__container{
    grid-template-columns: repeat(3, 160px);
  }
  
  
  .footer__container{
    grid-template-columns: repeat(2, max-content);
    justify-content: space-between;
  }

}

/* For large devices */
@media screen and (min-width: 1150px){
  .container{
    margin-inline: auto;
  }

  .section{
    padding-block: 7rem 2rem;
  }

  .section__title{
    margin-bottom: 1.5rem;
  }

  .nav{
    height: calc(var(--header-height) + 2rem);
  }

  .nav__toggle,
  .nav__close{
    display: none;
  }

  .nav__logo img{
    width: 70px;
  }

  .nav__menu{
    width: initial;
  }

  .nav__list{
    flex-direction: row;
    column-gap: 3.5rem;
  }

  .nav__actions{
    font-size: 1.5rem;
    column-gap: 1rem;
  }

  .slider{
    width: 200px;
    height: 290px;
    margin-top: 15rem;
    margin-bottom: 15rem;
  }

  .slider .item{
    transform:  
    rotateY(calc((var(--position) - 1) * (360 / var(--quantity)) * 1deg))
    translateZ(550px);
  }

  .home__container{
    grid-template-columns: 480px 535px;
    align-items: center;
    column-gap: 4rem;
    padding-top: 4rem;
  }

  .home__img{
    width: 480px;
  }

  .home__data{
    text-align: initial;
  }

  .home__description{
    margin-bottom: 4.5rem;
  }

  .home__buttons{
    justify-content: initial;
    column-gap: 1.5rem;
  }

  .new__container{
    grid-template-columns: 412px 490px;
    align-items: center;
    column-gap: 7.5rem;
  }

  .new__data,
  .about__data,
  .contact_data,
  .new__data .section__title{
    text-align: initial;
  }

  .new__card{
  width: 200px;
  }

  .new__card:nth-child(1){
    top: 5rem;
  }

  .new__card:nth-child(3){
    top: -5rem;
  }

  .shop__container{
    grid-template-columns: repeat(3, 240px);
    gap: 8.5rem 4rem;
    padding-top: 7.5rem;
  }

  .shop__card{
    padding: 1.5rem 1.5rem 1.5rem 1.5rem;
    border-radius: 1.5rem;
  }

  .shop__img{
    width: 210px;
    top: -5.5rem;
  }

  .care__container{
    grid-template-columns: 480px 385px;
    align-items: center;
    column-gap: 8rem;
    padding-top: 3rem;
  }

  .care__img{
    width: 480px;
  }

  .care__list{
    row-gap: 1.5rem;
  }

  .contact form{
    width: 800px;
  }

  .contact__container{
    grid-template-columns: 290px 480px;
    justify-content: center;
    align-items: center;
    column-gap: 8rem;
    padding-block: 3rem;
  }

  .contact__content{
    order: -1;
    text-align: initial;
    row-gap: 2.5rem;
  }

  .contact__social a{
      justify-content: initial;
  }

  .contact__img{
    width: 480px;
  }

  .footer__logo{
    margin-bottom: 1.5rem;
  }

  .footer__logo img{
    width: 70px;
  }

  .footer__content{
    column-gap: 5.5rem;
  }

  .footer__title{
    font-size: var(--h3-font-size);
    margin-bottom: 1.5rem;
  }

  .footer__social{
    column-gap: 1rem;
  }

  .footer__copy{
    margin-top: 7.5rem;
  }

  .scrollup{
    right: 3rem;
  }
}
