/* WRGMI mobile overrides — loaded by every page */
#navCheck{display:none;}
.navBurger{display:none;}

@media (max-width:880px){
  /* ---- Nav / hamburger ---- */
  #siteNav{padding:12px 20px !important;backdrop-filter:none !important;-webkit-backdrop-filter:none !important;}
  #siteNav > a{position:relative;z-index:3;}
  #siteNav img{height:34px !important;}
  .navBurger{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;width:44px;height:44px;cursor:pointer;position:relative;z-index:3;margin-right:-6px;}
  .navBurger span{display:block;width:24px;height:2px;background:#e8e4de;transition:transform .3s,opacity .3s;}
  #navCheck:checked ~ .navBurger span:nth-child(1){transform:translateY(7px) rotate(45deg);}
  #navCheck:checked ~ .navBurger span:nth-child(2){opacity:0;}
  #navCheck:checked ~ .navBurger span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}
  .navLinks{position:fixed;top:0;left:0;width:100vw;height:100svh;z-index:2;flex-direction:column !important;align-items:flex-start !important;justify-content:center;gap:4px !important;padding:90px 28px 40px;background:rgba(12,11,10,.97);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);opacity:0;pointer-events:none;transition:opacity .25s;}
  #navCheck:checked ~ .navLinks{opacity:1;pointer-events:auto;}
  .navLinks a{font-size:21px !important;padding:12px 0;width:100%;}
  .navLinks a[style*="background"]{margin-top:20px;padding:16px 26px !important;width:auto;text-align:center;}

  /* ---- Horizontal gutters: any "… 48px" section/hero padding -> 20px ---- */
  [style*="px 48px"],[style*=":0 48px"],[style*=": 0 48px"]{padding-left:20px !important;padding-right:20px !important;}

  /* ---- Vertical rhythm ---- */
  [style*="130px 48px"]{padding-top:88px !important;padding-bottom:72px !important;}
  [style*="120px 48px"],[style*="120px 0"]{padding-top:80px !important;padding-bottom:80px !important;}
  [style*="100px 48px"]{padding-top:72px !important;}
  [style*="140px 48px"]{padding-top:88px !important;}
  [style*="160px 48px"]{padding-top:130px !important;padding-bottom:52px !important;}
  [style*="200px 48px"]{padding-top:150px !important;padding-bottom:56px !important;}

  /* ---- Grids collapse ---- */
  [style*="repeat(3,1fr)"],[style*="repeat(3, 1fr)"]{grid-template-columns:1fr !important;}
  [style*="repeat(2,1fr)"],[style*="repeat(2, 1fr)"]{grid-template-columns:1fr !important;}
  [style*="grid-template-columns:1fr 1fr"],[style*="grid-template-columns: 1fr 1fr"]{grid-template-columns:1fr !important;}
  [style*="1fr 1.4fr"]{grid-template-columns:1fr !important;}
  [style*="repeat(4,1fr)"],[style*="repeat(4, 1fr)"]{grid-template-columns:repeat(2,1fr) !important;gap:16px !important;}
  section[data-screen-label="Engagement"] [style*="repeat(4"]{grid-template-columns:1fr !important;}
  [style*="2fr 1fr 1fr 1fr"]{grid-template-columns:1fr 1fr !important;gap:36px !important;}
  [style*="2fr 1fr 1fr 1fr"] > div:first-child{grid-column:1 / -1;}
  [style*="120px 1fr"]{grid-template-columns:1fr !important;gap:12px !important;padding-top:36px !important;padding-bottom:36px !important;}
  [style*="gap:72px"],[style*="gap: 72px"]{gap:44px !important;}
  [style*="gap:80px"],[style*="gap: 80px"]{gap:44px !important;}
  [style*="gap:60px"],[style*="gap: 60px"]{gap:36px !important;}

  /* ---- Index projects mosaic ---- */
  [style*="grid-auto-rows:260px"],[style*="grid-auto-rows: 260px"]{grid-auto-rows:230px !important;}
  figure[style*="span 2"]{grid-row:auto !important;}

  /* ---- Cards / cells ---- */
  [style*="44px 40px"]{padding:30px 24px !important;}
  [style*="padding:48px"],[style*="padding: 48px"]{padding:28px 18px !important;}

  /* ---- Type scale ---- */
  h1{font-size:clamp(38px,10.5vw,52px) !important;}
  h2{font-size:clamp(28px,7.6vw,38px) !important;}
  p[style*="clamp(26px"]{font-size:22px !important;line-height:1.35 !important;}
  p[style*="clamp(24px"]{font-size:21px !important;line-height:1.4 !important;}

  /* ---- Hero (index) ---- */
  [style*="height:100vh"],[style*="height: 100vh"]{height:100svh !important;min-height:600px !important;}
  div[style*="right:48px"][style*="top:50%"],div[style*="right: 48px"][style*="top: 50%"]{display:none !important;}

  /* ---- Heritage 1985 badge: keep on-screen ---- */
  [style*="left:-24px"],[style*="left: -24px"]{left:0 !important;bottom:0 !important;padding:16px 20px !important;font-size:24px !important;}

  /* ---- Marquee density ---- */
  [style*="0 56px"],[style*="0px 56px"]{padding-left:28px !important;padding-right:28px !important;}

  /* ---- Footer bottom bar ---- */
  [style*="24px 0 36px"],[style*="24px 0px 36px"]{flex-wrap:wrap;gap:10px;}

  /* ---- iOS: prevent input zoom ---- */
  input,textarea,select{font-size:16px !important;}
}
