/* =======================
   Layout & Global Styles
   ======================= */
body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

#main-content {
  padding: 2rem;
  max-width: 1200px;
  width: 100%;
  margin: auto;
}

/* =======================
   Navbar - Desktop Styles
   ======================= */
.navbar {
  display: flex;
  justify-content: center;
  padding: 3rem;
  width: 100%;
  background-color: #fff;
  position: relative;
}

.nav-brand {
  display: none; /* hidden on desktop */
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--color-text);
  user-select: none;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
}

.logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 6rem;
  margin: 0;
  padding: 0;
}

.navbar a {
  position: relative;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  font-size: 1.5rem;
  display: inline-block;
  padding: 0.5rem 0;
  --underline-color: #000;
}

.navbar a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background-color: var(--underline-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.navbar a:hover::after,
.navbar a.active::after {
  transform: scaleX(1);
}

.navbar a.active:hover {
  animation: waveDrop 0.8s ease forwards;
}

.navbar a.active span {
  display: inline-block;
  transform: translateY(0);
}

/* =======================
   Link Animation Keyframes
   ======================= */
@keyframes waveDrop {
  0% {
    transform: translateY(0);
  }
  20% {
    transform: translateY(-3px);
  }
  40% {
    transform: translateY(2px);
  }
  60% {
    transform: translateY(-1px);
  }
  100% {
    transform: translateY(0);
  }
}

/* =======================
   Hamburger Icon Styles
   ======================= */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background: rgb(0, 0, 0);
  transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* =======================
   Footer Styles
   ======================= */
footer {
  display: flex;
  justify-content: center;
  background-color: transparent;
  padding: 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text);
  position: relative;
  bottom: 0;
  left: 0;
  width: 100%;
}

/* =======================
   Responsive Styles - Tablet
   ======================= */
@media (max-width: 1200px) {
  #main-content {
    max-width: 900px;
  }
}

/* =======================
   Responsive Styles - Mobile
   ======================= */
@media (max-width: 900px) {
  #main-content {
    max-width: 768px;
  }

  .navbar {
    display: flex;
    flex-direction: row;
    justify-content: space-between; /* brand left, hamburger right */
    align-items: center;
    padding: 1rem 2rem;
  }

  .nav-brand {
    display: flex; /* show brand */
  }

  .nav-list {
    display: none;
    flex-direction: column;
    background: #fff;
    position: absolute;
    top: 100%; /* directly under navbar */
    right: 0;
    width: 200px;
    box-shadow: var(--shadow, 0 4px 8px rgba(0, 0, 0, 0.1));
    padding: 1rem;
    gap: 1rem;
    z-index: 999;
    border-radius: 0 0 20px 20px;
  }

  .nav-list.active,
  .nav-list.show {
    display: flex;
  }

  .hamburger {
    display: flex;
  }
}

/* =======================
   Utility Classes
   ======================= */
.hidden {
  display: none;
}

/* =============
   Page Specific
   ============= */

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 70vh;
  position: relative;
}

.hero-container > * {
  height: 100%;
}

.hero-section {
  z-index: 2;
  background-color: var(--color-bg);
  padding: 0;
  height: 100%;
}

.hero-text {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: inline-block;
  font-family: serif;
}

.line {
  transform: translateX(-100%);
  opacity: 0;
  animation: slideIn 0.8s ease-out forwards;
}

/* Stagger animation delays */
.line:nth-child(1) {
  animation-delay: 0.2s;
}
.line:nth-child(2) {
  animation-delay: 0.6s;
}
.line:nth-child(3) {
  animation-delay: 1s;
}

