/* ==========================================================================
   Site navigation — floating pill bar + full-screen mobile menu.
   Markup: includes/navbar.php. Behaviour: assets/js/navbar.js.
   ========================================================================== */

:root {
  --jh-nav-green: hsl(109, 37%, 36%);
  --jh-nav-green-deep: hsl(109, 30%, 22%);
  --jh-nav-ink: #1f2a1c;
  --jh-nav-top: 16px;
  --jh-nav-ease: cubic-bezier(.22, 1, .36, 1);
  /* space the page leaves above its first section (set exactly by navbar.js) */
  --jh-nav-space: 96px;
}

.jh-nav *, .jh-nav-menu, .jh-nav-menu * { box-sizing: border-box; }

.jh-nav {
  position: fixed; top: var(--jh-nav-top); left: 0; right: 0; z-index: 1000;
  display: flex; justify-content: center;
  padding: 0 16px;
  pointer-events: none;
  font-family: var(--body-font-font-family, "adelle-sans"), "Helvetica Neue", Arial, sans-serif;
}
.jh-nav__bar {
  pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  width: 100%; max-width: 980px;
  padding: 10px 10px 10px 24px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(31, 42, 28, .12), 0 1px 3px rgba(31, 42, 28, .08);
  animation: jh-nav-in .6s var(--jh-nav-ease) both;
}
@keyframes jh-nav-in { from { opacity: 0; transform: translateY(-12px) scale(.97); } }

.jh-nav__logo { display: block; flex: none; line-height: 0; transition: transform .3s var(--jh-nav-ease); }
.jh-nav__logo img { height: 38px; width: auto; animation: jh-nav-logo .5s var(--jh-nav-ease) both; }
.jh-nav__logo:hover { transform: scale(1.04) rotate(-1.5deg); }
@keyframes jh-nav-logo { from { transform: scale(.8); } }

.jh-nav__links { display: flex; align-items: center; gap: clamp(20px, 3vw, 36px); }
.jh-nav__link {
  position: relative;
  font-size: 15px; font-weight: 500; letter-spacing: .01em;
  color: var(--jh-nav-ink) !important; text-decoration: none !important;
  padding: 6px 0;
  transition: color .25s ease, transform .25s var(--jh-nav-ease);
  animation: jh-nav-link .35s ease both;
  animation-delay: calc(var(--i, 0) * 60ms + 150ms);
}
@keyframes jh-nav-link { from { opacity: 0; transform: translateY(-10px); } }
.jh-nav__link:hover { color: var(--jh-nav-green) !important; transform: scale(1.05); }
.jh-nav__link::after {
  content: ""; position: absolute; left: 50%; bottom: -2px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--jh-nav-green);
  transform: translateX(-50%) scale(0);
  transition: transform .3s var(--jh-nav-ease);
}
.jh-nav__link.is-active { color: var(--jh-nav-green) !important; font-weight: 600; }
.jh-nav__link.is-active::after { transform: translateX(-50%) scale(1); }

.jh-nav__cta {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  min-height: 46px; padding: 0 24px;
  border-radius: 999px;
  background: var(--jh-nav-green); color: #fff !important;
  font-size: 15px; font-weight: 600; letter-spacing: .02em;
  text-decoration: none !important;
  transition: background-color .25s ease, transform .25s var(--jh-nav-ease);
  animation: jh-nav-link .35s ease both; animation-delay: 420ms;
}
.jh-nav__cta:hover { background: var(--jh-nav-green-deep); transform: scale(1.05); }
.jh-nav__cta.is-active { background: var(--jh-nav-green-deep); }

.jh-nav__toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 46px; height: 46px; margin: 0; padding: 0;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--jh-nav-ink);
  cursor: pointer;
  transition: transform .2s ease, background-color .2s ease;
}
.jh-nav__toggle:hover { background: rgba(31, 42, 28, .06); }
.jh-nav__toggle:active { transform: scale(.9); }

