/* ==========================================================================
   Site chrome: header, navigation (desktop dropdowns + mobile panel), footer
   Header = warm ivory, text-only warm-taupe logo, NO bridge.
   Footer = dark blue, approved bridge-left logo.
   ========================================================================== */

/* ------------------------------ HEADER ------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--vd-ivory-100);
  border-bottom: 1px solid var(--vd-line);
  transition: box-shadow var(--dur) var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 14px 30px -26px rgba(11, 47, 74, 0.55); }

.site-header__inner {
  position: relative;
  display: flex; align-items: center; gap: clamp(16px, 2vw, 32px);
  width: min(100% - 2 * var(--gutter), 1440px);
  min-height: var(--header-h);
  margin-inline: auto;
}

.site-branding { flex: none; }
.site-title { margin: 0; font-size: 1rem; line-height: 0; letter-spacing: 0; }
.site-title a { display: block; line-height: 0; text-decoration: none; }
.site-logo { width: 215px; height: auto; }   /* native 215x53 (screenshot-derived; see docs) */

/* Navigation */
.primary-nav { flex: 1 1 auto; min-width: 0; }
.primary-nav .menu { display: flex; align-items: center; justify-content: center; gap: clamp(2px, 0.5vw, 10px); }
.menu__item { position: relative; display: flex; align-items: center; }
.menu__link {
  display: block;
  padding: 0.7em 0.55em;
  font-size: var(--fs-ui);
  font-weight: 450;
  color: var(--vd-ink);
  text-decoration: none;
  white-space: nowrap;
  background-image: linear-gradient(var(--vd-taupe-500), var(--vd-taupe-500));
  background-repeat: no-repeat;
  background-position: 0.55em calc(100% - 0.42em);
  background-size: 0 1px;
  transition: color var(--dur) var(--ease), background-size 0.3s var(--ease);
}
.menu__link:hover, .menu__item.is-open > .menu__link { color: var(--vd-blue-700); background-size: calc(100% - 1.1em) 1px; }
.menu__toggle {
  display: grid; place-items: center;
  width: 22px; height: 30px; margin-left: -6px; padding: 0;
  background: transparent; border: 0; color: var(--vd-taupe-700);
}
.menu__toggle .icon { width: 14px; height: 14px; transition: transform var(--dur) var(--ease); }
.menu__item.is-open > .menu__toggle .icon { transform: rotate(180deg); }

