/* High Grade Excavation: what Elementor's controls can't express. Colors and fonts come from the kit
   globals (var(--e-global-color-*)), so changing a global in Site Settings updates these rules too. */

body { -webkit-font-smoothing: antialiased; }

/* ---- Header (template hge-header) ---- */

/* Scrolled (Elementor Pro adds elementor-sticky--effects 30px down): the bar tightens from 108px to
   86px, the logo steps down and a shadow separates it from the page. Phones keep 84px. */
.hge-head.e-con.e-parent { transition: min-height .3s cubic-bezier(.2, .7, .1, 1), box-shadow .3s, border-color .3s; }
.hge-head .hge-logo img { transition: width .3s cubic-bezier(.2, .7, .1, 1); }
.hge-head.elementor-sticky--effects.e-con.e-parent { --min-height: 86px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); --border-color: rgba(255, 255, 255, .1); }
.hge-head.elementor-sticky--effects .hge-logo img { width: 134px !important; }
@media (max-width: 767px) {
  .hge-head.elementor-sticky--effects.e-con.e-parent { --min-height: 84px; }
  .hge-head.elementor-sticky--effects .hge-logo img { width: 140px !important; }
}

/* Menu: a red hairline grows under plain links on hover (gold for the Design Studio link);
   items with a dropdown show their chevron instead. */
.hge-menu .e-n-menu-title:not(:has(.e-n-menu-dropdown-icon)) .e-n-menu-title-container { position: relative; }
.hge-menu .e-n-menu-title:not(:has(.e-n-menu-dropdown-icon)) .e-n-menu-title-container::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 2px; background: var(--e-global-color-secondary);
  transform: scaleX(0); transform-origin: left; transition: transform .3s cubic-bezier(.2, .7, .1, 1);
}
.hge-menu .e-n-menu-title:not(:has(.e-n-menu-dropdown-icon)) .e-n-menu-title-container:hover::after { transform: scaleX(1); }
.hge-menu a[href*="highgradedesignstudio.com"]::after { background: var(--e-global-color-a1c3e0b) !important; }

/* Narrower desktops: the call block steps aside first, then the utility bar's email. */
@media (max-width: 1240px) { .hge-head-call { display: none !important; } }
@media (max-width: 1200px) { .hge-util-email { display: none !important; } }

/* Tablet/phone menu: the toggle fills the bar's height so the panel always opens at its bottom edge;
   items sit inside the page gutter with hairlines between them, and the phone number closes the list. */
.hge-burger.elementor-widget { align-self: stretch; position: static; }
.hge-burger > .elementor-widget-container { height: 100%; display: flex; flex-direction: column; justify-content: center; }
.hge-head > .e-con-inner { position: static; }
/* Positioned against the header bar itself (not Elementor's stretch script, which mis-measures once the bar is stuck). */
.hge-burger .elementor-nav-menu--dropdown.elementor-nav-menu__container {
  position: absolute; top: 100%; left: 0; right: 0; width: auto; margin-top: 0;
  padding: 4px 28px 32px; background: var(--e-global-color-a1c3e0d);
}
@media (max-width: 767px) { .hge-burger .elementor-nav-menu--dropdown.elementor-nav-menu__container { padding: 4px 20px 32px; } }
.hge-burger .elementor-nav-menu--dropdown a { padding-left: 0 !important; padding-right: 0 !important; }
.hge-burger .hge-m-phone > a {
  justify-content: center; font-family: var(--e-global-typography-text-font-family) !important;
  font-size: 18px !important; padding-top: 22px !important;
}

/* ---- Footer (template hge-footer) ---- */

/* Survey-map contours fade in below the call to action. */
.hge-foot-body.e-con { position: relative; overflow: hidden; }
.hge-foot-body.e-con::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background: url(../img/topo-dark.svg) center / cover;
  -webkit-mask: linear-gradient(180deg, transparent 280px, #000 480px); mask: linear-gradient(180deg, transparent 280px, #000 480px);
}
.hge-foot-body > .e-con-inner { position: relative; z-index: 1; }

.hge-foot-links .elementor-icon-list-item a { transition: color .2s, padding .25s; }
.hge-foot-links .elementor-icon-list-item a:hover { padding-left: 6px; }
.hge-foot-credit p { margin: 0; }
.hge-foot-credit a { color: var(--e-global-color-a1c3e14); text-decoration: none; }
.hge-foot-credit a:hover { color: #fff; }

/* Design Studio line: a short hairline above, the studio's gold underneath. */
.hge-sister.e-con { position: relative; }
.hge-sister.e-con::before { content: ""; position: absolute; left: 0; top: -16px; width: 240px; height: 1px; background: var(--e-global-color-a1c3e17); }
.hge-sister:hover .elementor-heading-title, .hge-sister:hover .elementor-icon { color: #d9c79c !important; }

/* Phones: fixed action bar within thumb reach; it steps aside while the menu is open. */
@media (max-width: 767px) {
  .hge-mbar.e-con.e-parent {
    position: fixed; z-index: 70; left: 0; right: 0; bottom: 0;
    padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -10px 30px rgba(0, 0, 0, .3);
  }
  body { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
  .hge-mbar .elementor-widget-button, .hge-mbar .elementor-button-wrapper { height: 100%; }
  .hge-mbar .elementor-button { display: flex; align-items: center; justify-content: center; width: 100%; height: 58px; }
  body:has(.hge-burger .elementor-menu-toggle.elementor-active) .hge-mbar { display: none; }
}

/* Page load: the header's contents drop in and the utility bar fades in (motion only with hge-js).
   The bar itself never moves: Elementor's sticky script measures it on load and would stick a shifted bar. */
@keyframes hge-head-in { from { opacity: 0; transform: translateY(-24px); } to { opacity: 1; transform: none; } }
@keyframes hge-fade-in { from { opacity: 0; } to { opacity: 1; } }
.hge-js .hge-head > .e-con-inner { animation: hge-head-in .9s cubic-bezier(.2, .7, .1, 1) both; }
.hge-js .hge-utility.e-con { animation: hge-fade-in .8s ease both; }
