/*
 * hv-global.css — Unconditionally enqueued chrome stylesheet.
 *
 * PURPOSE: All header + footer chrome rules that must be SELF-SUFFICIENT — i.e.
 * they must render correctly whether or not Elementor's conditional per-page
 * asset loading happened to enqueue widget-icon-list.css (or any other widget
 * base CSS) on a given page. This file is enqueued on every page, always, so
 * the chrome never inherits broken layout from missing widget base CSS.
 *
 * Background: Elementor's "improved CSS loading" only enqueues a widget's base
 * CSS on pages whose OWN content uses that widget. The global header (Xpro
 * template post 217) is chrome, not page content, so the icon-list widget CSS
 * is not reliably loaded. Lesson 40: on pages without an icon-list in the body
 * the phone icon balloons and the WhatsApp lockup collapses because the widget
 * base resets are absent. This file makes those resets unconditional.
 *
 * Scope: ONLY header/footer chrome rules live here. Page-section / content
 * styling lives in hv-elementor.css. The modal component is in hv-elementor.css
 * (separate, recently fixed — leave it there). Load order: after hv-elementor.css
 * (declared as a dependency in functions.php) so cascade wins are reliable.
 *
 * Values reference --hv-* tokens (assets/css/hv-tokens.css); no raw hex except
 * where noted and justified.
 */


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CHROME TOKEN: --hv-slate
   Defined locally here (not yet in tokens.css / Pencil — see BACKLOG).
   The orbital figure (hv-orbital.js) reads this token for its ring colour;
   keeping the definition in an unconditionally-loaded file ensures it resolves
   regardless of which page is being viewed.
   The utility bar previously used var(--hv-slate) as its background; that usage
   is now replaced by var(--hv-dark-background) to match the footer (Task 3).
   The token definition is retained because the orbital still needs it.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