/* Dropdown panels */
.sub-menu {
  position: absolute; top: 100%; left: 0; z-index: 20;
  min-width: 270px;
  padding: 12px;
  background: var(--vd-white);
  border: 1px solid var(--vd-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s linear var(--dur);
}
.menu__item.is-open > .sub-menu,
html:not(.js) .menu__item:hover > .sub-menu,
html:not(.js) .menu__item:focus-within > .sub-menu {
  opacity: 1; visibility: visible; transform: none;
  transition-delay: 0s;
}
.sub-menu a {
  display: block; padding: 0.55em 0.8em;
  font-size: var(--fs-ui); color: var(--vd-ink); text-decoration: none;
  border-radius: var(--radius-sm);
}
.sub-menu a:hover { background: var(--vd-ivory-100); color: var(--vd-blue-700); }

.sub-menu--end { left: auto; right: 0; }

/* Services: nested menu becomes one multi-column panel (no fly-outs) */
.menu__item--mega { position: static; }
.menu__item--mega > .sub-menu {
  left: 50%; right: auto; width: min(1180px, calc(100vw - 2 * var(--gutter)));
  padding: 30px 34px 34px;
  transform: translate(-50%, 8px);
}
.menu__item--mega.is-open > .sub-menu, html:not(.js) .menu__item--mega:hover > .sub-menu { transform: translate(-50%, 0); }
.mega { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px 28px; }
.mega > li > a {
  display: block; padding: 0 0 10px; margin-bottom: 8px;
  border-bottom: 1px solid var(--vd-line);
  font-family: var(--font-serif); font-size: 1.4rem; font-weight: 500; line-height: 1.15; color: var(--vd-blue-900);
  border-radius: 0;
}
.mega > li > a:hover { background: transparent; color: var(--vd-blue-700); border-bottom-color: var(--vd-taupe-500); }
.mega ul a { padding: 0.4em 0; font-size: var(--fs-ui); }
.mega ul a:hover { background: transparent; text-decoration: underline; text-decoration-color: var(--vd-taupe-500); text-underline-offset: 0.25em; }

/* Right side: phone + scheduling */
.site-header__actions { flex: none; display: flex; align-items: center; gap: 18px; }
.header-phone {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 1.0625rem; font-weight: 500; color: var(--vd-blue-900); text-decoration: none; white-space: nowrap;
}
.header-phone:hover { color: var(--vd-blue-700); }

/* Mobile toggle */
.nav-toggle {
  display: none; place-items: center;
  width: 46px; height: 46px; margin-right: -8px; padding: 0;
  background: transparent; border: 1px solid var(--vd-line); border-radius: var(--radius-sm); color: var(--vd-blue-900);
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 20px; height: 1.5px; background: currentColor; border-radius: 1px; transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }
.primary-nav__mobile-actions { display: none; }

/* Compact desktop (nav + actions need room) */
@media (min-width: 1180px) and (max-width: 1439px) {
  .site-logo { width: 190px; }
  .header-phone { display: none; }   /* no room for the number here, and the phone icon was taken off on request */
  .menu__link { padding-inline: 0.42em; }
}

/* ------------------------ MOBILE / TABLET NAV ------------------------ */
@media (max-width: 1179px) {
  .site-logo { width: 176px; }
  .site-header__inner { gap: 10px; }
  .site-header__actions { margin-left: auto; gap: 10px; }
  .site-header__actions .btn { display: none; }
  .header-phone { display: none; }   /* the open menu starts with the Call button */
  .nav-toggle { display: grid; }

  .primary-nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 90;
    padding: 20px var(--gutter) 40px;
    background: var(--vd-ivory-100);
    overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s linear var(--dur);
  }
  .primary-nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .primary-nav__mobile-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
  .primary-nav__mobile-actions .btn { white-space: nowrap; padding-inline: 0.9em; }
  .primary-nav .menu { flex-direction: column; align-items: stretch; gap: 0; }
  .menu__item { flex-wrap: wrap; border-bottom: 1px solid var(--vd-line); }
  .menu__link { flex: 1 1 0; padding: 1em 0.2em; font-size: 1.125rem; background-image: none; }
  .menu__toggle { width: 48px; height: 48px; margin: 0; border-left: 1px solid var(--vd-line); }
  .menu__toggle .icon { width: 18px; height: 18px; }

  .sub-menu, .menu__item--mega > .sub-menu {
    position: static; width: 100%; min-width: 0; flex-basis: 100%;
    padding: 0 0 12px 14px; background: transparent; border: 0; box-shadow: none; transform: none;
    display: none; opacity: 1; visibility: visible; transition: none;
  }
  .menu__item.is-open > .sub-menu, .menu__item--mega.is-open > .sub-menu { display: block; transform: none; }
  .mega { grid-template-columns: 1fr; gap: 6px; }
  .mega > li > a { font-family: var(--font-sans); font-size: 1.0625rem; font-weight: 500; padding: 0.6em 0; margin: 0; border: 0; }
  .sub-menu a { padding: 0.6em 0.2em; }
  .mega ul { padding-left: 14px; }

  html.nav-open { overflow: hidden; }                       /* stop the page scrolling behind the open menu */
  /* No-JS fallback: show the menu as a normal block under the header */
  html:not(.js) .nav-toggle { display: none; }
  html:not(.js) .primary-nav { position: static; opacity: 1; visibility: visible; transform: none; padding-bottom: 20px; }
  html:not(.js) .site-header__inner { flex-wrap: wrap; }
  html:not(.js) .sub-menu { display: block; }
}
@media (max-width: 420px) {
  .site-logo { width: 150px; }
  .primary-nav__mobile-actions { grid-template-columns: 1fr; }   /* stack the two buttons so the number never wraps */
}

/* ------------------------------ FOOTER ------------------------------ */
.site-footer { background: var(--vd-blue-900); color: rgba(246, 243, 237, 0.86); }
.site-footer a { color: rgba(246, 243, 237, 0.88); text-decoration: none; }
.site-footer a:hover { color: var(--vd-taupe-300); text-decoration: underline; text-decoration-color: var(--vd-taupe-500); text-underline-offset: 0.25em; }

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 4vw, 64px);
  padding-block: clamp(56px, 6vw, 88px) clamp(40px, 5vw, 64px);
}
.footer__logo { display: inline-block; width: min(100%, 391px); line-height: 0; }
.footer-logo { width: 100%; height: auto; }    /* native 391x70, never upscaled past 1x */
.footer__tagline { max-width: 30ch; margin: 26px 0 0; font-size: 1rem; line-height: 1.65; color: rgba(246, 243, 237, 0.8); }

.footer__title {
  margin: 0 0 1.1rem; padding-bottom: 0.9rem;
  font-size: 1.625rem; line-height: 1.1; color: var(--vd-ivory-100);
  border-bottom: 1px solid rgba(216, 204, 185, 0.28);
}
.footer__list { display: grid; gap: 0.35rem; font-size: 1rem; }
.footer__list a { display: inline-block; padding: 0.2em 0; }
.footer__office { display: grid; gap: 1.1rem; font-size: 1rem; font-style: normal; }
.footer__office p { margin: 0; }
.footer__hours { display: grid; gap: 0.15rem; }
.footer__phone { font-size: 1.125rem; font-weight: 500; }

.footer__bottom { border-top: 1px solid rgba(216, 204, 185, 0.24); }
.footer__bottom-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 32px; padding-block: 26px 30px; font-size: 0.9375rem; color: rgba(246, 243, 237, 0.78); }
.footer__bottom p { margin: 0; }
.footer__legal { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.social { display: flex; gap: 10px; }
.social a {
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid rgba(216, 204, 185, 0.4); border-radius: 50%;
  color: var(--vd-ivory-100);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.social a:hover { background: var(--vd-taupe-500); border-color: var(--vd-taupe-500); color: var(--vd-blue-900); text-decoration: none; }
.social .icon { width: 19px; height: 19px; }

@media (max-width: 1023px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 599px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom-inner { flex-direction: column; align-items: flex-start; }
}
