/* responsive.css — load AFTER styles.css:  <link rel="stylesheet" href="responsive.css"> */

/* ───────── Global safety ───────── */
html,body{overflow-x:clip}
img,video,svg{max-width:100%}
body:has(.mobile-menu.open){overflow:hidden}
.p{line-height:1.55}                       /* was 1.2 – too tight once text wraps on narrow screens */
#manufacturing .mf-p{line-height:1.6}
#sustainability,.cg,.final,.contact,.prod{overflow:hidden}

/* ───────── Hero + video (all sizes) ───────── */
.sx-anwar{min-height:100vh;min-height:100svh}
.sx-anwar .anwar-video,.sx-anwar .anwar-poster{width:100%;height:100%;object-fit:cover;object-position:center}
.loader-wrap .ld-box img{max-width:100%;max-height:100%}

/* ───────── Extra-wide screens ───────── */
@media(min-width:1920px){
  .wrap{max-width:96rem}.wrap.md{max-width:80rem}.wrap.lg{max-width:72rem}.wrap.sm{max-width:60rem}
  .sx-hd,.sx-in,.topbar .tb{max-width:1760px}
  #manufacturing .mf-wrap{max-width:1360px}
}

/* ───────── Laptops / small desktops ───────── */
@media(max-width:1279px){
  .cat-show{gap:28px}
}

/* Team: stack intro above cards before the 3 columns get cramped */
@media(max-width:1180px){
  .team-layout{grid-template-columns:1fr;gap:40px}
  .team-intro{position:static;max-width:640px}
}
.tcontact a{overflow-wrap:anywhere}

/* Topbar: hide the location string on narrow tablets so nothing overflows */
@media(max-width:1023px){.topbar .loc{display:none}}

/* Products marquee, tablet */
@media(max-width:1024px){
  .mcard{width:clamp(200px,30vw,260px);margin:0 10px;border-radius:20px}
}

/* ───────── Tablets & below ───────── */
@media(max-width:980px){
  .cat-show{grid-template-columns:1fr}
  .sus-copy{max-width:none}
}

/* Sustainability feature cards: 2 columns (was 3, because .cat-stats overrode .sus-feats) */
.cat-stats.sus-feats{grid-template-columns:repeat(2,1fr)}
@media(max-width:560px){.cat-stats.sus-feats{grid-template-columns:1fr}}

/* Catalog grid: flex so the last row is centred, 5 → 3 → 2 → 1 */
.cg-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:20px}
.cg-card{flex:0 1 calc((100% - 80px)/5);min-width:0}
@media(max-width:1100px){.cg-card{flex-basis:calc((100% - 40px)/3)}}
@media(max-width:700px){.cg-grid{gap:14px}.cg-card{flex-basis:calc((100% - 14px)/2)}}
@media(max-width:420px){.cg-card{flex-basis:100%;max-width:340px}}

/* Certifications: flex, centred last row. 2 → 3 → 4 → 7 */
.certs{display:flex;flex-wrap:wrap;justify-content:center;gap:16px}
.cert-card{flex:0 1 calc((100% - 16px)/2);min-width:0;overflow-wrap:anywhere}
@media(min-width:640px){.cert-card{flex-basis:calc((100% - 32px)/3)}}
@media(min-width:1024px){.cert-card{flex-basis:calc((100% - 48px)/4)}}
@media(min-width:1360px){.cert-card{flex-basis:calc((100% - 96px)/7)}}

/* Manufacturing */
@media(max-width:900px){
  #manufacturing{padding-block:56px}
  #manufacturing .mf-panel,#manufacturing .mf-corner{display:none}
  #manufacturing .mf-orb{filter:blur(50px)}
  #manufacturing .mf-frame{aspect-ratio:4/3}
  #manufacturing .mf-caption{bottom:38px}
}
#manufacturing .mf-slide-dots i{position:relative}
#manufacturing .mf-slide-dots i::after{content:"";position:absolute;inset:-10px -3px}   /* bigger tap target */

