/* ═══════════════════════════════════════════════════════════════
   BELAKOO TRUST — Design System v3.0
   Behance Case Study / Bento Box / Editorial
   ═══════════════════════════════════════════════════════════════ */

/* ─── BRAND TOKENS ────────────────────────────────────────────── */
:root {
  /* Warm Cream Palette — NO pure white */
  --bg:             #F9F8F6;
  --bg-warm:        #F5F2ED;
  --bg-card:        #FFFFFF;
  --bg-glass:       rgba(255, 255, 255, 0.85); /* Reduced transparency for cleaner look */
  --bg-glass-dark:  rgba(26, 26, 46, 0.90);

  /* Primary */
  --orange:         #F58220;
  --orange-dark:    #D96E10;
  --orange-light:   rgba(245, 130, 32, 0.08);
  --orange-glow:    rgba(245, 130, 32, 0.12);

  /* Deep palette */
  --navy:           #1A1A2E;
  --navy-mid:       #252545;
  --navy-light:     #2D2D52;
  --text:           #1A1A2E;
  --text-mid:       #4A4A68;
  --text-light:     #8A8AAA;

  /* Accent */
  --cream:          #F5F0E8;
  --border:         rgba(26, 26, 46, 0.08);
  --border-card:    rgba(26, 26, 46, 0.06);
  --white:          #FFFFFF;

  /* Squircle Radiuses */
  --r-xs:           12px;
  --r-sm:           16px;
  --r:              24px;
  --r-lg:           32px;
  --r-xl:           40px;
  --r-pill:         100px;

  /* Spacing */
  --sp-2:  8px;  --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
  --sp-6: 24px;  --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;
  --sp-16: 64px; --sp-20: 80px; --sp-24: 96px;

  /* Transitions */
  --ease:   cubic-bezier(0.4, 0, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --trans:      all 0.35s var(--ease);
  --trans-fast: all 0.2s var(--ease);

  /* Glassmorphism */
  --glass-blur: blur(24px);
  --glass-border: rgba(255, 255, 255, 0.25);

  /* Layout */
  --container: 1200px;
  --nav-h: 72px;
  --gap: 40px;
}

/* ─── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}
.page-wrapper {
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; cursor: pointer; }
ul, ol { list-style: none; }
::selection { background: var(--orange); color: var(--white); }

/* ─── TYPOGRAPHY ─────────────────────────────────────────────── */
.h-display {
  font-weight: 800;
  font-size: clamp(2.8rem, 5.5vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  color: var(--navy);
}
.h-section {
  font-weight: 800;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--navy);
}
.h-sub {
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--navy);
}
.h-card {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--navy);
}
.body-lg {
  font-size: 1.1rem;
  line-height: 1.9;
  color: var(--text-mid);
  font-weight: 400;
}
.body-md {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-mid);
}
.body-sm {
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--text-light);
}
.accent { color: var(--orange); }
.label {
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.label::before {
  content: '';
  width: 20px; height: 2px;
  background: var(--orange);
  border-radius: 2px;
}
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ─── LAYOUT ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  position: relative;
}

/* ─── LANGUAGE TOGGLE SWITCH ─────────────────────────────────── */
.lang-toggle {
  position: fixed;
  bottom: 28px; right: 28px;
  display: flex; align-items: center; gap: 0;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(245,130,32,0.3);
  border-radius: var(--r-pill);
  padding: 4px;
  z-index: 100;
  box-shadow: 0 8px 32px rgba(26,26,46,0.1), 0 2px 8px rgba(245,130,32,0.08);
  cursor: pointer;
  transition: var(--trans);
  user-select: none;
}
.lang-toggle:hover {
  box-shadow: 0 12px 40px rgba(245,130,32,0.2);
  transform: translateY(-2px);
  border-color: rgba(245,130,32,0.5);
}
.lang-toggle__option {
  padding: 8px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: var(--r-pill);
  transition: all 0.3s var(--ease);
  color: var(--text-mid);
  position: relative;
  z-index: 2;
  line-height: 1;
  white-space: nowrap;
}
.lang-toggle__option.active {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(245,130,32,0.3);
}

