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

:root {
  --hue: 189;
  --primary-color: hsl(var(--hue), 100%, 26%);
  --primary-color-bg: hsla(calc(var(--hue) - 22), 23%, 89%, 1);
  --headline: hsl(210, 11%, 15%);
  --paragraph: hsl(210, 9%, 31%);
  --brand-green-light-02: hsla(180, 14%, 97%, 1);
  --brand-beige: rgb(240, 251, 255);
  --brand-green-hover: hsla(var(--hue), 100%, 14%, 1);
  font-size: 62.5%; /* 1 rem = 10px*/

  --nav-height: 8rem;
}

html {
  scroll-behavior: smooth;
}
html,
body {
  width: 100%;
  height: 100%;
}

.wrapper {
  width: min(50rem, 100%);
  margin-inline: auto;
  padding-inline: 2.4rem;
}

img {
  max-width: 100%;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

body {
  font-family: "DM Sans";
  font-size: 1.6rem;
  background: var(--brand-green-light-02);
  overflow: overlay;
}

.button {
  background-color: var(--primary-color);
  color: #ffffff;

  font-size: 1.4rem;
  font-weight: bold;
  text-transform: uppercase;

  padding: 1.6rem 3.2rem;

  border: none;
  border-radius: 4rem;
  margin-bottom: 6rem;
  width: fit-content;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  transition: all 0.2s;
}

.button:hover {
  background-color: var(--brand-green-hover);
}

section {
  padding-block: 10rem;
}

section .content p {
  color: var(--paragraph);
  line-height: 150%;
}

section header h1 {
  font-size: 3.4rem;
  line-height: 4.4rem;
  margin-bottom: 2.4rem;
  color: var(--headline);
}

section header h2 {
  font-size: 3rem;
  line-height: 3.9rem;
  color: var(--headline);
}

section header h4 {
  line-height: 150%;
  letter-spacing: 0.08em;
  font-size: 1.4rem;
  margin-bottom: 1.6rem;
  color: var(--primary-color);
  text-transform: uppercase;
}

/*====custom colors===*/
#services .card circle {
  fill: var(--primary-color-bg);
}

.logo svg path {
  fill: var(--primary-color);
}

#navigation .logo path[fill*="#00856F"],
#backToTopButton circle {
  fill: var(--primary-color);
}

#navigation button path[stroke*="#00856F"],
#contact li path {
  stroke: var(--primary-color);
}

body.menu-expanded #navigation .logo path,
#navigation.scroll .logo path {
  fill: #ffffff;
}

#navigation.scroll button path[stroke*="#00856F"] {
  stroke: #ffffff;
}

/*=========Home===============================*/

#home:before {
  content: "";
  width: 100%;
  height: calc(76% + var(--nav-height));
  display: block;
  background: var(--primary-color-bg);
  z-index: -1;
  position: absolute;
  top: 0;
  left: 0;
}
#home {
  padding-top: calc(var(--nav-height) + 4.1rem);
  text-align: center;
}

#home a {
  margin-inline: auto;
}

#home p {
  font-size: 1.8rem;
  line-height: 150%;
  /* or 27px */

  margin-bottom: 3.2rem;
  color: var(--paragraph);
}

#home img {
  display: block;
  margin: 0 auto;
  width: 26.4rem;
  object-position: 0 1.5rem;
}

#home .stats {
  width: 100%;
  margin-inline: auto;
  background-color: var(--brand-beige);
  border: 1px solid #dce9e2;
  border-radius: 6px;
  padding: 4rem;

  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6rem;
}

#home .stat h3 {
  font-size: 4.8rem;
  line-height: 130%;
  color: var(--headline);
  margin-bottom: 0.4rem;
}

#home .stat p {
  margin: 0;
  line-height: 150%;
  color: var(--primary-color);
}

/*=======Menu ==================================================*/

nav {
  display: flex;
  align-items: center;
  height: var(--nav-height);
  z-index: 100;
  position: fixed;
  top: 0;
  width: 100vw;
}

nav .wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav.scroll {
  background-color: var(--primary-color);
}

nav button {
  background: none;
  border: none;
  cursor: pointer;
}

nav .menu,
nav .close-menu {
  position: fixed;
}

/*=======Menu Expanded ==================================================*/

body.menu-expanded {
  overflow: hidden;
  text-align: center;
}

body.menu-expanded > :not(nav) {
  visibility: hidden;
}

