*,
*::before,
*::after {
  box-sizing: border-box;
  scroll-behavior: smooth;
  scroll-padding-block-start: 10rem;
}

:root {
  --primary-body-bg: #ffffff;
  --text-color: black;
  --text-color-btn: white;
  --card-bg-color: #f5f5f5;
  --toogle-btn-bg: black;
  --toogle-btn-text: white;
  --text-color-input: rgb(46, 44, 44);
  --modal-bg-color: rgb(0 0 0 /0.35);
  --logo-color: transparent;
  --logo-padding: 0;
  --logo-radius: 0;
  --box-shadow: rgba(0, 0, 0, 0.6);
}

/* Dark Theme colors */
[data-dark-mode="true"] {
  --primary-body-bg: #000000;
  --text-color: white;
  --card-bg-color: #27282a;
  --toogle-btn-bg: white;
  --toogle-btn-text: black;
  --text-color-input: rgba(0, 0, 0, 0.737);
  --modal-bg-color: rgb(255 255 255 / 0.36);
  --logo-color: #fff;
  --logo-padding: 8px;
  --logo-radius: 10px;
}

body {
  margin: 0;
  padding: 0;
  width: 100vw;
  min-height: 100vh;
  font-family: Poppins, "Helvetica", "Arial";
  background-color: var(--primary-body-bg);
  transition: all 600ms ease;
  overflow-x: hidden;
  position: relative;
}

a {
  text-decoration: none;
}

.logo-mobile {
  display: none;
  position: absolute;
  top: 15px;
  left: 15px;
  width: 5rem;
  z-index: 100;
  --translateX: -50px;
}

nav {
  --justify-content: space-around;
  position: fixed;
  top: 0;
  z-index: 2222;
  width: 100vw;
  height: 6rem;
  padding: 1rem;
  background-color: var(--primary-body-bg);
  -webkit-border-after: 1px solid rgba(133, 127, 127, 0.335);
  border-block-end: 1px solid rgba(133, 127, 127, 0.335);
  transition: all 0.2s ease;
}

nav img {
  width: 6rem;
}
img[alt="logo"] {
  border-radius: var(--logo-radius);
  padding: var(--logo-padding);
  background-color: var(--logo-color);
}
.nav-items a,
li {
  text-decoration: none;
  list-style-type: none;
  color: var(--text-color);
  font-weight: 600;
}
nav li {
  position: relative;
}
nav .active::before,
nav .active::after {
  content: "";
  width: 100%;
  height: 6px;
  border-radius: 2rem;
  position: absolute;
  background-image: linear-gradient(
    45deg,
    #ff0000,
    orange,
    rgba(0, 0, 255, 0.695),
    #ff0000
  );
  background-size: 300% 300%;
  top: 100%;
  right: 0%;
  transform: translate(-50% -50%);
  -webkit-animation: animated-gradient 5000ms linear infinite;
  animation: animated-gradient 5000ms linear infinite;
  transition: opacity 900ms ease;
}
.nav-items a:hover {
  opacity: 0.6;
}
.nav-items a:active {
  opacity: 1;
}

.nav-items {
  margin-left: 2rem;
  --gap: 2rem;
}

#sign-in {
  --font-weight: 700;
  --text-color-btn: #3c7eff;
  --btn-background: transparent;
}
#sign-in:hover {
  --text-color-btn: #2b5ab8;
}
#sign-in:active {
  --text-color-btn: #3c7eff;
}

#sign-up {
  --text-color-btn: white;
  --btn-background: #538af7;
}

#sign-up:hover {
  --btn-background: #3c7eff;
}

#sign-up:active {
  --btn-background: #538af7;
}

.theme-toggle-btn {
  position: absolute;
  top: 10%;
  right: 5%;
  z-index: 1;
  font-weight: 500;
  color: var(--text-color);
}

section .hero {
  width: 90vw;
  height: -webkit-fit-content;
  height: -moz-fit-content;
  height: fit-content;
  padding: 2rem;
  margin-top: 10rem;
  border-radius: 1.25rem;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  --columns: 2;
  color: var(--text-color);
}

section .text {
  width: 100%;
  height: 100%;
}

section .text h1 {
  font-size: 4.25rem;
  line-height: 1.1;
  -webkit-margin-before: 0.67em;
  margin-block-start: 0.67em;
  -webkit-margin-after: 0.67em;
  margin-block-end: 0.67em;
  -webkit-margin-start: 0px;
  margin-inline-start: 0px;
  -webkit-margin-end: 0px;
  margin-inline-end: 0px;
}

section .text p {
  font-size: 1.315em;
  -webkit-margin-before: 1em;
  margin-block-start: 1em;
  -webkit-margin-after: 1em;
  margin-block-end: 1em;
  -webkit-margin-start: 0px;
  margin-inline-start: 0px;
  -webkit-margin-end: 0px;
  margin-inline-end: 0px;
  line-height: 1.6;
  color: var(--text-color);
  opacity: 0.6;
}

section .text button {
  --btn-background: #387aff;
  --btn-padding: 1.2rem;
  --width: 8rem;
  --height: 3rem;
  cursor: pointer;
}
section .text button:hover {
  --btn-background: #3c7eff;
}

section .text button:active {
  --btn-background: #538af7;
}
section:is(.flex-column):not(:has(img)) {
  margin-top: 8%;
  --justify-content: center;
  --align-items: center;
  -webkit-border-before: 1px solid #837d7d72;
  border-block-start: 1px solid #837d7d72;
}

