/* Mobile homepage composition repair, based on actual device captures.
   This stylesheet loads AFTER the shared viewport/scroll sheets.
   Scope narrowly to Company, Historical Catalogue and final Contact, so the
   original sticky-sheet navigation, page scroll and other pages stay intact. */
@media(max-width:900px){
  /* Section one: story occupies the middle/lower portion of the screen
     instead of pinning the editorial card directly underneath the header. */
  html body.znj-home .znj-mobile-home > section.znj-m-story{
    justify-content:center!important;
    align-items:stretch!important;
    min-height:max(460px,calc(100svh - var(--znj-safe-head,88px) - var(--znj-safe-dock,82px)))!important;
    padding-top:clamp(24px,4svh,44px)!important;
    padding-bottom:clamp(32px,6svh,65px)!important;
    overflow:hidden!important;
    background:#111a17!important;
  }
  html body.znj-home .znj-mobile-home > section.znj-m-story > .znj-m-image{
    position:absolute!important;
    inset:0!important;
    width:100%!important;
    height:100%!important;
    max-height:none!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    z-index:0!important;
  }
  html body.znj-home .znj-mobile-home > section.znj-m-story > .znj-m-image img{
    width:100%!important;height:100%!important;
    object-fit:cover!important;object-position:50% 45%!important;
    filter:brightness(.68);
  }
  html body.znj-home .znj-mobile-home > section.znj-m-story > .znj-m-image:after{
    content:"";position:absolute;inset:0;
    background:linear-gradient(180deg,rgba(11,18,15,.42),rgba(11,18,15,.18) 30%,rgba(11,18,15,.78) 100%);
  }
  html body.znj-home .znj-mobile-home > section.znj-m-story > .znj-m-panel-content{
    position:relative!important;z-index:2!important;
    width:calc(100% - 32px)!important;
    max-width:580px!important;
    margin:0 auto!important;
    padding:clamp(22px,5vw,35px)!important;
    background:linear-gradient(140deg,rgba(28,29,24,.94),rgba(17,21,18,.94))!important;
    border:1px solid rgba(213,179,122,.43)!important;
    border-radius:24px!important;
    box-shadow:0 16px 48px rgba(0,0,0,.28)!important;
    -webkit-backdrop-filter:none!important;backdrop-filter:none!important;
  }
  /* Rebalance CTA section instead of leaving half an empty sheet. */
  html body.znj-home .znj-mobile-home > section.znj-m-contact{
    justify-content:center!important;
    align-items:stretch!important;
    min-height:max(420px,calc(100svh - var(--znj-safe-head,88px) - var(--znj-safe-dock,82px)))!important;
    padding-top:clamp(35px,7svh,80px)!important;
    padding-bottom:clamp(35px,7svh,80px)!important;
    background:radial-gradient(ellipse at 90% 25%,rgba(196,151,81,.12),transparent 55%),
      linear-gradient(155deg,#19201a,#0b1410 75%)!important;
  }
  html body.znj-home .znj-mobile-home > section.znj-m-contact > .znj-m-panel-content{
    width:100%!important;max-width:600px!important;
    margin:auto!important;
    padding:clamp(20px,5vw,35px)!important;
    border-left:2px solid rgba(215,179,115,.7)!important;
  }
  html body.znj-home .znj-mobile-home > section.znj-m-contact .znj-m-actions{
    margin-top:clamp(20px,3svh,34px)!important;
  }

  /* Historical catalogue: show 2-2.3 genuinely different original logos in
     a single horizontal rail; full cards remain accessible by swiping. */
  html body.znj-home .znj-mobile-home > section.znj-m-footprint{
    justify-content:center!important;
    align-items:stretch!important;
    gap:clamp(12px,2svh,23px)!important;
    min-height:max(420px,calc(100svh - var(--znj-safe-head,88px) - var(--znj-safe-dock,82px)))!important;
    padding-top:clamp(20px,4svh,38px)!important;
    padding-bottom:clamp(25px,4svh,42px)!important;
    overflow:hidden!important;
  }
  html body.znj-home .znj-mobile-home > section.znj-m-footprint > .znj-m-panel-content{
    flex:none!important;
    padding-inline:clamp(18px,5vw,30px)!important;
  }
  html body.znj-home .znj-mobile-home .znj-m-footprint .znj-m-logo-rail{
    width:100%!important;
    gap:clamp(9px,2.3vw,15px)!important;
    align-items:stretch!important;
    padding:4px clamp(18px,5vw,30px) 12px!important;
    scroll-padding-inline:clamp(18px,5vw,30px);
    scroll-snap-type:x mandatory!important;
    overflow-x:auto!important;overflow-y:hidden!important;
    touch-action:pan-x pan-y!important;
  }
  html body.znj-home .znj-mobile-home .znj-m-footprint .znj-m-logo-tile{
    flex:0 0 clamp(128px,43vw,220px)!important;
    width:clamp(128px,43vw,220px)!important;
    max-width:clamp(128px,43vw,220px)!important;
    min-width:0!important;
    min-height:clamp(150px,23svh,230px)!important;
    height:clamp(150px,23svh,230px)!important;
    padding:clamp(11px,2.5vw,20px)!important;
    gap:clamp(9px,1.8svh,18px)!important;
    border-radius:16px!important;
    justify-content:center!important;
    background:#f7f5ef!important;
    scroll-snap-align:start!important;
  }
  html body.znj-home .znj-mobile-home .znj-m-footprint .znj-m-logo-tile img{
    display:block!important;
    width:100%!important;
    height:clamp(75px,13svh,125px)!important;
    max-height:125px!important;
    max-width:100%!important;
    object-fit:contain!important;
  }
  html body.znj-home .znj-mobile-home .znj-m-footprint .znj-m-logo-tile :is(span,strong){
    font-size:clamp(10px,2.5vw,12px)!important;
    line-height:1.35!important;
    overflow-wrap:anywhere;
  }
  html body.znj-home .znj-mobile-home .znj-m-footprint > .znj-m-carousel-footer{
    padding:0 clamp(18px,5vw,30px)!important;
    min-height:30px!important;
  }
}
/* Wider phones/tablets can carry three original historical catalogue tiles
   while retaining the same native horizontal swipe interaction. */
@media(min-width:600px) and (max-width:900px){
  html body.znj-home .znj-mobile-home .znj-m-footprint .znj-m-logo-tile{
    flex-basis:clamp(170px,29vw,250px)!important;
    width:clamp(170px,29vw,250px)!important;
    max-width:clamp(170px,29vw,250px)!important;
  }
}
@media(max-width:900px) and (max-height:630px){
  html body.znj-home .znj-mobile-home > section.znj-m-story,
  html body.znj-home .znj-mobile-home > section.znj-m-contact,
  html body.znj-home .znj-mobile-home > section.znj-m-footprint{
    min-height:0!important;
    justify-content:flex-start!important;
  }
  html body.znj-home .znj-mobile-home .znj-m-footprint .znj-m-logo-tile{
    min-height:135px!important;height:135px!important;
  }
}
@media(prefers-reduced-motion:reduce){
  html body.znj-home .znj-mobile-home .znj-m-footprint .znj-m-logo-rail{scroll-behavior:auto!important}
}
