* {
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  text-decoration: none;
  list-style: none;
  box-sizing: border-box;
}

:root {
  --color-primary: #3ccf4e;
  --color-primary-variant: rgba(60, 207, 78, 0.2);
  --color-white: #fff;
  --color-light: #f5f5f5;
  --color-black: #0f0f1b;
  --color-dark: #4b4a53;

  --color-success: #00bf8e;
  --color-warning: #f7c94b;
  --color-danger: #f75842;
  --color-danger-variant: rgba(247, 88, 66, 0.4);

  --color-bg: #1f2641;
  --color-bg1: #2e3267;
  --color-bg2: #424890;

  --container-width-lg: 82%;
  --container-width-md: 90%;
  --container-width-sm: 92%;

  --transition: all 400ms ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  font-weight: 300;
  color: var(--color-dark);
  line-height: 1.7;
  background: var(--color-white);
}

.container {
  width: var(--container-width-lg);
  max-width: 1800px;
  margin: 0 auto;
}

section {
  padding: 6rem 0;
  margin: 5rem 0;
}

/*section h2 {
    text-align: center;
    margin-bottom: 4rem;
}*/

h1,
h2,
h3,
h4,
h5 {
  color: var(--color-black);
}

h1 {
  font-size: 4.4rem;
  line-height: 1.1;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.6rem;
}

h4 {
  font-size: 1.4rem;
}

h5 {
  font-size: 1rem;
}

a {
  color: var(--color-black);
}

.lead {
  width: 63%;
  line-height: 1.5;
  margin: 0 auto 3rem;
  text-align: center;
}

img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.btn {
  display: inline-block;
  background: var(--color-black);
  color: var(--color-white);
  width: fit-content;
  padding: 0.8rem 1.6rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.btn:hover {
  background: var(--color-light);
  color: var(--color-black);
  border-color: var(--color-white);
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  border-color: var(--color-primary);
  background: var(--color-light);
  color: var(--color-primary);
}

.btn-lg {
  padding: 1.1rem 2rem;
  font-size: 1.2rem;
}

/* ==================== NAVBAR ==================== */
nav {
  width: 100vw;
  height: 5rem;
  display: grid;
  place-items: center;
  position: fixed;
  z-index: 999;
}

/* changes navbar styles on window scroll using javascript */
.window-scroll {
  background: var(--color-black);
  box-shadow: 0 1.5rem 1.5rem rgba(36, 0, 64, 0.2);
}

.window-scroll a {
  color: var(--color-white);
}

.window-scroll .nav__logo h3 {
  color: var(--color-white);
}

nav a {
  color: var(--color-black);
  font-size: 0.9rem;
  transition: var(--transition);
}

nav a:hover {
  color: var(--color-primary);
}

.nav__container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  position: relative;
}

nav button {
  display: none;
}

.nav__menu {
  display: flex;
  justify-content: space-between;
  text-align: center;
  align-items: center;
  gap: 4rem;
  position: relative;
}

.nav__menu .list a .icon {
  display: none;
}
/* Icons Magic CSS Styling */
/*.nav__menu .list {
    position: relative;
}

.nav__menu .list a .text {
    position: relative;
    display: block;
    letter-spacing: 0.05em;
    line-height: 75px;
    text-align: center;
    transition: 0.5s;
}

.nav__menu .list.active a .text {
    transform: translateY(-10px);
}

.nav__menu .list a .icon{
    position: absolute;
    font-weight: 500;
    font-size: 1.5rem;
    transition: 0.5s;
    opacity: 0;
    transform: translateY(60px);
}

.nav__menu .list.active a .icon {
    opacity: 1;
    transform: translateY(50px);
}


.indicator {
    position: absolute;
    top: 50%;
    width: 70px;
    height: 70px;
    background: greenyellow;
    border-radius: 50%;
    border: 6px solid var(--color-bg);
    transition: 0.5s;
}

.indicator::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -22px;
    width: 20px;
    height: 20px;
    background: transparent;
    border-top-right-radius: 20px;
    box-shadow: 0 -10px 0 0 var(--color-bg);
}

.indicator::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -22px;
    width: 20px;
    height: 20px;
    background: transparent;
    border-top-left-radius: 20px;
    box-shadow: 0 -10px 0 0 var(--color-bg);
}

.nav__menu .list:nth-child(1).active ~ .indicator {
    transform: translateX(calc(70px * 0));
}

.nav__menu .list:nth-child(2).active ~ .indicator {
    transform: translateX(calc(70px * 1));
}

.nav__menu .list:nth-child(3).active ~ .indicator {
    transform: translateX(calc(70px * 2));
}

.nav__menu .list:nth-child(4).active ~ .indicator {
    transform: translateX(calc(70px * 3));
}

.nav__menu .list:nth-child(5).active ~ .indicator {
    transform: translateX(calc(70px * 4));
}

.nav__menu li a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.nav__btn a {
    display: block !important;
}
*/

