@font-face {
  font-family: "Golden";
  src: url("./assets/fonts/Golden.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ── Shared navigation + footer ─────────────────────────────── */

.top-nav {
  position: sticky;
  top: 0;
  z-index: 52; /* must exceed nav-overlay (48) so the nav panel (inside this stacking context) stays visible */
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 0.25rem 1.5rem;
  background: rgba(245, 237, 224, 0.96);
  border-bottom: 1px solid rgba(101, 67, 33, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  min-height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo img {
  height: 60px;
  width: auto;
  display: block;
}

@media (min-width: 861px) {
  .logo img {
    height: 80px;
  }
}

.top-nav nav {
  display: flex;
  gap: 0.2rem;
  margin-left: auto;
  align-items: center;
}

.nav-toggle {
  display: none;
}

.top-nav nav a {
  text-decoration: none;
  color: #6e4e3a;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 2rem;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.top-nav nav a:hover {
  background: rgba(139, 90, 43, 0.1);
  color: #3d2b1f;
}

.top-nav nav a.active {
  background: #3d2b1f;
  color: #f5ede0;
}

/* ── Footer ──────────────────────────────────────────────────── */

.site-footer {
  background: #44030F;
  color: #f5ede0;
  padding: 3rem 6% 1.8rem;
  /* Must sit above the hero-float (z-20) so the footer slides over the
     locked 3D asset as the user scrolls into it, hiding it cleanly. */
  position: relative;
  z-index: 25;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 3rem;
  margin-bottom: 1.8rem;
}

.footer-logo-wrap {
  flex: none;
}

.footer-logo-wrap img {
  max-width: 340px;
  width: 100%;
  height: auto;
  display: block;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex-shrink: 0;
}

.footer-links-label {
  margin: 0 0 0.6rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 237, 224, 0.38);
}

.footer-links a {
  text-decoration: none;
  color: rgba(245, 237, 224, 0.62);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.18s ease;
}

.footer-links a:hover {
  color: #f5ede0;
}

.footer-bottom {
  padding-top: 1.2rem;
  border-top: 1px solid rgba(245, 237, 224, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.75rem;
  color: rgba(245, 237, 224, 0.4);
}

/* ── Mobile nav ──────────────────────────────────────────────── */

/* Overlay backdrop — created by JS, styled here */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(61, 43, 31, 0.45);
  z-index: 48;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  display: none;
}
.nav-overlay.is-open {
  opacity: 1;
  pointer-events: all;
  display: block;
}

@media (max-width: 860px) {
  .top-nav {
    position: relative;
    justify-content: space-between;
    padding: 0.25rem 1rem;
    flex-wrap: nowrap;
  }

  /* ── Sidebar nav — full-height drawer ── */
  .top-nav nav {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    height: 100dvh;
    width: min(82vw, 300px);
    margin-left: 0;
    /* top padding clears the burger button; justify links with generous breathing room */
    padding: 5rem 2rem 2.5rem;
    background: #f5ede0;
    border: none;
    border-left: 2px solid rgba(101, 67, 33, 0.1);
    border-radius: 0;
    box-shadow: -8px 0 40px rgba(61, 43, 31, 0.22);
    z-index: 50;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.32, 0, 0.67, 0);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .top-nav.menu-open nav {
    transform: translateX(0);
    transition-timing-function: cubic-bezier(0.33, 1, 0.68, 1);
  }

  .top-nav nav a {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 1rem 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #5c3d2e;
    border-radius: 0;
    border-bottom: 1px solid rgba(101, 67, 33, 0.12);
    white-space: normal;           /* allow wrap on very narrow phones */
    justify-content: flex-start;
  }

  .top-nav nav a:last-child { border-bottom: none; }
  .top-nav nav a:hover { color: #3d2b1f; }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(101, 67, 33, 0.22);
    background: rgba(245, 237, 224, 0.9);
    padding: 0 11px;
    cursor: pointer;
    flex-shrink: 0;
  }

  .nav-toggle span {
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: #6e4e3a;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .top-nav.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .top-nav.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .top-nav.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .site-footer {
    padding: 2.5rem 5% 1.5rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    text-align: center;
  }

  .footer-logo-wrap {
    flex: none;
    display: flex;
    justify-content: center;
  }

  .footer-logo-wrap img {
    max-width: 260px;
  }

  .footer-links-label {
    display: none;
  }

  .footer-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.35rem 1rem;
    padding-left: 0;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .site-footer {
    padding: 2rem 4% 1.2rem;
  }

  .footer-logo-wrap img {
    max-width: 220px;
  }
}
