/* AVIX Water v149 — authoritative mobile hero geometry + queued v148 fixes.
   MUST be loaded last. The hero eyebrow begins exactly 60 CSS px below the
   fixed announcement + menu stack on screens <= 767px. */

@media (max-width:767px){
  :root{
    --avix-m-top:34px;
    --avix-m-header:64px;
    --avix-m-chrome:98px;
    --avix-m-hero-eyebrow-gap:60px;
  }

  /* One fixed mobile chrome reservation on every normal page. */
  html body.home-v8:not(.page-diagram) main#main-content{
    padding-top:var(--avix-m-chrome)!important;
    overflow:visible!important;
  }

  /* Hero itself begins exactly at the bottom of the menu/header. */
  html body.home-v8.avix-home-page:not(.page-diagram) main#main-content > .avix-home-hero,
  html body.home-v8.avix-principal-page:not(.page-diagram) main#main-content > .avix-principal-hero,
  html body.home-v8.avix-editorial-utility:not(.page-diagram) main#main-content > .avix-utility-hero-v144{
    margin-top:0!important;
    padding-top:0!important;
  }

  /* Remove inherited grid top padding/centering so the 60px measurement has
     one origin: the actual hero top (= menu bottom). */
  html body.home-v8.avix-home-page:not(.page-diagram) .avix-home-hero .av5-hero-grid,
  html body.home-v8.science-v12.avix-principal-page:not(.page-diagram) .s12-hero .s12-hero-grid,
  html body.home-v8.products-v3.avix-principal-page:not(.page-diagram) .p3-hero .p3-hero-grid,
  html body.home-v8.co18-page.avix-principal-page:not(.page-diagram) .co18-hero .co18-hero-grid,
  html body.home-v8.tc-team-page.avix-principal-page:not(.page-diagram) .team9-hero .tc-hero-grid,
  html body.home-v8.tc-contact-page.avix-principal-page:not(.page-diagram) .tc-contact-hero .tc-hero-grid,
  html body.home-v8.fp-page.avix-principal-page:not(.page-diagram) .fp-hero--journey .fpj-main,
  html body.home-v8.avix-editorial-utility:not(.page-diagram) .avix-utility-hero-v144 .avix-utility-hero-grid-v144{
    padding-top:0!important;
    margin-top:0!important;
    align-items:start!important;
    align-content:start!important;
  }

  /* EXACT MOBILE STANDARD: first hero eyebrow = 60px below menu bottom. */
  html body.home-v8.avix-home-page:not(.page-diagram) .avix-home-hero .av5-hero-copy,
  html body.home-v8.science-v12.avix-principal-page:not(.page-diagram) .s12-hero .s12-hero-copy,
  html body.home-v8.products-v3.avix-principal-page:not(.page-diagram) .p3-hero .p3-hero-copy,
  html body.home-v8.co18-page.avix-principal-page:not(.page-diagram) .co18-hero .co18-hero-copy,
  html body.home-v8.tc-team-page.avix-principal-page:not(.page-diagram) .team9-hero .tc-hero-copy,
  html body.home-v8.tc-contact-page.avix-principal-page:not(.page-diagram) .tc-contact-hero .tc-hero-copy,
  html body.home-v8.fp-page.avix-principal-page:not(.page-diagram) .fp-hero--journey .fpj-copy,
  html body.home-v8.avix-editorial-utility:not(.page-diagram) .avix-utility-hero-v144 .avix-utility-copy-v144{
    padding-top:var(--avix-m-hero-eyebrow-gap)!important;
    margin-top:0!important;
  }

  html body.home-v8.avix-home-page .avix-home-hero .av5-hero-copy > .av5-eyebrow,
  html body.home-v8.science-v12 .s12-hero .s12-hero-copy > .av5-eyebrow,
  html body.home-v8.products-v3 .p3-hero .p3-hero-copy > .av5-eyebrow,
  html body.home-v8.co18-page .co18-hero .co18-hero-copy > .av5-eyebrow,
  html body.home-v8.tc-team-page .team9-hero .tc-hero-copy > .av5-eyebrow,
  html body.home-v8.tc-contact-page .tc-contact-hero .tc-hero-copy > .av5-eyebrow,
  html body.home-v8.fp-page .fp-hero--journey .fpj-copy > .fpj-eyebrow,
  html body.home-v8.avix-editorial-utility .avix-utility-copy-v144 > .eyebrow{
    margin-top:0!important;
  }

  /* Utility heroes stay 400px. Restore a compact live animation on mobile. */
  html body.home-v8.avix-editorial-utility:not(.page-diagram) .avix-utility-hero-v144,
  html body.home-v8.avix-editorial-utility:not(.page-diagram) .avix-utility-hero-v144 .avix-utility-hero-grid-v144{
    height:400px!important;
    min-height:400px!important;
  }
  html body.home-v8.avix-editorial-utility:not(.page-diagram) .avix-utility-hero-v144{
    position:relative!important;
    overflow:hidden!important;
  }
  html body.home-v8.avix-editorial-utility:not(.page-diagram) .avix-utility-hero-v144 .avix-utility-hero-grid-v144{
    position:relative!important;
    display:block!important;
    padding-bottom:0!important;
  }
  html body.home-v8.avix-editorial-utility:not(.page-diagram) .avix-utility-hero-v144 .avix-utility-copy-v144{
    position:relative!important;
    z-index:2!important;
    width:100%!important;
    max-width:none!important;
  }
  html body.home-v8.avix-editorial-utility:not(.page-diagram) .avix-utility-hero-v144 .avix-utility-visual-v144{
    position:absolute!important;
    z-index:1!important;
    display:grid!important;
    place-items:center!important;
    width:190px!important;
    height:104px!important;
    right:0!important;
    bottom:4px!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
    opacity:.9!important;
    pointer-events:none!important;
  }
  html body.home-v8.avix-editorial-utility:not(.page-diagram) .avix-utility-hero-v144 .avix-utility-visual-v144 img{
    display:block!important;
    width:100%!important;
    height:100%!important;
    object-fit:contain!important;
    overflow:visible!important;
  }

  /* Commercial mobile: clear separation between CTA and investment bridge. */
  html body.home-v8.co18-page.avix-principal-page:not(.page-diagram) .co18-hero .co18-hero-visual{
    margin-top:40px!important;
  }

  /* Plant diagram: temporary height only; responsive.js replaces it with the
     real .sheet height immediately after load. */
  html body.home-v8.science-v12.avix-principal-page iframe.s12-plant-diagram{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:600px!important;
    min-height:0!important;
    margin:0!important;
    border:0!important;
    overflow:hidden!important;
    pointer-events:none!important;
    touch-action:pan-y!important;
  }
}

