:root {
  --cream: #FFF9F0;
  --yellow: #FDB813;
  --yellow-light: #FFDC73;
  --brown: #8B4513;
  --blue: #007AFF;
  --blue-light: #EBF5FF;
  --green: #4CAF50;
  --green-vibrant: #76D275;
  --white: #FFFFFF;
  --shadow-warm: rgba(139, 69, 19, 0.15);
  --glass-heavy: rgba(255, 255, 255, 0.85);
  --border-radius-lg: 40px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Fredoka', 'Outfit', sans-serif;
  background-color: var(--cream);
  color: #5D4037; /* Warm Soft Tan */
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3 {
  color: #4A2800; /* Wood Brown Baseline */
  font-weight: 900;
}

/* Global Spacing & Layout */
section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10rem 2rem;
  overflow: hidden;
}

.container { 
  width: 100%; 
  max-width: 1200px; 
  margin: 0 auto; 
  z-index: 20; 
  position: relative;
}

h1 { font-size: 4.8rem; margin-bottom: 2rem; color: var(--brown); text-shadow: 2px 2px 0 var(--white); }
h2 { font-size: 3.5rem; margin-bottom: 3rem; color: var(--brown); }
h3 { font-size: 2rem; margin-bottom: 1rem; color: var(--brown); }

p { font-size: 1.4rem; max-width: 800px; margin: 0 auto 3rem; color: #5D4037; font-weight: 500; }

.btn {
  padding: 1.4rem 3.5rem;
  font-size: 1.5rem;
  font-weight: 800;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 12px 0 var(--yellow-dark), 0 15px 30px rgba(0,0,0,0.1);
  background-color: var(--yellow);
  color: white;
  text-transform: capitalize;
}

.btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 0 var(--yellow-dark), 0 20px 40px rgba(253, 184, 19, 0.3);
}

.btn:active {
  transform: translateY(5px);
  box-shadow: 0 5px 0 var(--yellow-dark), 0 10px 20px rgba(0,0,0,0.1);
}

/* Definitive 3D Card Layout - 100% Visibility */
.card-3d {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 40px;
  border: 4px solid var(--white);
  padding: 2.5rem 2.5rem; /* Reduced vertical padding */
  box-shadow: 0 40px 80px rgba(139, 69, 19, 0.15);
  transition: all 0.5s ease-out;
  text-decoration: none;
  color: var(--brown) !important; /* Forced contrast */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  z-index: 50; /* Ensure it's on top */
  opacity: 1;
}

