/* ═══════════════════════════════════════════════
   style.css — Prisha's World · Design System
   ═══════════════════════════════════════════════ */

/* ── Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Playfair+Display:ital,wght@0,700;1,700&display=swap');

/* ── Tokens ── */
:root {
  --green-900: #1a3d28;
  --green-800: #2d5a3d;
  --green-700: #3d6b4a;
  --green-500: #4fa060;
  --green-300: #8ec9a0;
  --green-100: #d4edda;
  --green-50:  #f0f9f2;

  --amber-500: #f59e0b;
  --amber-200: #fde68a;

  --bg-page:   #faf7f2;
  --bg-card:   rgba(255,255,255,0.88);
  --bg-glass:  rgba(255,255,255,0.55);

  --shadow-card:  0 4px 24px rgba(45,90,61,0.10), 0 1px 4px rgba(45,90,61,0.07);
  --shadow-hover: 0 8px 40px rgba(45,90,61,0.15), 0 2px 8px rgba(45,90,61,0.10);

  --radius-sm:  10px;
  --radius-md:  18px;
  --radius-lg:  28px;
  --radius-xl:  36px;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Nunito', system-ui, sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-page);
  background-image:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(78,160,100,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(78,160,100,0.08) 0%, transparent 50%);
  min-height: 100vh;
  padding-bottom: 80px;
  color: var(--green-900);
}

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 52px 24px 16px;
  position: relative;
}

.hero-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 8px;
  animation: floatIcon 4s ease-in-out infinite;
}

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

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  font-style: italic;
  font-weight: 700;
  color: var(--green-800);
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.hero h1 span {
  color: var(--green-500);
  font-style: normal;
}

.hero-sub {
  font-size: 1rem;
  color: var(--green-300);
  margin-top: 8px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ── Stats Bar ── */
.stats-bar {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 480px;
  margin: 28px auto 0;
  padding: 0 20px;
}

.stat-pill {
  background: var(--bg-card);
  border: 1.5px solid rgba(78,160,100,0.18);
  border-radius: var(--radius-xl);
  padding: 14px 22px;
  text-align: center;
  flex: 1;
  min-width: 100px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-pill:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.stat-value {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--green-700);
  line-height: 1;
}

.stat-label {
  font-size: 0.65rem;
  color: var(--green-300);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 4px;
}

/* ── Sections ── */
.section {
  max-width: 920px;
  margin: 36px auto;
  padding: 0 22px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.section-icon {
  width: 36px; height: 36px;
  background: var(--green-100);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--green-700);
}

/* ── Card ── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 26px;
  border: 1.5px solid rgba(78,160,100,0.14);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(8px);
}

/* ── Age Badge ── */
.age-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 14px;
  margin-bottom: 13px;
  border: 1px solid rgba(245,158,11,0.3);
}

/* ── Tree Canvas ── */
#treeCanvas {
  display: block;
  width: 100%;
  height: 480px;
  border-radius: var(--radius-md);
  background: transparent;
}

/* ── Legend ── */
.tree-legend {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 14px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--green-700);
  font-weight: 600;
}

.legend-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Map ── */
.map-outer {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.map-hint {
  font-size: 0.8rem;
  color: var(--green-300);
  margin-bottom: 13px;
  font-weight: 600;
}

.map-tooltip {
  position: absolute;
  background: var(--green-800);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  pointer-events: none;
  white-space: nowrap;
  display: none;
  z-index: 30;
  transform: translateX(-50%);
  font-family: var(--font-body);
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}

.map-tooltip::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--green-800);
  border-bottom: 0;
}

#indiaMap {
  display: block;
  width: 100%;
  border-radius: var(--radius-md);
  filter: drop-shadow(0 4px 16px rgba(45,90,61,0.15));
}

/* Pulse animation for map pins */
@keyframes mapPulse {
  0%   { r: 7;  opacity: 0.55; }
  70%  { r: 18; opacity: 0;    }
  100% { r: 7;  opacity: 0;    }
}

.map-pulse { animation: mapPulse 2.6s infinite ease-out; }

/* ── Place Chips ── */
.place-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
}

.chip {
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 5px 13px;
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.15s;
}

.chip:hover { transform: translateY(-1px); }

/* ── Footer ── */
.site-footer {
  text-align: center;
  padding: 36px 20px 0;
  font-size: 0.8rem;
  color: var(--green-300);
  font-weight: 600;
}

.site-footer a {
  color: var(--green-500);
  text-decoration: none;
}

/* ── Responsive ── */
@media (max-width: 520px) {
  .card { padding: 18px; }
  .stats-bar { gap: 10px; }
  .stat-pill { padding: 12px 14px; min-width: 88px; }
  #treeCanvas { height: 360px; }
  .hero h1 { font-size: 1.8rem; }
}