@media (min-width:768px){
  html body.home-v8.science-v12 iframe.s12-plant-diagram{
    height:600px!important;
    min-height:0!important;
  }
}

@media (max-width:390px){
  html body.home-v8.avix-editorial-utility:not(.page-diagram) .avix-utility-hero-v144 .avix-utility-visual-v144{
    width:116px!important;
    height:64px!important;
    right:2px!important;
    bottom:2px!important;
    opacity:.82!important;
  }
}

/* v149.1 — specificity lock. Older mobile layers use #main-content + !important;
   these selectors deliberately exceed them so the 60px standard truly wins. */
@media (max-width:767px){
  html body.home-v8.avix-home-page:not(.page-diagram) main#main-content > section.av5-hero.avix-home-hero > .av5-container > .av5-hero-grid > .av5-hero-copy,
  html body.home-v8.science-v12.avix-principal-page:not(.page-diagram) main#main-content > section.s12-hero.avix-principal-hero > .av5-container.s12-hero-grid > .s12-hero-copy,
  html body.home-v8.products-v3.avix-principal-page:not(.page-diagram) main#main-content > section.p3-hero.avix-principal-hero > .av5-container.p3-hero-grid > .p3-hero-copy,
  html body.home-v8.co18-page.avix-principal-page:not(.page-diagram) main#main-content > section.co18-hero.avix-principal-hero > .av5-container.co18-hero-grid > .co18-hero-copy,
  html body.home-v8.tc-team-page.avix-principal-page:not(.page-diagram) main#main-content > section.team9-hero.avix-principal-hero > .av5-container.tc-hero-grid > .tc-hero-copy,
  html body.home-v8.tc-contact-page.avix-principal-page:not(.page-diagram) main#main-content > section.tc-contact-hero.avix-principal-hero > .av5-container.tc-hero-grid > .tc-hero-copy,
  html body.home-v8.fp-page.avix-principal-page:not(.page-diagram) main#main-content > section.fp-hero--journey.avix-principal-hero > .av5-container.fpj-main > .fpj-copy,
  html body.home-v8.avix-editorial-utility:not(.page-diagram) main#main-content > section.avix-utility-hero-v144 > .av5-container.avix-utility-hero-grid-v144 > .avix-utility-copy-v144{
    padding-top:60px!important;
    margin-top:0!important;
  }

  html body.home-v8.avix-home-page:not(.page-diagram) main#main-content > section.av5-hero.avix-home-hero > .av5-container > .av5-hero-grid,
  html body.home-v8.science-v12.avix-principal-page:not(.page-diagram) main#main-content > section.s12-hero.avix-principal-hero > .av5-container.s12-hero-grid,
  html body.home-v8.products-v3.avix-principal-page:not(.page-diagram) main#main-content > section.p3-hero.avix-principal-hero > .av5-container.p3-hero-grid,
  html body.home-v8.co18-page.avix-principal-page:not(.page-diagram) main#main-content > section.co18-hero.avix-principal-hero > .av5-container.co18-hero-grid,
  html body.home-v8.tc-team-page.avix-principal-page:not(.page-diagram) main#main-content > section.team9-hero.avix-principal-hero > .av5-container.tc-hero-grid,
  html body.home-v8.tc-contact-page.avix-principal-page:not(.page-diagram) main#main-content > section.tc-contact-hero.avix-principal-hero > .av5-container.tc-hero-grid,
  html body.home-v8.fp-page.avix-principal-page:not(.page-diagram) main#main-content > section.fp-hero--journey.avix-principal-hero > .av5-container.fpj-main,
  html body.home-v8.avix-editorial-utility:not(.page-diagram) main#main-content > section.avix-utility-hero-v144 > .av5-container.avix-utility-hero-grid-v144{
    padding-top:0!important;
    margin-top:0!important;
    align-items:start!important;
    align-content:start!important;
  }
}

@media (max-width:767px){
  /* 404 uses the same eyebrow origin too; its decorative 404 badge must not
     consume vertical flow ahead of the eyebrow on mobile. */
  html body.home-v8.avix-404-page.avix-editorial-utility:not(.page-diagram)
  main#main-content > section.avix-utility-hero-v144 .avix-404-code{
    display:none!important;
  }
}