/* ───────── Phones & small tablets ───────── */
@media(max-width:767px){
  .sec{padding:64px 0}
  .prod{padding:64px 0 48px}
  .cg,.final{padding:64px 0}
  .contact{padding:72px 0 64px}
  .g2{gap:36px}
  .ph{margin-bottom:32px}

  /* hero */
  .sx-in{padding-top:120px;padding-bottom:72px}
  .sx-h1{font-size:clamp(28px,8.4vw,44px);margin-bottom:20px}
  .sx-lead{line-height:1.5;margin-bottom:24px}
  .sx-cert{margin-top:24px;font-size:12px}
  .sx-shade{background:linear-gradient(to top,rgba(10,18,23,.92),rgba(10,18,23,.55) 55%,rgba(10,18,23,.35))}

  /* stats: clean 2×2 dividers */
  .si{padding:24px 16px}
  .stat:nth-child(2n){border-right:0}
  .stat:nth-child(-n+2){border-bottom:1px solid #e8e8e8}
  .stat p{font-size:12px}

  /* story mini-stats wrap instead of overflowing */
  .mini{flex-wrap:wrap;gap:20px 24px}
  .mini>div{gap:24px}
  .mini b{font-size:24px}

  /* products marquee */
  .marquee{padding:24px 0 36px}
  .marquee::before,.marquee::after{width:36px}
  .mcard{width:clamp(180px,56vw,240px);margin:0 8px;border-radius:18px}
  .mimg{padding:18px 14px 26px}
  .track{animation-duration:30s}

  /* team */
  .team-grid{grid-template-columns:1fr;gap:32px}
  .tcard,.tcard:first-child{border-left:0;padding:0;max-width:420px}

  /* contact */
  .contact-input,.form-input{font-size:16px}          /* stops iOS zoom-on-focus */
  .contact .intro{margin-bottom:36px}
  .info{gap:24px}
  #cf .btn-primary{width:100%;justify-content:center}
  .final .btns .btn-outline{width:100%;justify-content:center}

  /* footer */
  footer{padding:40px 0 28px}
}
@media(min-width:720px) and (max-width:1180px){
  .team-grid{grid-template-columns:repeat(3,1fr)}
}

/* Mobile menu */
.mobile-menu{overflow-y:auto;padding:72px 24px 32px}
.mobile-menu .cta{display:none}                       /* quote modal is disabled in script.js */
@media(max-width:380px){.mobile-menu nav a{font-size:26px}}
@media(max-height:640px){.mobile-menu nav a{font-size:24px;padding:6px 0}}

/* Footer links */
.fbs{display:flex;flex-wrap:wrap;justify-content:center;gap:12px 24px}
.fbs div{display:flex;flex-wrap:wrap;justify-content:center;gap:12px 24px}
.fbs a{color:rgba(255,255,255,.5);font-size:13px}.fbs a:hover{color:#fff}

/* ───────── Small phones (≤480) ───────── */
@media(max-width:480px){
  .sx-logo img{height:40px}
  .sx-hd{padding:12px 16px}
  .num{font-size:clamp(28px,8vw,34px)}
  #manufacturing .mf-frame{aspect-ratio:1/1.05;border-radius:16px}
  #manufacturing .mf-caption b{font-size:16px}
  #manufacturing .mf-caption span{font-size:12.5px}
  #manufacturing .mf-slide-dots i{width:12px}
  #manufacturing .mf-slide-dots i.on{width:22px}
  .cg-title{font-size:clamp(34px,11vw,48px)}
  .cg-eyebrow{letter-spacing:.24em}
}
@media(max-width:380px){.wrap{padding:0 16px}}

/* ───────── Short landscape phones ───────── */
@media(max-height:500px) and (orientation:landscape){
  .sx-in{padding-top:88px;padding-bottom:32px}
  .sx-h1{font-size:clamp(24px,5vw,40px);margin-bottom:12px}
  .sx-lead{margin-bottom:12px}
  .sx-cert{display:none}
  .mobile-menu nav a{font-size:22px;padding:4px 0}
}

/* ───────── Touch devices: no sticky hover, pause marquee while touched ───────── */
@media(hover:none){
  .mcard:hover{transform:none}
  .mcard:hover::after{transform:translateX(-130%)}
  .cat-fig:hover,.cg-card:hover{transform:none}
  .marquee:active .track{animation-play-state:paused}
}