.menu,
.close-menu,
body.menu-expanded .open-menu {
  opacity: 0;
  visibility: hidden;
}

body.menu-expanded .menu,
body.menu-expanded .close-menu {
  opacity: 1;
  visibility: visible;
}

.menu {
  transform: translateY(100%);
}

body.menu-expanded .menu {
  top: 0;
  left: 0;
  background-color: var(--primary-color);

  padding-top: var(--nav-height);
  min-width: 7.2rem;
  width: 100vw;
  height: 100vh;

  transition: transform 300ms;

  transform: translateY(0%);
}

.menu ul:first-child {
  display: flex;
  flex-direction: column;
  gap: 4.8rem;
  margin-top: 6rem;

  font-size: 2.4rem;
  line-height: 3.1rem;
  text-align: center;
}

.menu ul li a {
  color: var(--brand-beige);
}

.menu .button {
  background-color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.8rem;
  line-height: 2.3rem;
  text-transform: uppercase;
  text-align: center;
  color: var(--primary-color);
  border: 1px solid #ffffff;
  border-radius: 4rem;

  display: inline-block;
  margin-top: 4.8rem;
  margin-bottom: 8rem;
  padding: 1.6rem 3.2rem;
}

.menu .button:hover {
  background-color: var(--primary-color);
  color: var(--brand-beige);
  border-color: var(--brand-beige);
}

.social-links {
  display: flex;
  gap: 3.2rem;
  align-items: center;
  justify-content: center;
}

body.menu-expanded .logo,
body.menu-expanded .close-menu {
  position: relative;
  z-index: 100;
  transition: all 300ms;
}

body.menu-expanded .logo path {
  fill: white;
}
body.menu-expanded .close-menu path {
  stroke: white;
}

/*====================servicer======================================*/

#services h4 {
  text-align: center;
}

#services h2 {
  text-align: center;
  margin-bottom: 6rem;
}

#services .cards {
  display: flex;
  flex-direction: column;
  gap: 3.2rem;
}

#services .card {
  padding: 2.4rem;

  background: #ffffff;

  border: 1px solid #dce9e2;
  border-radius: 0.6rem;
}

#services .card h3 {
  font-size: 2.4rem;
  line-height: 3.1rem;
  margin-block: 1.6rem;
}

/*====================About======================================*/

#about {
  background: var(--brand-beige);
}
#about h2 {
  margin-bottom: 2.4rem;
}

#about p {
  margin-bottom: 6rem;
}

#about img {
  border-radius: 0.8rem;
}


/*====================Contact======================================*/

#contact header {
  margin-bottom: 3.2rem;
}

#contact ul {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;

  margin-bottom: 3.2rem;
}

#contact ul li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

#contact li  a {
  color: var(--primary-color);
  transition: .2s;
  opacity: .5;
}

#contact li a:hover {
  opacity: 1;
}

/*====================footer======================================*/

footer {
  text-align: left;
  background-color: var(--primary-color);
  padding-block: 6rem;
}

footer .logo {
  display: inline-block;
  margin-bottom: 2.4rem;
}

footer .logo svg {
  width: 100%;
  height: 100%;
}

footer .logo path {
  fill: white;
}

footer p {
  color: var(--brand-beige);
  line-height: 2;
}

footer ul.social-links {
  margin-top: 3.2rem;
  justify-content: flex-start;
}

footer ul.social-links li {
  transition: opacity 0.2s;
}

footer ul.social-links li:hover {
  opacity: 0.7;
}

#backToTopButton {
  position: fixed;
  bottom: 1rem;
  right: 2.5rem;
  transition: 200ms;
  opacity: 0;
  visibility: hidden;
}

#backToTopButton.show {
  opacity: 1;
  visibility: visible;
}

/*============DESKTOP==========================================*/

