/* AVIX Water v78 mobile visual correction layer
   Purpose: preserve desktop information while making every page read naturally on mobile and tablet.
   Loaded last so it can safely override earlier page-specific rules. */

:root{
  --avix-mobile-gutter: 20px;
  --avix-mobile-radius: 20px;
}

html,body{
  overflow-x:hidden;
}

img,svg,video,canvas,iframe{
  max-width:100%;
}

@media (max-width:1024px){
  .av5-container,
  .container,
  .sheet,
  .avix-footer-shell{
    width:min(100%, calc(100% - (var(--avix-mobile-gutter) * 2))) !important;
    max-width:100% !important;
    margin-inline:auto !important;
  }

  .av5-section,
  .co18-section,
  .tc-contact-path,
  .tc-prefooter,
  .fp-cta,
  .tc-prefooter,
  .av5-cta,
  .tc-contact-main,
  .team9-founder-section,
  .team9-avix-team,
  .team9-build,
  .fp2-profile,
  .fp2-water,
  .fp-ventures,
  .fp-career-strip,
  .avix-global-footer{
    padding-inline:0 !important;
  }

  /* section navigation should never clip */
  .avix-section-nav{
    overflow:hidden !important;
  }
  .avix-section-nav__viewport{
    overflow-x:auto !important;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    padding-inline:var(--avix-mobile-gutter) !important;
  }
  .avix-section-nav__viewport::-webkit-scrollbar{display:none}
  .avix-section-nav__inner{
    width:max-content !important;
    min-width:100% !important;
    gap:10px !important;
  }
  .avix-section-nav__link{
    flex:0 0 auto !important;
    min-width:max-content !important;
    white-space:nowrap !important;
  }

  /* all major two-column / three-column assemblies collapse gracefully on tablet */
  .av5-hero-grid,
  .av5-products-grid,
  .s12-hero-grid,
  .p3-hero-grid,
  .co18-hero-grid,
  .tc-hero-grid,
  .fp-hero-grid,
  .team9-founder-card,
  .fp2-profile-card,
  .tc-contact-shell,
  .tc-prefooter-grid,
  .av5-cta-grid,
  .s12-section-head,
  .av5-section-head,
  .sr-need-head,
  .v76-format-grid,
  .v76-positioning-band,
  .co18-build-grid,
  .co18-market-grid,
  .co18-upside-stats,
  .co18-partner-grid,
  .co18-prefooter-grid,
  .team9-build-grid,
  .fp2-water-grid,
  .fp-science-map-grid,
  .fp-cta-grid,
  .fp-venture-grid,
  .tc-contact-shell,
  .avix-footer-top,
  .avix-footer-offices,
  .avix-footer-bottom{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:24px !important;
  }

  .sr-need-points,
  .sr-standard-grid,
  .sr-protect-grid,
  .sr-verification-board,
  .sr-product-grid,
  .sr-value-grid,
  .co18-proof-grid,
  .co18-checkpoints,
  .co18-milestones,
  .team9-team-grid,
  .team9-build-points,
  .fp-proof-grid,
  .fp-capability-row,
  .sr-contact-choices,
  .tc-form-grid,
  .av5-evidence-grid{
    grid-template-columns:1fr !important;
  }

  .sr-readiness-track,
  .v76-commercial-pathway,
  .co18-backbone-strip,
  .co18-upside-route-steps,
  .fp-career-track{
    grid-template-columns:1fr !important;
    display:grid !important;
    gap:16px !important;
  }

  .team9-logo-track,
  .fp2-logo-track{
    display:flex !important;
    flex-wrap:wrap !important;
    gap:12px !important;
    justify-content:flex-start !important;
  }

  .av5-products-bottles,
  .p3-hero-products,
  .co18-hero-visual,
  .tc-hero-grid .avix-utility-visual,
  .fp-hero-visual,
  .s12-hero-visual,
  .team9-hero-art,
  .team9-founder-photo-shell,
  .fp2-profile-image-shell,
  .fp2-profile-image,
  .av5-founder-image,
  .av5-hero-bottle{
    justify-self:center !important;
    text-align:center !important;
    margin-inline:auto !important;
  }

  .av5-hero-bottle img,
  .av5-founder-image img,
  .team9-founder-photo,
  .fp2-profile-image img,
  .fp-hero-visual img,
  .tc-hero-grid .avix-utility-visual img,
  .s12-hero-visual img,
  .team9-hero-art img,
  .team9-person-image img,
  .sr-product-image img,
  .av5-products-bottles img,
  .p3-hero-products img,
  .co18-hero-visual img{
    width:100% !important;
    max-width:100% !important;
    height:auto !important;
    object-fit:contain !important;
  }

  /* menu overlay width fix */
  .av5-nav{
    width:min(92vw, 420px) !important;
    max-width:calc(100vw - (var(--avix-mobile-gutter) * 2)) !important;
    overflow-y:auto !important;
    max-height:calc(100vh - 24px) !important;
  }

  /* iframe content must always breathe */
  .s12-plant-diagram{
    width:100% !important;
    min-height:780px !important;
    border-radius:18px !important;
  }
}