.features-text {
  text-align: center;
  width: max(50%, 450px);
  color: var(--text-color);
}

.features-text h2 {
  font-size: clamp(2em, 2.5vw, 2.5em);
  font-weight: 600;
}

.features-text p {
  line-height: 1.4;
  font-size: clamp(1.2rem, 2.5vw, 1.4em);
  opacity: 0.7;
}

.testimonial {
  width: 90%;
  height: -webkit-fit-content;
  height: -moz-fit-content;
  height: fit-content;
  flex-wrap: wrap;
  padding: 2rem;
  color: var(--text-color);
}

.testimonial > * {
  flex-shrink: 0;
}
.testimonial .card {
  width: min(90%, 350px);
  height: min(90%, 350px);
  aspect-ratio: 1;
  padding-block: 3rem;
  padding-inline: 3.5rem;
  background-color: var(--card-bg-color);
  --gap: 0;
}
.testimonial .card svg {
  width: clamp(60px, 50%, 80px);
  aspect-ratio: 1;
}

.testimonial .card h5 {
  text-align: center;
  font-size: clamp(1rem, 2.5vw, 1.1em);
  margin: 5% auto;
}

.testimonial .card p {
  font-size: 0.91rem;
  text-align: center;
  line-height: 1.5;
  opacity: 0.8;
}

.learn-more {
  color: #007bff;
}
.learn-more:hover {
  color: #195faa;
}

/* footer styles */

.footer {
  -webkit-margin-before: 10rem;
  margin-block-start: 10rem;
  background-color: var(--primary-body-bg);
  padding: 20px 0;
  text-align: center;
  border-top: 1px solid #a7a3a371;
  color: var(--text-color);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.footer-logo {
  margin-bottom: 1rem;
}

.footer-logo img {
  width: clamp(60px, 50%, 150px);
}

.footer-nav a {
  margin: 0 10px;
  color: #007bff;
  text-decoration: none;
}

@media screen and (min-width: 901px) and (max-width: 1080px) {
  img:not([alt="logo"]) {
    transform: translateY(80px);
  }

  section .text h1 {
    font-size: clamp(2.2rem, 9vh + 1px, 4rem);
  }
}

@media screen and (min-width: 601px) and (max-width: 900px) {
  nav {
    --gap: 1rem;
    --justify-content: space-around;
  }

  .sign-btns {
    display: flex;
    align-items: center;
    flex-shrink: 1;
    flex-wrap: wrap;
    -webkit-margin-start: min(1rem, 5%);
    margin-inline-start: min(1rem, 5%);
  }

  #sign-in,
  #sign-up {
    width: 5rem;
  }

  nav .nav-items {
    margin: 0;
    --gap: 1rem;
  }

  img[alt="logo"] {
    min-width: 50px;
  }

  .theme-toggle-btn {
    position: absolute;
    top: 7%;
    left: 10%;
    margin: 0;
  }
  section .hero {
    --columns: 1;
    width: -webkit-fit-content;
    width: -moz-fit-content;
    width: fit-content;
  }
  .testimonial {
    padding: 0;
    flex-wrap: wrap;
  }

  .testimonial > * {
    flex-shrink: 0;
  }

  img {
    max-width: 100%;
  }
}

@media screen and (max-width: 600px) {
  .logo-mobile {
    display: block;
  }
  nav {
    width: 60%;
    height: 100%;
    padding: 1rem;
    margin: 0;
    right: 0;
    overflow: hidden;
    --flex-direction: column;
    --align-items: flex-start;
    background: rgb(0 0 0 / 0.6);
    transition: all 300ms ease;
    transform: translateX(110vw);
  }
  .nav-items a {
    font-size: 1.156rem;
    color: white;
  }
  nav img {
    width: 4rem;
    transform: translate(0);
  }

  .mobile-nav-toggle {
    width: 3rem;
    height: 3rem;
    aspect-ratio: 1;
    position: fixed;
    z-index: 9999;
    top: 2rem;
    right: 2rem;
    border: none;
    background: none;
  }

  .mobile-nav-toggle .child1,
  .child2,
  .child3 {
    width: 90%;
    height: 3px;
    margin-top: 5px;
    background-color: var(--text-color);
    transition: all 300ms ease;
  }

  button[aria-expanded="true"] .child2 {
    display: none;
  }

  button[aria-expanded="true"] .child1 {
    transform: rotate(-45deg) translateY(5px);
  }

  button[aria-expanded="true"] .child3 {
    transform: rotate(45deg) translateY(-5px);
  }

  .theme-toggle-btn {
    position: absolute;
    top: 4%;
    left: 12%;
    margin: 0;
  }

  section .hero {
    margin-top: 5rem;
    --columns: 1;
  }

  section .text h1 {
    font-size: clamp(1.2rem, 6vh + 1px, 3rem);
  }

  .features-text {
    width: -webkit-fit-content;
    width: -moz-fit-content;
    width: fit-content;
    padding: 1rem;
  }

  .testimonial {
    padding: 0;
    --flex-direction: column;
  }

  .footer {
    font-size: 0.891rem;
  }

  @supports (
    (-webkit-backdrop-filter: blur(30px)) or (backdrop-filter: blur(30px))
  ) {
    nav {
      background: rgb(0 0 0 /0.2);
      -webkit-backdrop-filter: blur(30px);
      backdrop-filter: blur(30px);
    }
    .nav-items a {
      color: var(--text-color);
    }
  }
}

@media screen and (max-width: 400px) {
  .testimonial .card p {
    font-size: 0.8rem;
    word-break: break-all;
  }
}