/* ==================== HEADER ==================== */
header {
  position: relative;
  top: 5rem;
  height: calc(100vh - 5rem);
  display: grid;
  place-items: center;
  margin: auto;
  overflow: hidden;
}

.header__container {
  display: grid;
  grid-template-columns: 40% 60%;
  height: 100%;
}

.header__left {
  display: flex;
  align-items: center;
  height: 100%;
}

.header__left h3 {
  color: var(--color-primary);
  margin-bottom: 0.6rem;
}

.header__left p {
  margin: 1.2rem 0 2rem;
}

.header__right {
  position: relative;
  height: 100%;
}

.header__socials {
  position: absolute;
  right: 0;
  bottom: 8rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  font-size: 1.2rem;
}

.header__socials a {
  color: var(--color-white);
  transition: var(--transition);
}

.header__socials a:hover {
  color: var(--color-black);
}

.header__right-bg {
  width: 70rem;
  height: 70rem;
  border-radius: 50%;
  background: var(--color-primary);
  position: absolute;
  right: -30rem;
  bottom: -30rem;
}

.header__image {
  width: 82%;
  position: absolute;
  bottom: -1rem;
  right: -1rem;
  z-index: 1;
}

/* ==================== COMPANIES ==================== */

section#companies {
  position: relative;
  top: 5rem;
  padding: 0;
  background: var(--color-light);
  margin: 0;
}

.companies__container {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2rem;
  align-items: center;
}

.companies__container span {
  padding: 2.4rem;
}

/* ==================== SERVICES ==================== */
section#services {
  margin-top: 8rem;
}

.services__container {
  display: grid;
  grid-template-columns: 25% auto;
  gap: 2rem;
}

.services__left {
  background: var(--color-primary);
  padding: 2rem;
  color: var(--color-light);
  transition: var(--transition);
}

.services__left:hover {
  transform: scale(1.1);
}

.services__left h1 {
  font-size: 7rem;
  font-weight: 600;
  color: var(--color-white);
}

.services__left h4 {
  line-height: 1.4;
  font-weight: 600;
  color: var(--color-white);
}

.services__right h2 {
  margin-bottom: 2rem;
}

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

.services__card {
  background: var(--color-light);
  padding: 4rem 2rem;
  cursor: default;
  transition: var(--transition);
}

.services__card:hover {
  background: var(--color-primary);
  color: var(--color-white);
  translate: 5px -10px;
}

.services__card:hover * {
  color: var(--color-white);
  transition: var(--transition);
}

.services__card-icon {
  font-size: 2rem;
}

.services__card h5 {
  margin: 1rem 0;
}

.services__card:hover a {
  margin-left: 1rem;
}

/* ==================== PORTFOLIO ==================== */
#portfolio {
  background: var(--color-light);
}

.portfolio__head {
  display: flex;
  justify-content: space-between;
  gap: 3rem;
}

.portfolio__head h3 {
  width: 25%;
}

.portfolio__head-right {
  width: 49%;
}