.card-3d h3 { color: var(--brown); margin: 1rem 0; font-size: 2rem; font-weight: 800; }
.card-3d p { color: #5D4037; font-size: 1.15rem; line-height: 1.5; margin-bottom: 0; }

/* 3D Icon Sprite Mappings (from features.png) */
.icon-3d { 
  width: 140px; 
  height: 140px; 
  background-image: url('assets/features.png');
  background-size: 200% 200%;
  border-radius: 30px;
  margin-bottom: 1.5rem;
  transition: transform 0.6s;
  background-color: var(--white);
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.icon-micro { background-position: 0% 0%; }
.icon-shield { background-position: 100% 0%; }
.icon-trophy { background-position: 0% 100%; }
.icon-clipboard { background-position: 100% 100%; }

/* Game Section Sprite Mappings (from game_custom.png) */
.icon-game { 
  width: 80px; 
  height: 80px; 
  background-image: url('assets/game_custom.png');
  background-size: 300% 100%;
  border-radius: 20px;
  background-color: var(--white);
}

.icon-run { background-position: 0% 0%; }
.icon-cards { background-position: 50% 0%; }
.icon-sing { background-position: 100% 0%; }

.card-3d::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(253, 184, 19, 0.15) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.6s;
}

.card-3d:hover::before { opacity: 1; }

.card-3d:hover {
  transform: translateY(-30px) scale(1.05);
  box-shadow: 0 50px 100px rgba(139, 69, 19, 0.2);
  border-color: var(--yellow-light);
}

@keyframes float-island {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.header-top {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 185px; 
  padding: 0 3rem 0 1.5rem; /* Reduced left padding to eliminate empty space */
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1020;
  pointer-events: none;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.header-top > * {
  pointer-events: auto;
}

.header-cta {
  padding: 0.95rem 2rem !important;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  color: #FFF8E7 !important;
  background: #2E7D00 !important;
  border-radius: 100px !important;
  box-shadow: 0 8px 25px rgba(46, 125, 0, 0.3) !important;
  text-decoration: none !important;
}

nav {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  max-width: 1180px;
  height: 185px;
  /* Shifted slightly right to pull Home away from the left vine: 20% right, 16% left */
  padding: 0 20% 0 16%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1010;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.header-top.header-hidden {
  transform: translateY(-200%);
}

/* nav.png full image as the background — covers the entire nav area including flower overflow */
nav::before {
  content: '';
  position: absolute;
  top: -90%;
  left: 0;
  right: 0;
  bottom: -90%;
  background: url('assets/nav.png') center center / contain no-repeat;
  z-index: 0;
  pointer-events: none;
}

nav::after { content: none; }

nav.nav-hidden {
  transform: translate(-50%, -150%);
}

/* Logo - Anchored Top Left with Title Background Image */
.nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  width: 540px;
  height: 280px; 
  background: url('assets/title.png') center center / contain no-repeat;
  font-size: 2.5rem;
  font-weight: 900;
  color: #FFF8E7;
  text-shadow: 0 2px 5px rgba(80,40,10,0.65);
  position: relative;
  z-index: 5;
  padding: 0 45px 0 0; /* Tight centering on wood grain */
  flex-shrink: 0;
  margin-left: -45px; /* Pulling flush to the left edge */
  margin-top: 0;
}
.nav-logo img { height: 85px; filter: drop-shadow(0 3px 6px rgba(0,0,0,0.2)); }

/* Nav links - Centered on Plank */
.nav-links {
  display: flex;
  gap: 2.8rem;
  align-items: center;
  position: relative;
  z-index: 5;
}

.nav-links a {
  color: #FFF8E7 !important;
  text-decoration: none !important;
  font-weight: 800;
  font-size: 1.05rem;
  transition: all 0.3s ease;
  position: relative;
  text-shadow: 0 2px 4px rgba(80,40,10,0.5);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.nav-links a:hover {
  color: #2E7D00 !important;
  transform: scale(1.08);
  text-shadow: 0 0 10px rgba(46, 125, 0, 0.3);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 3px;
  background: #2E7D00;
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 100px;
  box-shadow: 0 0 12px rgba(46, 125, 0, 0.6);
}
.nav-links a:hover::after { width: 100%; }

/* Remove old deco divs if any linger */
.nav-deco { display: none; }

/* Hero Restyle - Precise Centering for background.png */
#hero { 
  background: url('assets/background.png') center center no-repeat;
  background-size: cover;
  padding: 12rem 2rem 10rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#features { background-color: var(--cream); position: relative; z-index: 20; }
.features-grid { 
  display: grid; 
  grid-template-columns: repeat(2, 1fr); 
  gap: 3rem; 
  margin-top: 4rem; 
  width: 100%; 
}

/* Centerpiece Feature Card Modification - MOJO REFIX */
.card-centerpiece {
  grid-column: 1 / -1;
  flex-direction: row;
  text-align: left;
  gap: 4rem;
  padding: 4rem;
  min-height: 350px;
}

.card-centerpiece .vocal-coach-mojo {
  width: 220px; /* Right-sized Mojo */
  height: 220px;
  flex-shrink: 0;
}

.card-centerpiece .vocal-coach-mojo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.15));
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  text-align: center;
}

.mascot-hero { 
  width: 180px; 
  height: 180px; 
  margin-bottom: 2rem; 
  position: relative;
}
.mascot-hero img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.15)); }

/* 3D Waveform Component */
.waveform-3d {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 80px;
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(0, 122, 255, 0.05);
  border-radius: 30px;
  width: 100%;
}
.waveform-3d span {
  width: 8px;
  background: var(--blue);
  border-radius: 10px;
  animation: wave-pulse 1.2s ease-in-out infinite;
}
@keyframes wave-pulse {
  0%, 100% { height: 10px; opacity: 0.3; }
  50% { height: 40px; opacity: 1; }
}

/* 3D Streak Bar Component */
.streak-bar-3d {
  width: 100%;
  height: 40px;
  background: rgba(139, 69, 19, 0.05);
  border-radius: 100px;
  margin-top: 2rem;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  font-weight: 800;
  color: #4A2800; /* Wood Brown */
}
.streak-bar-3d::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 70%;
  background: linear-gradient(90deg, var(--yellow), var(--yellow-light));
  z-index: -1;
  border-radius: 100px;
}