@media (min-width: 1024px) {
  /*===========GERAL==========================================*/

  body {
    overflow: auto;
  }

  .wrapper {
    width: min(112rem, 100%);
    height: 100%;
    display: grid;
  }

  section {
    padding-top: 16rem;
  }

  section header h2 {
    font-size: 4rem;
    line-height: 5.2rem;

  }

  .col-a {
    grid-area: A; 
  }

  .col-b {
    grid-area: B;
  }

  /*===========NAVIGATION==========================================*/

  /*Reset*/
  nav#navigation .wrapper * {
    margin: 0;
    padding: 0;
    visibility: initial;
    display: initial;
    opacity: initial;
    flex-direction: initial;
    transform: initial;
    color: initial;
    background: initial;
    font-size: initial;
    font-weight: initial;
    line-height: initial;
    position: initial;
    filter: initial;
  }

  nav#navigation .close-menu,
  nav#navigation .open-menu,
  nav#navigation .social-links {
    display: none;
  }

  nav#navigation .menu {
    width: min(73.5rem, 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  nav#navigation .menu ul:nth-child(1) {
    display: flex;
    align-items: center;
    gap: 3.2rem;
  }

  nav#navigation .menu ul li a {
    opacity: 0.7;
    color: var(--primary-color);
    transition: .2s;
  }

  nav#navigation .menu a.button {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 2.4rem;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 4rem;

    font-weight: bold;
    font-size: 1.4rem;
    line-height: 1.8rem;
    text-transform: uppercase;
    transition: .2;

  }

  nav#navigation .menu a.button:hover {
    color: white;
    background-color: var(--primary-color);
  }

  nav#navigation.scroll .menu a.button.active,
  nav#navigation.scroll .menu a.button:hover {
    color: var(--primary-color);
    background-color: white;
  }

  nav#navigation.scroll .menu ul li a {
    color : var(--brand-green-light-02);
    opacity: 0.6;
    
  }

  nav#navigation.scroll .menu a.button {
    color: white;
    border-color: white;
  } 

  nav#navigation .menu ul li a.active,
  nav#navigation .menu ul li a:hover {
    opacity: 1;
    font-weight: 700;
  }

  nav#navigation .menu ul li a::after {
    content: '';
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    display: block;
    position: relative;
    bottom: -2.4rem;
    left: -1rem;
    transition: .2s;
  }

  
  nav#navigation.scroll .menu ul li a::after {
    background-color: white;
  }

  nav#navigation .menu ul li a.active::after,
  nav#navigation .menu ul li a:hover::after {
    padding-inline: 1rem ;
    width: 100%;

  }


  /*===========HOME==========================================*/

  #home {
    padding-top: var(--nav-height);
  }

  #home::before {
    height: calc(87% - var(--nav-height));
  }
  #home .wrapper {
    grid-template-columns: 60.5rem 1fr;
    grid-template-areas: 
    "A B"
    "C C";
  }

  #home .col-a {
    grid-area: A;
    text-align: left;
    align-self: center;
  }

  #home .col-b {
    grid-area: B;
  }

  #home h1 {
    font-size: 5.2rem;
    line-height: 130%;
    
  }

  #home .content p  {
    font-size: 1.8rem;
  }
  #home .stats {
    grid-area: C;
    flex-direction: row;
    padding: 6rem;
    gap: 0;
  }

  #home .stats .stat + .stat {
    border-left: 1px solid var(--primary-color);
  }

  #home .stats .stat {
    flex: 1;
  }

  #home .button {
    margin: 0;
  }

  #home img {
    width: 42rem;
  }

  /*===========SERVICES==========================================*/

  #services h4 {
    font: 1.4rem;
  }
  #services h2 {
    width: 50rem;
    margin-inline: auto;
  }

  #services .cards {
    flex-direction: row;
    flex-wrap: wrap;
  }

  #services .card {
    width: 30%;
    flex-grow: 1;
  }

  /*===========ABOUT==========================================*/

  #about .wrapper {
    display: grid;
    grid-template-columns:  48rem 1fr;
    grid-template-areas: 'B A';
    gap: 6.7rem;
  }

  #about .col-a {
    grid-area: A;
    align-self: center;
  }

  #about .col-b {
    grid-area: B;
  }

  #about .content p {
    margin-bottom: 0;
  }

  /*===========CONTACT==========================================*/

  #contact .wrapper {
    grid-template-columns: 1fr 57.5rem;
    grid-template-areas: 'A B';

  }

  #contact h2 {
    width: 40rem;
  }

  #contact .col-a {
    grid-area: A;
    align-self: center;
  }

  #contact .col-b {
    grid-area: B;
  }

  /*===========FOOTER==========================================*/

  footer {
    padding-block: 8rem;
  }
  footer .wrapper {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: 'A B';
  }

  footer p {
    margin-bottom: 0;
  }

  footer .col-a {
    align-self: center;
  }

  footer .col-b {
    align-self: center;
    justify-self: flex-end;
  }

  footer ul.social-links {
    margin: 0 ;
  }


}


@media (min-width: 1500px) {
  .wrapper {
    width:min(1500px, 100%);

  }
}