@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,800;1,600&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --primary-forest: #2d4a27;
  --secondary-moss: #556b2f;
  --soft-sage: #8fbc8f;
  --light-sage: #e8f0e6;
  --water-blue: #0284c7;
  --water-dark: #0369a1;
  --water-light: #e0f2fe;
  --earth-terracotta: #c86d51;
  --wheat-gold: #e5a93c;
  --cream-bg: #fcfbfa;
  
  --green-primary: #2f7138;
  --green-dark: #1b4923;
  --green-light: #eaf5e1;
  --accent-orange: #f28b6b;
  --accent-yellow: #ffca55;
  --text-dark: #1d3022;
  --text-muted: #57685a;
  --card-bg: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  width: 100vw;
  min-height: 100vh;
  background: var(--cream-bg);
  color: var(--text-dark);
  font-family: 'Plus Jakarta Sans', sans-serif;
  overflow-x: hidden;
  padding-top: 80px;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  outline: none;
}

.hidden {
  display: none !important;
}

/* NAVBAR STYLES MATCHING MODULE 1 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(252, 251, 250, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(45, 74, 39, 0.08);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 4px 20px rgba(45, 74, 39, 0.08);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon {
  width: 60px;
  height: 60px;
  background: url('../assets/home/seeds-of-success-logo.svg') center/cover no-repeat;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.logo:hover .logo-icon {
  transform: rotate(15deg) scale(1.05);
}

.logo-text {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--primary-forest);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 1px;
  color: var(--primary-forest);
  text-decoration: none;
  position: relative;
}

.nav-links a:hover {
  color: var(--water-blue);
}

.nav-sound-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-btn {
  background: var(--water-light);
  border-radius: 40px;
  padding: 6px 14px;
  color: var(--water-dark);
  font-weight: 700;
  font-size: 13px;
}

.hamburger {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary-forest);
}

/* HERO SECTION */
main {
  width: 100%;
}

.welcome {
  width: 100%;
  min-height: calc(100vh - 80px);
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4vw 6vw;
}

.welcome-copy {
  max-width: 550px;
}

.eyebrow {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--water-blue);
  text-transform: uppercase;
}

.welcome h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(38px, 4.5vw, 64px);
  line-height: 1.1;
  margin: 16px 0;
  color: #0f172a;
}

.welcome h1 em {
  font-style: normal;
  color: var(--water-blue);
}

.welcome-copy p {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 28px;
}

