/* FGMC M6.1.7 — Performance & Browser Compatibility
   Presentation only. No payment/API logic is modified. */

html { -webkit-text-size-adjust:100%; text-size-adjust:100%; }
img { max-width:100%; height:auto; }

/* Hide developer/build labels that must never appear publicly. */
.build-badge,.version-badge,.dev-build,.debug-build,.build-info,
#build-info,#buildInfo,#version-info,#versionInfo,[data-build-label],
[data-dev-build],[data-debug-build] { display:none!important; }

/* Give the hero a visible server-rendered title while JS is starting. */
.hero-title .tw-line { min-height:1em; }

/* Secondary hero slides are intentionally deferred until the page is usable. */
html.fgmc-booting .hero-live-2,
html.fgmc-booting .hero-live-3 {
  background-image:none!important;
}

/* Below-fold rendering optimization. Browsers that do not support this simply ignore it. */
@supports (content-visibility:auto) {
  #participate,#program,#accommodation,#registration-search,#gallery,#faq,#contact,
  .reach-band,.registration-focus-strip,.sponsors-section,.partners-section {
    content-visibility:auto;
    contain-intrinsic-size:1px 700px;
  }
}

/* Low-bandwidth / low-memory mode. */
html.fgmc-low-bandwidth *,
html.fgmc-low-bandwidth *::before,
html.fgmc-low-bandwidth *::after {
  animation-duration:.001ms!important;
  animation-iteration-count:1!important;
  transition-duration:.001ms!important;
  scroll-behavior:auto!important;
}

html.fgmc-low-bandwidth .hero-slide,
html.fgmc-low-bandwidth .announcement-track,
html.fgmc-low-bandwidth .scroll-progress {
  animation:none!important;
}

html.fgmc-low-bandwidth #page-landing,
html.fgmc-low-bandwidth .land-paths::before,
html.fgmc-low-bandwidth .hero,
html.fgmc-low-bandwidth .fgmc-v2-hero {
  filter:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}

html.fgmc-low-bandwidth .land-paths::before {
  display:none!important;
}

/* Mobile stability: avoid large fixed/blurred effects and keep tools compact. */
@media (max-width:900px) {
  body { background-attachment:scroll!important; }

  .staff-login-fab { display:none!important; }

  .quick-actions-v3 {
    right:12px!important;
    bottom:calc(108px + env(safe-area-inset-bottom))!important;
    z-index:8800!important;
  }
  .quick-actions-v3.collapsed .qa-items {
    display:none!important;
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
  }
  .quick-actions-v3 .qa-main {
    width:50px!important;
    height:50px!important;
    min-width:50px!important;
  }

  #nav-menu {
    z-index:10050!important;
    max-height:calc(100vh - 86px)!important;
    max-height:calc(100svh - 86px)!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch;
  }

  /* Reduce expensive paint work on weaker phones. */
  .land-paths::before {
    filter:none!important;
    opacity:.35!important;
  }
}

/* Old-browser layout fallback: critical areas stack cleanly without CSS Grid. */
@supports not (display:grid) {
  .hero-v2-grid,.land-paths,.pay-method-grid,.form-grid,.countdown-grid,
  .reach-band,.registration-focus-strip {
    display:block!important;
  }
  .hero-v2-grid > *, .land-paths > *, .pay-method-grid > *, .form-grid > * {
    width:100%!important;
    margin-bottom:14px!important;
  }
}

/* Respect OS accessibility settings even if the main stylesheet misses a component. */
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    animation-duration:.001ms!important;
    animation-iteration-count:1!important;
    transition-duration:.001ms!important;
    scroll-behavior:auto!important;
  }
}
