/*
 * Game Buddy landing page
 *
 * This stylesheet defines the visual appearance of the landing page.
 * The design takes inspiration from the provided assets, using a dark
 * background with pastel accents and fluid decorative shapes. The
 * layout is responsive and adapts gracefully to smaller screens.
 */

/* CSS variables for easy theme tweaks */
:root {
  --color-bg: #021c34;       /* primary dark background */
  --color-primary: #013e73;  /* slightly lighter dark for nav */
  --color-accent: #2df2e5;   /* turquoise accent from palette */
  --color-highlight: #4cee82;/* light green highlight */
  --color-light: #e6fcff;    /* very light tone for contrast */
  --color-text: #cde4ed;     /* soft off‑white for body text */
  --font-body: 'Poppins', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: linear-gradient(160deg, var(--color-bg) 0%, #031e36 100%);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

/* Navigation */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 5%;
  background: var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.navbar .logo img {
  height: 48px;
}

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

.nav-links a {
  font-weight: 600;
  transition: color 0.3s ease;
}

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

/* Mobile navigation toggle */
.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--color-primary);
    flex-direction: column;
    width: 200px;
    padding: 1rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  .nav-links li {
    margin-bottom: 1rem;
  }
  .nav-toggle-label {
    display: block;
    width: 30px;
    height: 22px;
    position: relative;
  }
  .nav-toggle-label span,
  .nav-toggle-label span::before,
  .nav-toggle-label span::after {
    display: block;
    background: var(--color-accent);
    height: 3px;
    width: 100%;
    border-radius: 2px;
    position: absolute;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .nav-toggle-label span {
    top: 50%;
    transform: translateY(-50%);
  }
  .nav-toggle-label span::before {
    content: '';
    top: -8px;
  }
  .nav-toggle-label span::after {
    content: '';
    top: 8px;
  }
  /* Show menu when checkbox is checked */
  .nav-toggle:checked ~ .nav-links {
    transform: translateX(0);
  }
  /* Transform hamburger into X when menu is open */
  .nav-toggle:checked + .nav-toggle-label span {
    background: transparent;
  }
  .nav-toggle:checked + .nav-toggle-label span::before {
    transform: translateY(8px) rotate(45deg);
  }
  .nav-toggle:checked + .nav-toggle-label span::after {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* Hero section */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90vh;
  padding: 3rem 5%;
  overflow: hidden;
}

.hero-content {
  position: relative;
  max-width: 600px;
  z-index: 2;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--color-light);
}

.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  text-align: center;
  transition: background 0.3s ease, color 0.3s ease;
}

.btn-primary {
  background: var(--color-accent);
  color: #012738;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
  background: var(--color-highlight);
}

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

.btn-secondary:hover {
  background: var(--color-accent);
  color: #012738;
}

/* Decorative elements */
.decor {
  position: absolute;
  opacity: 0.25;
  pointer-events: none;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5));
}

.decor-1 {
  top: -10%;
  left: -5%;
  width: 50%;
}

.decor-2 {
  bottom: -20%;
  right: -10%;
  width: 50%;
  transform: rotate(180deg);
}

.hero-tagline {
  position: absolute;
  top: 20%;
  right: -10%;
  width: 60%;
  opacity: 0.06;
  z-index: 1;
  pointer-events: none;
}

/* Section base styles */
.section {
  padding: 5rem 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--color-light);
}

/* About section */
.about-section .about-text {
  margin-bottom: 1.5rem;
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.1rem;
  color: var(--color-text);
  text-align: justify;
}

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

.feature-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.icon-wrapper {
  height: 64px;
  width: 64px;
  margin: 0 auto 1rem;
}

.icon {
  width: 100%;
  height: 100%;
}

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

.feature-card p {
  font-size: 0.95rem;
  color: var(--color-text);
}

/* CTA section */
.cta-section {
  background: linear-gradient(160deg, var(--color-accent) 0%, var(--color-highlight) 100%);
  color: #012738;
  text-align: center;
}

.cta-section .cta-text {
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.1rem;
}

.cta-section .btn-secondary {
  border-color: #012738;
  color: #012738;
  background: #ffffff;
}

.cta-section .btn-secondary:hover {
  background: #012738;
  color: #ffffff;
}

/* Footer */
.footer {
  background: var(--color-primary);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--color-text);
  font-size: 0.9rem;
}

/* Media query tweaks */
@media (max-width: 600px) {
  .hero {
    padding: 4rem 1.5rem;
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .features-grid {
    gap: 1.5rem;
  }
  .feature-card {
    padding: 1.5rem;
  }
}