/* Keyframes */
@keyframes slideIn {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.hero-subtext {
  transform: translateX(-100%);
  opacity: 0;
  animation: slideIn 0.8s ease-out forwards;
  animation-delay: 1.4s;
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

.cta-btns {
  display: flex;
  padding-left: 5rem;
  padding-top: 2rem;
  gap: 2rem;
}

.cta-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 140px;
  height: 48px;
  font-weight: 700;
  border: 2px solid black;
}

.resources-cta-btn {
  text-decoration: none;
  color: var(--color-text);
  background-color: #65a0f8;
  border-radius: 20px 20px 0px 20px;
  box-shadow: grey -2px 2px;
}

.mission-cta-btn {
  text-decoration: none;
  color: var(--color-text);
  background-color: #f1d859;
  border-radius: 0px 20px 20px 20px;
  box-shadow: grey -2px 2px;
}

.mission-cta-btn,
.resources-cta-btn {
  transition: all 0.3s ease;
}

.resources-cta-btn:hover {
  background-color: #4a90f0;
}

.mission-cta-btn:hover {
  background-color: #ffe066;
}

.mission-cta-btn:hover,
.resources-cta-btn:hover {
  text-decoration: none;
  box-shadow: grey -5px 5px;
  color: #000;
}

.shapes-section {
  padding-left: 45%;
}

.about-container {
  width: 1100px;
  height: fit-content;
  background-color: #f3f3f3;
  border-radius: 20px;
  padding-top: 4rem;
  padding-bottom: 4rem;
  margin: auto;
  display: flex;
  flex-direction: column;
}

.about-container h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  font-family: sans-serif;
  text-align: center;
}

.about-container p {
  font-size: 1.25rem;
  margin: 2rem auto;
  max-width: 800px;
}

.about-cta-btn {
  text-decoration: none;
  color: var(--color-text);
  background-color: #73e65f;
  border-radius: 20px;
  padding: 0.5rem 1rem;
  box-shadow: grey -2px 2px;
  transition: all 0.3s ease;
  align-self: center;
}

.about-cta-btn:hover {
  text-decoration: none;
  background-color: #29d10c;
  box-shadow: grey -5px 5px;
  color: #000;
}

@media (max-width: 1200px) {
  .hero-text {
    font-size: 2.5rem;
  }

  .hero-subtext {
    font-size: 1.1rem;
  }

  .about-container {
    max-width: 900px;
    height: fit-content;
    background-color: #f3f3f3;
    border-radius: 20px;
    text-align: center;
    padding-top: 4rem;
    padding-bottom: 4rem;
    margin: auto;
  }
}

@media (max-width: 1049px) {
  .hero-container {
    display: flex;
  }

  .hero-text {
    font-size: 3rem;
  }

  .shapes-section {
    display: none;
  }

  .about-container {
    max-width: 800px;
    height: fit-content;
    background-color: #f3f3f3;
    border-radius: 20px;
    text-align: center;
    padding-top: 4rem;
    padding-bottom: 4rem;
    padding-left: 3rem;
    padding-right: 3rem;
    margin: auto;
  }

  .about-container h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: sans-serif;
  }

  .about-container p {
    font-size: 1.25rem;
    margin: 2rem auto;
    max-width: 600px;
  }
}

@media (max-width: 900px) {
  .about-container {
    max-width: fit-content;
    height: fit-content;
    background-color: #f3f3f3;
    border-radius: 20px;
    text-align: center;
    padding-top: 4rem;
    padding-bottom: 4rem;
    padding-left: 3rem;
    padding-right: 3rem;
    margin: auto;
  }

  .about-container h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: sans-serif;
  }

  .about-container p {
    font-size: 1.25rem;
    margin: 2rem auto;
    max-width: 600px;
  }
}

@media (max-width: 600px) {
  .hero-container {
    height: fit-content;
    margin-bottom: 10rem;
  }

  .hero-text {
    font-size: 2.5rem;
  }

  .about-container {
    max-width: fit-content;
    height: fit-content;
    background-color: #f3f3f3;
    border-radius: 20px;
    text-align: center;
    padding-top: 4rem;
    padding-bottom: 4rem;
    padding-left: 3rem;
    padding-right: 3rem;
    margin-top: 0;
  }

  .about-container h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: sans-serif;
  }

  .about-container p {
    font-size: 1.25rem;
    margin: 2rem auto;
    max-width: 600px;
  }
}

@media (max-width: 500px) {
  #main-content {
    padding: 3%;
  }

  .hero-text {
    font-size: 2.3rem;
  }

  .hero-subtext {
    font-size: 1.2rem;
  }

  .cta-btns {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-left: 5%;
  }

  .about-container {
    height: fit-content;
    background-color: #f3f3f3;
    border-radius: 20px;
    text-align: left;
    padding-top: 2rem;
    padding-bottom: 2rem;
    padding-left: 1rem;
    padding-right: 1rem;
    margin: auto;
    display: flex;
    flex-direction: column;
  }

  .about-container h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: sans-serif;
    align-self: center;
  }

  .about-container p {
    font-size: 1.25rem;
    margin: 2rem auto;
    max-width: 600px;
  }

  .about-cta-btn {
    align-self: center;
  }
}
