:root {
  /* ### Primary */
  --Dark-Blue: hsl(233, 26%, 24%);
  --Lime-Green: hsl(136, 65%, 51%);
  --Bright-Cyan: hsl(192, 70%, 51%);

  /* ### Neutral */
  --Grayish-Blue: hsl(233, 8%, 62%);
  --Light-Grayish-Blue: hsl(220, 16%, 96%);
  --Very-Light-Gray: hsl(0, 0%, 98%);
  --White: hsl(0, 0%, 100%);
}

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

html {
  font-family: "Public Sans", sans-serif;
  font-size: 18px;
  scroll-behavior: smooth;
}

html,
body {
  width: 100%;
  overflow-x: clip;
}

a {
  text-decoration: none;
}

ul {
  display: flex;
  flex-direction: row;
  list-style-type: none;
}

section {
  padding: 6rem 0;
  scroll-margin-top: 90px;
}

p {
  color: var(--Grayish-Blue);
  line-height: 29px;
}

h1 {
  font-size: 3rem;
  color: var(--Dark-Blue);
}

h2 {
  font-size: 2rem;
  color: var(--Dark-Blue);
}

h3 {
  color: var(--Dark-Blue);
}

h1,
h2,
h3,
h4 {
  font-weight: 400;
}

button {
  padding: 15px 30px;
  border-radius: calc(infinity * 1px);
  border: none;
  background: linear-gradient(90deg, hsl(136, 65%, 51%) 0%, hsl(192, 70%, 51%) 100%);
  color: white;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
}

button:hover {
  background: linear-gradient(90deg, hsl(136, 100%, 67%) 0%, hsl(192, 100%, 68%) 100%);
}

.desktop-menu a {
  color: var(--Grayish-Blue);
  padding: 32px;
}

.desktop-menu a:hover {
  border-bottom: 5px solid;
  border-image-slice: 1;
  border-width: 5px;
  border-image-source: linear-gradient(to right, #31d35c, #2bb7da);
}

header {
  width: 100%;
  height: 90px;
  position: fixed;
  background-color: var(--White);
  z-index: 3;
}

.wrapper {
  width: 85%;
  margin: auto;
}

header .wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

/* hero section */

#hero {
  height: 745px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  position: relative;
}

.call2action {
  max-width: 500px;
  margin-left: 8%;
}

.call2action p {
  margin: 30px 0;
}

.phones {
  background-image: url("../images/bg-intro-desktop.svg");
  background-repeat: no-repeat;
  background-position-y: -208px;
  background-position-x: -39px;
  width: 50%;
  height: 100%;
}

.mockup {
  position: absolute;
  right: 0;
  transform: translate(122px, 50px);
  width: clamp(300px, 56vw, 890px);
  transform-origin: left center;
  z-index: 2;
}

/* why-choose-us section */

#why-choose-us {
  background-color: var(--Light-Grayish-Blue);
  width: 100%;
}

#why-choose-us .wrapper p:nth-child(2) {
  margin-bottom: 50px;
  margin-top: 20px;
}

.reason {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 30px;
  text-wrap: balance;
}

/* blog section */

#blog {
  background-color: var(--Very-Light-Gray);
}

.article-container {
  gap: 26px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  margin-top: 30px;
}

.img-ratio {
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.article {
  background-color: var(--White);
}

.article img {
  width: 100%;
  height: auto;
}

.article-text {
  padding: 20px;
}

.article-text h4 {
  margin: 20px 0;
  color: var(--Dark-Blue);
}
.article-text h4:hover {
  color: #31d35c;
  cursor: pointer;
}

.article-text p {
  font-size: 0.9rem;
  line-height: 23px;
}

footer {
  background-color: var(--Dark-Blue);
  padding: 50px 0;
}

footer .wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
}

.icons {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
}

.icons > img {
  filter: brightness(6);
}

.socials img {
  margin-right: 10px;
}

.socials a:last-child img {
  margin-right: 0px;
}

