/* Layout-only fixes for phones and desktops. No colours, fonts or brand changes. Linked last on every page. */

/* 1. Decorative shapes (the moving circles and squares) never catch taps and never sit above text. */
div.px:empty{pointer-events:none;z-index:0}

/* 2. Finger-sized tap targets on touch screens (44px is the usual minimum). Mouse users see no change. */
@media (pointer:coarse){
  button,[role=button],[role=tab],select,input[type=button],input[type=submit],
  .tab,.chip,.pre,.rm,.seg,.m,.b,.mini,.btn,.lg-btn,.lg-go{min-height:44px}
  button,[role=button],[role=tab],.tab,.chip,.pre,.rm,.seg,.m,.mini{min-width:44px}
  summary{padding-block:12px}
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]):not([type=file]),textarea{min-height:44px}
  .nav-l{min-width:44px;min-height:44px;justify-content:center;padding:.3rem .5rem}
  .lg-body h3 a,.card .plate a{display:inline-block;padding-block:8px}
  a.home{min-height:44px}
  label:has(>input[type=checkbox]),label:has(>input[type=radio]){min-height:44px;display:flex;align-items:center}
  a[href="../index.html"]{min-height:44px;display:flex!important;align-items:center}
}

/* 3. Never allow sideways scrolling, even if one stray element is too wide. */
html,body{max-width:100%;overflow-x:clip}

/* 4. Respect the notch and home bar on phones. */
@supports (padding:max(0px)){
  body{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
}

/* Parallax band: keep the shapes at the edges on phones, and keep the white headline readable wherever a shape passes behind it. */
.band-tx{text-shadow:0 2px 0 rgba(10,37,64,.9),0 0 22px rgba(10,37,64,.55)}
@media(max-width:767px){
  .band-sq{width:7rem!important;height:7rem!important;right:-2rem!important;bottom:-1.5rem!important}
  .band-ci{width:11rem!important;height:11rem!important;left:-4.5rem!important;top:1rem!important}
}
@media(max-width:767px){
  #phone>div.px:first-child{top:38%!important;left:-2rem!important;width:6rem!important;height:6rem!important}
}

/* Homepage on phones: tighter, steadier spacing so the sections read as one scroll. Desktop is untouched. */
@media(max-width:767px){
  .lg{padding:4rem 0 3.5rem}
  .lg-lead{margin-top:16px;font-size:1.05rem}
  .lg-stats{margin-top:24px}
  .lg-rack{margin-top:34px}
  .lg-cards{gap:20px}
  .lg-shot{aspect-ratio:16/9}
  .lg-body{padding:14px 16px 2px;gap:6px}
  .lg .lg-ds{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;line-height:1.5}
  .lg-go{margin:10px 16px 16px}
  .lg-more{margin-top:28px;gap:12px}
  section.band{height:auto;min-height:0;padding:76px 0}
  #creative .grid{gap:28px}
  #phone{padding-block:0}
  .br{margin-top:44px}
  .br-lead{margin-top:14px;font-size:1.05rem}
  .br-pillars{margin-top:26px;gap:14px}
  .br-pillars li{padding:18px 18px 20px}
  .br-wall{margin-top:30px}
  #contact{padding-block:3.5rem}
  .ct .bc-wrap{margin-top:36px}
}
@media(max-width:767px) and (orientation:portrait){
  .hero-wrap{top:22%!important}
  .hero-brain{height:min(78vw,46vh)!important}
}
