*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: hsl(0, 0%, 95%);
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  overflow-x: hidden;
}

/* ================= HEADER ================= */

.head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background-color: white;
  position: sticky; 
  top: 0; 
  z-index: 1000;
}

.top-button {
  display: none;
}

/* Hamburger */
.menu-btn {
  width: 40px;
  height: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 2000;
}

.menu-btn span {
  height: 3px;
  background: #333;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ================= MOBILE MENU ================= */

.mobile-menu {
  position: fixed;
  inset: 0;
  background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6));
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 120px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 99;
}

.mobile-menu ul {
  background: white;
  list-style: none;
  padding: 20px 60px;
  width: 80%;
  border-radius: 6px;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.mobile-menu li {
  margin: 20px 0;
}

.mobile-menu a {
  text-decoration: none;
  color: #333;
  font-size: 18px;
  font-weight: 500;
}

.mobile-menu.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu.active ul {
  transform: scale(1);
}

/* ================= HERO IMAGE SECTION ================= */

.top {
  position: relative;
  overflow: hidden;
}

.top .rel {
  position: relative;
}

.mobile img {
  width: 100%;
}

.abso {
  position: absolute;
  top: -140px;
}

.abso img {
  width: 100%;
}

/* ================= HERO TEXT ================= */

.hero {
  text-align: center;
  padding: 20px;
}

.hero .button {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.hero button,
.footer button,
.right-side .top-button {
  padding: 10px 24px;
  border-radius: 30px;
  border: none;
  background: linear-gradient(
    135deg,
    hsl(136, 64%, 51%),
    hsl(192, 69%, 51%)
  );
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Slightly darken and lift the Request Invite button on hover */
.top-button:hover, .hero button:hover,.footer button:hover {
  transform: translateY(-2px);
  filter: brightness(0.92);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.hero a {
  background: linear-gradient(
    135deg,
    hsl(136, 64%, 51%),
    hsl(192, 69%, 51%)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
}

/* ================= FEATURES ================= */

.feature {
  text-align: center;
  margin-top: 50px;
  display: flex;
  flex-direction: column;
}

.feature div {
  width: 100%;
  background-color: hsl(240, 2%, 91%);
  padding: 20px;
}

.feature p,
.hero p,
.articles .p1,
.articles .p3,
.footer p {
  color: hsl(231, 8%, 69%);
}

.feature h2,
.articles .p2 {
  color: hsl(233, 26%, 24%);
}

.calculator-cta {
  background: linear-gradient(
    135deg,
    hsl(136, 64%, 51%),
    hsl(192, 69%, 51%)
  );
  padding: 60px 30px;
  text-align: center;
  color: white;
  margin: 60px 0;
}

.calculator-cta h2 {
  margin-bottom: 15px;
}

.calculator-cta p {
  max-width: 500px;
  margin: 0 auto 20px;
  opacity: 0.9;
}

.calc-link {
  display: inline-block;
  color: white;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid white;
  padding: 12px 24px;
  border-radius: 30px;
  transition: background 0.2s ease, color 0.2s ease;
}

.calc-link:hover {
  background: white;
  color: hsl(233, 26%, 24%);
}


/* ================= ARTICLES ================= */

.articles {
  padding: 20px;
  text-align: center;
}
.article-header{
  text-align: center;
}

.articles img {
  width: 100%;
  border-radius: 6px 6px 0 0;
}

.card {
  background: white;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  margin-top: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.1);
}
.card .texts{
  text-align: left;
}
.texts .p1{
  padding-left: 20px;
  font-size: 13px;
}
.texts .p2{
  padding-left: 20px;
  width: 250px;
}
.texts .p3{
  padding-left: 20px;
}

/* ================= FAQ ================= */
.faq {
  max-width: 800px;
  margin: 80px auto;
  padding: 0 20px;
}

.faq-title {
  text-align: center;
  margin-bottom: 40px;
}

.faq-item {
  border-bottom: 1px solid #ddd;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 20px;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-question .icon {
  font-size: 1.5rem;
  transition: transform 0.3s;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 20px;
}

.faq-answer p {
  padding-bottom: 20px;
  color: #555;
}

.faq-item.active .faq-answer {
  max-height: 200px;
}

.faq-item.active .icon {
  transform: rotate(45deg);
}


/* ================= FOOTER ================= */

.footer {
  background-color: hsl(233, 26%, 24%);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 40px 20px;
  align-items: center;
}
.footer .logos{
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-direction: row;
  align-items: center;
}
/* ================= INVITE MODAL ================= */

.invite-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.invite-modal.active {
  display: flex;
}

/* Dark background */
.invite-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

/* Modal box */
.invite-content {
  position: relative;
  background: white;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  z-index: 1;
  animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Close button */
.close-modal {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

/* Form */
.invite-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.invite-form input {
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.invite-form button {
  padding: 12px;
  border-radius: 30px;
  border: none;
  background: linear-gradient(
    135deg,
    hsl(136, 64%, 51%),
    hsl(192, 69%, 51%)
  );
  color: white;
  font-weight: 600;
  cursor: pointer;
}


/* ================= ANIMATIONS ================= */

@keyframes slideInUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-40px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(40px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ================= HERO ANIMATION ================= */
.hero h1,
.hero p,
.hero .button {
  opacity: 0;
  animation: slideInUp 0.8s forwards;
}

.hero h1 {
  animation-delay: 0.3s;
}
.hero p {
  animation-delay: 0.6s;
}
.hero .button {
  animation-delay: 0.9s;
}

/* ================= FEATURES ANIMATION ================= */
.feature div {
  opacity: 0;
  transform: translateY(20px);
  animation: slideInUp 0.8s forwards;
}

/* Add staggered delays for each feature box */
.feature div:nth-child(1) { animation-delay: 0.3s; }
.feature div:nth-child(2) { animation-delay: 0.6s; }
.feature div:nth-child(3) { animation-delay: 0.9s; }

/* ================= CARDS ANIMATION ================= */
.card {
  opacity: 0;
  transform: translateY(20px);
  animation: slideInUp 0.6s forwards;
}

/* Staggered card animations */
.articles .card:nth-child(1) { animation-delay: 0.2s; }
.articles .card:nth-child(2) { animation-delay: 0.4s; }
.articles .card:nth-child(3) { animation-delay: 0.6s; }
.articles .card:nth-child(4) { animation-delay: 0.8s; }

/* ================= FAQ ANIMATION ================= */
.faq-item {
  opacity: 0;
  transform: translateY(20px);
  animation: slideInUp 0.6s forwards;
}

/* Stagger FAQ items */
.faq-item:nth-child(1) { animation-delay: 0.2s; }
.faq-item:nth-child(2) { animation-delay: 0.4s; }
.faq-item:nth-child(3) { animation-delay: 0.6s; }
.faq-item:nth-child(4) { animation-delay: 0.8s; }

/* ================= INVITE MODAL ANIMATION ================= */
.invite-content {
  animation: scaleIn 0.4s ease forwards;
}

/* ================= HOVER MICRO ANIMATION ================= */
.card:hover {
  transform: translateY(-6px) scale(1.02);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero button:hover,
.footer button:hover,
.calc-link:hover {
  transform: translateY(-3px) scale(1.02);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}



/* ================= DESKTOP ================= */

@media (min-width: 904px) {
  .menu-btn {
    display: none;
  }

  .top-button {
    display: block;
  }

  .mobile-menu {
    position: static;
    background: none;
    opacity: 1;
    pointer-events: auto;
    padding: 0;
  }

  .mobile-menu ul {
    display: flex;
    gap: 30px;
    padding: 0;
    width: auto;
    transform: none;
  }

  .mobile-menu li {
    margin: 0;
  }

  .mobile-menu a {
    color: hsl(231, 8%, 69%);
    font-size: 16px;
  }

  .mobile-menu a:hover {
    color: hsl(233, 26%, 24%);
  }

  /* HERO IMAGE DESKTOP FIX */
  .top .rel {
    height: 650px;
  }

  .mobiles {
    content: url("../images/bg-intro-desktop.svg");
    position: absolute;
    top: -200px;
    right: -250px;
    width: 900px;
    max-width: none;
  }

  .top .abso {
    position: absolute;
    top: -170px;
    right: -80px;
    width: 600px;
  }

  .hero {
    text-align: left;
    max-width: 500px;
    padding-left: 80px;
    margin-top: -550px;
  }

  .hero .button {
    justify-content: flex-start;
  }
  .display-pc{
    display: flex;
    flex-direction: column;
    margin-top: 0;
  }
  .feature{
    margin-top: 250px;
  }
  .feature-first{
    text-align: left;
  }
  .feature-first h2{
    margin-left: 50px;
  }
  .feature-first-p1{
    margin-left: 50px;
  }
  .feature-first p{
    width: 600px;
  }
  .pc-grid {
    display: flex;
    flex-direction: row;
    gap:10px;
    text-align: left;
  }
  .pc-grid img,h2,p{
    margin-left: 20px;
  }

.article-header{
  text-align: left;
  margin-left: 60px;
}

.articles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding: 40px 60px;
  background-color: hsl(0, 0%, 95%);
}

.card {
  background: white;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
 }
 .footer{
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
}
.pc-footer{
  display: flex;
  flex-direction: column;
  gap: 50px;
}
.pc-footer2{
 text-align: left;
 display: flex;
 justify-content: center;
 flex-direction: column;
 gap: 20px;
}
.pc-footer2 button{
  width: 60%;
  margin-left: 100px;
}
}

