/* --- BRAND VARIABLES --- */
:root {
  --bg-dark: #222222;
  --brand-blue: #3454D1;
  --brand-sage: #9BC1BC;
  --text-cream: #E6EBE0;
  --font-title: 'Pacifico', cursive;
  --font-text: 'Montserrat', sans-serif;
}

/* --- GLOBAL STYLES --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-cream);
  font-family: var(--font-text);
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}

/* --- CANVAS BACKGROUND --- */
#canvas-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* Behind everything */
}

/* --- MAIN CONTAINER --- */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh; /* Center vertically */
  text-align: center;
  width: 90%;
  max-width: 1000px;
  z-index: 1;
}

/* --- LOGO --- */
.logo-container {
  margin-bottom: 3rem;
  perspective: 1000px;
}

.logo-img {
  max-width: 100%;
  width: 550px;
  height: auto;
  filter: drop-shadow(0 15px 30px rgba(0,0,0,0.4));
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  animation: floatLogo 6s ease-in-out infinite;
}

.logo-img:hover {
  transform: scale(1.05) rotateX(5deg);
}

@keyframes floatLogo {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

/* --- HEADING AND INTRO TEXT --- */
h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fff 0%, var(--brand-sage) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 10px 30px rgba(0,0,0,0.3);
  letter-spacing: -1.5px;
}

.homepage-intro {
  font-size: 1.3rem;
  margin-bottom: 4rem;
  color: var(--text-cream);
  opacity: 0.85;
  line-height: 1.6;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  display: inline-block;
}

.homepage-intro::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--brand-blue);
  margin: 1.5rem auto 0;
  border-radius: 2px;
  opacity: 0.7;
}

/* --- BUTTONS GRID --- */
.nav-grid {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  width: 100%;
}

.nav-card {
  display: block;
  text-decoration: none;
  width: 320px;
  height: 180px;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.text-content h2 {
  font-family: var(--font-title);
  font-size: 2rem;
  margin-bottom: 0.3rem;
  color: #fff;
  text-align: left;
  letter-spacing: 0.5px;
  text-shadow: none;
}

.text-content p {
  color: var(--text-cream);
  font-size: 0.95rem;
  text-align: left;
  opacity: 0.7;
  font-weight: 500;
  line-height: 1.4;
  transition: opacity 0.4s;
}

.arrow-icon {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: #fff;
  font-size: 1.5rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.4s ease;
}

/* Background Effects */
.card-bg {
  position: absolute;
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%;
  background: radial-gradient(circle at top right, rgba(52, 84, 209, 0.15), transparent 60%);
  opacity: 0.5;
  transition: all 0.5s ease;
  z-index: 0;
}

.games-card .card-bg { background: radial-gradient(circle at top right, rgba(52, 84, 209, 0.2), transparent 70%); }
.tools-card .card-bg { background: radial-gradient(circle at top right, rgba(155, 193, 188, 0.2), transparent 70%); }

.shine {
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.1) 45%, rgba(255,255,255,0.02) 50%, transparent 60%);
  pointer-events: none;
  z-index: 1;
  transition: all 0.6s ease;
}

/* Hover States */
.nav-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 
              inset 0 0 20px rgba(255, 255, 255, 0.05); 
}

.nav-card:hover .text-content p {
  opacity: 1;
}

.nav-card:hover .arrow-icon {
  opacity: 1;
  transform: translateX(0);
}

.games-card:hover .card-bg {
  opacity: 1;
  background: radial-gradient(circle at top right, rgba(52, 84, 209, 0.4), transparent 80%);
}

.tools-card:hover .card-bg {
  opacity: 1;
  background: radial-gradient(circle at top right, rgba(155, 193, 188, 0.4), transparent 80%);
}

.nav-card:hover .shine {
  top: -50%;
  left: -50%;
}
  width: 280px;
  height: 80px;

  border-radius: 12px;

  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  position: relative;
  transition: all 0.3s ease;

  background: linear-gradient(135deg, rgba(52, 84, 209, 0.1) 0%, rgba(155, 193, 188, 0.05) 100%);
  color: var(--brand-blue);
  border: 2px solid var(--brand-blue);

  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

.nav-btn:hover {
  background: linear-gradient(135deg, var(--brand-blue) 0%, rgba(52, 84, 209, 0.8) 100%);
  color: white;
  box-shadow: 0 0 30px rgba(52, 84, 209, 0.6);
  transform: translateY(-5px);
  border-color: var(--brand-blue);
}

/* --- FOOTER --- */
footer {
  width: 100%;
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 1rem;
  z-index: 1;
}

.footer-link {
  /* All links displayed in #3454D1 */
  color: var(--brand-blue);
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.3s ease;
  font-weight: 600;
}

.footer-link:hover {
  text-decoration: underline;
  text-shadow: 0 0 8px rgba(52, 84, 209, 0.4);
}

.separator {
  color: #555;
  margin: 0 5px;
}

/* --- MOBILE TWEAKS --- */
@media (max-width: 768px) {
  .logo-img { width: 85%; }

  .nav-grid{
    flex-direction: column;
    align-items: center;   /* centre the stacked buttons */
    justify-content: center;
    gap: 1.5rem;
  }

  .nav-btn{
    width: min(92vw, 320px); /* centred, consistent size */
    max-width: 320px;
  }
}