/* Pulse Link Component */
.pulse-link-3d {
  margin-top: 2.5rem;
  padding: 0.8rem 1.8rem;
  background: var(--white);
  border-radius: 100px;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--blue);
  box-shadow: 0 10px 20px rgba(0, 122, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}
.pulse-link-3d::before {
  content: '📊';
  font-size: 1.2rem;
}
.pulse-link-3d:hover { transform: scale(1.05); }

/* Learning Flow Icon (Bird & Graph) */
.flow-header-icon {
  width: 120px;
  height: 120px;
  background: url('assets/game_custom.png') center center no-repeat;
  background-size: cover;
  filter: drop-shadow(0 15px 30px rgba(0,0,0,0.1));
  margin-bottom: 2rem;
}

/* Game Section */
#game { background: #FDE0B2; }
.game-split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 5rem; align-items: center; }
.game-mockup-3d { 
  background: var(--white); 
  border-radius: 60px; 
  padding: 1.5rem; 
  border: 15px solid var(--white); 
  box-shadow: 0 50px 100px rgba(139, 69, 19, 0.2);
  rotate: -2deg;
}

/* Privacy */
.info-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin-top: 3rem; text-align: left; }
.info-card { background: var(--blue-light); padding: 2.5rem; border-radius: 30px; border: 4px solid var(--white); }

/* Footer */
footer { background: var(--brown); color: white; padding: 6rem 3rem; position: relative; z-index: 10; text-align: center; }
.footer-links { display: flex; gap: 2.5rem; margin: 3rem 0; justify-content: center; }
.footer-links a { color: rgba(255,255,255,0.8); text-decoration: none; font-weight: 600; }

/* --- ADVENTURE WORKSHOP FLOATING NODES --- */
.adventure-network {
  position: relative;
  width: 100%;
  min-height: 650px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 4rem;
}

.floating-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 10;
  width: 260px;
  transition: z-index 0.1s;
}

.floating-node:hover {
  z-index: 100 !important;
}

.center-node {
  position: relative;
  width: 380px;
  z-index: 20;
}

.center-node .vocal-coach-mojo {
  width: 250px;
  height: 250px;
  margin: 0 auto 1rem;
  position: relative;
  z-index: 5;
}

.center-node .vocal-coach-mojo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.2));
}

.floating-node .icon-3d {
  margin-bottom: 1.5rem;
  z-index: 5;
  position: relative;
}

.node-content {
  position: relative;
  z-index: 5;
  max-width: 210px;
  margin: 0 auto;
}

.node-content h3 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: #4A2800; /* Wood Brown */
}

.node-content p {
  font-size: 1.1rem;
  color: #5D4037;
  font-weight: 500;
  margin: 0;
}

.blob-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 145%;
  height: 145%;
  background: white;
  z-index: 0;
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  box-shadow: 0 30px 60px rgba(139, 69, 19, 0.1);
  animation: morph 8s ease-in-out infinite alternate;
  border: 4px solid var(--white);
}

@keyframes morph {
  0% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; box-shadow: 0 30px 60px rgba(139, 69, 19, 0.1); }
  100% { border-radius: 60% 40% 30% 70% / 50% 60% 40% 50%; box-shadow: 0 35px 70px rgba(139, 69, 19, 0.15); }
}