.portfolio__head-right a {
  margin-top: 1.4rem;
  display: inline-block;
  color: var(--color-primary);
  transition: var(--transition);
}

.portfolio__head-right a:hover {
  margin-left: 1rem;
}

.portfolio__projects {
  margin-top: 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.portfolio__project {
  display: flex;
  flex-direction: column;
  align-items: space-between;
  gap: 1rem;
}

.portfolio__project-image {
  height: 20rem;
  display: block;
  border: 1rem solid var(--color-white);
  overflow: hidden;
  box-shadow: 0 0 1.6rem var(--color-primary-variant);
  transition: var(--transition);
}

.portfolio__project-image:hover {
  box-shadow: none;
}

.portfolio__project-image img {
  transform: 0;
  transition: all 12s ease;
}

.portfolio__cta {
  display: flex;
  gap: 1rem;
}

/* 18rem because the project image height 
is 20rem + 1 rem of border top and bottom*/
.portfolio__project-image:hover img {
  transform: translateY(calc(-100% + 18rem));
}

/* ==================== TESTIMONIALS ==================== */
#testimonials h2 {
  text-align: center;
}

.testimonials__container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.testimonial {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  background: var(--color-light);
  padding: 3rem;
  font-size: 0.88rem;
  border: 1px solid transparent;
  transition: var(--transition);
}

.testimonial:hover {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 2rem var(--color-primary-variant);
  z-index: 1;
}

.avatar {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  overflow: hidden;
  display: block;
}

.testimonial__client {
  display: flex;
  gap: 1rem;
}

/* ==================== CONTACT ==================== */
#contact {
  background: var(--color-primary);
  color: var(--color-white);
  margin: 0;
}

.contact__container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8rem;
  font-size: 0.9rem;
}

.contact__container h2 {
  color: var(--color-white);
}

.contact__container p {
  margin: 1rem 0 2rem;
}

.contact__socials {
  display: flex;
  gap: 1rem;
}

.contact__socials a {
  color: var(--color-white);
  font-size: 1.3rem;
  transition: var(--transition);
}

