/* FGLaw — Astra Header & Footer skin, v1.6.0.
 * All menus/mobile interactions remain managed by the Astra parent theme.
 * No font families are declared; typography is managed in Astra.
 */

/* Main header: editorial paper, hairline border. */
.site-header .ast-primary-header-bar {
  background-color: var(--fg-color-paper);
  border-bottom: 1px solid rgba(81, 37, 38, .22);
}
.site-header .site-title a,
.site-header .site-title a:visited,
.site-header .site-description { color: var(--fg-color-wine); }
.site-header .site-title {
  line-height: 1.15;
  letter-spacing: -.025em;
}

/* Keep Astra's own header layout and menu behavior. */
.site-header .main-header-menu > .menu-item > .menu-link {
  color: var(--fg-color-wine);
  letter-spacing: .07em;
  font-size: clamp(.75rem, .72rem + .2vw, .875rem);
  text-transform: uppercase;
}
.site-header .main-header-menu > .menu-item > .menu-link:hover,
.site-header .main-header-menu > .current-menu-item > .menu-link,
.site-header .main-header-menu > .current-menu-ancestor > .menu-link {
  color: var(--fg-color-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .4em;
}
.site-header .main-header-menu .sub-menu {
  border: 1px solid rgba(81,37,38,.20);
  box-shadow: 0 .75rem 2rem rgba(42,36,34,.08);
  background: var(--fg-color-paper);
}
.site-header .main-header-menu .sub-menu .menu-link { color: var(--fg-color-wine); }
.site-header .main-header-menu .sub-menu .menu-link:hover { background: rgba(185,156,126,.13); }

/* Accessible focus style: never remove Astra's keyboard handling. */
.site-header a:focus-visible,
.site-header button:focus-visible,
.site-footer a:focus-visible,
.site-footer button:focus-visible {
  outline: 3px solid var(--fg-color-wine);
  outline-offset: 4px;
}

/* Mobile menu wrapper and toggle are owned by Astra. */
.site-header .ast-mobile-header-wrap .ast-primary-header-bar { background: var(--fg-color-paper); }
.site-header .ast-mobile-popup-drawer .ast-mobile-popup-inner { background: var(--fg-color-paper); }
.site-header .ast-mobile-popup-drawer .menu-item .menu-link { color: var(--fg-color-wine); }
.site-header .ast-mobile-popup-drawer button:focus-visible,
.site-header .ast-mobile-popup-drawer a:focus-visible { outline: 3px solid var(--fg-color-wine); outline-offset: 3px; }

/* Editorial footer, using Astra Footer Builder rows. */
.site-footer,
.site-footer .ast-builder-grid-row-container,
.site-footer .ast-small-footer-wrap {
  background: var(--fg-color-wine);
  color: var(--fg-color-paper);
}
.site-footer .site-primary-footer-wrap {
  border-top: 1px solid rgba(237,232,223,.3);
  padding-block: clamp(3.5rem, 7vw, 7rem);
}
.site-footer .site-below-footer-wrap {
  border-top: 1px solid rgba(237,232,223,.28);
  padding-block: 1.2rem;
}
.site-footer :is(h2,h3,h4,h5,h6),
.site-footer .widget-title {
  color: var(--fg-color-sand);
  line-height: 1.25;
}
.site-footer a,
.site-footer a:visited { color: var(--fg-color-paper); }
.site-footer a:hover { color: var(--fg-color-sand); }
.site-footer .menu,
.site-footer .widget_nav_menu ul { list-style: none; margin: 0; padding: 0; }
.site-footer .menu-item { margin-bottom: .75rem; }
.site-footer .menu-item a { text-decoration-thickness: 1px; text-underline-offset: .22em; }
.site-footer .ast-footer-copyright { font-size: .875rem; line-height: 1.5; }

@media (max-width: 921px) {
  .site-footer .site-primary-footer-wrap { padding-block: 3.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header *, .site-footer * { scroll-behavior: auto; }
}

/* FGLaw v2.3 — full-viewport styling of Astra's OWN mobile popup.
 * Astra retains toggle, close, focus and sub-menu behaviour. No parallel menu.
 * Enable Astra Header Builder > Off-Canvas menu on mobile.
 */
@media (max-width: 921px) {
  body .ast-mobile-popup-drawer.active .ast-mobile-popup-inner,
  body .ast-mobile-popup-drawer .ast-mobile-popup-inner {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    background-color: var(--fg-color-wine);
    color: var(--fg-color-paper);
    box-shadow: none;
  }
  body .ast-mobile-popup-drawer .ast-mobile-popup-header {
    padding: clamp(1.2rem, 4vw, 2rem) clamp(1.3rem, 5vw, 3rem);
    min-height: 6rem;
    border-bottom: 1px solid rgba(237,232,223,.24);
  }
  body .ast-mobile-popup-drawer .ast-mobile-popup-content {
    padding: clamp(2.5rem, 7vh, 5rem) clamp(1.3rem, 7vw, 5rem) 5rem;
  }
  body .ast-mobile-popup-drawer .ast-mobile-popup-inner .menu-item > .menu-link,
  body .ast-mobile-popup-drawer .ast-mobile-popup-inner .menu-item > a {
    color: var(--fg-color-paper);
    font-size: clamp(1.8rem, 6vw, 3.9rem);
    line-height: 1.12;
    letter-spacing: -.035em;
    font-weight: 400;
    text-transform: none;
    padding: .65em 0;
    background: transparent;
  }
  body .ast-mobile-popup-drawer .ast-mobile-popup-inner .menu-item {
    border-bottom: 1px solid rgba(237,232,223,.20);
  }
  body .ast-mobile-popup-drawer .ast-mobile-popup-inner .sub-menu {
    background: transparent;
    box-shadow: none;
    border: 0;
    padding: 0 0 1.1rem 1rem;
  }
  body .ast-mobile-popup-drawer .ast-mobile-popup-inner .sub-menu .menu-item { border: 0; }
  body .ast-mobile-popup-drawer .ast-mobile-popup-inner .sub-menu .menu-item > .menu-link {
    font-size: clamp(1rem, 3.8vw, 1.35rem);
    line-height: 1.4;
    padding: .6rem 0;
    letter-spacing: .01em;
  }
  body .ast-mobile-popup-drawer .ast-mobile-popup-inner .menu-item.current-menu-item > .menu-link,
  body .ast-mobile-popup-drawer .ast-mobile-popup-inner .menu-item > .menu-link:hover {
    color: var(--fg-color-sand);
  }
  body .ast-mobile-popup-drawer .ast-mobile-popup-inner .ast-mobile-popup-close,
  body .ast-mobile-popup-drawer .ast-mobile-popup-inner .menu-toggle,
  body .ast-mobile-popup-drawer .ast-mobile-popup-inner .ast-menu-toggle,
  body .ast-mobile-popup-drawer .ast-mobile-popup-inner .menu-toggle-icon,
  body .ast-mobile-popup-drawer .ast-mobile-popup-inner .ast-close-svg {
    color: var(--fg-color-paper);
    fill: currentColor;
  }
  body .ast-mobile-popup-drawer .ast-mobile-popup-inner :is(a,button):focus-visible {
    outline: 3px solid var(--fg-color-sand);
    outline-offset: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  body .ast-mobile-popup-drawer *,
  body .ast-mobile-popup-drawer *::before,
  body .ast-mobile-popup-drawer *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* v2.3: Astra can render a mobile DROPDOWN instead of the Popup Drawer.
 * The previous skin only targeted .ast-mobile-popup-drawer; this addresses the
 * actual .ast-mobile-header-wrap navigation observed on the staging site.
 * Astra still controls whether navigation is open and all submenu actions.
 */
@media (max-width: 921px) {
  /* Keep the header/toggle clickable above the open full-screen navigation. */
  body.fg-mobile-nav-open .ast-mobile-header-wrap .ast-primary-header-bar,
  body.fg-mobile-nav-open .ast-mobile-header-wrap .ast-main-header-wrap {
    position: relative;
    z-index: 100002;
    background: var(--fg-color-wine);
    border-color: rgba(237,232,223,.25);
  }
  body.fg-mobile-nav-open .ast-mobile-header-wrap .site-title a,
  body.fg-mobile-nav-open .ast-mobile-header-wrap .site-description,
  body.fg-mobile-nav-open .ast-mobile-header-wrap .ast-button-wrap .menu-toggle,
  body.fg-mobile-nav-open .ast-mobile-header-wrap .ast-button-wrap .menu-toggle .ast-mobile-svg,
  body.fg-mobile-nav-open .ast-mobile-header-wrap .ast-button-wrap .menu-toggle svg {
    color: var(--fg-color-paper);
    fill: currentColor;
  }
  /* The dropdown is fixed to the viewport, rather than positioned in normal
     document flow. Leave the header's first ~76px for the logo/close button. */
  body .ast-mobile-header-wrap .main-header-bar-navigation,
  body .ast-mobile-header-wrap .ast-builder-menu-mobile .main-navigation,
  body .ast-mobile-header-wrap .ast-builder-menu-mobile .main-navigation .main-header-menu {
    box-shadow: none;
  }
  body .ast-mobile-header-wrap .main-header-bar-navigation,
  body .ast-mobile-header-wrap .ast-builder-menu-mobile .main-navigation {
    background-color: var(--fg-color-wine);
  }
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-bar-navigation,
  body.fg-mobile-nav-open .ast-mobile-header-wrap .ast-builder-menu-mobile .main-navigation {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--fg-color-wine);
    padding: clamp(7rem, 14vh, 10rem) clamp(1.5rem, 7vw, 4rem) 3rem;
    z-index: 100001;
    box-sizing: border-box;
  }
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-bar-navigation .ast-builder-menu-mobile .main-navigation {
    /* Nested menus must not overlap the same viewport twice. */
    position: static;
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 0;
  }
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu,
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu .sub-menu {
    background: transparent;
    border: none;
    box-shadow: none;
  }
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu > .menu-item {
    border-bottom: 1px solid rgba(237,232,223,.25);
  }
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu > .menu-item > .menu-link {
    color: var(--fg-color-paper);
    background: transparent;
    font-size: clamp(1.6rem, 6.6vw, 3rem);
    line-height: 1.13;
    letter-spacing: -.035em;
    font-weight: 400;
    text-transform: none;
    padding: .68em 2.5rem .68em 0;
    min-height: 3.5rem;
  }
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu .sub-menu {
    padding: .25rem 0 1rem 1rem;
  }
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu .sub-menu .menu-link {
    color: var(--fg-color-paper);
    background: transparent;
    font-size: clamp(1rem, 3.6vw, 1.25rem);
    text-transform: none;
    line-height: 1.4;
    padding: .7rem 2.5rem .7rem 0;
  }
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu .current-menu-item > .menu-link,
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu .menu-link:hover {
    color: var(--fg-color-sand);
  }
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu .ast-menu-toggle,
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu .menu-toggle {
    color: var(--fg-color-paper);
    background: transparent;
    border: 0;
  }
  body.fg-mobile-nav-open .ast-mobile-header-wrap :is(a,button):focus-visible {
    outline: 3px solid var(--fg-color-sand);
    outline-offset: 3px;
  }
  /* Also target popup markup when it is outside .site-header. */
  body .ast-mobile-popup-drawer .ast-mobile-popup-inner { background: var(--fg-color-wine); }
}

/* v2.3.1 — Restore a consistent editorial interaction style for Astra dropdown.
 * Astra's selected/focused mobile items can carry blue/white backgrounds from
 * Customizer/default selectors; explicitly neutralise only in the open menu.
 */
@media (max-width: 921px) {
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu,
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu > li,
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu .sub-menu,
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu .sub-menu li {
    background-color: transparent;
  }
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu a.menu-link,
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu a.menu-link:link,
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu a.menu-link:visited,
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu a.menu-link:hover,
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu a.menu-link:focus,
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu a.menu-link:active {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none;
    text-decoration: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transition: color .18s ease;
  }
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu a.menu-link:hover,
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu a.menu-link:focus,
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu .current-menu-item > a.menu-link,
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu .current-menu-ancestor > a.menu-link {
    color: var(--fg-color-sand);
  }
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu a.menu-link:focus-visible {
    outline: 2px solid var(--fg-color-sand);
    outline-offset: -2px;
    border-radius: 2px;
  }
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu :is(.ast-menu-toggle,.menu-toggle),
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu :is(.ast-menu-toggle,.menu-toggle):is(:hover,:focus,:active) {
    background: transparent !important;
    box-shadow: none;
    border: 0;
    color: var(--fg-color-paper);
  }
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu :is(.ast-menu-toggle,.menu-toggle) :is(svg,path),
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu :is(.ast-menu-toggle,.menu-toggle) .ast-icon {
    color: inherit;
    fill: currentColor;
  }
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu :is(.ast-menu-toggle,.menu-toggle):hover {
    color: var(--fg-color-sand);
  }
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu :is(.ast-menu-toggle,.menu-toggle):focus-visible {
    outline: 2px solid var(--fg-color-sand);
    outline-offset: 2px;
  }
  /* Stop focus/hover causing a rectangular colour fill around menu items. */
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu li:is(:hover,:focus,:focus-within) {
    background-color: transparent !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-menu a.menu-link { transition: none; }
}


/* v2.3.2 — Legal micro-footer at the bottom of Astra's mobile navigation. */
@media (max-width: 921px) {
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-bar-navigation {
    display: flex;
    flex-direction: column;
    padding-bottom: max(1.8rem, env(safe-area-inset-bottom));
  }
  body .fg-mobile-menu-legal {
    margin-top: auto;
    padding-top: clamp(2.5rem, 8vh, 5rem);
    width: 100%;
    color: var(--fg-color-paper);
  }
  body .fg-mobile-menu-legal::before {
    content: '';
    display: block;
    border-top: 1px solid rgba(237,232,223,.28);
    margin-bottom: 1.15rem;
  }
  body .fg-mobile-menu-legal__links {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem 1.2rem;
    align-items: center;
    margin-bottom: 1rem;
  }
  body .fg-mobile-menu-legal__links a,
  body .fg-mobile-menu-legal__links a:visited {
    color: var(--fg-color-paper);
    font-size: .79rem;
    line-height: 1.6;
    letter-spacing: .01em;
    text-decoration: none;
    background: transparent;
  }
  body .fg-mobile-menu-legal__links a:hover,
  body .fg-mobile-menu-legal__links a:focus-visible {
    color: var(--fg-color-sand);
    text-decoration: underline;
    text-underline-offset: .2em;
  }
  body .fg-mobile-menu-legal__links a:focus-visible {
    outline: 2px solid var(--fg-color-sand);
    outline-offset: 4px;
  }
  body .fg-mobile-menu-legal__copyright {
    font-size: .73rem;
    line-height: 1.5;
    letter-spacing: .025em;
    opacity: .78;
    margin: 0;
  }
  body .ast-mobile-popup-drawer .ast-mobile-popup-content {
    display: flex;
    flex-direction: column;
    min-height: 100%;
  }
  body .ast-mobile-popup-drawer .fg-mobile-menu-legal { padding-bottom: max(1.5rem, env(safe-area-inset-bottom)); }
}

/* v2.6: the mobile legal footer belongs to the fixed scrolling navigation.
   Avoid nesting the entire nav inside a flex child with an unbounded height. */
@media (max-width:921px) {
  body.fg-mobile-nav-open .ast-mobile-header-wrap .ast-builder-menu-mobile .main-navigation {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  body.fg-mobile-nav-open .ast-mobile-header-wrap .ast-builder-menu-mobile .main-navigation > .main-header-menu {
    flex: 0 0 auto;
    width: 100%;
  }
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-navigation > .fg-mobile-menu-legal {
    flex: 0 0 auto;
    margin-top: auto;
    padding-top: 3.5rem;
    padding-bottom: max(1.75rem, env(safe-area-inset-bottom));
    display: block;
    visibility: visible;
  }
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-bar-navigation > .fg-mobile-menu-legal {
    display: block;
    visibility: visible;
  }
  body .fg-mobile-menu-legal__links { gap: .55rem 1rem; }
}

@media (max-width:921px) {
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-bar-navigation {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-bar-navigation > :not(.fg-mobile-menu-legal) { flex-shrink: 0; }
  body.fg-mobile-nav-open .ast-mobile-header-wrap .main-header-bar-navigation > .fg-mobile-menu-legal {
    flex-shrink: 0;
    margin-top: auto;
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  }
}

/* v2.8 — bespoke minimal mobile nav glyph; native Astra button/ARIA unchanged. */
@media(max-width:921px) {
  .ast-mobile-header-wrap .ast-button-wrap .menu-toggle { position:relative; min-width:44px; min-height:44px; display:inline-flex; align-items:center; justify-content:center; }
  .ast-mobile-header-wrap .ast-button-wrap .menu-toggle .ast-mobile-svg,
  .ast-mobile-header-wrap .ast-button-wrap .menu-toggle .ast-icon { opacity:0 !important; }
  .ast-mobile-header-wrap .ast-button-wrap .menu-toggle::before,
  .ast-mobile-header-wrap .ast-button-wrap .menu-toggle::after { content:""; position:absolute; left:calc(50% - 12px); width:24px; height:1.5px; border-radius:1px; background:currentColor; transform-origin:center; transition:transform 360ms cubic-bezier(.22,1,.36,1),top 360ms cubic-bezier(.22,1,.36,1); pointer-events:none; }
  .ast-mobile-header-wrap .ast-button-wrap .menu-toggle::before { top:calc(50% - 5px); }
  .ast-mobile-header-wrap .ast-button-wrap .menu-toggle::after { top:calc(50% + 5px); }
  body.fg-mobile-nav-open .ast-mobile-header-wrap .ast-button-wrap .menu-toggle::before { top:50%; transform:rotate(45deg); }
  body.fg-mobile-nav-open .ast-mobile-header-wrap .ast-button-wrap .menu-toggle::after { top:50%; transform:rotate(-45deg); }
  .ast-mobile-popup-drawer .ast-mobile-popup-close { min-width:44px; min-height:44px; }
}
@media(prefers-reduced-motion:reduce) { .ast-mobile-header-wrap .ast-button-wrap .menu-toggle::before,.ast-mobile-header-wrap .ast-button-wrap .menu-toggle::after { transition:none; } }
