/* WeBecome phone layout. Desktop is untouched: everything here sits behind the media query. */
.mnav-btn,.mnav-cta,.mbar,.mdots{display:none}

/* Sticky header on every screen size. Its size never changes; once you scroll, a backing fades in behind it. */
html{scroll-padding-top:96px}
body>div:first-of-type>header{position:sticky;top:0;z-index:60}
body>div:first-of-type>header::before{content:"";position:absolute;top:0;bottom:0;left:-16px;right:-16px;z-index:-1;background:#EDEDEA;box-shadow:0 14px 24px -14px rgba(10,10,10,.22);opacity:0;transition:opacity .2s ease;pointer-events:none}
body>div:first-of-type>header.stuck::before{opacity:1}
@media (prefers-reduced-motion:reduce){body>div:first-of-type>header::before{transition:none}}

/* Desktop and tablet: once you scroll, the menu floats as a rounded frosted bar. Size never changes, only the backing fades in. */
@media (min-width:761px){
  body>div:first-of-type>header{top:16px}
  body>div:first-of-type>header::before{top:-8px;bottom:8px;left:-12px;right:-12px;border-radius:26px;background:rgba(218,218,212,.72);-webkit-backdrop-filter:saturate(170%) blur(20px);backdrop-filter:saturate(170%) blur(20px);border:1px solid rgba(10,10,10,.08);box-shadow:inset 0 1px 0 rgba(255,255,255,.55),0 2px 6px rgba(10,10,10,.06),0 24px 50px -22px rgba(10,10,10,.42);transform:translateY(-6px) scale(.985);transition:opacity .25s ease,transform .35s cubic-bezier(.2,.8,.2,1)}
  body>div:first-of-type>header.stuck::before{transform:none}
}
@media (min-width:761px) and (max-width:1240px){
  body>div:first-of-type>header::before{top:-2px;bottom:2px;left:-10px;right:-10px;border-radius:24px}
}
@media (prefers-reduced-motion:reduce){body>div:first-of-type>header::before{transform:none!important}}

/* Below 1240px the full menu would wrap onto several rows, so the header becomes one slim row with a menu button */
@media (max-width:1240px){
  body>div:first-of-type>header{flex-wrap:nowrap!important;justify-content:flex-start!important;gap:8px!important;padding:10px 0!important}
  header>a:first-child{min-height:46px!important;padding:0 16px!important;font-size:21px!important;flex:0 0 auto}
  header>a:not(:first-child){margin-left:auto;min-height:46px!important}
  header>nav{display:none!important}
  .mnav-btn{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;flex:0 0 auto;height:46px;padding:0 16px;border:0;border-radius:14px;background:#0A0A0A;color:#FFF;font:600 14px Inter,system-ui,sans-serif;cursor:pointer}
  .mnav-btn i{display:block;width:18px;height:2px;background:#FFF;border-radius:2px;transition:transform .25s ease}
  header.open .mnav-btn i:first-child{transform:translateY(3.5px) rotate(45deg)}
  header.open .mnav-btn i:last-child{transform:translateY(-3.5px) rotate(-45deg)}
  header.open>nav{display:flex!important;position:absolute;left:auto;right:0;width:min(380px,100%);box-sizing:border-box;top:calc(100% - 2px);flex-direction:column!important;flex-wrap:nowrap!important;gap:2px!important;padding:8px!important;border-radius:18px!important;box-shadow:0 24px 48px rgba(10,10,10,.18);font-size:17px!important}
  header.open>nav a{padding:14px 14px!important;border-radius:10px!important}
  header.open>nav .mnav-cta{display:flex!important;align-items:center;justify-content:space-between;margin-top:6px;min-height:54px!important;padding:0 6px 0 16px!important;background:#0A0A0A!important;color:#FFF!important;border-radius:12px!important;font-weight:600;text-decoration:none!important}
}

@media (max-width:760px){
  html{scroll-padding-top:76px}
  body>div:first-of-type{padding:0 10px!important}
  body>div:first-of-type>header::before{left:-10px;right:-10px}

  /* Phone header: logo left, menu button right, menu drops down full width */
  header{background:#EDEDEA}
  header>a:not(:first-child){display:none!important}
  .mnav-btn{margin-left:auto}
  header.open>nav{left:0;width:auto}

  /* Section labels: keep number and name on one tidy line */
  .mrow{flex-wrap:nowrap!important;gap:14px!important;letter-spacing:1.5px!important;font-size:11px!important}
  .mrow>*{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mrow>:first-child{flex:0 0 auto;overflow:visible}
  .mrow>:nth-child(2){min-width:0;text-align:right}
  .mrow>:nth-child(3){display:none!important}

  /* Desktop sized gaps */
  .sec,section.s6,section[style*="padding: 120px"]{padding-top:56px!important;padding-bottom:56px!important}
  .reel{padding-top:48px!important;padding-bottom:8px!important}
  .reel .wrap>div[style*="margin-top: 48px"]{margin-top:24px!important}
  .reelwrap{margin-top:24px!important}
  footer{padding-top:44px!important}
  .h2,h2.s19,h2[style*="margin: 64px"]{margin-top:24px!important}
  a.s15,a.s17{width:100%;box-sizing:border-box;justify-content:space-between}
  a.s17{justify-content:center}
  [style*="margin-top: 72px"],[style*="margin-top: 64px"],[style*="margin-top: 56px"],.tk{margin-top:28px!important}
  .panel{padding:36px 20px!important;border-radius:26px!important}
  p[style*="margin: 28px 0 0"]{margin-top:16px!important;font-size:17px!important}

  /* Cards: drop the tall fixed heights and slim the padding */
  .pcard,.tkc,.step,.s8,.s10,div.s2,div[style*="min-height: 2"]{min-height:0!important}
  .pcard,div.s2,div[style*="padding: 36px;"]{padding:24px!important}
  .tkc{padding:24px!important;gap:20px!important}
  span.big{font-size:80px!important}
  .s3,span[style*="font-size: 96px"]{font-size:68px!important}
  .band:has(video){min-height:480px!important;border-radius:26px!important}

  /* Client logos: three across, slimmer */
  section[aria-label="Employers we work with"]{padding:8px 0 24px!important}
  section[aria-label="Employers we work with"]>div{grid-template-columns:repeat(3,1fr)!important;gap:8px!important}
  .logo{height:48px!important;border-radius:12px!important;font-size:10px!important}

  /* Services list: colour tile becomes a small pill */
  a.svc{padding:22px 0!important;gap:10px 14px!important;align-items:center}
  .svn{flex:0 0 auto!important;font-size:26px!important}
  span.tile{flex:0 0 auto!important;height:auto!important;padding:7px 12px!important;border-radius:999px!important;font-size:14px!important}
  .svb{flex-basis:100%!important}
  .svd{font-size:16px!important}

  /* Homepage hero */
  #top h1{min-height:3em}
  #top h1+p{margin-top:12px!important}
  #top>div:last-child{gap:28px!important}
  .btnw,.btno{width:100%;box-sizing:border-box;justify-content:space-between}
  .btno{justify-content:center}
  .wb{padding:22px 22px 20px!important;border-radius:22px!important}
  .wbh{font-size:38px!important;margin-top:12px!important}
  .wbw{height:180px!important}
  .wbf{font-size:14px!important;padding-top:14px!important}
  form button[type="submit"]{font-size:16px!important}

  /* Homepage banner on phones: the first screen is the video and the message, the request card follows on black.
     The video only covers the first screen, so it is never stretched by the content below. */
  #top.hero{padding:18px 18px 22px!important;min-height:0!important}
  #top>div[aria-hidden="true"]:not(.hv){display:none!important}
  #top .hv{bottom:auto!important;height:calc(100svh - 64px);z-index:0}
  #top .hv::after{background:linear-gradient(180deg,rgba(10,10,10,.30) 0%,rgba(10,10,10,.12) 22%,rgba(10,10,10,.35) 45%,rgba(10,10,10,.82) 70%,#0A0A0A 100%)!important}
  #top .hv::before{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(180deg,rgba(22,49,242,.30) 0%,rgba(22,49,242,.20) 45%,rgba(22,49,242,.06) 75%,rgba(22,49,242,0) 100%)}
  #top .hv::after{z-index:2}
  #top>.row{border-bottom:0!important;padding-bottom:0!important}
  #top .hgrid{margin-top:0!important;gap:22px!important}
  #top .hgrid>div:first-child{min-height:calc(100svh - 150px);display:flex;flex-direction:column;justify-content:flex-end}
  #top .hh{font-size:clamp(40px,11.5vw,50px)!important;line-height:1.02;min-height:0!important}
  #top .hlead{font-size:16px!important;line-height:1.5;margin-top:12px!important;color:rgba(255,255,255,.88)!important}
  #top .hbtns{margin-top:18px!important}
  #top .btno{display:none!important}
  #top .btnw{min-height:56px}
  #top .hchips{flex-wrap:nowrap!important;overflow-x:auto;margin:14px -18px 0!important;padding:0 18px 2px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  #top .hchips::-webkit-scrollbar{display:none}
  #top .hchip,#top .hchips .chip{flex:0 0 auto;padding:7px 12px 7px 7px!important;gap:10px!important;background:rgba(10,10,10,.45)!important;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
  #top .hchips .chip b{font-size:14px!important;padding:6px 9px!important}
  #top .hchips .chip span{font-size:13px!important;white-space:nowrap}
  #top .qf{grid-template-columns:1fr 1fr!important;gap:10px!important}
  #top .qf label:nth-of-type(1),#top .qf label:nth-of-type(6),#top .qf label:nth-of-type(7),#top .qf label:nth-of-type(8){grid-column:1 / -1}
  #top .qf p.qh{font-size:20px!important}
  #top .qf select,#top .qf input{padding:0 10px!important}
  #top .wb{background:#151515!important;border-color:rgba(255,255,255,.12)!important;-webkit-backdrop-filter:none;backdrop-filter:none}

  /* Inputs at 16px so iPhone does not zoom in on tap */
  input,select,textarea,.fi{font-size:16px!important}

  /* Card rows become swipe rails with dots */
  .mrail{display:flex!important;grid-template-columns:none!important;overflow-x:auto;scroll-snap-type:x mandatory;gap:12px!important;padding-bottom:6px;scrollbar-width:none;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
  .mrail::-webkit-scrollbar{display:none}
  .mrail>*{flex:0 0 84%!important;max-width:84%;box-sizing:border-box;scroll-snap-align:start;min-width:0}
  .mdots{display:flex;justify-content:center;gap:6px;margin-top:14px}
  .mdots i{width:6px;height:6px;border-radius:99px;background:currentColor;opacity:.25;transition:width .25s ease,opacity .25s ease}
  .mdots i.on{width:20px;opacity:1}
  .mrail .pcard.lit{transform:none;box-shadow:none;border-color:transparent}
  .mrail .pcard.lit .big{color:#E6E6E2;transform:none}
  .mrail .pcard.act{border-color:#1631F2}
  .mrail .pcard.act .big{color:#1631F2}
  .mrail .step{gap:10px}

  /* Request staff bar that follows you down the page */
  .mbar{display:flex;position:fixed;left:10px;right:10px;bottom:calc(10px + env(safe-area-inset-bottom));z-index:55;align-items:center;justify-content:space-between;gap:12px;min-height:58px;padding:0 6px 0 20px;background:#0A0A0A;color:#FFF;border-radius:16px;box-shadow:0 18px 40px rgba(10,10,10,.35);font:600 16px Inter,system-ui,sans-serif;text-decoration:none;transform:translateY(140%);transition:transform .35s ease}
  .mbar.show{transform:none}
  .mbar span{display:inline-flex;width:46px;height:46px;align-items:center;justify-content:center;background:#1631F2;border-radius:11px;font-size:20px}
  body.has-mbar footer{padding-bottom:96px!important}

  /* Apply page hero clip */
  .panel figure video{height:280px!important}

  /* Enterprise coverage: provinces in two columns */
  #coverage div:has(> .pb){display:grid!important;grid-template-columns:1fr 1fr;gap:8px!important}

  /* Enterprise portal: each requirement becomes a small card, no sideways scroll */
  #ptable{min-width:0!important}
  #ptable .ph{display:none!important}
  #ptable .pt{grid-template-columns:1fr auto!important;row-gap:6px!important;padding:16px 0!important}
  #ptable .pt>span:nth-child(1){grid-column:1;grid-row:1}
  #ptable .pt>span:nth-child(2){grid-column:1;grid-row:2;font-size:13px;color:#6B6B6B}
  #ptable .pt>span:nth-child(3){grid-column:2;grid-row:1;font-weight:600}
  #ptable .pt>span:nth-child(3)::before{content:"Need ";font-weight:400;color:#6B6B6B}
  #ptable .pt>span:nth-child(4){grid-column:1 / -1;grid-row:3;margin-top:6px}
}

@media (max-width:380px){
  header>a:first-child{padding:0 12px!important;font-size:19px!important}
  .mnav-btn{padding:0 13px}
  span.big{font-size:68px!important}
}

@media (prefers-reduced-motion:reduce){
  .mbar,.mdots i{transition:none}
}