@media (max-width:767px){
  :root{ --avix-mobile-gutter: 16px; }

  body{
    overflow-x:hidden !important;
  }

  .av5-container,
  .container,
  .sheet,
  .avix-footer-shell{
    width:min(100%, calc(100% - (var(--avix-mobile-gutter) * 2))) !important;
  }

  /* Type scale */
  h1{
    font-size:clamp(36px, 10vw, 52px) !important;
    line-height:1.02 !important;
    letter-spacing:-.035em !important;
  }
  h2{
    font-size:clamp(29px, 7.4vw, 38px) !important;
    line-height:1.08 !important;
    letter-spacing:-.03em !important;
  }
  h3{
    font-size:20px !important;
    line-height:1.18 !important;
  }
  p,
  li,
  .av5-button,
  input,
  select,
  textarea,
  .avix-section-nav__label,
  .avix-section-nav__num{
    font-size:16px !important;
    line-height:1.55 !important;
  }

  .av5-eyebrow,
  .team9-accent,
  .tc-kicker,
  .fp2-profile-kicker,
  .sr-need-label,
  .sr-stage-label{
    font-size:12px !important;
    letter-spacing:.08em !important;
  }

  /* Global spacing */
  .av5-section,
  .co18-section,
  .tc-contact-path,
  .tc-prefooter,
  .av5-cta,
  .fp-cta,
  .team9-founder-section,
  .team9-avix-team,
  .team9-build,
  .fp2-profile,
  .fp2-water,
  .fp-ventures,
  .fp-career-strip,
  .tc-contact-main,
  .avix-global-footer{
    padding-block:56px !important;
  }

  .av5-topline{
    font-size:12px !important;
  }
  .av5-topline-centre{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:6px !important;
    justify-items:center !important;
    text-align:center !important;
    padding-block:9px !important;
  }
  .av5-topline-centre i{display:none !important;}

  .av5-header{
    position:sticky !important;
    top:0 !important;
    z-index:90 !important;
  }
  .av5-header-inner{
    min-height:72px !important;
    gap:14px !important;
    align-items:center !important;
  }
  .av5-brand img,
  .avix-footer-logo{
    width:auto !important;
    max-width:190px !important;
    height:auto !important;
  }
  .av5-menu{margin-left:auto !important;}

  /* Mobile heroes */
  .avix-principal-hero,
  .avix-home-hero,
  .s12-hero,
  .p3-hero,
  .co18-hero,
  .tc-hero,
  .fp-hero,
  .team9-hero{
    min-height:auto !important;
    padding-block:36px 44px !important;
  }
  .av5-hero-grid,
  .s12-hero-grid,
  .p3-hero-grid,
  .co18-hero-grid,
  .tc-hero-grid,
  .fp-hero-grid{
    gap:22px !important;
  }
  .av5-hero-copy,
  .s12-hero-copy,
  .p3-hero-copy,
  .co18-hero-copy,
  .tc-hero-copy,
  .fp-hero-copy{
    text-align:left !important;
    max-width:none !important;
  }
  .av5-hero-copy > p,
  .s12-hero-copy > p,
  .p3-hero-copy > p,
  .co18-hero-copy > p,
  .tc-hero-copy > p,
  .fp-hero-copy > p{
    max-width:none !important;
  }
  .av5-actions,
  .av5-founder-actions,
  .team9-linkedin,
  .fp2-linkedin{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    gap:12px !important;
    width:100% !important;
  }
  .av5-actions .av5-button,
  .av5-founder-actions .av5-button,
  .team9-linkedin .av5-button,
  .fp2-linkedin .av5-button,
  .tc-prefooter .av5-button,
  .av5-cta .av5-button,
  .fp-cta .av5-button{
    width:100% !important;
    justify-content:center !important;
  }
  .av5-hero-bottle img{
    max-width:230px !important;
  }
  .s12-hero-visual img,
  .team9-hero-art img,
  .tc-hero-grid .avix-utility-visual img,
  .fp-hero-visual img,
  .co18-hero-visual img,
  .p3-hero-products img{
    max-width:min(100%, 320px) !important;
  }

  .sr-hero-proof{
    margin-top:10px !important;
  }
  .sr-hero-proof-grid{
    display:grid !important;
    grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
    gap:10px !important;
  }
  .sr-hero-proof-grid > div{
    min-width:0 !important;
  }

  /* Home page */
  .sr-need-points article,
  .sr-standard-grid article,
  .sr-readiness-track article,
  .sr-protect-grid article,
  .sr-verification-board article,
  .co18-proof-card,
  .co18-market-card,
  .team9-build-card,
  .team9-person,
  .fp-venture-card,
  .tc-office-card,
  .av5-mineral-panel,
  .v76-format-offer,
  .v76-format-standard{
    padding:18px !important;
    border-radius:18px !important;
  }
  .av5-evidence-grid{
    gap:16px !important;
  }
  .av5-bar-row{
    grid-template-columns:1fr !important;
    gap:10px !important;
  }
  .av5-bar-row strong,
  .av5-bar-row > div{
    text-align:left !important;
  }
  .av5-products-grid{
    gap:28px !important;
  }
  .av5-product-list{
    display:grid !important;
    gap:10px !important;
  }
  .av5-product-list > div{
    padding:12px 14px !important;
    border-radius:14px !important;
  }
  .av5-products-bottles img{
    max-width:300px !important;
  }
  .v76-commercial-pathway article{
    min-height:auto !important;
  }
  .v76-positioning-metrics{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:10px !important;
  }
  .av5-founder-shell,
  .av5-founder-stats{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:18px !important;
  }
  .av5-founder-image img{
    max-width:220px !important;
    border-radius:18px !important;
  }

  /* Science page */
  .sr-profile-visual{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:12px !important;
  }
  .sr-profile-arrow{
    text-align:center !important;
  }
  .s12-process-guardrails{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:14px !important;
  }
  .s12-plant-diagram{
    min-height:980px !important;
  }

  /* Products page */
  .sr-product-grid,
  .sr-backbone,
  .sr-split,
  .sr-portfolio{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:16px !important;
  }
  .sr-product-image img{
    max-width:230px !important;
    margin-inline:auto !important;
  }

  /* Commercial opportunity */
  .co18-section{
    padding-block:56px !important;
  }
  .co18-build-grid,
  .co18-market-grid,
  .co18-unit-economics,
  .co18-investment-bridge,
  .co18-upside-core,
  .co18-upside-engine,
  .co18-partner-grid,
  .co18-products-ready,
  .co18-prefooter-grid{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:16px !important;
  }
  .co18-backbone-strip,
  .co18-checkpoints,
  .co18-milestones,
  .co18-upside-route-steps{
    gap:12px !important;
  }

  /* Team page */
  .team9-founder-main,
  .team9-founder-side,
  .team9-founder-metrics,
  .team9-build-grid,
  .team9-build-points,
  .team9-team-grid,
  .team9-logo-set{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:16px !important;
  }
  .team9-founder-photo{
    max-width:250px !important;
    margin-inline:auto !important;
  }

  /* Founder profile */
  .fp-proof-grid,
  .fp2-profile-main,
  .fp2-profile-side,
  .fp2-profile-metrics,
  .fp2-water-grid,
  .fp-science-map-grid,
  .fp-venture-grid,
  .fp-career-track,
  .fp-capability-row,
  .fp-cta-grid{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:16px !important;
  }

  /* Contact page */
  .sr-contact-choices article,
  .tc-contact-aside > article,
  .tc-office-card,
  .tc-direct{
    padding:18px !important;
    border-radius:18px !important;
  }
  .tc-form-grid{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:14px !important;
  }
  .tc-form-submit{
    align-items:stretch !important;
    gap:12px !important;
  }
  .tc-consent{
    align-items:flex-start !important;
  }
  .tc-socials{
    flex-wrap:wrap !important;
  }
  .tc-phone-list{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:10px !important;
  }

  /* Utility / legal pages */
  .legal-page-main,
  .utility-page-main,
  .utility-page-grid,
  .utility-page-shell{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:16px !important;
  }

  /* Footer */
  .avix-global-footer{
    padding-block:42px 28px !important;
  }
  .avix-footer-top,
  .avix-footer-offices,
  .avix-footer-bottom{
    gap:18px !important;
  }
  .avix-footer-column,
  .avix-footer-contact,
  .avix-footer-office,
  .avix-footer-brand{
    padding:0 !important;
  }
  .avix-footer-proof,
  .avix-footer-socials,
  .avix-footer-bottom nav{
    display:flex !important;
    flex-wrap:wrap !important;
    gap:10px !important;
    justify-content:flex-start !important;
  }
  .avix-footer-proof li,
  .avix-footer-bottom nav a{
    min-width:0 !important;
  }
  .avix-footer-contact-block,
  .avix-footer-phones{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:10px !important;
  }
  .avix-footer-disclaimer,
  .avix-footer-bottom p{
    font-size:13px !important;
    line-height:1.55 !important;
  }
}

@media (max-width:420px){
  .sr-hero-proof-grid{
    grid-template-columns:1fr !important;
  }
  .av5-brand img,
  .avix-footer-logo{
    max-width:170px !important;
  }
  .av5-hero-bottle img,
  .av5-products-bottles img,
  .p3-hero-products img,
  .co18-hero-visual img,
  .tc-hero-grid .avix-utility-visual img,
  .fp-hero-visual img,
  .s12-hero-visual img,
  .team9-founder-photo,
  .av5-founder-image img{
    max-width:210px !important;
  }
}

/* embedded diagram support if the diagram is opened directly */
@media (max-width:767px){
  .page-diagram .sheet{
    width:min(100%, calc(100% - 24px)) !important;
    padding:12px !important;
  }
}