/* ─── KANNADA MODE — Typography Overrides ────────────────────── */
body.kannada-mode {
  word-spacing: 0.05em;
}
body.kannada-mode .hero-heading,
body.kannada-mode .h-display,
body.kannada-mode .h-section {
  line-height: 1.25;
  letter-spacing: 0;
  word-spacing: 0.06em;
}
body.kannada-mode .h-card,
body.kannada-mode .h-sub {
  line-height: 1.45;
  letter-spacing: 0;
}
body.kannada-mode .body-lg,
body.kannada-mode .body-md,
body.kannada-mode .body-sm,
body.kannada-mode p {
  line-height: 1.9;
  letter-spacing: 0.01em;
  word-spacing: 0.04em;
}
body.kannada-mode .hero-desc {
  line-height: 1.85;
}
body.kannada-mode .nav-link,
body.kannada-mode .btn {
  letter-spacing: 0.02em;
  word-spacing: 0.03em;
}
body.kannada-mode .stat-label,
body.kannada-mode .label {
  letter-spacing: 0.06em;
}
body.kannada-mode .fw-desc {
  line-height: 1.6;
}

/* ─── UTILITIES ──────────────────────────────────────────────── */
.text-center { text-align: center; }
.mt-12 { margin-top: 12px; }
.mt-24 { margin-top: 24px; }
.mt-48 { margin-top: 48px; }
.mt-64 { margin-top: 64px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }
.mb-64 { margin-bottom: 64px; }

/* ─── BUTTONS — Heavy squircle radius ────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 28px;
  border-radius: var(--r-pill);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: none;
  transition: var(--trans);
  position: relative;
}
.btn-primary {
  background: var(--orange);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--orange-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(245, 130, 32, 0.3);
}
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
}
.btn-ghost:hover {
  background: var(--navy);
  color: var(--white);
}
.btn-navy {
  background: var(--navy);
  color: var(--white);
}
.btn-navy:hover {
  background: var(--navy-mid);
  transform: translateY(-2px);
}
.btn-outline-white {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.3);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.6);
}

/* ─── SCROLL REVEALS ─────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.d1 { transition-delay: 0.08s; }
.d2 { transition-delay: 0.16s; }
.d3 { transition-delay: 0.24s; }
.d4 { transition-delay: 0.32s; }
.d5 { transition-delay: 0.40s; }
.d6 { transition-delay: 0.48s; }

/* ─── LOADING SCREEN ─────────────────────────────────────────── */
#loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  transition: opacity 0.6s var(--ease);
}
#loader.hidden { opacity: 0; pointer-events: none; }
#loader .loader-logo { width: 80px; height: 80px; opacity: 0; transform: scale(0.7); }
#loader .loader-text {
  font-weight: 800; font-size: 1.4rem; color: var(--white);
  margin-top: 16px; opacity: 0; letter-spacing: 0.1em;
}
#loader .loader-tagline {
  font-size: 0.8rem; color: rgba(255,255,255,0.35);
  margin-top: 6px; opacity: 0;
}
#loader .loader-bar {
  width: 100px; height: 3px; background: rgba(255,255,255,0.08);
  border-radius: 3px; margin-top: 28px; overflow: hidden; opacity: 0;
}
#loader .loader-bar-fill {
  width: 0%; height: 100%; background: var(--orange);
  border-radius: 3px; transition: width 1.2s var(--ease);
}

/* ─── NAVIGATION — Glassmorphic floating pill ────────────────── */
.nav {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 1000;
  width: calc(100% - 48px);
  max-width: var(--container);
  height: 56px;
  background: var(--bg-glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: none;
  border-radius: var(--r-pill);
  display: flex;
  align-items: center;
  padding: 0 8px 0 20px;
  transition: var(--trans);
  /* Added depth request */
  box-shadow: 0 8px 32px rgba(26, 26, 46, 0.08), 0 2px 12px rgba(245, 130, 32, 0.06);
}
.nav::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-pill);
  padding: 1.5px;
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(245,130,32,0.5), rgba(255,255,255,0.4));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.nav--solid {
  background: rgba(253, 252, 250, 0.95);
  box-shadow: 0 4px 24px rgba(26, 26, 46, 0.08), 0 2px 8px rgba(245, 130, 32, 0.1);
}
.nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; height: 40px;
}
.nav-logo img { height: 36px; width: auto; }
.nav-logo span {
  font-weight: 800; font-size: 1rem; color: var(--navy);
  letter-spacing: -0.01em;
}
.nav-links {
  display: flex; align-items: center; gap: 4px;
  position: absolute; left: 50%; transform: translateX(-50%);
}
.nav-link {
  font-size: 0.78rem; font-weight: 600; color: var(--text-mid);
  padding: 8px 16px; border-radius: var(--r-pill);
  transition: var(--trans-fast); cursor: pointer;
  border: 1.5px solid transparent; /* layout stability */
  display: inline-block;
}
.nav-link:hover, .nav-link.active, .nav-dropdown:hover .nav-link {
  color: var(--navy); 
  background: rgba(245, 130, 32, 0.08); /* Soft orange fill */
  border: 1.5px solid rgba(245, 130, 32, 0.6); /* Outlined with orange */
}

