/* Root variables for colour palette */
:root {
  --primary-color: #7f33ff;
  --secondary-color: #e8308c;
  --text-dark: #1a1a1a;
  --text-light: #ffffff;
  --card-bg: #f9f9f9;
  --shadow: rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* When the mobile menu is open, prevent background scrolling */
body.no-scroll {
  overflow: hidden;
}

h1, h2, h3 {
  font-weight: 800;
}

h2 {
  margin-bottom: 1rem;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: background 0.3s ease;
}

/* Overlay for mobile menu – appears when nav has .open. This overlay covers
   the rest of the page to capture clicks and darken the background. */
nav::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: -1; /* place behind nav contents */
}

/* When nav is open, show the overlay and allow it to receive clicks */
nav.open::before {
  opacity: 1;
  pointer-events: auto;
  z-index: 998;
}

nav.scrolled {
  background: rgba(0, 0, 0, 0.85);
}

nav .logo {
  color: var(--text-light);
  font-size: 1.6rem;
  font-weight: 800;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav ul li a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

nav ul li a:hover {
  color: var(--secondary-color);
}

/* Burger menu */
.burger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.burger span {
  height: 3px;
  width: 25px;
  background: var(--text-light);
  margin: 4px 0;
  transition: 0.4s;
}

/* Transform burger into a cross when the menu is open */
nav.open .burger span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
nav.open .burger span:nth-child(2) {
  opacity: 0;
}
nav.open .burger span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
  nav ul {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 200px;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    background: #111;
    padding-top: 6rem;
    gap: 1.5rem;
    transition: 0.5s ease;
  }
  /* When the navigation has the .open class, reveal the menu */
  nav.open ul {
    right: 0;
  }
  .burger {
    display: flex;
  }
}

/* Parallax sections */
.parallax {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}

/* Hero section */
#hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-light);
  background-image: url('../images/gradient.jpg');
  /* The following properties animate the gradient image for a subtle moving effect */
  background-size: cover;
  background-position: center;
  animation: heroBg 20s ease-in-out infinite;
  position: relative;
  padding: 0 1rem;
}

#hero h1 {
  font-size: 3rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeInUp 1.6s forwards;
}

#hero p {
  font-size: 1.2rem;
  max-width: 600px;
  opacity: 0;
  animation: fadeInUp 2s forwards;
  animation-delay: 0.3s;
}

.scroll-down {
  display: inline-block;
  margin-top: 2rem;
  font-size: 2rem;
  color: var(--text-light);
  text-decoration: none;
  animation: bounce 2s infinite;
}

@keyframes fadeInUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Animation for subtle movement of the hero background */
@keyframes heroBg {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* About section */
#about {
  padding: 5rem 2rem;
  background: #ffffff;
  color: var(--text-dark);
  text-align: center;
}

#about h2 {
  font-size: 2.6rem;
  margin-bottom: 1.5rem;
}

#about p {
  max-width: 900px;
  margin: 0 auto 2rem;
  font-size: 1rem;
}

.list-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.list-container h3 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.list-container ul {
  list-style: none;
  text-align: left;
}

.list-container ul li {
  margin-bottom: 0.8rem;
  padding-left: 1.5rem;
  position: relative;
  font-size: 1rem;
}

.list-container ul li::before {
  content: '\2714';
  position: absolute;
  left: 0;
  color: var(--secondary-color);
  font-weight: 600;
}

/* Impact section */
#impact {
  padding: 5rem 2rem;
  background: #f7f7fa;
  color: var(--text-dark);
  text-align: center;
}

#impact h2 {
  font-size: 2.6rem;
  margin-bottom: 2rem;
}

#impact .cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
}

.card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 20px;
  max-width: 280px;
  box-shadow: 0 10px 20px var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.card p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #555;
}

/* Headlines section */
#headlines {
  padding: 5rem 2rem;
  /* Add extra top padding to prevent the fixed navigation from overlapping the first headline */
  padding-top: 7rem;
  background-image: url('../images/waves.jpg');
  background-size: cover;
  background-position: center;
  color: var(--text-light);
  text-align: center;
}

#headlines h2 {
  font-size: 2.6rem;
  margin-bottom: 2rem;
}

/* Headline blocks: container for illustration and text */
#headlines .headline {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  max-width: 700px;
  margin: 2rem auto;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease-out;
}

/* Show state for headlines when in viewport */
#headlines .headline.show {
  opacity: 1;
  transform: translateY(0);
}

/* Image styling within headline blocks */
#headlines .headline img {
  max-width: 180px;
  width: 35%;
  height: auto;
  margin: 0 auto;
}

/* Text styling within headline blocks */
#headlines .headline p {
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0;
}

/* CTA section */
#cta {
  padding: 5rem 2rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--text-light);
  text-align: center;
}

#cta h2 {
  font-size: 2.4rem;
  margin-bottom: 1rem;
}

#cta p {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

#cta .btn {
  display: inline-block;
  background: var(--text-light);
  color: var(--primary-color);
  padding: 0.8rem 2rem;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
}

#cta .btn:hover {
  background: #f0f0f0;
  color: var(--secondary-color);
}

/* Footer */
footer {
  background: #111;
  color: #bbb;
  padding: 2rem;
  text-align: center;
}

footer p {
  font-size: 0.8rem;
}

footer .social {
  margin-top: 1rem;
}

footer .social a {
  color: var(--text-light);
  margin: 0 0.5rem;
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

footer .social a:hover {
  color: var(--secondary-color);
}