/* Blocksy bridge: the site chrome is owned by Blocksy's Header/Footer builders. */
:root {
  --paper: var(--theme-palette-color-8, #f7f5ee);
  --ink: var(--theme-palette-color-3, #203d32);
  --muted: var(--theme-palette-color-4, #677168);
  --line: var(--theme-border-color, #d8ddcf);
  --accent: var(--theme-palette-color-6, #dce5ba);
  --dark: var(--theme-palette-color-3, #203d32);
  --white: var(--theme-palette-color-7, #fffef9);
}

/* Neutralise the legacy generic selectors without fighting Blocksy's builder. */
#header nav,
#offcanvas nav,
.ct-footer nav {
  display: block;
  position: static;
  padding: 0;
  background: transparent;
  box-shadow: none;
  font-size: inherit;
}

#header [data-row] {
  border-bottom: 1px solid var(--line);
}

#header .ct-container {
  width: min(100%, 1560px);
  padding-inline: clamp(20px, 4vw, 64px);
}

#header .site-branding {
  min-width: 0;
}

#header .site-branding:has(.site-logo-container) .site-title-container {
  display: none;
}

#header .site-logo-container img {
  width: clamp(190px, 18vw, 245px) !important;
  max-width: none !important;
  max-height: 104px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

#header .menu > li > a {
  font-size: 12px;
  letter-spacing: .01em;
  color: var(--ink) !important;
  text-decoration: none;
  transition: color 160ms ease;
}

#header .menu > li > a:hover {
  color: #5f7352 !important;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

#header .menu > li.current-menu-item > a:not([href*="#"]),
#header .menu > li.current-menu-ancestor > a:not([href*="#"]) {
  color: #5f7352 !important;
}

#offcanvas .ct-panel-content {
  background: var(--paper);
}

#offcanvas .mobile-menu a {
  min-height: 48px;
  font-size: 17px;
  color: var(--ink) !important;
  text-decoration: none;
  transition: color 160ms ease;
}

#offcanvas .mobile-menu a:hover,
#offcanvas .mobile-menu .current-menu-item > a:not([href*="#"]),
#offcanvas .mobile-menu .current-menu-ancestor > a:not([href*="#"]) {
  color: #5f7352 !important;
}

.ct-footer {
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.ct-footer [data-row] > div {
  width: min(100%, 1440px);
  padding-inline: clamp(20px, 7vw, 100px);
}

.ct-footer .footer-menu-inline {
  gap: 8px 22px;
}

.ct-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Blocksy changes header layouts at 999px by default. This menu needs more room,
   so tablets and compact laptops use the clearer off-canvas navigation sooner. */
@media (max-width: 1199px) {
  #header [data-device="desktop"],
  #offcanvas [data-device="desktop"] {
    display: none !important;
  }

  #header [data-device="mobile"] {
    display: block !important;
  }

  #offcanvas [data-device="mobile"] {
    display: flex !important;
  }
}

@media (max-width: 689px) {
  #header .ct-container {
    padding-inline: 20px;
  }

  #header .site-logo-container img {
    width: clamp(155px, 46vw, 185px) !important;
    max-height: 82px;
  }

  .ct-footer [data-row] > div {
    padding-inline: 20px;
  }

  .ct-footer .footer-menu-inline {
    justify-content: center;
  }
}
