/* ============================================================================
   SITE MENU INTERACTION STYLES
   ============================================================================
   The closed header shell is inlined separately. These panel, breadcrumb and
   footer rules can load as a cacheable noncritical stylesheet.
   ============================================================================ */

/* ============================================================================
   MENU OVERLAY (BACKDROP)
   ============================================================================ */

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0; /* unchanged */
  width: 100%;
  height: 100%;
  background:
    linear-gradient(115deg, rgba(240, 239, 232, 0.34) 0%, rgba(80, 111, 122, 0.34) 58%, rgba(34, 54, 47, 0.42) 100%),
    url("/wp-content/uploads/2026/03/shrub.jpg") center / cover no-repeat,
    #6c8279;
  backdrop-filter: blur(14px) saturate(0.92);
  -webkit-backdrop-filter: blur(14px) saturate(0.92);
  z-index: var(--ww-menu-overlay-z);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.42s ease;
}

.menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================================================
   SLIDE-OUT MENU PANEL (FLY-OUT FROM RIGHT)
   ============================================================================ */

.menu-panel {
  position: fixed;
  top: calc(var(--ww-menu-header-height, 74px) + clamp(16px, 2vw, 28px));
  right: clamp(16px, 3.5vw, 48px);
  bottom: clamp(16px, 3vw, 40px);
  width: min(880px, calc(100vw - clamp(32px, 7vw, 96px)));
  max-width: none;
  height: auto;
  background: #fffef5;
  border: 1px solid rgba(93, 122, 145, 0.28);
  border-radius: 4px;
  z-index: var(--ww-menu-panel-z);
  transform: translateZ(0);
  clip-path: inset(0 0 0 100%);
  visibility: hidden;
  pointer-events: none;
  box-shadow: 0 22px 70px rgba(20, 49, 71, 0.28), 0 2px 12px rgba(20, 49, 71, 0.12);
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 3vw, 38px) 0 0;
  transition:
    clip-path 0.54s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0s linear 0.54s;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.menu-panel.active {
  clip-path: inset(0);
  visibility: visible;
  pointer-events: auto;
  transition:
    clip-path 0.54s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0s linear 0s;
}

/* ============================================================================
   MENU NAVIGATION ITEMS
   ============================================================================ */

.menu-nav {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
}

.menu-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  height: auto;
  margin: 0;
  padding: 0 clamp(20px, 2.8vw, 42px);
}

.menu-nav li {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.42s ease, transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: none;
}

.menu-nav li:last-child {
  border-bottom: none;
}

.menu-nav a.current {
  color: #966022;
}

/* ============================================================================
   STAGGERED ENTRANCE ANIMATION
   ============================================================================ */

.menu-panel.active .menu-nav li:nth-child(1) {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.1s;
}
.menu-panel.active .menu-nav li:nth-child(2) {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.18s;
}
.menu-panel.active .menu-nav li:nth-child(3) {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.26s;
}
.menu-panel.active .menu-nav li:nth-child(4) {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.34s;
}
.menu-panel.active .menu-nav li:nth-child(5) {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.42s;
}
.menu-panel.active .menu-nav li:nth-child(6) {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.56s;
}

/* ============================================================================
   MENU LINKS
   ============================================================================ */

.menu-nav a {
  display: flex;
  align-items: center;
  height: 100%;
  color: #8796a3;
  font-size: clamp(2.7rem, 4.4vw, 3.75rem);
  letter-spacing: 0;
  line-height: 1.02;
  transition: color 0.35s ease;
  position: relative;
  background: transparent;
  font-family: "Quinn Display", var(--serif);
  padding: 0.08em 0;
}

.menu-nav a:hover {
  background: transparent;
  color: #0d2b41;
}

/* ============================================================================
   SUBMENU / ACCORDION FUNCTIONALITY
   ============================================================================ */

/* Container for menu items with submenus */
.menu-nav .has-submenu {
  position: relative;
  border-bottom: none;
}

/* --------------------------------------------------------------------------
   SUBMENU TOGGLE BUTTON
   -------------------------------------------------------------------------- */

/* Clickable toggle styled to match menu links */
.menu-nav .submenu-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  cursor: pointer;
  color: #8796a3;
  text-align: left;
  font-size: clamp(2.7rem, 4.4vw, 3.75rem);
  letter-spacing: 0;
  line-height: 1.02;
  transition: color 0.35s ease;
  font-family: "Quinn Display", var(--serif);
  user-select: none;
  outline: none;
  padding: 0.08em 0;
}

.menu-nav .submenu-toggle:hover,
.menu-nav .submenu-toggle:focus-visible {
  background: transparent;
  color: #0d2b41;
}

/* Chevron indicator (SVG data URI) — sits right beside the label rather than
   pushed to the far edge, and scales with the heading instead of a fixed
   12px that disappeared at desktop sizes. */
