.masthead {
  position: relative;
  z-index: 3;
}

.masthead-over-image {
  position: absolute;
}

.masthead-layout {
  position: relative;
}

.masthead-layout > .wordmark .brand-image {
  max-width: clamp(9.25rem, 16vw, 13.75rem);
}

.site-navigation {
  display: flex;
  align-self: stretch;
  margin-inline-start: auto;
}

.main-navigation, .nav-items, .nav-items > li {
  display: flex;
  align-items: stretch;
}

.nav-items, .nav-panel-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-items {
  gap: clamp(.7rem, 1.45vw, 1.375rem);
}

.nav-item-link, .nav-disclosure summary, .masthead-call {
  display: flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.nav-item-link, .nav-disclosure summary {
  min-height: 100%;
  border-block: 2px solid transparent;
  font-size: clamp(.9375rem, 1.15vw, 1.0625rem);
  font-weight: 700;
  white-space: nowrap;
}

.nav-item-link:hover, .nav-item-link[aria-current="page"],
.nav-disclosure summary:hover, .nav-disclosure[open] summary,
.nav-disclosure:has([aria-current="page"]) summary {
  border-block-end-color: var(--accent);
}

.nav-disclosure summary {
  gap: .45rem;
  cursor: pointer;
  list-style: none;
}

.nav-disclosure summary::-webkit-details-marker {
  display: none;
}

.nav-disclosure summary::after {
  width: .43rem;
  height: .43rem;
  flex: none;
  transform: translateY(-.13rem) rotate(45deg);
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  content: "";
}

.nav-disclosure[open] summary::after {
  transform: translateY(.08rem) rotate(225deg);
}

.nav-disclosure-services {
  position: relative;
}

.nav-panel {
  border-radius: var(--radius-ui);
  position: absolute;
  z-index: 2;
  inset-block-start: 100%;
  width: 17.5rem;
  max-height: calc(100vh - 5.25rem);
  max-height: calc(100svh - 5.25rem);
  overflow: auto;
  padding: .6rem .85rem .85rem;
  border-block-start: 3px solid var(--accent);
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 1rem 2.5rem rgb(0 0 0 / 24%);
}

.nav-region-panel {
  inset-inline-end: 0;
  width: min(47rem, 100%);
  padding-inline: 1.15rem;
}

.nav-panel a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .35rem .65rem;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.nav-panel a:hover, .nav-panel a[aria-current="page"] {
  background: #f3f2ee;
  text-decoration: underline;
}

.site-navigation .nav-panel :focus-visible {
  outline-color: var(--focus);
  outline-offset: -2px;
}

.nav-panel .nav-index-link {
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .35rem;
  border-block-end: 1px solid var(--rule);
  font-weight: 700;
}

.nav-index-link .symbol {
  width: 1rem;
  height: 1rem;
}

.nav-region-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
}

.nav-region + .nav-region {
  border-inline-start: 1px solid var(--rule);
  padding-inline-start: .85rem;
}

.nav-region h2 {
  font-size: 1rem;
  letter-spacing: normal;
}

.nav-region h2 a {
  font-weight: 700;
}

.nav-fallback, .nav-toggle {
  display: none;
}

@media (max-width: 75rem) {
  .masthead-call {
    display: none;
  }
}

