/*
 * Main stylesheet for Merolav Technologies website
 *
 * This file defines styles for the navigation, hero section, feature grids,
 * forms, and footer. It uses CSS variables for easy customization of colors
 * and fonts, ensuring a cohesive look throughout the site. The layout
 * responds gracefully to different screen sizes, providing a great
 * experience on both desktop and mobile devices.
 */

/* Reset margins, paddings, and box model */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Color palette and typography variables */
:root {
  --primary-color: #6c63ff; /* violet accent */
  --secondary-color: #ff6f61; /* coral accent */
  --dark-bg: #0b132b; /* deep navy background */
  --light-bg: #f7f7ff; /* off‑white background for contrast */
  --text-color: #333333; /* body text color */
  --section-padding: 4rem 0; /* spacing for sections */
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Container utility */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Navigation styles */
#header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#header.scrolled {
  background-color: var(--dark-bg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
}

.logo {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
}

.logo .primary {
  color: var(--primary-color);
}

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

.nav-links li a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

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

/* Hamburger menu for mobile */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 1.5rem;
  height: 1.3rem;
  cursor: pointer;
}

.hamburger span {
  display: block;
  height: 0.2rem;
  background-color: #ffffff;
  border-radius: 1px;
  transition: all 0.3s ease;
}

/* Hero section */
.hero {
  background-color: var(--dark-bg);
  color: #ffffff;
  padding: 8rem 0 4rem;
  overflow: hidden; /* Prevents parallax overflow */
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.hero-content {
  flex: 1 1 50%;
  padding-right: 2rem;
}

.hero-content h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: #e0e0e0;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

.hero-image {
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease-out; /* Smooth parallax transition */
}

.hero-image img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

/* Button styles */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

.primary-btn:hover {
  background-color: #5146e5;
}

.secondary-btn {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.secondary-btn:hover {
  background-color: var(--primary-color);
  color: #ffffff;
}

/* Section styles */
.section {
  padding: var(--section-padding);
}

.alt-bg {
  background-color: #eef1fb;
}

.section h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--dark-bg);
}

.section-intro {
  max-width: 800px;
  margin: 0 auto 2rem;
  text-align: center;
  color: #555555;
}

/* Feature grid */
.features-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin-bottom: 2rem;
}

.feature {
  background-color: #ffffff;
  border-radius: 0.5rem;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.feature i {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
}

.feature h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--dark-bg);
}

.feature p {
  font-size: 0.95rem;
  color: #555555;
}

/* G3N Feature Grid */
.features-grid-g3n {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-bottom: 2rem;
}

.feature-g3n {
  background-color: #ffffff;
  border-radius: 0.5rem;
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-g3n:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.feature-g3n i {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-top: 0.25rem;
}

.feature-g3n h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  color: var(--dark-bg);
}

.feature-g3n p {
  font-size: 0.9rem;
  color: #555555;
}

.google-play-badge img {
  height: 60px;
}

.cta-center {
  text-align: center;
}

