/* Shared site header. Loaded by every page together with /assets/nav.js.
   - The header is pinned to the top, so the page links are always reachable (also while the homepage film plays).
   - Under 1340px wide the links fold into a Menu button with big tap targets.
   - The bottom Call / Text / Email / Estimate bar is tidied for phones. */
:root{--hh:81px}
@media (max-width:1340px){:root{--hh:68px}}
@media (max-width:700px){:root{--hh:57px}}
html{scroll-padding-top:calc(var(--hh) + 10px)}
html body{padding-top:var(--hh)}
html.dh-lock,html.dh-lock body{overflow:hidden}
header{position:fixed;top:0;left:0;right:0;z-index:1000;transition:box-shadow .2s}
header.dh-scrolled{box-shadow:0 6px 20px rgba(0,0,0,.38)}
/* a little more room so the whole row fits on one line */
header > div{max-width:1480px!important}
header nav[aria-label="Main"]{gap:16px!important}

.dh-burger{display:none;align-items:center;gap:9px;min-height:44px;padding:0 14px;margin-left:12px;background:transparent;color:#F5EBDF;border:1.5px solid #C49A5E;border-radius:8px;font:600 15px Figtree,system-ui,sans-serif;letter-spacing:.02em;cursor:pointer;-webkit-tap-highlight-color:transparent}
.dh-burger svg{width:20px;height:20px;display:block}
.dh-burger line{stroke:#C49A5E;stroke-width:2.2;stroke-linecap:round;transition:transform .2s,opacity .2s;transform-origin:center}
header.dh-open .dh-burger .l1{transform:translateY(6px) rotate(45deg)}
header.dh-open .dh-burger .l2{opacity:0}
header.dh-open .dh-burger .l3{transform:translateY(-6px) rotate(-45deg)}
.dh-menu{display:none}

@media (max-width:1340px){
  header > div{flex-wrap:nowrap!important;gap:10px!important}
  .dh-burger{display:inline-flex}
  header > div > a[href^="tel"]{margin-left:auto}
  header nav[aria-label="Main"]{position:fixed!important;top:var(--hh);left:0;right:0;bottom:0;display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;gap:0!important;width:auto!important;margin:0!important;overflow-y:auto!important;overflow-x:hidden!important;-webkit-overflow-scrolling:touch;background:#0C0D11;padding:4px 0 calc(28px + env(safe-area-inset-bottom))!important;opacity:0;visibility:hidden;transform:translateY(-8px);transition:opacity .18s,transform .18s,visibility 0s .18s}
  header.dh-open nav[aria-label="Main"]{opacity:1;visibility:visible;transform:none;transition:opacity .18s,transform .18s}
  header nav[aria-label="Main"] > a{display:flex!important;align-items:center;justify-content:space-between;min-height:56px;padding:0 22px!important;font:500 19px Figtree,system-ui,sans-serif!important;color:#F5EBDF!important;text-decoration:none!important;white-space:normal!important;border-bottom:1px solid #1E1F25}
  header nav[aria-label="Main"] > a::after{content:"";width:8px;height:8px;border-top:2px solid #5D5E66;border-right:2px solid #5D5E66;transform:rotate(45deg)}
  header nav[aria-label="Main"] > a[aria-current]{color:#C49A5E!important}
  header nav[aria-label="Main"] > a[aria-current]::after{border-color:#C49A5E}
  .dh-menu{display:block;padding:20px 22px 0}
  header nav .dh-menu a{display:flex!important;align-items:center;justify-content:center;min-height:52px;border-radius:8px;font:600 17px Figtree,system-ui,sans-serif;text-decoration:none!important;box-sizing:border-box}
  header nav .dh-menu .dh-call-big{background:#C49A5E;color:#0C0D11!important;margin-bottom:10px}
  header nav .dh-menu .dh-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
  header nav .dh-menu .dh-row a{border:1.5px solid #3A3B42;color:#F5EBDF!important}
  header nav .dh-menu .dh-small{display:block;margin-top:16px;text-align:center;color:#A9A59B;font:400 14px/1.6 Figtree,system-ui,sans-serif}
  header nav .dh-menu .dh-small a{display:inline!important;min-height:0;font:600 14px Figtree,system-ui,sans-serif;color:#C49A5E!important;border-radius:0;text-decoration:underline!important}
}
/* tablets and phones with a Call button in the header keep it; phones hide it (the bottom bar and menu have Call) */
@media (max-width:700px){
  header > div{padding:8px 14px!important}
  header > div > a:first-child{gap:10px!important}
  header > div > a:first-child img{height:40px!important}
  header > div > a:first-child span span:first-child,header > div > a:first-child b{font-size:17px!important}
  header > div > a:first-child span span:last-child,header > div > a:first-child i{font-size:10px!important;letter-spacing:.3em!important}
  .dh-burger{margin-left:auto}
}

/* bottom bar on phones: one line per label, room for the iPhone home bar */
@media (max-width:700px){
  html body{padding-bottom:calc(64px + env(safe-area-inset-bottom))}
  html .mbar{padding-bottom:env(safe-area-inset-bottom)}
  html .mbar a{white-space:nowrap;padding:17px 2px;font-size:15px;-webkit-tap-highlight-color:transparent}
  html .mbar a:last-child{flex:1.55}
  html.dh-lock .mbar{display:none}
}
/* phones: hero text should not make a visitor wait for staggered fade-ins (they saw an empty hero for up to 2 seconds) */
@media (max-width:700px){
  .fade,.rise,.rule{animation-delay:0s!important;animation-duration:.45s!important}
  .d1,.d2,.d3,.f1,.f2,.f3,.f4{animation-delay:0s!important}
}
@media (prefers-reduced-motion:reduce){header,.dh-burger line,header nav[aria-label="Main"]{transition:none!important}}
