/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Nunito', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Navbar ===== */
#navbar {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
  padding: 4px 0;
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #E06050;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

#navbar.scrolled .nav-link {
  color: #4a4e56;
}

#navbar.scrolled .nav-link:hover {
  color: #E06050;
}

#navbar.scrolled .font-display {
  color: #1e2024;
}

/* ===== Mobile Menu ===== */
#mobile-menu {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-link {
  border-radius: 12px;
  padding: 8px 12px;
  transition: background 0.2s ease, color 0.2s ease;
}

.mobile-link:hover {
  background: #fff1ee;
}

/* ===== Floating Pieces (Hero Decoration) ===== */
.floating-piece {
  position: absolute;
  animation: floatPiece 6s ease-in-out infinite;
  opacity: 0.8;
}

@keyframes floatPiece {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-15px) rotate(5deg); }
  66% { transform: translateY(8px) rotate(-3deg); }
}

/* ===== Floating Cards (Hero) ===== */
.floating-card {
  animation: floatCard 5s ease-in-out infinite;
  will-change: transform;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

.card-games { animation-delay: 0.2s !important; }
.card-community { animation-delay: 0.5s !important; }
.card-location { animation-delay: 0.8s !important; }
.card-friendly { animation-delay: 1.1s !important; }

/* ===== Game Cards ===== */
.game-card {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

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

/* ===== Scroll Reveal Animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ===== Section Divider ===== */
.section-divider {
  height: 4px;
  background: linear-gradient(90deg, transparent, #E06050, transparent);
  border: none;
  border-radius: 2px;
  margin: 0 auto;
  max-width: 120px;
}

/* ===== Button Focus ===== */
a:focus-visible, button:focus-visible {
  outline: 3px solid #E06050;
  outline-offset: 2px;
  border-radius: 8px;
}

/* ===== Mobile Responsiveness ===== */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 70px;
  }

  #hero h1 {
    font-size: 2.25rem !important;
  }

  #hero p {
    font-size: 1.1rem !important;
  }

  .game-card {
    margin-bottom: 0;
  }
}

@media (max-width: 480px) {
  #hero h1 {
    font-size: 1.875rem !important;
  }

  .font-display.font-bold.text-3xl,
  .font-display.font-bold.text-4xl {
    font-size: 1.75rem !important;
  }
}

/* ===== Subtle Pattern Background ===== */
.bg-pattern {
  background-image: radial-gradient(circle at 1px 1px, rgba(224, 96, 80, 0.05) 1px, transparent 0);
  background-size: 24px 24px;
}