/* Colors for blobs */
.bg-blue-blob { background: linear-gradient(135deg, #cce4ff, #88bbff); }
.bg-green-blob { background: linear-gradient(135deg, #ccffcc, #81c784); }
.bg-yellow-blob { background: linear-gradient(135deg, #fff5cc, #ffd54f); }
.bg-red-blob { background: linear-gradient(135deg, #ffccdd, #ff8a65); }

.glow-effect {
  box-shadow: 0 0 80px rgba(253, 184, 19, 0.4), inset 0 0 40px rgba(255,255,255,0.8);
  border: 4px solid var(--white);
}

.streak-badge {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1.4rem;
  background: var(--yellow);
  color: var(--brown);
  border-radius: 100px;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(253, 184, 19, 0.3);
}

/* Satellite Positions Desktop */
@media (min-width: 1024px) {
  .satellite-1 { top: 5%; left: 0%; }
  .satellite-2 { bottom: 5%; left: 10%; }
  .satellite-3 { top: 15%; right: 0%; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .adventure-network { min-height: 800px; }
  .satellite-1 { top: 0%; left: 0%; transform: scale(0.9); }
  .satellite-2 { bottom: 0%; left: 0%; transform: scale(0.9); }
  .satellite-3 { top: 10%; right: 0%; transform: scale(0.9); }
}

/* --- ADVENTURE MAP BOARD --- */
.playful-map {
  position: relative;
  width: 100%;
  min-height: 550px;
  margin: 0 auto;
}

.map-path-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  filter: drop-shadow(0 10px 0 rgba(253, 184, 19, 0.4));
  pointer-events: none;
}

.map-waypoint {
  position: absolute;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 250px;
  text-align: center;
  animation: map-float 4s ease-in-out infinite alternate;
  transition: transform 0.3s;
}

.map-waypoint:hover {
  transform: scale(1.08) translateY(-10px) !important;
  z-index: 30;
}

.game-image-no-bg {
  width: 140px;
  height: 140px;
  object-fit: contain;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 20px 30px rgba(0,0,0,0.15));
}

.floating-label {
  padding: 0.5rem;
}

.floating-label strong {
  display: block;
  font-size: 1.4rem;
  color: var(--brown);
  margin-bottom: 0.5rem;
  line-height: 1.2;
  text-shadow: 3px 3px 0 var(--white), -3px -3px 0 var(--white), 3px -3px 0 var(--white), -3px 3px 0 var(--white), 0 5px 15px rgba(139, 69, 19, 0.2);
}

.floating-label span {
  font-size: 1rem;
  color: var(--brown);
  font-weight: 500;
  line-height: 1.4;
  display: block;
  text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.9), -2px -2px 0 rgba(255, 255, 255, 0.9), 2px -2px 0 rgba(255, 255, 255, 0.9), -2px 2px 0 rgba(255, 255, 255, 0.9);
}

@keyframes map-float {
  0% { transform: translateY(0); }
  100% { transform: translateY(-12px); }
}

/* Map Waypoint Default Desktop Origins */
.wp-1 { top: 60%; left: 10%; }
.wp-2 { top: 10%; left: 50%; margin-left: -125px; }
.wp-3 { top: 60%; right: 10%; }

/* Responsive Overrides */
/* --- COMPREHENSIVE RESPONSIVE HEADER OVERHAUL --- */

@media (max-width: 1250px) {
  .nav-logo {
    width: 380px;
    height: 200px;
    font-size: 1.8rem;
    margin-left: -25px;
  }
  .nav-logo img { height: 55px; }
  
  .nav-links { gap: 1.8rem; }
  .nav-links a { font-size: 1rem; }
  
  nav { max-width: 1000px; padding: 0 16% 0 12%; }
}

@media (max-width: 968px) {
  .header-top { padding: 0 1.5rem; }
  
  .header-cta { 
    padding: 0.7rem 1.4rem !important;
    font-size: 0.85rem !important;
  }

  .nav-logo {
    width: 280px;
    height: 160px;
    font-size: 1.4rem;
    margin-left: -15px;
    gap: 0.6rem;
  }
  .nav-logo img { height: 42px; }

  nav { 
    max-width: 780px; 
    padding: 0 12% 0 10%; 
  }
  
  .nav-links { gap: 1.2rem; }
  .nav-links a { font-size: 0.88rem; }
}

@media (max-width: 768px) {
  .header-top { 
    padding: 1.2rem 1rem; 
    align-items: flex-start; /* Move logo/button higher on small phones */
  }
  
  .nav-logo {
    width: 210px;
    height: 120px;
    font-size: 1.15rem;
    margin-left: -10px;
    gap: 0.5rem;
    padding-right: 20px;
  }
  .nav-logo img { height: 35px; }

  nav { 
    width: 98%;
    max-width: 500px;
    height: 150px;
    padding: 0 10%;
  }
  
  /* Simplify links for very small screens to avoid overflow */
  .nav-links a[href="#privacy"],
  .nav-links a[href="#support"] {
    display: none;
  }
  
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.85rem; }

  h1 { font-size: 2.8rem; line-height: 1.1; }
  h2 { font-size: 2.2rem; }

  .adventure-network {
    flex-direction: column;
    gap: 5rem;
    margin-top: 2rem;
  }
  .floating-node {
    position: relative;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 90%;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .header-cta { display: none; } /* Hide CTA on extremely small phones if it overlaps */
  
  .nav-logo {
    width: 180px;
    height: 100px;
    font-size: 1rem;
    padding-right: 15px;
  }
  
  nav { height: 130px; }
  .nav-links { gap: 0.8rem; }
  .nav-links a { font-size: 0.8rem; }
}