:root {
  --hv-slate: #475569; /* sky tone — orbital ring; not the utility bar (Task 3) */
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ANCHOR SCROLL OFFSET
   The sticky header sits at 96px; anchor targets need that clearance.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
:root {
  --hv-header-offset: 96px;
}

/* Anchor targets land clear of the sticky header. */
[id] {
  scroll-margin-top: var(--hv-header-offset);
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ICON-LIST WIDGET BASE RESETS (self-sufficiency layer)
   Elementor's widget-icon-list.css normally handles these. When it's absent
   (pages without an icon-list in their body content), the header icon-list falls
   back to browser defaults: ul margin inflates the utility bar, icon span reverts
   to display:inline (collapses width), etc.
   These resets duplicate ONLY the minimal base behaviour we depend on so the
   chrome renders identically on every page. They are intentionally low-specificity
   so the more targeted rules below can still override them.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Base ul reset — Elementor's widget-icon-list.css zeros this; without it the
   browser default ~16px top/bottom margin inflates the utility bar. */
.elementor-icon-list-items {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Inline layout items: Elementor sets display:inline-block on each li when
   link_click="inline" is set on the icon-list. Without widget CSS this falls
   back to display:list-item (block). */
.elementor-inline-items .elementor-inline-item {
  display: inline-block;
  margin: 0;
}

/* Icon span base: Elementor's widget CSS sets display:inline-block. Without it
   the span reverts to display:inline, which ignores explicit width/height —
   causing the WhatsApp lockup box to collapse to zero (lesson 40). */
.elementor-icon-list-icon {
  display: inline-block;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   UTILITY ROW LAYOUT
   The text-editor widget for office hours emits a <p> with a browser-default
   margin-bottom (~1em). Kill it so hours + phone + WhatsApp sit on the same
   visual baseline within the flex container (ae10010).
   The icon-list (phone + WhatsApp) is pushed to the right edge via margin-left:auto —
   the reliable equivalent of space-between when there are exactly two flex items.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.hv-k-chrome-header-hours p {
  margin: 0;
}

.hv-k-chrome-header-contact {
  margin-left: auto;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   UTILITY BAR — dark band (matches footer background, Task 3)
   Background is var(--hv-dark-background) = #1B1917, matching the footer
   (post 218, background_color: globals/colors?id=hv_dark_background).
   Previously var(--hv-slate) #475569; changed on Jon's instruction 2026-06-21
   so the utility bar and footer share the same dark value.
   Full-bleed: the row sits inside #site-header's 20px gutter; widened +40px
   and pulled -20px each side to reach viewport edges (lesson 38: negative
   margin alone only shifts, does not stretch).
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.elementor-element-ae10010 {
  background: var(--hv-dark-background);
  box-sizing: border-box;
  width: calc(100% + 40px);
  margin-left: -20px;
  margin-right: -20px;
  padding: 8px 20px;
  overflow: visible;
}

/* Cream text on the dark band — !important beats the icon-list text_color global
   (hv_muted_foreground #6B7280) which otherwise wins on the phone number + hours. */
.hv-k-chrome-header-hours,
.hv-k-chrome-header-hours p,
.hv-k-chrome-header-contact .elementor-icon-list-text,
.hv-k-chrome-header-contact a {
  color: var(--hv-background) !important;
}

/* Icon-list UL base reset (self-sufficiency — lesson 40 family).
   This zeroes the browser-default block margin on the <ul> itself.
   The more specific .elementor-icon-list-items reset above handles the general
   case; this rule is scoped to the contact widget for belt-and-braces safety. */
.hv-k-chrome-header-contact .elementor-icon-list-items.elementor-inline-items {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
  margin: 0;
  padding: 0;
}

.hv-k-chrome-header-contact .elementor-inline-items .elementor-inline-item {
  margin: 0 !important;
  padding: 0 !important;
}

/* Force each contact <li> to be a horizontal flex row so the ::before divider
   sits BESIDE the <a>, never stacked above it. On variant-A pages
   widget-icon-list.min.css makes the <a> display:flex (block-level) which
   blockifies the <li> and stacks the ::before pseudo vertically above the link,
   adding ~11 px of unwanted height. Explicit flex here makes the layout
   self-sufficient regardless of whether that widget CSS is present (2.15.2). */
.hv-k-chrome-header-contact .elementor-icon-list-item {
  display: flex;
  align-items: center;
}

/* Force the <a> inside each contact item to be a horizontal flex row on BOTH
   variants — do not rely on Elementor's widget CSS for this (variant-B pages
   do not load widget-icon-list.min.css so the <a> would be inline there). */
.hv-k-chrome-header-contact .elementor-icon-list-item a {
  display: flex;
  align-items: center;
}

/* Remove Elementor's default after-separator between inline items. */
.hv-k-chrome-header-contact .elementor-icon-list-item:not(:last-child):after {
  display: none;
}

/* Divider between phone and WhatsApp items. */
.hv-k-chrome-header-contact .elementor-icon-list-item:nth-child(2)::before {
  content: "";
  display: inline-block;
  flex: 0 0 auto;
  width: 1px;
  height: 16px;
  margin: 0 16px;
  background: rgba(253, 250, 245, 0.5);
  vertical-align: middle;
}

/* Phone item: native phone-alt glyph, cream on the dark band.
   SIZE PINNED (lesson 40, 2026-06-14): icon has no explicit widget Icon Size;
   Elementor's per-page rendering varies — webfont glyph (sized by font-size)
   on some pages, inline SVG (e-font-icon-svg) with no size cap that balloons
   to its ~150px viewBox on others (e.g. /products/). Pin 16px on BOTH forms
   (loads unconditionally) so it can't balloon regardless of render path. */
.hv-k-chrome-header-contact .elementor-icon-list-item:first-child .elementor-icon-list-icon {
  display: flex;
  align-items: center;
  margin: 0 8px 0 0;
  position: static;
  width: 16px;
}
.hv-k-chrome-header-contact .elementor-icon-list-item:first-child .elementor-icon-list-icon svg {
  fill: var(--hv-background) !important;
  width: 16px !important;
  height: 16px !important;
}
.hv-k-chrome-header-contact .elementor-icon-list-item:first-child .elementor-icon-list-icon i {
  color: var(--hv-background) !important;
  font-size: 16px !important;
}

/* WhatsApp item: official green lockup SVG replaces the FA glyph + "WhatsApp" text.
   display:inline-block + !important sizing pinned (lesson 40, 2026-06-14): without
   widget CSS the icon span falls back to display:inline, which IGNORES width — the
   86px box collapsed to 0 and the background-image had nothing to paint on.
   The base reset above (.elementor-icon-list-icon) handles the general case;
   the !important here beats any conflicting kit global. */
.hv-k-chrome-header-contact .elementor-icon-list-item:nth-child(2) .elementor-icon-list-icon {
  display: inline-block !important;
  width: 86px !important;
  height: 20px !important;
  margin: 0;
  background: url(../img/whatsapp.svg) left center / contain no-repeat;
}
/* FIX 2 / A11y: WhatsApp link accessible name.
   The FA WhatsApp SVG icon is aria-hidden; the .elementor-icon-list-text "WhatsApp"
   span is the accessible name source for the <a> element. Hiding it with
   display:none removes it from the accessibility tree and leaves the link with no
   name (axe: link-name). Fix: hide the SVG glyph (replaced by the background-image
   lockup above) but keep the text in the accessibility tree via the clip-path
   visually-hidden pattern. The text is still display:inline (flex child) — the
   clip-path makes it visually invisible without removing it from the a11y tree.
   Result: the <a href="https://wa.me/…"> computes accessible name "WhatsApp". */
.hv-k-chrome-header-contact .elementor-icon-list-item:nth-child(2) .elementor-icon-list-icon svg {
  display: none;
}
.hv-k-chrome-header-contact .elementor-icon-list-item:nth-child(2) .elementor-icon-list-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MOBILE DRAWER LINKS
   The Xpro horizontal-menu drawer uses ink defaults (rgb 181,181,181) that
   fail brand and contrast. Widget typography controls apply to the desktop
   inline list only; the slide-in drawer needs direct CSS. The responsive
   wrapper is present in the DOM regardless of viewport; it becomes the drawer
   panel at ≤1024px.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.xpro-elementor-horizontal-navbar-wrapper .xpro-elementor-horizontal-navbar-nav .xpro-elementor-nav-link,
.xpro-elementor-horizontal-navbar-wrapper .xpro-elementor-horizontal-navbar-nav a {
  color: var(--hv-foreground) !important;
  font-size: 18px;
  font-weight: 500;
}

.xpro-elementor-horizontal-navbar-wrapper .xpro-elementor-horizontal-navbar-nav .xpro-elementor-nav-link:hover,
.xpro-elementor-horizontal-navbar-wrapper .xpro-elementor-horizontal-navbar-nav a:hover {
  color: var(--hv-primary) !important;
}

/* Active/current item (desktop inline list + drawer share this rule).
   Deepened from --hv-primary #F08C10 (2.4:1 on cream — fails WCAG AA) to a
   scoped AA-safe deep amber #A85F07 (4.7:1). Retargets only the nav-active
   surface, not the global primary (a global deepen is the larger Pencil
   re-sync call held in BACKLOG). */
.xpro-elementor-horizontal-navbar-wrapper .xpro-elementor-horizontal-navbar-nav .current-menu-item > a,
.xpro-elementor-horizontal-navbar-wrapper .xpro-elementor-horizontal-navbar-nav .current-menu-ancestor > a,
.xpro-elementor-horizontal-navbar-wrapper .xpro-elementor-horizontal-navbar-nav .xpro-elementor-nav-link.active {
  color: #A85F07 !important;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HEADER DROPDOWN SUBMENUS (Xpro free Horizontal Menu nested items)
   The hub items (What we solve / Products) carry child pages. Xpro renders
   ul.xpro-elementor-dropdown-menu > a.xpro-elementor-dropdown-item; its
   defaults are a transparent panel with dark-on-dark items. Brand it: a lifted
   cream panel, calm hover.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.xpro-elementor-horizontal-navbar-wrapper .xpro-elementor-dropdown-menu {
  background: var(--hv-background) !important;
  border: 1px solid var(--hv-border) !important;
  border-radius: 6px !important;
  box-shadow: 0 12px 32px rgba(27, 25, 23, 0.14) !important;
  padding: 8px 0 !important;
  min-width: 240px !important;
  /* Pull the panel up into the link's bottom padding so the hover path stays
     continuous — no dead-zone between the nav link and the dropdown panel. */
  transform: translateY(-14px) !important;
}

/* Xpro draws a dark diamond "pointer" above the panel (::after); remove it on
   our cream panel where it reads as a stray icon. */
.xpro-elementor-horizontal-navbar-wrapper .xpro-elementor-dropdown-menu::after {
  display: none !important;
}

.xpro-elementor-horizontal-navbar-wrapper .xpro-elementor-horizontal-navbar-nav .xpro-elementor-dropdown-item {
  background: transparent !important;
  font-size: 15px !important;
  font-weight: 500;
  padding: 10px 20px !important;
  line-height: 1.4;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.xpro-elementor-horizontal-navbar-wrapper .xpro-elementor-horizontal-navbar-nav .xpro-elementor-dropdown-item:hover,
.xpro-elementor-horizontal-navbar-wrapper .xpro-elementor-horizontal-navbar-nav .xpro-elementor-dropdown-item:focus {
  background: var(--hv-background-warm) !important;
  color: var(--hv-primary) !important;
}

/* Hamburger toggler button — bars icon must be cream for contrast. */
.xpro-elementor-horizontal-menu-toggler {
  border-color: var(--hv-primary) !important;
}
.xpro-elementor-horizontal-menu-toggler span,
.xpro-elementor-horizontal-menu-toggler i {
  color: var(--hv-background) !important;
}

/* Close button inside the drawer. */
.xpro-elementor-horizontal-menu-close,
.xpro-elementor-horizontal-menu-close span,
.xpro-elementor-horizontal-menu-close i {
  color: var(--hv-foreground) !important;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   STICKY COLLAPSE — hide utility row, keep nav/logo bar, add shadow
   When Xpro adds xtb-appear to the sticky header, collapse the utility row and
   show only the logo/nav/CTA bar. Calm transition (no bounce). The utility row
   is .elementor-element-ae10010 inside .xpro-theme-builder-header-nav. The
   shadow lands on the <header> element itself (the fixed pinned surface).
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.xtb-header-sticky {
  transition: box-shadow 0.3s ease;
}

.elementor-element-ae10010 {
  transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease, padding 0.3s ease;
  max-height: 200px;
  overflow: hidden;
  opacity: 1;
  /* Utility bar breathing room. The collapsed state below must zero it:
     max-height:0 does not remove padding from the box. */
  padding-top: 10px;
  padding-bottom: 8px;
}

.xtb-header-sticky.xtb-appear .elementor-element-ae10010 {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0 !important;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
}

.xtb-header-sticky.xtb-appear {
  box-shadow: 0 2px 12px rgba(31, 41, 55, 0.10);
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DESKTOP MENU HOVER/ACTIVE POLISH
   Widget __globals__ bind menu_text_color → hv_foreground, hover_color and
   active_color → hv_primary. Padding supplement (8px max: at 12px the nav
   overflows its column at 1080px — About wraps to a second line and squeezes
   the CTA button).
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.elementor-element-ae10023 .xpro-elementor-nav-link {
  padding: 12px 8px !important;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   NAV-ROW MIDLINE — logo, menu text, and CTA on one optical baseline
   The row centres its children; the logo and button wrappers need align-self
   because Elementor's --container-widget-align-self var stretches them to row
   height and their content then top-aligns inside the stretched box.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.elementor-element-ae10020 > .e-con-inner {
  align-items: center;
}
.elementor-element-ae10021,
.elementor-element-ae10024 {
  align-self: center !important;
  height: auto !important;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FOOTER LINK HOVER
   Footer text-editor widgets use style="color:inherit" on their <a> tags.
   They inherit hv_muted_foreground (kit global on the widget). On hover,
   transition to orange (ink → orange is the site-wide link convention).
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.hv-k-chrome-footer-col-1 a,
.hv-k-chrome-footer-col-2 a,
.hv-k-chrome-footer-col-3 a,
.hv-k-chrome-footer-col-4 a,
.hv-k-chrome-footer-col-5 a,
.hv-k-chrome-footer-legal-1 a,
.hv-k-chrome-footer-legal-2 a,
.hv-k-chrome-footer-legal-3 a {
  transition: color 0.2s ease;
}

.hv-k-chrome-footer-col-1 a:hover,
.hv-k-chrome-footer-col-2 a:hover,
.hv-k-chrome-footer-col-3 a:hover,
.hv-k-chrome-footer-col-4 a:hover,
.hv-k-chrome-footer-col-5 a:hover,
.hv-k-chrome-footer-legal-1 a:hover,
.hv-k-chrome-footer-legal-2 a:hover,
.hv-k-chrome-footer-legal-3 a:hover {
  color: var(--hv-primary) !important;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HEADER LOGO
   At canonical 269×40 (ratio 6.73, height auto). Lives here rather than the
   widget CSS because the generated post-217.css is CDN-cached without reliable
   busting; this file busts via ?ver= on every HVEL_VERSION bump.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.hv-k-chrome-header-logo {
  width: 269px;
  max-width: 269px;
  flex-shrink: 0;
}
.hv-k-chrome-header-logo img {
  width: 269px;
  height: auto;
  vertical-align: baseline; /* override Elementor default .elementor-widget-image img{vertical-align:middle} */
}

/* Mobile header — smaller logo (Jon, 2026-06-12).
   The .elementor-element prefix matches specificity of Elementor's generated
   _element_custom_width rule, which otherwise wins on the wrapper. */
@media (max-width: 767px) {
  .elementor-element.hv-k-chrome-header-logo {
    width: 200px !important;
    max-width: 200px !important;
  }
  .elementor-element.hv-k-chrome-header-logo img {
    width: 200px !important;
  }
}

/* Wherever the drawer is active (≤1024, Xpro responsive collapse): hide the
   CTA button — it reappears as the .hv-menu-cta item inside the drawer — and
   keep logo + burger on one line. */
@media (max-width: 1024px) {
  .elementor-element-ae10024 {
    display: none !important;
  }
  .elementor-element-ae10020 > .e-con-inner {
    flex-wrap: nowrap !important;
  }
  .elementor-element.elementor-element-ae10022 {
    width: auto !important;
    margin-left: auto;
  }
}

/* CTA menu item (WP menu `primary`, li class hv-menu-cta): hidden on the
   desktop inline nav (the real button shows there), styled as the brand
   button inside the drawer. */
@media (min-width: 1025px) {
  li.hv-menu-cta {
    display: none;
  }
}

/* display:block (not inline-block): the drawer right-aligns inline content,
   which shoved the pill to the panel edge. block + fit-content pins it left. */
.xpro-elementor-horizontal-navbar-wrapper li.hv-menu-cta .xpro-elementor-nav-link,
.xpro-elementor-horizontal-navbar-wrapper li.hv-menu-cta a {
  display: block !important;
  width: fit-content !important;
  background: var(--hv-primary) !important;
  color: var(--hv-background) !important;
  border-radius: 8px;
  padding: 10px 20px;
  margin-top: 8px;
  font-weight: 600;
}

.xpro-elementor-horizontal-navbar-wrapper li.hv-menu-cta .xpro-elementor-nav-link:hover,
.xpro-elementor-horizontal-navbar-wrapper li.hv-menu-cta a:hover {
  color: var(--hv-background) !important;
  filter: brightness(0.94);
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SCROLL COLOUR-FLIP STICKY NAV (initNavFlip in hv-motion.js)
   When the sticky nav passes over a dark/coloured band, JS probes the page
   point just below the fixed nav, detects dark luminance, and toggles
   .hv-flip-dark on nav.xpro-theme-builder-header-nav.

   Architecture:
   - Flip state (colour) applies to ALL users — ink text over a dark band is
     unreadable without it; this is a contrast/readability feature.
   - Transition (fade duration) is suppressed for prefers-reduced-motion: reduce.
   - Targeting: frosted-glass tint on the main menu-row (the full-width
     .e-con-full.e-parent that carries Xpro's sticky background).
   - The utility bar keeps its own dark bg; it is deliberately NOT touched here.
   - Logo swap (img[src]) is done in JS; this block handles preload + opacity.
   - The CTA button flips to ghost/outline in dark mode.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Main menu-row background: frosted-glass tint. Targets the top-level full-width
   container (Xpro's sticky bg lands here); utility bar keeps its own dark bg. */
nav.xpro-theme-builder-header-nav .e-con-full.e-parent {
  background-color: var(--hv-motion-nav-bar-bg, rgba(253, 250, 245, 0.55)) !important;
  backdrop-filter: blur(var(--hv-motion-nav-bar-blur, 10px)) !important;
  -webkit-backdrop-filter: blur(var(--hv-motion-nav-bar-blur, 10px)) !important;
}
nav.xpro-theme-builder-header-nav.hv-flip-dark .e-con-full.e-parent {
  background-color: var(--hv-motion-nav-bar-bg-dark, rgba(27, 25, 23, 0.45)) !important;
}

/* Nav link text and hamburger icon colour transition. */
nav.xpro-theme-builder-header-nav .xpro-elementor-nav-link,
nav.xpro-theme-builder-header-nav .xpro-elementor-horizontal-menu-toggler span,
nav.xpro-theme-builder-header-nav .xpro-elementor-horizontal-menu-toggler i {
  transition: color var(--hv-motion-nav-flip-duration, 500ms) ease !important;
}

/* CTA button transition. */
.elementor-element-ae10024 .elementor-button {
  transition:
    background-color var(--hv-motion-nav-flip-duration, 500ms) ease,
    border-color     var(--hv-motion-nav-flip-duration, 500ms) ease,
    color            var(--hv-motion-nav-flip-duration, 500ms) ease !important;
}

/* Logo img opacity crossfade. */
.hv-k-chrome-header-logo img {
  transition: opacity var(--hv-motion-nav-flip-logo-dur, 300ms) ease;
}

/* Dark band state — foreground only.
   No background override: transparency sidesteps the .e-con specificity fight. */

/* Menu link text cream in dark mode. */
nav.xpro-theme-builder-header-nav.hv-flip-dark .xpro-elementor-nav-link,
nav.xpro-theme-builder-header-nav.hv-flip-dark .xpro-elementor-horizontal-navbar-nav a {
  color: var(--hv-motion-nav-flip-text, #FDFAF5) !important;
}

/* Hamburger bars cream in dark mode (bars only — button border stays orange). */
nav.xpro-theme-builder-header-nav.hv-flip-dark .xpro-elementor-horizontal-menu-toggler span,
nav.xpro-theme-builder-header-nav.hv-flip-dark .xpro-elementor-horizontal-menu-toggler i {
  color: var(--hv-motion-nav-flip-text, #FDFAF5) !important;
}

/* CTA button: ghost/outline in dark mode. */
nav.xpro-theme-builder-header-nav.hv-flip-dark .elementor-element-ae10024 .elementor-button {
  background-color: transparent !important;
  border: 1px solid var(--hv-motion-nav-flip-text, #FDFAF5) !important;
  color: var(--hv-motion-nav-flip-text, #FDFAF5) !important;
}

/* Hover on the ghost CTA: subtle fill. */
nav.xpro-theme-builder-header-nav.hv-flip-dark .elementor-element-ae10024 .elementor-button:hover {
  background-color: rgba(253, 250, 245, 0.12) !important;
}

/* Dropdown panel: stays cream over dark band (opens on top of content). */
nav.xpro-theme-builder-header-nav.hv-flip-dark .xpro-elementor-dropdown-menu {
  background: var(--hv-background) !important;
}

/* Dropdown item text: stays ink (panel is always cream).
   Must beat the broader .hv-flip-dark .xpro-elementor-horizontal-navbar-nav a rule
   ([0,3,2]) — adding .xpro-elementor-dropdown-menu raises to [0,4,2]. */
nav.xpro-theme-builder-header-nav.hv-flip-dark .xpro-elementor-horizontal-navbar-nav .xpro-elementor-dropdown-menu a,
nav.xpro-theme-builder-header-nav.hv-flip-dark .sub-menu a {
  color: var(--hv-foreground) !important;
}

/* Reduced-motion: state still flips (readability), transitions go instant. */
@media (prefers-reduced-motion: reduce) {
  nav.xpro-theme-builder-header-nav > .e-con,
  nav.xpro-theme-builder-header-nav > .e-con > .e-con-inner,
  nav.xpro-theme-builder-header-nav .xpro-elementor-nav-link,
  nav.xpro-theme-builder-header-nav .xpro-elementor-horizontal-menu-toggler span,
  nav.xpro-theme-builder-header-nav .xpro-elementor-horizontal-menu-toggler i,
  .elementor-element-ae10024 .elementor-button,
  .hv-k-chrome-header-logo img {
    transition: none !important;
  }
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   XPRO ADMIN THEMER TOGGLE FIX
   The frontend themer toggle mis-sizes its fixed wrapper (~100px past the
   viewport) and ends up below the fold. Pin the button itself. Renders for
   logged-in admins only — no public impact.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.xpro-theme-builder-frontend .xpro-main-toggle {
  position: fixed !important;
  left: 15px !important;
  bottom: 15px !important;
  top: auto !important;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BACK TO TOP — footer-anchored icon button
   hvel_back_to_top() in functions.php emits the button after the Xpro chrome;
   the inline script appends it inside #site-footer so position:absolute anchors
   it to the footer's bottom-right, level with the legal strip. JS sets
   display:flex after the move; on mobile the button switches to position:fixed
   so it floats in the viewport corner rather than colliding with wrapped footer rows.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
#site-footer { position: relative; } /* containing block for the abs-pos button */

#hv-back-to-top {
  display: none; /* JS reveals after appending inside #site-footer */
  position: absolute;
  bottom: 40px;
  right: 20px;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(253, 250, 245, 0.25);
  border-radius: 6px;
  color: var(--hv-background);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
  z-index: 2;
}

#hv-back-to-top:hover {
  border-color: var(--hv-primary);
  color: var(--hv-primary);
}

#hv-back-to-top:focus-visible {
  outline: 2px solid var(--hv-primary);
  outline-offset: 3px;
}

@media (max-width: 767px) {
  #hv-back-to-top {
    position: fixed; /* float in viewport corner; avoids wrapped footer row overlap */
    bottom: 20px;
    right: 16px;
    z-index: 10; /* below contact modal (99999) */
  }
}

@media (prefers-reduced-motion: reduce) {
  #hv-back-to-top { transition: none; }
}