.primary-btn {
  background: var(--water-blue);
  color: #ffffff;
  border-radius: 24px;
  padding: 16px 32px;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 6px 0 var(--water-dark);
  transition: transform 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.primary-btn:hover {
  transform: translateY(-2px);
}

.secondary-btn {
  background: var(--green-primary);
  color: #ffffff;
  border-radius: 18px;
  padding: 10px 20px;
  font-weight: 700;
}

.tiny-note {
  margin-top: 18px;
  color: #64748b;
  font-weight: 600;
  font-size: 0.9rem;
}

.welcome-art {
  width: 48%;
  max-height: 440px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(2, 132, 199, 0.15);
  border: 4px solid #ffffff;
}

.welcome-river-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* GAME SHELL & NAVIGATION */
.game-shell {
  width: 100%;
  padding-bottom: 60px;
}

.farm-banner {
  width: 100%;
  height: 250px;
  position: relative;
  overflow: hidden;
}

.farm-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-label {
  position: absolute;
  left: 4vw;
  bottom: 20px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 12px 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.banner-label b {
  font-size: 1.15rem;
  color: #0f172a;
  display: block;
}

.journey-head {
  padding: 28px 6vw 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.journey-head h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: #0f172a;
  margin: 0;
}

.star-score {
  background: var(--accent-yellow);
  border-radius: 20px;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* MISSION TABS */
.mission-nav {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  padding: 0 6vw;
  margin-bottom: 28px;
}

.mission-tab {
  background: var(--water-light);
  border-radius: 20px;
  padding: 12px 6px;
  color: var(--water-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
}

.mission-tab .step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  color: var(--water-blue);
}

.mission-tab.active {
  background: var(--water-blue);
  color: #ffffff;
}

.mission-tab.active .step-num {
  background: var(--accent-yellow);
  color: #0f172a;
}

.mission-tab.done {
  background: #e2e8f0;
  color: #475569;
}

/* MISSION CARDS */
.mission-card {
  width: 88vw;
  max-width: 1100px;
  margin: 0 auto 32px;
  background: var(--card-bg);
  border: 2px solid #e2e8f0;
  border-radius: 28px;
  padding: 32px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.mission-intro {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 24px;
}

.step-pill {
  display: inline-block;
  border-radius: 30px;
  padding: 6px 16px;
  background: var(--water-light);
  color: var(--water-dark);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.mission-intro h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: #0f172a;
  margin: 10px 0 6px;
}

.mission-intro p {
  color: var(--text-muted);
  line-height: 1.5;
}

.fact-strip {
  background: var(--water-light);
  border-radius: 16px;
  padding: 16px 20px;
  margin-top: 24px;
  color: #0369a1;
  font-size: 0.95rem;
}

.next-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px auto 0;
  background: var(--water-blue);
  color: #ffffff;
  padding: 12px 26px;
  border-radius: 18px;
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: 0 4px 0 var(--water-dark);
}

/* MISSION 1: FISHING CANVAS */
.canvas-wrapper {
  position: relative;
  width: 100%;
  height: 380px;
  border-radius: 20px;
  overflow: hidden;
  border: 3px solid #cbd5e1;
  background: #0f172a;
}

.game-status-bar {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.92);
  padding: 8px 18px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  color: #0f172a;
  z-index: 10;
}

#gameCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* MISSION 2: RIVER SAMPLING */
.river-sampling-area {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sampling-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

.full-viewport-container {
  position: relative;
  width: 100%;
  height: 400px;
  border-radius: 20px;
  overflow: hidden;
  border: 3px solid #cbd5e1;
}

#river-background {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.river-hotspot {
  position: absolute;
  width: 48px;
  height: 48px;
  background: rgba(14, 165, 233, 0.65);
  border: 3px solid #ffffff;
  border-radius: 50%;
  cursor: pointer;
  animation: pulseRipple 1.5s infinite;
}

@keyframes pulseRipple {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 15px rgba(14, 165, 233, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); }
}

.river-hotspot.collected {
  display: none;
}

/* MISSION 3: CHEMISTRY LAB */
.chem-lab-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.chem-card {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 20px;
  padding: 20px;
}

.chem-card h3 {
  margin-top: 0;
  color: #0f172a;
}

.chem-card input[type="range"] {
  width: 100%;
  accent-color: var(--water-blue);
  margin: 14px 0;
}

.status-box {
  border-radius: 16px;
  padding: 16px;
  margin-top: 18px;
  font-weight: 600;
}

.status-box.polluted {
  background: #fef2f2;
  border: 2px solid #fca5a5;
  color: #991b1b;
}

.status-box.clean {
  background: #f0fdf4;
  border: 2px solid #86efac;
  color: #166534;
}

/* MISSION 4: FILTRATION */
.filter-controls-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.slider-group label {
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
}

.slider-group input[type="range"] {
  width: 100%;
  accent-color: var(--water-blue);
}

.water-preview {
  padding: 16px;
  border-radius: 16px;
  margin-top: 18px;
  font-weight: 700;
  text-align: center;
}

.water-preview.polluted {
  background: #fef2f2;
  color: #dc2626;
  border: 2px dashed #fca5a5;
}

.water-preview.clean {
  background: #f0fdf4;
  color: #16a34a;
  border: 2px dashed #86efac;
}

/* MISSION 5: FARM IRRIGATION */
.farm-arena {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.farm-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  width: 100%;
}

.farm-zone {
  background: #ffffff;
  border: 3px dashed #cbd5e1;
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  transition: all 0.2s ease;
}

.farm-zone.drag-over {
  border-color: var(--water-blue);
  background: #f0f9ff;
}

.farm-zone.irrigated {
  border-style: solid;
  border-color: #16a34a;
  background: #f0fdf4;
}

.zone-icon {
  font-size: 2.2rem;
  display: block;
}

.farm-zone .status-text {
  font-size: 0.88rem;
  color: #dc2626;
  font-weight: 700;
}

.farm-zone.irrigated .status-text {
  color: #16a34a;
}

#water-bucket {
  background: var(--water-blue);
  color: #ffffff;
  padding: 14px 28px;
  border-radius: 30px;
  font-weight: 700;
  cursor: grab;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
  user-select: none;
}

/* MISSION 6: STEM QUIZ */
.quiz-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.quiz-question-box {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 20px;
  padding: 20px;
}

.quiz-question-box h3 {
  font-family: 'Playfair Display', serif;
  margin-top: 0;
  color: #0f172a;
}

.quiz-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.quiz-options button {
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 600;
  text-align: left;
}

.quiz-options button.correct {
  background: #d4edda;
  border-color: #28a745;
  color: #155724;
}

.quiz-options button.incorrect {
  background: #f8d7da;
  border-color: #dc3545;
  color: #721c24;
}

.quiz-hint {
  font-weight: 700;
  margin-top: 10px;
  margin-bottom: 0;
}

/* CELEBRATION */
.celebration {
  text-align: center;
  padding: 50px 20px;
  background: #f0f9ff;
  border-radius: 32px;
  width: 88vw;
  max-width: 900px;
  margin: 0 auto;
}

.archive-box {
  background: #ffffff;
  border: 3px dashed var(--water-blue);
  border-radius: 24px;
  padding: 24px;
  max-width: 480px;
  margin: 20px auto;
}

.big-stars {
  font-size: 2.2rem;
  margin: 16px;
}

.footer-section {
  padding: 20px;
  text-align: center;
  background-color: var(--cream-bg);
  border-top: 1px solid rgba(45, 74, 39, 0.1);
}

@media (max-width: 850px) {
  .hamburger {
    display: block;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--cream-bg);
    flex-direction: column;
    padding: 20px;
    display: none;
  }
  .nav-links.open {
    display: flex;
  }
  .welcome {
    flex-direction: column;
    text-align: center;
  }
  .welcome-art {
    width: 100%;
    margin-top: 20px;
  }
  .mission-nav {
    grid-template-columns: repeat(3, 1fr);
  }
  .chem-lab-panel, .farm-grid {
    grid-template-columns: 1fr;
  }
}