
/* =========================================================
   V5.3.1 HOTFIX — Homepage
   ========================================================= */

/* The development banner was an extra grid child and broke the V5.3 viewport frame. */
body:has(.v5-home-main) .dev-banner {
  display:none !important;
}

/* Do NOT use body as a 3-row grid on homepage. */
body:has(.v5-home-main) {
  display:block !important;
  height:auto !important;
  min-height:100vh !important;
  overflow-x:hidden !important;
  overflow-y:auto !important;
}

/* Header stays fixed in normal document flow. */
body:has(.v5-home-main) .site-header {
  height:92px !important;
  min-height:92px !important;
  position:relative !important;
  top:auto !important;
}

/* Main owns the visible stage, not body. */
body:has(.v5-home-main) .v5-home-main {
  min-height:0 !important;
  overflow:visible !important;
}

body:has(.v5-home-main) .v5-home-screen {
  height:auto !important;
  min-height:calc(100vh - 92px - 70px) !important;
  overflow:hidden !important;
}

/* Ensure V5 content cannot be clipped below the fold. */
body:has(.v5-home-main) .v5-home-shell {
  min-height:calc(100vh - 92px - 70px - 54px) !important;
  height:auto !important;
  padding-top:28px !important;
  padding-bottom:24px !important;
}

/* Footer remains in flow after the V5 stage. */
body:has(.v5-home-main) .ep-master-footer {
  position:relative !important;
  height:70px !important;
  min-height:70px !important;
}

/* Contact overlay remains above everything. */
body:has(.v5-home-main) .ep-contact-layer {
  position:fixed !important;
  z-index:500 !important;
}

/* Header links remain clickable above decorative layers. */
body:has(.v5-home-main) .site-header,
body:has(.v5-home-main) .main-nav,
body:has(.v5-home-main) .main-nav a {
  position:relative;
  z-index:100 !important;
  pointer-events:auto !important;
}

/* Decorative V5 circles must never intercept pointer input. */
body:has(.v5-home-main) .v5-home-screen::before,
body:has(.v5-home-main) .v5-home-orbit {
  pointer-events:none !important;
}

/* On standard desktop, keep the experience essentially one-screen. */
@media (min-width:980px) and (min-height:760px) {
  body:has(.v5-home-main) {
    overflow-y:hidden !important;
  }

  body:has(.v5-home-main) .v5-home-screen {
    height:calc(100vh - 92px - 70px) !important;
    min-height:0 !important;
  }

  body:has(.v5-home-main) .v5-home-shell {
    height:calc(100% - 54px) !important;
    min-height:0 !important;
  }
}

/* Short screens are allowed to scroll instead of clipping content. */
@media (min-width:980px) and (max-height:759px) {
  body:has(.v5-home-main) {
    overflow-y:auto !important;
  }

  body:has(.v5-home-main) .v5-home-screen {
    min-height:650px !important;
  }

  body:has(.v5-home-main) .v5-home-shell {
    min-height:596px !important;
  }
}

@media (max-width:979px) {
  body:has(.v5-home-main) {
    overflow-y:auto !important;
  }

  body:has(.v5-home-main) .site-header {
    height:auto !important;
    min-height:78px !important;
  }

  body:has(.v5-home-main) .v5-home-screen,
  body:has(.v5-home-main) .v5-home-shell {
    min-height:0 !important;
    height:auto !important;
  }
}