.menu-nav .submenu-toggle::after {
  content: "";
  width: 0.34em;
  height: 0.34em;
  transform: rotate(0deg);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  background-image: url('data:image/svg+xml;utf8,<svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 9l6 6 6-6" stroke="%238796a3" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Rotate chevron when expanded */
.menu-nav .submenu-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

/* Open and current-section states share the tobacco accent, so the toggle
   never sits in a third colour; hover stays the shared navy. */
.menu-nav .submenu-toggle[aria-expanded="true"],
.menu-nav .submenu-toggle.current {
  color: #966022;
}

.menu-nav .submenu-toggle[aria-expanded="true"]::after,
.menu-nav .submenu-toggle.current::after {
  background-image: url('data:image/svg+xml;utf8,<svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 9l6 6 6-6" stroke="%23966022" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}

/* --------------------------------------------------------------------------
   SUBMENU CONTAINER & ANIMATION
   -------------------------------------------------------------------------- */

/* Collapsible submenu container - uses max-height trick for smooth animation */
.menu-nav .submenu {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
}

/* Expanded state */
.menu-nav .submenu[data-open="true"] {
  max-height: 420px;
  opacity: 1;
}

/* Inner wrapper for content fade effect */
.menu-nav .submenu-inner {
  overflow: hidden;
  opacity: 0;
  padding: 0rem 0 1rem;
  transition: opacity 300ms ease;
}

.menu-nav .submenu[data-open="true"] .submenu-inner {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   SUBMENU LINKS
   -------------------------------------------------------------------------- */

/* Submenu item styling - indented and slightly smaller */
.menu-nav .submenu a {
  display: block;
  padding: 0.42rem 0 0.42rem clamp(18px, 2vw, 34px);
  color: #718493;
  font-size: clamp(0.72rem, 1vw, 0.95rem);
  font-weight: 400;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
  transition: color 0.25s ease, transform 0.25s ease;
  font-family: var(--font-sans);
  background: transparent;
  border-bottom: none;
}

.menu-nav .submenu a:last-child {
  border-bottom: none;
}

.menu-nav .submenu a:hover {
  background: transparent;
  color: #0d2b41;
  transform: translateX(1px);
}

/* Current page highlight in submenu */
.menu-nav a.current {
  background: transparent !important;
  color: #966022;
}

/* Commented out - uncomment if you want current state on toggle button too */
/* .submenu-toggle.current {
  background: rgba(0, 0, 0, 0.15) !important;
} */

/* ============================================================================
   BREADCRUMB NAVIGATION
   ============================================================================ */

/* Breadcrumb section label */
.breadcrumb-intro {
  padding: clamp(28px, 6vh, 70px) clamp(20px, 2.8vw, 42px) 0;
  color: #8796a3;
  border-top: none;
  margin-top: auto;
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.1em;
  letter-spacing: 4px;
}

/* Breadcrumb pill container */
.menu-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem clamp(20px, 2.8vw, 42px) clamp(20px, 2.8vw, 34px);
  margin-top: 0;
  flex-direction: row;
}

/* Individual breadcrumb pill. Solid backgrounds (the old rgba values
   composited over the cream panel) so the overflow fade below can blend
   into an exact colour. Long labels stop at max-width and fade out to the
   right instead of stretching the pill. */
.breadcrumb-pill {
  --pill-bg: #eef0e9;
  position: relative;
  display: inline-block;
  max-width: 13rem;
  overflow: hidden;
  white-space: nowrap;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border-radius: 999px;
  background: var(--pill-bg);
  color: #34546b;
  font-family: "Quinn Display", var(--serif);
  cursor: pointer;
  transition: background 0.2s ease;
}

.breadcrumb-pill::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1.8em;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(to right, transparent, var(--pill-bg) 75%);
  pointer-events: none;
}

.breadcrumb-pill:hover {
  --pill-bg: #dfe3dc;
  color: #0d2b41;
}

/* "Clear" or special action pill variant. Its label never overflows, so the
   fade layer only ever mismatched whatever background hover gives it. */
.clear-pill::after {
  display: none;
}

.clear-pill {
  --pill-bg: #dfe3dc;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.clear-pill:hover {
  --pill-bg: #d2d7cf;
}

/* ============================================================================
   MENU FOOTER
   ============================================================================ */

/* Footer area with logo (animated entrance) */
.menu-footer {
  padding: clamp(16px, 2vw, 28px) clamp(20px, 2.8vw, 42px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem clamp(1.4rem, 3vw, 2.6rem);
  border-top: 1px solid rgba(93, 122, 145, 0.3);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-panel.active .menu-footer {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.5s;
}

.menu-footer .logo-text {
  color: #8796a3;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.45;
  opacity: 1;
  padding-left: 0;
  max-width: 34ch;
}

/* Get in touch / Instagram — the full ww-link treatment, chevron and all. */
.menu-footer__ctas {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 3vw, 2.4rem);
}

.menu-footer__ctas .ww-link {
  color: #966022;
}

@media (max-width: 900px) {
  :root {
    --ww-menu-header-height: 66px;
  }

  .menu-panel {
    top: calc(var(--ww-menu-header-height, 66px) + 12px);
    right: 12px;
    left: 12px;
    bottom: 12px;
    width: auto;
    padding-top: 22px;
  }

  .menu-nav ul {
    padding-inline: 22px;
  }

  .menu-nav a,
  .menu-nav .submenu-toggle {
    font-size: clamp(2.45rem, 12vw, 4rem);
  }

  .breadcrumb-intro,
  .menu-breadcrumbs,
  .menu-footer {
    padding-inline: 22px;
  }
}