.jh-nav a:focus-visible, .jh-nav button:focus-visible,
.jh-nav-menu a:focus-visible, .jh-nav-menu button:focus-visible {
  outline: 3px solid var(--jh-nav-green); outline-offset: 3px;
}

/* ---------- small screens: menu button + full-screen panel ---------- */
@media (max-width: 880px) {
  .jh-nav__links, .jh-nav__bar > .jh-nav__cta { display: none; }
  .jh-nav__toggle { display: inline-flex; }
  .jh-nav__bar { padding: 8px 8px 8px 20px; }
  .jh-nav__logo img { height: 34px; }
}

.jh-nav-menu {
  position: fixed; inset: 0; z-index: 1100;
  background: #fff;
  padding: 104px 28px 40px;
  overflow-x: hidden; overflow-y: auto;
  font-family: var(--body-font-font-family, "adelle-sans"), "Helvetica Neue", Arial, sans-serif;
  opacity: 0; visibility: hidden;
  transform: translateX(100%);
  transition: transform .55s cubic-bezier(.2, 1.15, .4, 1), opacity .3s ease, visibility 0s linear .55s;
}
.jh-nav-menu.is-open {
  opacity: 1; visibility: visible; transform: none;
  transition: transform .55s cubic-bezier(.2, 1.15, .4, 1), opacity .3s ease, visibility 0s;
}
.jh-nav-menu__logo { position: absolute; top: 30px; left: 28px; display: block; line-height: 0; }
.jh-nav-menu__logo img { width: 170px; max-width: calc(100vw - 130px); height: auto; }
.jh-nav-menu__close {
  position: absolute; top: 24px; right: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; padding: 0; margin: 0;
  border: 0; border-radius: 50%; background: rgba(31, 42, 28, .06); color: var(--jh-nav-ink);
  cursor: pointer; transition: transform .2s ease;
}
.jh-nav-menu__close:active { transform: scale(.9); }
.jh-nav-menu__links { display: flex; flex-direction: column; gap: 6px; max-width: 520px; }
.jh-nav-menu__link, .jh-nav-menu__actions {
  opacity: 0; transform: translateX(20px);
  transition: opacity .35s ease, transform .45s var(--jh-nav-ease);
}
.jh-nav-menu.is-open .jh-nav-menu__link,
.jh-nav-menu.is-open .jh-nav-menu__actions {
  opacity: 1; transform: none;
  transition-delay: calc(var(--i, 0) * 70ms + 120ms);
}
.jh-nav-menu__link {
  display: block; padding: 12px 0;
  font-family: var(--heading-font-font-family, "Cormorant Garamond"), Georgia, serif;
  font-size: 34px; font-weight: 700; line-height: 1.1;
  color: var(--jh-nav-ink) !important; text-decoration: none !important;
  border-bottom: 1px solid rgba(31, 42, 28, .08);
}
.jh-nav-menu__link.is-active { color: var(--jh-nav-green) !important; }
.jh-nav-menu__actions { display: grid; gap: 14px; margin-top: 28px; }
.jh-nav__cta--block { width: 100%; min-height: 56px; font-size: 17px; animation: none; }
.jh-nav-menu__call {
  display: flex; align-items: center; justify-content: center;
  min-height: 56px; border-radius: 999px;
  border: 2px solid var(--jh-nav-green);
  color: var(--jh-nav-green) !important; font-size: 17px; font-weight: 600;
  text-decoration: none !important;
}
html.jh-nav-locked { overflow: hidden; }

/* ---------- page offset: content starts below the floating bar ---------- */
#page { padding-top: var(--jh-nav-space); }
#page:has(.jh-home) { padding-top: 0; }   /* the home hero runs under the bar */

@media (prefers-reduced-motion: reduce) {
  .jh-nav__bar, .jh-nav__logo img, .jh-nav__link, .jh-nav__cta { animation: none; }
  .jh-nav-menu, .jh-nav-menu.is-open, .jh-nav-menu__link, .jh-nav-menu__actions { transition: none; }
}
