/*
 * Website stylesheet for Blue Backpack Games landing page
 *
 * This file defines a modern, responsive layout using the colour
 * palette supplied by the client (#1E0041, #F28250, #FFCD73,
 * #AABCE6). The design focuses on strong contrast, clear
 * typography and simple interactive cues.
 */

:root {
  /* Colour palette */
  --primary: #1E0041; /* dark purple background */
  --accent-orange: #F28250; /* bright orange */
  --accent-yellow: #FFCD73; /* warm yellow */
  --accent-blue: #AABCE6; /* soft pastel blue */
  --text-light: #F5F5F5; /* off‑white for dark backgrounds */
  --text-dark: #1E0041; /* dark text for light backgrounds */
}

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

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  background-color: var(--primary);
  color: var(--text-light);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Generic container to constrain content width */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

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

/* When the page is scrolled, add a dark overlay and subtle shadow */
header.scrolled {
  background-color: rgba(30, 0, 65, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

.logo img {
  /* Further increase the logo size to be at least twice as large */
  height: 120px;
}

nav {
  display: flex;
  align-items: center;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
}

.nav-links li a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
  transition: color 0.3s ease;
}

/* Underline effect on hover */
.nav-links li a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-orange);
  transition: width 0.3s ease;
}

.nav-links li a:hover::after,
.nav-links li a:focus::after {
  width: 100%;
}

.nav-links li a:hover,
.nav-links li a:focus {
  color: var(--accent-yellow);
}

/* Hero section */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  /* Reverse the direction of the gradient so the yellow starts at the top
     and flows into the dark purple. */
  background: linear-gradient(135deg, var(--accent-yellow) 0%, var(--primary) 100%);
  text-align: center;
  padding-top: 160px; /* compensate for fixed header and larger logo */
}

.hero-content {
  max-width: 800px;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  font-weight: 700;
  color: var(--accent-yellow);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 30px;
  /* Use the pastel blue for the subtitle to contrast on both the yellow
     and purple ends of the gradient */
  color: var(--accent-blue);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.btn.primary {
  background-color: var(--accent-orange);
  color: var(--primary);
}

.btn.primary:hover,
.btn.primary:focus {
  background-color: var(--accent-yellow);
  color: var(--primary);
}

.btn.secondary {
  background-color: transparent;
  color: var(--text-light);
  border: 2px solid var(--accent-orange);
}

.btn.secondary:hover,
.btn.secondary:focus {
  background-color: var(--accent-orange);
  color: var(--primary);
}

/* Generic section styling */
.section {
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.section h2 {
  font-size: 2.5rem;
  margin-bottom: 30px;
  font-weight: 700;
  text-align: center;
}

/* About section with light background */
.about {
  /* Use the yellow tone for the about section to further
     emphasise the requested colour */
  background-color: var(--accent-yellow);
  color: var(--text-dark);
}

.about-us {
  /* Use the pastel blue for the English about section to contrast with
     the yellow German introduction */
  background-color: var(--accent-blue);
  color: var(--text-dark);
}

.about-us p {
  max-width: 900px;
  margin: 0 auto 1rem;
  font-size: 1.1rem;
  line-height: 1.8;
}
.about p {
  max-width: 900px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.8;
}

/* Games section on dark background */
.games {
  background-color: var(--primary);
  color: var(--text-light);
}

.games .games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.game-card {
  position: relative;
  background-size: cover;
  background-position: center;
  height: 400px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.game-card:hover {
  transform: translateY(-5px);
}

.game-card .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  background: linear-gradient(
    0deg,
    rgba(30, 0, 65, 0.9) 0%,
    rgba(30, 0, 65, 0.3) 60%,
    rgba(30, 0, 65, 0) 100%
  );
  color: var(--text-light);
  transition: background 0.3s ease;
}

.game-card:hover .overlay {
  background: linear-gradient(
    0deg,
    rgba(30, 0, 65, 0.8) 0%,
    rgba(30, 0, 65, 0.2) 60%,
    rgba(30, 0, 65, 0) 100%
  );
}

.game-card h3 {
  margin-bottom: 10px;
  color: var(--accent-yellow);
  font-size: 1.8rem;
  font-weight: 600;
}

.game-card p {
  margin-bottom: 20px;
  font-size: 1rem;
}

/* Contact section with yellow background */
.contact {
  /* Place the contact section on the soft blue to break up the flow */
  background-color: var(--accent-blue);
  color: var(--text-dark);
  text-align: center;
}

/* Impressum section for legal notice */
.impressum {
  background-color: var(--primary);
  color: var(--text-light);
}

.impressum h2 {
  color: var(--accent-yellow);
  margin-bottom: 20px;
  text-align: center;
}

.impressum p {
  max-width: 900px;
  margin: 0 auto 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.contact p {
  margin-bottom: 20px;
}

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

/* Reveal animations using IntersectionObserver */
.invisible {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive typography adjustments */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.8rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .section h2 {
    font-size: 2rem;
  }
}