/* Dropdown (Desktop) */
.nav-dropdown {
  position: relative;
  display: inline-block;
  padding-bottom: 30px;
  margin-bottom: -30px;
}
.dropdown-content {
  opacity: 0; visibility: hidden; pointer-events: none;
  position: absolute;
  top: calc(100% - 6px); left: 50%; transform: translateX(-50%) translateY(4px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(245, 130, 32, 0.2);
  border-radius: var(--r-lg);
  padding: 12px;
  min-width: 220px;
  box-shadow: 0 16px 40px rgba(26,26,46,0.12), 0 4px 12px rgba(245,130,32,0.05);
  transition: opacity 0.25s var(--ease), visibility 0.25s var(--ease), transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex; flex-direction: column; gap: 4px; z-index: 100;
}
/* Invisible bridge to prevent gap between trigger and dropdown */
.dropdown-content::before {
  content: '';
  position: absolute;
  top: -20px; left: 0; right: 0;
  height: 20px;
  background: transparent;
}
.nav-dropdown:hover .dropdown-content {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0px);
}
.dropdown-content a {
  font-size: 0.82rem; font-weight: 600; color: var(--text-mid);
  padding: 10px 16px; border-radius: var(--r-sm);
  transition: var(--trans-fast); cursor: pointer;
  text-align: left;
}
.dropdown-content a:hover {
  background: var(--orange-light); color: var(--navy);
  transform: translateX(4px);
}
.nav-cta {
  background: var(--orange) !important;
  color: var(--white) !important;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: var(--r-pill);
  margin-left: 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.nav-cta:hover { background: var(--orange-dark) !important; transform: scale(1.02); }
.cta-donate {
  box-shadow: 0 4px 16px rgba(245, 130, 32, 0.3);
}

/* Hamburger */
.nav-hamburger {
  display: none; cursor: pointer; padding: 8px;
  background: var(--navy); border-radius: var(--r-xs);
  width: 40px; height: 40px;
  flex-direction: column; gap: 4px;
  align-items: center; justify-content: center;
}
.nav-hamburger span {
  display: block; width: 18px; height: 2px;
  background: var(--white); border-radius: 2px;
  transition: var(--trans-fast);
}
.mobile-nav {
  display: none; position: fixed;
  top: 80px; left: 24px; right: 24px;
  background: var(--bg-glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  padding: 12px;
  z-index: 999;
  flex-direction: column; gap: 2px;
  box-shadow: 0 16px 48px rgba(26,26,46,0.1);
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.mobile-nav.open { display: flex; }
.mobile-nav-inner {
  display: flex; flex-direction: column; gap: 2px;
}
.mobile-nav a, .mobile-dropdown-btn {
  padding: 14px 16px; font-size: 0.88rem; font-weight: 600;
  color: var(--navy); border-radius: var(--r-sm);
  transition: var(--trans-fast); cursor: pointer; display: block;
}
.mobile-nav a:hover, .mobile-dropdown-btn:hover { background: var(--orange-light); color: var(--orange); }

/* Mobile Dropdown */
.mobile-dropdown-content {
  display: none; flex-direction: column; padding-left: 16px; border-left: 2px solid var(--border); margin-left: 16px; margin-bottom: 8px;
}
.mobile-dropdown.open .mobile-dropdown-content { display: flex; }
.mobile-dropdown.open .mobile-dropdown-btn { color: var(--orange); font-weight: 700; }
.mobile-dropdown-content a { padding: 10px 16px; font-size: 0.82rem; }

/* Mobile Donate CTA */
.cta-donate-m {
  background: linear-gradient(135deg, var(--orange), #E06B20) !important;
  color: var(--white) !important;
  text-align: center; margin-top: 12px; padding: 16px !important;
  border-radius: var(--r-lg) !important; box-shadow: 0 4px 16px rgba(245, 130, 32, 0.3);
}

/* ─── PAGES ──────────────────────────────────────────────────── */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.page { display: none; flex-grow: 1; }
.page.active { display: block; }

/* ─── FOOTER ─────────────────────────────────────────────────── */
.footer {
  background: var(--navy);
  padding: 72px 5% 36px;
}
.footer-inner { max-width: var(--container); margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255, 0.06);
}
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-logo img { height: 36px; width: auto; }
.footer-logo span { font-weight: 800; font-size: 1rem; color: var(--white); }
.footer-tagline {
  font-size: 0.82rem; color: rgba(255,255,255,0.4);
  line-height: 1.7; max-width: 260px;
}
.footer-social { display: flex; gap: 8px; margin-top: 18px; }
.social-btn {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; transition: var(--trans-fast);
  color: var(--orange); /* Fix for invisible SVG icons */
}
.social-btn:hover { background: rgba(245,130,32,0.15); border-color: rgba(245,130,32,0.4); transform: translateY(-2px); }
.footer-col h4 {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.5); margin-bottom: 18px;
}
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  font-size: 0.85rem; color: rgba(255,255,255,0.55);
  transition: var(--trans-fast);
}
.footer-links a:hover { color: var(--orange); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px; flex-wrap: wrap; gap: 12px;
}
.footer-bottom span { font-size: 0.75rem; color: rgba(255,255,255,0.25); }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { font-size: 0.75rem; color: rgba(255,255,255,0.25); transition: var(--trans-fast); }
.footer-bottom-links a:hover { color: rgba(255,255,255,0.5); }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .nav-links { display: none; }
  
  .nav-right {
    display: flex;
    align-items: center;
    background: var(--orange);
    border-radius: 100px; /* Pill shape */
    padding: 6px 6px 6px 18px;
    box-shadow: 0 4px 12px rgba(245, 130, 32, 0.2);
  }
  
  .nav-cta {
    background: transparent !important;
    color: var(--white) !important;
    padding: 0;
    margin: 0 12px 0 0;
    box-shadow: none !important;
  }
  
  .nav-hamburger {
    display: flex;
    background: rgba(255, 255, 255, 0.2) !important; /* Stand out slightly inside orange pill */
    border-radius: 50% !important; /* perfectly round */
    width: 40px; height: 40px;
  }
}
@media (max-width: 768px) {
  .nav { width: calc(100% - 32px); top: 12px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .nav-cta { display: none; } /* On extremely small phones, just show hamburger */
  .nav-right { padding: 4px; }
}

/* ═══════════════════════════════════════════════════════════════
   GLOBAL RESPONSIVENESS & OVERFLOW CONTAINMENT
   ═══════════════════════════════════════════════════════════════ */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
  position: relative;
}

#pageWrapper {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
}

.page {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
}

*, *::before, *::after {
  box-sizing: border-box !important;
}

img, video, iframe {
  max-width: 100% !important;
  height: auto;
}

@media (max-width: 768px) {
  .container {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .h-section {
    font-size: 1.8rem !important;
  }
  .h-hero {
    font-size: 2.1rem !important;
  }
}


/* ─── KEYBOARD ACCESS ────────────────────────────────────────── */
.nav-dropdown:focus-within .dropdown-content {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0px);
}
a:focus-visible, button:focus-visible, [role="button"]:focus-visible,
[role="link"]:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

/* ─── MOBILE: language toggle sits in the nav bar, not over content ─ */
@media (max-width: 768px) {
  .lang-toggle {
    top: 27px; bottom: auto; right: 82px;
    z-index: 1001;
    padding: 3px;
    box-shadow: none;
  }
  .lang-toggle:hover { transform: none; }
  .lang-toggle__option { padding: 7px 11px; font-size: 0.72rem; }
}
