/* Shared header / footer nav for the memorial. */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--sisi-header-h, 56px);
  padding: 0.7rem clamp(16px, 6vw, 56px);
  background: rgba(255, 250, 240, 0.82);
  backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: 1px solid rgba(199, 154, 85, 0.32);
  font-family: var(--serif-stack);
}
/* Hidden over the home hero until the visitor scrolls. */
.headerHidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .header {
    transition: transform 0.32s ease, opacity 0.32s ease;
  }
}
/* Reserves the fixed bar's height on pages that always show it (everything but home). */
.headerSpacer {
  height: var(--sisi-header-h, 56px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--garnet);
  white-space: nowrap;
}
.brandName {
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 500;
  letter-spacing: 0.3px;
}
.brandYears {
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--gold);
  text-transform: uppercase;
}

/* desktop links */
.links {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.6vw, 1.4rem);
}
.link {
  position: relative;
  text-decoration: none;
  color: #6b4a3a;
  font-size: clamp(15px, 1.5vw, 18px);
  padding: 0.2em 0;
  transition: color 0.18s ease;
  white-space: nowrap;
}
.link:hover { color: var(--garnet-bright); }
.link[data-active="true"] { color: var(--garnet); }
.link[data-active="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.right {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

/* language toggle */
.langToggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(199, 154, 85, 0.5);
  background: rgba(255, 248, 232, 0.6);
  transition: opacity 0.18s ease;
}
.langToggle[data-pending="true"] { opacity: 0.55; }
.langGlobe {
  display: inline-flex;
  align-items: center;
  color: var(--gold);
  margin-right: 0.1rem;
}
.langBtn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0.1em 0.25em;
  transition: color 0.15s ease;
}
.langBtn[data-active="true"] { color: var(--garnet); font-weight: 700; }
.langSep { color: var(--gold); }
/* Spell out the languages where there's room; fall back to ES/EN on phones. */
.langShort { display: none; }
@media (max-width: 860px) {
  .langFull { display: none; }
  .langShort { display: inline; }
}

/* mobile hamburger — solid garnet pill so it's unmistakable over the hero photo */
.menuBtn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 40px;
  padding: 0 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 245, 235, 0.28);
  background: linear-gradient(180deg, var(--garnet-bright), var(--garnet));
  color: #fff7e8;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(122, 22, 32, 0.42);
}
.menuBtn svg { display: block; }
.menuLabel {
  font-family: var(--serif-stack);
  font-size: 15px;
  letter-spacing: 0.08em;
  font-weight: 500;
  line-height: 1;
}

/* mobile bottom nav — a swipe-scroll strip of all links (phones only) */
.bottomBar {
  display: none;
}
.bottomScroll {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 0.4rem 0.7rem calc(0.4rem + env(safe-area-inset-bottom));
}
.bottomScroll::-webkit-scrollbar { display: none; }
.bottomLink {
  flex: 0 0 auto;
  text-decoration: none;
  color: #6b4a3a;
  font-family: var(--serif-stack);
  font-size: 15px;
  white-space: nowrap;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  transition: color 0.18s ease, background 0.18s ease;
}
.bottomLink[data-active="true"] {
  color: var(--garnet);
  background: rgba(199, 154, 85, 0.16);
  font-weight: 600;
}

/* mobile drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: radial-gradient(120% 95% at 50% 8%, #fffdf8, #f3e4c6 70%, #e6d2b8);
  display: flex;
  flex-direction: column;
  padding: 1.2rem clamp(20px, 8vw, 56px) 2.4rem;
  animation: drawerIn 0.28s ease;
}
@keyframes drawerIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.drawerTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.6rem;
}
.drawerLinks {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.drawerLink {
  text-decoration: none;
  color: var(--garnet);
  font-size: clamp(26px, 7vw, 38px);
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(199, 154, 85, 0.22);
}
.drawerLink[data-active="true"] { color: var(--garnet-bright); font-style: italic; }
.drawerCta { margin-top: 1.8rem; }

@media (max-width: 860px) {
  .links { display: none; }
  /* Top bar (brand + language toggle) stays visible on phones, even over the
     home hero, so the language switch is always reachable up top. */
  .headerHidden {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  /* The nav links live in a fixed swipe-scroll strip at the BOTTOM on phones. */
  .bottomBar {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    background: rgba(255, 250, 240, 0.94);
    backdrop-filter: blur(10px) saturate(1.1);
    border-top: 1px solid rgba(199, 154, 85, 0.34);
    box-shadow: 0 -2px 14px rgba(120, 78, 40, 0.12);
  }
  /* Reserve space so the fixed bottom strip never covers the footer. */
  .footer { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
}

/* ── Footer ──────────────────────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 2;
  margin-top: clamp(40px, 8vh, 90px);
  padding: clamp(40px, 7vh, 80px) clamp(16px, 6vw, 56px) clamp(32px, 5vh, 56px);
  text-align: center;
  border-top: 1px solid rgba(199, 154, 85, 0.32);
  background: rgba(255, 250, 240, 0.5);
}
.footerNav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.3rem;
  margin: 1.4rem 0;
}
.footerNav a {
  text-decoration: none;
  color: #6b4a3a;
  font-size: 16px;
}
.footerNav a:hover { color: var(--garnet-bright); }
.footerName { font-size: clamp(22px, 3vw, 30px); color: var(--garnet); }
.footerGrace { font-style: italic; color: var(--garnet-bright); margin-top: 0.4rem; }
.footerFarewell { color: var(--muted); margin-top: 0.8rem; letter-spacing: 0.06em; }
.footerMade { color: var(--gold); font-size: 14px; margin-top: 1.6rem; letter-spacing: 0.04em; }