@media (max-width: 68rem) {
  .masthead-layout {
    min-height: 4.25rem;
    flex-wrap: nowrap;
    gap: .6rem;
  }

  .masthead-layout > .wordmark .brand-image {
    max-width: min(12rem, 60vw);
  }

  .site-navigation {
    align-self: center;
  }

  .nav-fallback, .nav-toggle {
    display: inline-grid;
    place-items: center;
    inline-size: 44px;
    block-size: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    text-decoration: none;
  }

  .nav-fallback .symbol, .nav-toggle .symbol {
    display: block;
    inline-size: 1.5rem;
    block-size: 1.5rem;
    stroke-width: 2;
  }

  .nav-toggle {
    cursor: pointer;
  }

  .site-navigation[data-navigation-ready] .nav-fallback,
  .nav-toggle-close, .nav-toggle[aria-expanded="true"] .nav-toggle-open {
    display: none;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-close {
    display: inline;
  }

  .main-navigation {
    position: absolute;
    z-index: 3;
    inset: 100% 0 auto;
    display: none;
    max-height: calc(100vh - 4.75rem);
    max-height: calc(100svh - 4.75rem);
    overflow: auto;
    overscroll-behavior: contain;
    padding: .25rem .75rem .75rem;
    border-block-start: 3px solid var(--accent);
    background: var(--white);
    color: var(--ink);
    box-shadow: 0 1rem 2.5rem rgb(0 0 0 / 26%);
  }

  .site-navigation[data-navigation-open] .main-navigation, .nav-items, .nav-items > li {
    display: block;
  }

  .site-navigation .main-navigation :focus-visible {
    outline-color: var(--focus);
    outline-offset: -2px;
  }

  .nav-items > li + li {
    border-block-start: 1px solid var(--rule);
  }

  .nav-item-link, .nav-disclosure summary {
    justify-content: space-between;
    min-height: 48px;
    padding: .25rem .5rem;
    border: 0;
    font-size: 1rem;
  }

  .nav-item-link:hover, .nav-item-link[aria-current="page"], .nav-disclosure[open] summary {
    background: #f3f2ee;
  }

  .nav-disclosure summary::after {
    margin-inline-end: .1rem;
  }

  .nav-panel, .nav-region-panel {
    position: static;
    width: auto;
    max-height: none;
    overflow: visible;
    padding: 0 .25rem .4rem;
    border: 0;
    box-shadow: none;
  }

  .nav-region-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .nav-region + .nav-region {
    border: 0;
    border-block-start: 1px solid var(--rule);
    padding: .25rem 0 0;
  }

  .nav-region .nav-panel-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (hover: none) {
  .nav-toggle, .main-navigation a, .nav-disclosure summary {
    -webkit-tap-highlight-color: rgb(247 198 0 / 22%);
  }
}

.mobile-menu {
  margin: 0;
  padding: 0;
  border: 0;
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  background: var(--ink);
  color: white;
}

html:has(.mobile-menu[open]) { overflow: hidden; }

.mobile-menu[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.mobile-menu-bar, .mobile-menu-contact {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding-inline: max(1.25rem, calc((100vw - 40rem) / 2));
}

.mobile-menu-bar {
  justify-content: space-between;
  min-height: 4.5rem;
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid #484848;
}

.mobile-menu-bar .brand-image { width: 10rem; }
.mobile-menu-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  color: white;
  border: 0;
  cursor: pointer;
}

.mobile-menu-close .symbol { width: 1.6rem; height: 1.6rem; }

.mobile-menu-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(.75rem, 4vh, 2.5rem) max(1.25rem, calc((100vw - 40rem) / 2));
}

.site-navigation .mobile-menu[open] .main-navigation {
  position: static;
  display: block;
  max-height: none;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
}

.mobile-menu .nav-items > li + li { border-color: #464646; }
.mobile-menu .nav-item-link, .mobile-menu .nav-disclosure summary {
  min-height: clamp(3.3rem, 8vh, 4.6rem);
  padding: .4rem 0;
  font-size: clamp(1.45rem, 5.6vw, 2.25rem);
  letter-spacing: -.025em;
  line-height: 1.2;
}

.mobile-menu .nav-disclosure summary::after { color: var(--accent); }
.mobile-menu :is(.nav-item-link:hover,.nav-item-link[aria-current],.nav-disclosure[open] summary) {
  background: transparent;
  color: var(--accent);
}

.mobile-menu .nav-panel {
  background: #282828;
  color: white;
  margin-bottom: .75rem;
  padding: .45rem .65rem;
}
.mobile-menu .nav-panel a:is(:hover,[aria-current]) { background: #383838; }
.mobile-menu .nav-index-link { color: var(--accent); }
.mobile-menu :focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.mobile-menu-contact {
  padding-block: .85rem max(.85rem, env(safe-area-inset-bottom));
  border-top: 1px solid #484848;
}
.mobile-menu-contact a {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 46px;
  border: 1px solid #777;
  border-radius: var(--radius-ui);
  text-decoration: none;
  font-weight: 700;
}
.mobile-menu-contact a[href^="tel:"] {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
}
.mobile-menu-contact .symbol { width: 1.15rem; height: 1.15rem; }

@media (prefers-reduced-motion: no-preference) {
  .mobile-menu[open] .mobile-menu-body { animation: mobile-menu-enter .22s ease-out; }
  @keyframes mobile-menu-enter {
    from { opacity: 0; transform: translateY(.5rem); }
    to { opacity: 1; transform: translateY(0); }
  }
}

.masthead:not(.masthead-over-image) {
  border-bottom: 1px solid var(--rule);
}

.masthead-fixed:not(.masthead-over-image) + .masthead-boundary {
  height: calc(var(--compact-masthead-height, var(--initial-header-height, 5.125rem)) + 1px);
}

@media (max-width: 68rem) {
  :root { --initial-header-height: 4.25rem; }
}

.masthead.masthead-fixed {
  position: fixed;
  inset: 0 0 auto;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--rule);
}

.masthead-fixed .wordmark-on-photo { display: none; }
.masthead-fixed .wordmark-on-white { display: grid; }
.masthead-fixed .masthead-call { border-color: var(--rule); }

html:has(.masthead-fixed) {
  scroll-padding-top: var(--fixed-header-height, 4rem);
}

@media (prefers-reduced-motion: no-preference) {
  .masthead-fixed { animation: masthead-arrive .22s ease-out; }
  @keyframes masthead-arrive {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
  }
}

.masthead.masthead-fixed .masthead-layout {
  min-height: var(--fixed-header-height, 4rem);
}

@media (max-width: 51rem), (max-width: 60rem) and (orientation: landscape) and (max-height: 34rem) {
  :root { --fixed-header-height: 3rem; }
  .masthead:not(.masthead-over-image) { border-bottom: 0; }
  .masthead-fixed:not(.masthead-over-image) + .masthead-boundary { height: var(--compact-masthead-height); }

  .masthead-fixed .nav-toggle, .masthead-fixed .nav-fallback {
    block-size: var(--fixed-header-height);
    inline-size: var(--fixed-header-height);
  }

  .masthead.masthead-fixed .masthead-layout > .wordmark .brand-image {
    max-width: min(42vw, 9rem);
  }

  .masthead-fixed.masthead-retracted:not(:has(:focus-visible, dialog[open])) {
    transform: translateY(-105%);
  }

  @media (prefers-reduced-motion: no-preference) {
    .masthead-fixed {
      animation: none;
      transition: transform .2s ease-out;
    }
  }
}
