/* Canonical public header. This file is loaded after page CSS so every public
   page uses the exact homepage navigation geometry and interaction styling. */
.uh-public-header {
  display: block;
  padding: 0;
  align-items: initial;
  justify-content: initial;
  flex-direction: initial;
  gap: 0;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(75, 55, 40, .16);
  background: rgba(255, 249, 239, .94);
  box-shadow: 0 8px 24px rgba(75, 55, 40, .06);
  backdrop-filter: blur(16px);
}

.uh-public-header .header-inner {
  width: min(var(--max), calc(100% - 2rem));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.uh-public-header .brand {
  display: flex;
  align-items: center;
  gap: .9rem;
  min-width: 310px;
  color: var(--ink);
  text-decoration: none;
  font-family: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
}

.uh-public-header .brand-symbol {
  display: block;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  object-fit: cover;
}

.uh-public-header .brand-text strong {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.76rem;
  line-height: .95;
}

.uh-public-header .brand-text small {
  display: block;
  margin-top: .25rem;
  color: #5f5246;
  font-size: .86rem;
  line-height: 1.1;
}

.uh-public-header .site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .15rem;
}

.uh-public-header .nav-link {
  padding: .55rem .82rem;
  border-radius: 999px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  font-family: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

.uh-public-header .nav-link:hover,
.uh-public-header .nav-link:focus-visible,
.uh-public-header .nav-link.active,
.uh-public-header .nav-link[aria-current="page"] {
  background: #fff9ef;
  box-shadow: inset 0 0 0 1px rgba(75, 55, 40, .18);
}

.uh-public-header .nav-link:focus-visible,
.uh-public-header .nav-dropdown-link:focus-visible,
.uh-public-header .menu-button:focus-visible {
  outline: 3px solid rgba(113, 129, 95, .42);
  outline-offset: 2px;
}

.uh-public-header .menu-button {
  display: none;
  padding: .55rem .9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font-family: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  font-weight: 400;
  min-height: 0;
  box-shadow: none;
  cursor: pointer;
  transform: none;
}

.uh-public-header .nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.uh-public-header .nav-parent {
  display: inline-flex;
  align-items: center;
  gap: .24rem;
}

.uh-public-header .nav-parent::after {
  content: "▾";
  margin-left: .18rem;
  color: var(--muted);
  font-size: .68em;
  line-height: 1;
  transform: translateY(.02rem);
}

.uh-public-header .nav-dropdown-menu {
  position: absolute;
  top: calc(100% + .08rem);
  left: 0;
  z-index: 1000;
  display: grid;
  gap: .16rem;
  min-width: 230px;
  padding: .55rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 249, 239, .98);
  box-shadow: 0 18px 44px rgba(54, 43, 30, .12);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-.25rem);
  transition: opacity .16s ease, transform .16s ease;
}

.uh-public-header .nav-dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: -.35rem;
  right: -.35rem;
  height: .82rem;
}

.uh-public-header .nav-dropdown:hover .nav-dropdown-menu,
.uh-public-header .nav-dropdown:focus-within .nav-dropdown-menu,
.uh-public-header .nav-dropdown.is-open .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Escape must close a desktop disclosure even while pointer hover or
   focus-within would otherwise keep the CSS-only fallback visible. */
.uh-public-header .nav-dropdown.is-escape-closed .nav-dropdown-menu {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-.25rem);
}

.uh-public-header .nav-dropdown.is-open .nav-parent::after {
  transform: translateY(.02rem) rotate(180deg);
}

.uh-public-header .nav-dropdown-link {
  padding: .56rem .72rem;
  border-radius: 13px;
  color: var(--ink);
  font-size: .92rem;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  font-family: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.uh-public-header .nav-dropdown-link:hover,
.uh-public-header .nav-dropdown-link:focus,
.uh-public-header .nav-dropdown-link.active,
.uh-public-header .nav-dropdown-link[aria-current="page"] {
  background: rgba(255, 255, 255, .68);
  box-shadow: inset 0 0 0 1px var(--line);
  outline: none;
}

.uh-public-header .site-nav > .nav-dropdown:last-child .nav-dropdown-menu {
  right: 0;
  left: auto;
}

@media (max-width: 980px) {
  .uh-public-header .header-inner {
    position: relative;
  }

  .uh-public-header .brand {
    min-width: 0;
  }

  .uh-public-header .brand-text small {
    display: none;
  }

  .uh-public-header .menu-button {
    display: inline-flex;
  }

  .uh-public-header .site-nav {
    position: absolute;
    top: 74px;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: .15rem;
    padding: .75rem;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 249, 239, .98);
    box-shadow: var(--shadow);
  }

  .uh-public-header .site-nav.open {
    display: flex;
  }

  .uh-public-header .nav-dropdown {
    display: grid;
    width: 100%;
  }

  .uh-public-header .nav-dropdown::after {
    display: none;
  }

  .uh-public-header .nav-dropdown .nav-link,
  .uh-public-header .site-nav > .nav-link {
    box-sizing: border-box;
    width: 100%;
  }

  .uh-public-header .nav-parent::after {
    display: none;
    content: "";
  }

  .uh-public-header .nav-dropdown-menu,
  .uh-public-header .site-nav > .nav-dropdown:last-child .nav-dropdown-menu {
    position: static;
    display: grid;
    min-width: 0;
    padding: .1rem 0 .25rem .8rem;
    border: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .uh-public-header .nav-dropdown-link {
    display: block;
    padding: .45rem .72rem;
    color: var(--muted);
    font-size: .9rem;
    white-space: normal;
  }

  .uh-public-header .nav-dropdown-link:hover,
  .uh-public-header .nav-dropdown-link:focus,
  .uh-public-header .nav-dropdown-link.active,
  .uh-public-header .nav-dropdown-link[aria-current="page"] {
    color: var(--ink);
  }
}

@media (max-width: 560px) {
  .uh-public-header .brand-symbol {
    width: 50px;
    height: 50px;
  }
}
