/* Home page navigation (BRAND.md section 10): links in spaced capitals and one
   outlined contact button in the header bar, and the phone menu that replaces
   them below a container width of 720px. The bar carries no brass: hover and
   focus answer in Ivory. */
.nav-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 clamp(26px, 3.2cqw, 48px);
}
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ivory);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 7px;
  transition: text-decoration-color 0.3s ease;
}
.nav-link:hover,
.nav-link:focus-visible,
.nav-link[aria-current="page"] { text-decoration-color: currentColor; }

/* Outlined control: the contact button in the bar, Menu, and Close. */
.button-line {
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  color: var(--ivory);
  text-decoration: none;
  transition: border-color 0.3s ease;
}
.button-line:hover { border-color: var(--ivory); }

.nav-contact {
  display: inline-flex;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 500;
}

.menu-toggle { gap: 12px; padding: 0 14px 0 16px; }
.menu-open { display: none; margin-left: auto; }
.menu-close {
  display: inline-flex;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

.menu-glyph {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  width: 20px;
}
.menu-glyph span { display: block; width: 20px; height: 1.5px; background: var(--ivory); }
.menu-glyph span:last-child { width: 12px; background: var(--brass); }

/* Three links and the contact button stay on one row beside the logo down to
   the width where the Menu button takes over. */
@container (max-width: 800px) {
  .nav-inline { column-gap: 18px; }
}
@container (max-width: 719px) {
  .nav-inline { display: none; }
  .menu-open { display: inline-flex; }
}

/* Phone menu: a full screen Forest dialog. It sits outside .page, so its sizes
   use vw where the bar uses cqw. */
.menu-panel {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  border: 0;
  padding: clamp(24px, 3vw, 44px) clamp(24px, 6.5vw, 96px) 40px;
  overflow-y: auto;
  flex-direction: column;
  color: var(--ivory);
}
.menu-panel[open] { display: flex; animation: menu-in 0.25s ease both; }
/* Written out because ::backdrop does not inherit custom properties in every browser. */
.menu-panel::backdrop { background: #173F35; }
html:has(.menu-panel[open]) { overflow: hidden; }
@keyframes menu-in { from { opacity: 0; } }

.menu-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 48px;
  padding-bottom: clamp(14px, 1.8vw, 24px);
}
.menu-panel .logo { --logo-w: clamp(180px, 14.5vw, 208px); }

.menu-nav { display: flex; flex-direction: column; border-top: 1px solid var(--brass); }
.menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 78px;
  border-bottom: 1px solid var(--brass);
  text-decoration: none;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1.1;
}

.menu-group {
  margin-top: auto;
  padding-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.menu-group-label { margin: 0 0 6px; line-height: 1.3; color: var(--stone); }
.menu-group-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 16px;
  color: var(--ivory);
}

@media (prefers-reduced-motion: reduce) {
  .nav-link, .button-line { transition: none; }
  .menu-panel[open] { animation: none; }
}