.contact__socials a:hover {
  color: var(--color-black);
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

form input,
textarea {
  padding: 1rem;
}

footer {
  text-align: center;
  background: var(--color-primary);
  padding: 1.2rem 0;
  color: var(--color-white);
  border-top: 1px solid var(--color-black);
}

/* ==================== MEDIA QUERIES (TABLETS) ==================== */
@media screen and (max-width: 1024px) {
  h1 {
    font-size: 3.6rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  .container {
    width: var(--container-width-md);
  }

  .lead {
    margin-top: 0.6rem;
  }

  /* =============== NAVBAR =============== */
  nav {
    background: var(--color-black);
  }

  .nav__container {
    position: relative;
    width: 100vw;
  }

  .nav__logo h3 {
    color: var(--color-white);
    margin-left: 2rem;
  }

  .nav__menu {
    position: fixed;
    top: 5rem;
    right: 0;
    height: fit-content;
    width: 18rem;
    flex-direction: column;
    gap: 0;
    z-index: 3;
    display: none;
    perspective: 400px;
  }

  .nav__menu li {
    width: 100%;
    height: 5.4rem;
    animation: flipNavItem 200ms ease forwards;
    transform-origin: top;
    opacity: 0;
  }

  .nav__menu li:nth-child(2) {
    animation-delay: 100ms;
  }

  .nav__menu li:nth-child(3) {
    animation-delay: 200ms;
  }

  .nav__menu li:nth-child(4) {
    animation-delay: 300ms;
  }

  .nav__menu li:nth-child(5) {
    animation-delay: 400ms;
  }

  @keyframes flipNavItem {
    from {
      transform: rotateX(90deg);
    }

    to {
      transform: rotateX(0deg);
      opacity: 1;
    }
  }

  .nav__menu li a {
    background: var(--color-primary);
    box-shadow: -2rem 2rem 2rem rgba(0, 0, 0, 0.2);
    color: var(--color-white);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav__menu li a:hover {
    background: var(--color-light);
    color: var(--color-black);
  }

  nav button {
    display: inline-block;
    margin-right: 1.4rem;
    background: transparent;
    color: var(--color-white);
    cursor: pointer;
    font-size: 2.4rem;
  }

  nav button#close-menu-btn {
    display: none;
  }

  /* =============== HEADER =============== */
  header {
    height: 100%;
    padding: 14rem 0 0;
  }

  .header__container {
    align-items: flex-end;
    height: 100%;
  }

  .header__left {
    margin-bottom: 6rem;
  }

  .header__right {
    align-self: flex-end;
    height: 100%;
  }

  .header__right-bg {
    width: 30rem;
    height: 30rem;
    right: 4%;
    bottom: 0;
    transform: translate(50% 50%);
  }

  .header__image {
    bottom: -5rem;
    right: 5%;
    width: 100%;
  }

  .header__socials {
    bottom: 4rem;
  }

  .header__socials a {
    color: var(--color-primary);
  }

  /* =============== COMPANIES =============== */
  .companies__container {
    gap: 0;
  }

  .companies__container span {
    padding: 1.5rem;
  }

  /* =============== SERVICES =============== */
  .services__container {
    grid-template-columns: 1fr;
  }

  .services__left {
    display: none;
  }

  .services__cards {
    gap: 1rem;
  }

  /* =============== PORTFOLIO =============== */
  .portfolio__head h3 {
    width: 40%;
  }

  .portfolio__head-right {
    width: auto;
  }

  /* =============== TESTIMONIALS =============== */
  .testimonials__container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* =============== CONTACT =============== */
  .contact__container {
    gap: 2rem;
  }

  .contact__socials a {
    font-size: 1.7rem;
  }
}

/* ==================== MEDIA QUERIES (PHONES) ==================== */
@media screen and (max-width: 600px) {
  .container {
    width: var(--container-width-sm);
  }

  section {
    padding: 4rem 0;
    margin: 4rem 0;
  }

  h1 {
    font-size: 2.8rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  h3 {
    font-size: 1.2rem;
  }

  .btn-lg {
    font-size: 1rem;
  }

  .lead {
    width: var(--container-width-sm);
  }

  /* =============== NAVBAR =============== */
  nav button {
    margin: 0;
    font-size: 1.9rem;
  }

  .nav__logo h3 {
    margin-left: 4px;
  }

  /* =============== HEADER =============== */
  header {
    height: 100vh;
    padding: 0;
  }

  .header__container {
    grid-template-columns: 1fr;
    margin-top: 4.4rem;
    gap: 0;
  }

  .header__left {
    text-align: center;
    margin-bottom: 2rem;
  }

  .header__left p {
    margin: 0.5rem 0 1.2rem;
  }

  .header__image {
    position: relative;
    top: -2rem;
  }

  .header__right-bg {
    bottom: 15%;
    right: -40%;
  }

  .header__socials {
    position: absolute;
    z-index: 1;
    bottom: 25rem;
  }

  .header__socials a {
    color: var(--color-white);
  }

  /* =============== COMPANIES =============== 
    .companies__container {
        grid-template-columns: repeat(3, 1fr);
    }

    .companies__container span {
        height: 5rem;
        display: grid;
        place-items: center;
    }
    */

  /* =============== SERVICES =============== */
  .services__cards {
    grid-template-columns: 1fr;
  }

  /* =============== PORTFOLIO =============== */
  .portfolio__head {
    flex-direction: column;
    gap: 1fr;
  }

  .portfolio__head h3,
  .portfolio__head-right {
    width: var(--container-width-sm);
  }

  .portfolio__projects {
    grid-template-columns: 1fr;
  }

  /* =============== TESTIMONIALS =============== */
  .testimonial {
    padding: 1rem;
  }

  /* =============== CONTACT =============== */
  .contact__container {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .contact__socials {
    justify-content: center;
  }
}
