/* HARTSTAND V16: true viewport-sized mobile menu; hero spacing corrected.
   Previous header backdrop-filter created a containing block for its fixed menu,
   resulting in an almost zero-height panel on Safari iOS. Mobile menu is now
   a direct child of body and placed above page content independently. */
@media (max-width: 1100px) {
  :root { --hs-header-height: 78px; }
  .menu-layer {
    display: flex !important;
    position: fixed !important;
    inset: var(--hs-header-height) 0 0 0 !important;
    width: 100% !important;
    height: calc(100vh - var(--hs-header-height));
    height: calc(100dvh - var(--hs-header-height)) !important;
    max-height: none !important;
    flex-direction: column;
    gap: 0 !important;
    padding: clamp(24px, 5vh, 48px) max(24px, 6vw) calc(28px + env(safe-area-inset-bottom)) !important;
    background: #101819 !important;
    color: #f7f8f6 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    z-index: 999 !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  }
  .menu-layer.open,
  .menu-layer[aria-hidden="false"] {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }
  .menu-layer a {
    display: block;
    flex: 0 0 auto;
    margin: 0 !important;
    padding: clamp(13px, 2.15vh, 21px) 0 !important;
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,.14);
    color: #f7f8f6;
    font-family: Montserrat, Inter, Arial, sans-serif;
    font-size: clamp(23px, 3.5vw, 36px) !important;
    font-weight: 650;
    letter-spacing: -.055em;
    line-height: 1.19;
    text-decoration: none;
  }
  .menu-layer a[aria-current="page"] { color: #cde64d; }
  .menu-layer a.menu-quote-link {
    color: #cde64d !important;
    font-weight: 700;
  }
  .menu-layer a.menu-phone {
    color: #cde64d !important;
    font-family: Inter, Arial, sans-serif;
    font-size: clamp(15px, 2.5vw, 19px) !important;
    font-weight: 650;
    letter-spacing: 0;
    overflow-wrap: anywhere;
    margin-top: auto !important;
    padding-top: 24px !important;
    border: 0;
  }
  .menu-layer a:focus-visible {
    outline: 2px solid #cde64d;
    outline-offset: -2px;
  }
  .site-nav { z-index: 1000 !important; }
  .site-nav .menu-btn { z-index: 1001 !important; }
  /* Keep links legible on short phones without a clipped footer. */
}
@media (max-width: 800px) {
  :root { --hs-header-height: 72px; }
  /* Compress the excessive space above the main message: content is centred,
     rather than anchored at the very bottom of a tall image. */
  .home-v7 .hero,
  .home-v6 .hero,
  body.home-v7 .hero {
    height: auto !important;
    min-height: 0 !important;
    padding-top: var(--hs-header-height) !important;
  }
  .home-v7 .hero-content {
    height: auto !important;
    min-height: clamp(510px, calc(100svh - var(--hs-header-height) - 95px), 630px) !important;
    display: flex;
    flex-direction: column;
    justify-content: center !important;
    padding-top: clamp(36px, 5svh, 60px) !important;
    padding-bottom: clamp(39px, 5svh, 58px) !important;
  }
  .home-v7 .hero-toptag {
    position: static !important;
    margin: 0 0 clamp(24px, 4svh, 38px) !important;
  }
  .home-v7 .hero-main { max-width: 100%; }
  .home-v7 .hero h1 { margin-bottom: 19px; }
  .home-v7 .hero-bottom { gap: 19px; }
  .home-v7 .hero-actions { margin-top: 2px; }
  .menu-layer a { font-size: clamp(23px, 6vw, 32px) !important; }
}
@media (max-width: 520px) {
  :root { --hs-header-height: 68px; }
  .home-v7 .hero-content {
    min-height: clamp(490px, calc(100svh - var(--hs-header-height) - 125px), 565px) !important;
    padding-top: 28px !important;
    padding-bottom: 34px !important;
  }
  .home-v7 .hero-toptag { margin-bottom: 24px !important; }
  .home-v7 .hero h1 { margin-bottom: 17px; }
  .menu-layer a { font-size: clamp(23px, 7vw, 31px) !important; }
}
/* Older iOS versions without dynamic viewport units */
@supports not (height: 100dvh) {
  @media(max-width:1100px) {
    .menu-layer { height: calc(100vh - var(--hs-header-height)) !important; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .menu-layer { transition: none !important; }
}

@media (max-width:1100px) and (max-height:700px) {
 .menu-layer { padding-top:12px !important; }
 .menu-layer a { padding:11px 0 !important; font-size:22px !important; }
 .menu-layer a.menu-phone { margin-top:12px !important; }
}