.socials img:hover {
  filter: invert(42%) sepia(93%) saturate(1352%) hue-rotate(104deg) brightness(89%) contrast(119%);
}

.footer-nav {
  display: flex;
  gap: 39%;
  line-height: 41px;
  text-wrap: nowrap;
}

.footer-nav ul {
  display: inline;
}

.footer-nav a {
  color: var(--Very-Light-Gray);
}

.footer-nav a:hover {
  color: var(--Lime-Green);
}

footer .wrapper .invite {
  justify-self: end;
}

.invite button {
  margin-bottom: 20px;
}

/* Behaviour classes */
.mobile {
  display: none;
}

.desktop {
  display: inherit;
}

.overmenu {
  height: 100vh;
  width: 100%;
  position: fixed;
  z-index: 3;
  background: linear-gradient(180deg, rgba(45, 49, 77, 1) 0%, rgba(0, 212, 255, 0) 100%);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-in-out;
}

.mobile-menu {
  width: 80%;
  max-width: 415px;
  margin: 0 auto;
  padding: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  border-radius: 10px;
  background-color: var(--White);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-90px);
  transition: all 0.5s ease-in-out;
}
.slideIn {
  transform: translateY(150px);
}

.fadeIn {
  opacity: 1;
  visibility: visible;
}

.mobile-menu a {
  padding: 17px;
  color: var(--Dark-Blue);
}

.attribution {
  font-size: 12px;
  color: var(--Very-Light-Gray);
}

.attribution a {
  color: hsl(27, 63%, 53%);
  letter-spacing: 0.5px;
}

/* --------------Media Queries---------------- */

@media (max-width: 2560px) {
  .phones {
    background-position-x: 167px;
  }
}

@media (max-width: 1024px) {
  .desktop {
    display: none;
  }
  .mobile {
    display: inherit;
  }
  .hamburger {
    width: 40px;
    cursor: pointer;
  }
  .call2action {
    max-width: 381px;
  }
  .phones {
    background-position-x: -59px;
  }
  .article-container {
    grid-template-columns: 1fr 1fr;
  }
  .invite p:nth-child(2) {
    font-size: 0.8rem;
  }
}

@media (max-width: 820px) {
  /* Tablet from ipad - lower */

  h1 {
    font-size: 2.3rem;
  }

  p {
    font-size: 0.9rem;
  }

  #hero,
  #why-choose-us,
  h2,
  footer {
    text-align: center;
  }

  #hero {
    flex-direction: column-reverse;
    height: 811px;
  }

  .mockup {
    position: absolute;
    top: -60px;
    transform: translateX(0%);
    right: unset;
    width: clamp(255px, 90%, 417px);
  }

  .call2action {
    max-width: 85%;
    margin: 0 auto;
    padding: 10%;
  }

  .phones {
    width: 100%;
    background-position-y: -175px;
    background-position-x: 36px;
  }

  .article-text h4 {
    margin: 13px 0;
  }
  .article-text p:first-child {
    font-size: 0.8rem;
  }

  .reason {
    align-items: center;
  }

  footer .wrapper {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .icons {
    align-items: center;
    justify-content: unset;
    gap: 20px;
  }
  .footer-nav {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }
  footer .wrapper .invite {
    justify-self: center;
  }
}

@media (max-width: 425px) {
  p {
    font-size: 0.8rem;
    line-height: 25px;
  }

  #hero {
    height: 846px;
  }

  .phones {
    background-position-y: -108px;
    background-position-x: -19px;
    background-size: 147%;
  }

  .article-container {
    grid-template-columns: 1fr;
  }

  .article-text p:first-child {
    font-size: 0.65rem;
  }
}

@media (max-width: 375px) {
  #hero {
    height: 844px;
  }

  .phones {
    background-image: url(../images/bg-intro-mobile.svg);
    background-position-y: 0px;
    background-position-x: 0;
    background-size: 100%;
  }
  .invite p:nth-child(3) {
    width: 200px;
  }
}

@media (max-width: 320px) {
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.7rem;
  }

  #hero {
    height: 758px;
  }
}