/* AI Tutor Highlights */
.tutor-highlights-container {
  display: flex;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.tutor-image {
  flex: 1 1 40%;
}

.tutor-image img {
  max-width: 100%;
  border-radius: 0.5rem;
}

.tutor-features {
  flex: 1 1 55%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tutor-feature {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.tutor-feature i {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-top: 0.25rem;
}

.tutor-feature h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.tutor-feature p {
  font-size: 0.95rem;
  color: #555555;
}

/* Signup form */
.signup-form {
  text-align: center;
  margin-top: 2rem;
}

.signup-form form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.signup-form input {
  width: 100%;
  max-width: 350px;
  padding: 0.6rem 0.8rem;
  border: 1px solid #cccccc;
  border-radius: 0.4rem;
  font-size: 1rem;
}

.signup-form button {
  max-width: 350px;
  width: 100%;
}

.form-message {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--primary-color);
}

/* Contact details */
.contact-details {
  margin-top: 1rem;
  text-align: center;
  color: #555555;
}

.contact-details a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-details a:hover {
  color: var(--secondary-color);
}

/* Footer */
.footer {
  background-color: var(--dark-bg);
  color: #ffffff;
  padding: 1rem 0;
  text-align: center;
  font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--dark-bg);
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 1rem 2rem;
    gap: 1rem;
    display: none;
  }

  .nav-links.show {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  .hero-container {
    flex-direction: column;
  }

  .hero-content,
  .hero-image {
    flex: 1 1 100%;
    padding: 0;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .tutor-highlights-container {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.8rem;
  }

  .feature-g3n {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* Accessibility: Focus styles */
a:focus,
button:focus,
input:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}


/* Reset margins, paddings, and box model */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Color palette and typography variables */
:root {
  --primary-color: #6c63ff; /* violet accent */
  --secondary-color: #ff6f61; /* coral accent */
  --dark-bg: #0b132b; /* deep navy background */
  --light-bg: #f7f7ff; /* off‑white background for contrast */
  --text-color: #333333; /* body text color */
  --section-padding: 4rem 0; /* spacing for sections */
}

html {
  scroll-behavior: smooth;
}

/* Container utility */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Navigation styles */
#header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#header.scrolled {
  background-color: var(--dark-bg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
}

.logo {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
}

.logo .primary {
  color: var(--primary-color);
}

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

.nav-links li a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

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

/* Hamburger menu for mobile */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 1.5rem;
  height: 1.3rem;
  cursor: pointer;
}

.hamburger span {
  display: block;
  height: 0.2rem;
  background-color: #ffffff;
  border-radius: 1px;
  transition: all 0.3s ease;
}

/* Hero section */
.hero {
  background-color: var(--dark-bg);
  color: #ffffff;
  padding: 8rem 0 4rem;
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.hero-content {
  flex: 1 1 50%;
  padding-right: 2rem;
}

.hero-content h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
  animation: slideInFromLeft 1s ease-in-out;
}

.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: #e0e0e0;
  animation: slideInFromLeft 1s ease-in-out 0.2s;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  animation: slideInFromLeft 1s ease-in-out 0.4s;
}

.hero-image {
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: slideInFromRight 1s ease-in-out;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

/* Button styles */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Provide a slightly darker shade on hover instead of relying on CSS functions */
.primary-btn:hover {
  background-color: #5146e5;
}

.secondary-btn {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.secondary-btn:hover {
  background-color: var(--primary-color);
  color: #ffffff;
}

/* Section styles */
.section {
  padding: var(--section-padding);
}

.alt-bg {
  background-color: #eef1fb;
}

.section h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--dark-bg);
}

.section-intro {
  max-width: 600px;
  margin: 0 auto 2rem;
  text-align: center;
  color: #555555;
}

/* Feature grid */
.features-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin-bottom: 2rem;
}

.feature {
  background-color: #ffffff;
  border-radius: 0.5rem;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.feature i {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
}

.feature h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--dark-bg);
}

.feature p {
  font-size: 0.95rem;
  color: #555555;
}

.cta-center {
  text-align: center;
}

/* Signup form */
.signup-form {
  text-align: center;
  margin-top: 2rem;
}

.signup-form form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.signup-form input {
  width: 100%;
  max-width: 350px;
  padding: 0.6rem 0.8rem;
  border: 1px solid #cccccc;
  border-radius: 0.4rem;
  font-size: 1rem;
}

.signup-form button {
  max-width: 350px;
  width: 100%;
}

.form-message {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--primary-color);
}

/* Contact details */
.contact-details {
  margin-top: 1rem;
  text-align: center;
  color: #555555;
}

.contact-details i {
  margin-right: 0.5rem;
  color: var(--primary-color);
  font-size: 1.2rem;
  vertical-align: middle;
}

.contact-details a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-details a:hover {
  color: var(--secondary-color);
}

/* Footer */
.footer {
  background-color: var(--dark-bg);
  color: #ffffff;
  padding: 1rem 0;
  text-align: center;
  font-size: 0.9rem;
}

/* Keyframe animations for hero section */
@keyframes slideInFromLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInFromRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--dark-bg);
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 1rem 2rem;
    gap: 1rem;
    display: none;
  }

  .nav-links.show {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  .hero-container {
    flex-direction: column;
  }

  .hero-content,
  .hero-image {
    flex: 1 1 100%;
    padding: 0;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.6rem;
  }

  .feature {
    padding: 1.5rem 1rem;
  }
}