/*
=================================================================
Pham Foundation — Header & Footer
File: css/headfoot.css
-----------------------------------------------------------------
SCOPE: This file controls ONLY the site header (nav) and footer.
       Do not add body or page-content styles here.
       All page content styles belong in css/style.css.

DESIGN SYSTEM:
  Brand:   "Quiet Authority"
  Colors:  --navy-deep: #091d30 | --gold: #c59b3b | --cream: #faf7f2
  Fonts:   Cormorant Garamond (brand wordmark) | Josefin Sans (nav links)
  
NAV STRUCTURE (all 14 pages):
  Left:    "Pham Foundation" brand wordmark → index.html
  Center/Right: About · Scholarships · Stewardship · Contact
  Far Right: EN / Việt language toggle
  Mobile:  Hamburger ☰ → dropdown with all 4 links + lang toggle

FOOTER STRUCTURE (all 14 pages — Option A: minimal):
  Left:  Pham Foundation · EIN 86-1609883 · San Ramon, California · Est. 2021
  Right: Privacy Policy · Accessibility Statement · Public Filings · Family Stewardship

ACTIVE STATE: Add class="active" to the <a> matching current page.
LANGUAGE TOGGLE: Add class="active" to current language link.
=================================================================
*/

/* ── GOOGLE FONTS (header/footer only) ── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500&family=Josefin+Sans:wght@300;400;600&display=swap');

/* ── CSS VARIABLES (header/footer scope) ── */
:root {
  --hf-navy-deep:  #091d30;
  --hf-navy:       #0f2a44;
  --hf-gold:       #c59b3b;
  --hf-gold-light: #d4af5a;
  --hf-gold-pale:  #f0e0b0;
  --hf-cream:      #faf7f2;
  --hf-rule:       rgba(197,155,59,0.18);
}

/* ════════════════════════════════════════
   NAV — DESKTOP
   ════════════════════════════════════════ */

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--hf-navy-deep);
  border-bottom: 1px solid var(--hf-rule);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}

/* Brand wordmark */
.nav-brand {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--hf-gold-pale);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.2s;
}
.nav-brand:hover { color: var(--hf-gold-light); }

/* Desktop nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(240,224,176,0.5);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--hf-gold-light);
}

/* Language toggle */
.nav-lang {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}
.nav-lang a {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(197,155,59,0.4);
  text-decoration: none;
  padding: 0 10px;
  transition: color 0.2s;
}
.nav-lang a + a {
  border-left: 1px solid rgba(197,155,59,0.18);
}
.nav-lang a:hover,
.nav-lang a.active {
  color: var(--hf-gold);
}

/* Hamburger button — hidden on desktop */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--hf-gold-pale);
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Hamburger → X animation */
.nav-hamburger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ════════════════════════════════════════
   NAV — MOBILE DROPDOWN
   ════════════════════════════════════════ */

.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0;
  z-index: 199;
  background: var(--hf-navy-deep);
  border-bottom: 1px solid var(--hf-rule);
  padding: 1.5rem 2rem 2rem;
  flex-direction: column;
  gap: 0;
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}
.nav-mobile-menu.open {
  display: flex;
}
.nav-mobile-menu a {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(240,224,176,0.55);
  text-decoration: none;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(197,155,59,0.1);
  transition: color 0.2s;
}
.nav-mobile-menu a:last-of-type {
  border-bottom: none;
}
.nav-mobile-menu a:hover,
.nav-mobile-menu a.active {
  color: var(--hf-gold-light);
}

/* Mobile lang toggle inside dropdown */
.nav-mobile-lang {
  display: flex;
  gap: 0;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(197,155,59,0.15);
}
.nav-mobile-lang a {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(197,155,59,0.4);
  text-decoration: none;
  padding: 0 12px 0 0;
  border-bottom: none !important;
  transition: color 0.2s;
}
.nav-mobile-lang a + a {
  padding-left: 12px;
  border-left: 1px solid rgba(197,155,59,0.18);
}
.nav-mobile-lang a:hover,
.nav-mobile-lang a.active {
  color: var(--hf-gold);
}

/* Body offset for fixed nav */
body {
  padding-top: 64px;
}

/* ════════════════════════════════════════
   MOBILE BREAKPOINT
   ════════════════════════════════════════ */

@media (max-width: 780px) {
  .site-nav {
    padding: 0 1.5rem;
  }
  .nav-links,
  .nav-lang {
    display: none;
  }
  .nav-hamburger {
    display: flex;
  }
}

/* ════════════════════════════════════════
   FOOTER — OPTION A (minimal)
   ════════════════════════════════════════ */

.site-footer {
  background: #060e16;
  border-top: 1px solid rgba(197,155,59,0.1);
  padding: 2rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(240,224,176,0.55);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.footer-links a {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(240,224,176,0.5);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--hf-gold-light);
}

/* ── FOOTER HAMBURGER BUTTON — mobile only, hidden on desktop ── */
.footer-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
}
.footer-hamburger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: rgba(240,224,176,0.55);
  transition: all 0.3s ease;
  transform-origin: center;
}
.footer-hamburger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.footer-hamburger.open span:nth-child(2) {
  opacity: 0; transform: scaleX(0);
}
.footer-hamburger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ── FOOTER MOBILE MENU — expands upward from bottom-left ── */
.footer-mobile-menu {
  display: none;
  position: fixed;
  bottom: 56px;
  left: 0;
  z-index: 198;
  background: #060e16;
  border-top: 1px solid rgba(197,155,59,0.15);
  border-right: 1px solid rgba(197,155,59,0.1);
  padding: 1.25rem 1.75rem;
  flex-direction: column;
  gap: 0;
  min-width: 200px;
}
.footer-mobile-menu.open {
  display: flex;
}
.footer-mobile-menu a {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(240,224,176,0.55);
  text-decoration: none;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(197,155,59,0.1);
  transition: color 0.2s;
}
.footer-mobile-menu a:last-child {
  border-bottom: none;
}
.footer-mobile-menu a:hover {
  color: var(--hf-gold-light);
}

@media (max-width: 780px) {
  .site-footer {
    padding: 0.85rem 1.5rem;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 197;
  }
  .footer-brand {
    font-size: 0.58rem;
  }
  .footer-links {
    display: none;
  }
  .footer-hamburger {
    display: flex;
  }
  body {
    padding-bottom: 52px;
  }
}

/* ════════════════════════════════════════
   HAMBURGER JS — nav + footer
   Include once per page before </body>.

   <script>
   // Nav hamburger
   const navBtn = document.querySelector('.nav-hamburger');
   const navMenu = document.querySelector('.nav-mobile-menu');
   navBtn.addEventListener('click', () => {
     navBtn.classList.toggle('open');
     navMenu.classList.toggle('open');
   });
   navMenu.querySelectorAll('a').forEach(a => {
     a.addEventListener('click', () => {
       navBtn.classList.remove('open');
       navMenu.classList.remove('open');
     });
   });
   // Footer hamburger
   const footBtn = document.querySelector('.footer-hamburger');
   const footMenu = document.querySelector('.footer-mobile-menu');
   if (footBtn && footMenu) {
     footBtn.addEventListener('click', () => {
       footBtn.classList.toggle('open');
       footMenu.classList.toggle('open');
     });
     footMenu.querySelectorAll('a').forEach(a => {
       a.addEventListener('click', () => {
         footBtn.classList.remove('open');
         footMenu.classList.remove('open');
       });
     });
   }
   </script>
   ════════════════════════════════════════ */
