/* ==========================================================================
   MAHI ELECTRONICS — Responsive layers
   Purpose-built layouts at each tier, not a shrunken desktop.
   320 · 360 · 375 · 390 · 414 · 480 · 576 · 768 · 820 · 992 · 1024 · 1200 ·
   1366 · 1440 · 1600 · 1920 · 2560 · 4K
   ========================================================================== */

/* ---------- 2560px / 4K: wider container, calmer measure ---------------- */
@media (min-width:2200px){
  :root{--container:1720px;--section:clamp(96px,5vw,150px)}
  body{font-size:1.06rem}
  .lead{font-size:1.24rem}
  .hero-grid{min-height:min(760px,74vh)}
}
@media (min-width:3200px){
  :root{--container:2040px}
  body{font-size:1.12rem}
  .sec-head{max-width:900px}
}

/* ---------- 1600 / 1440 / 1366 ------------------------------------------ */
@media (max-width:1599.98px){ :root{--container:1340px} }
@media (max-width:1440px){
  :root{--container:1260px}
  .nav-link{font-size:.83rem;padding:.6rem .6rem}
}
@media (max-width:1366px){
  :root{--container:1180px}
  .footer-grid{grid-template-columns:1.5fr 1fr 1fr 1fr 1.1fr;gap:26px}
  .logos{grid-template-columns:repeat(4,minmax(0,1fr))}
}

/* ---------- 1200px ------------------------------------------------------ */
@media (max-width:1200px){
  :root{--container:1080px}
  .nav-list{gap:0}
  .nav-link{font-size:.8rem;padding:.55rem .48rem}
  .brand-sub{letter-spacing:.2em}
  .g4,.gridset-4,.plate-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .stats,.cap-grid,.hero-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hero-strip div:nth-child(2n){border-right:0}
  .hero-strip div:nth-child(-n+2){border-bottom:1px solid var(--line-dark)}
  .ind-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* ---------- 1024px: drawer navigation ----------------------------------- */
@media (max-width:1024px){
  :root{--header-h:70px}
  .nav{display:none}
  .burger{display:block}
  .header-actions{margin-left:auto}
  .topbar-tag{display:none}
  .topbar-inner{justify-content:center}
  .hero-grid{grid-template-columns:1fr;min-height:0}
  .hero-body{padding-right:0;padding-block:clamp(36px,6vw,64px)}
  .hero-media{min-height:300px;order:-1}
  .hero-media::after{background:linear-gradient(180deg,rgba(13,27,42,.55) 0%,rgba(13,27,42,.75) 100%)}
  .callout-1{top:8%;right:5%}
  .callout-2{display:none}
  .callout-3{bottom:6%;left:5%}
  .split,.split-l,.split-r{grid-template-columns:1fr}
  .sec-head-row{grid-template-columns:1fr;gap:16px;align-items:start}
  .banner-grid{grid-template-columns:1fr}
  .cta-inner{grid-template-columns:1fr}
  .cta-actions{justify-content:flex-start}
  .contact-grid{grid-template-columns:1fr}
  .selector{grid-template-columns:1fr}
  .selector-nav{flex-direction:row;overflow-x:auto}
  .selector-nav button{white-space:nowrap;min-width:190px}
  .proj{grid-template-columns:1fr}
  .proj-media{min-height:230px}
  .footer-top-inner{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:32px}
  .f-brand,.f-contactcol{grid-column:1/-1}
  .sticky-col{position:static}
  .logos{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* ---------- 992px ------------------------------------------------------- */
@media (max-width:992px){
  .g3,.gridset-3{grid-template-columns:repeat(2,minmax(0,1fr))}
  .plate-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* ---------- 820 / 768: tablet ------------------------------------------- */
@media (max-width:820px){
  :root{--section:clamp(46px,7vw,72px);--section-sm:clamp(32px,5vw,54px)}
  .g2,.g3,.g4,.gridset-2,.gridset-3,.gridset-4{grid-template-columns:1fr}
  .ind-grid{grid-template-columns:1fr}
  .cap-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .form-grid{grid-template-columns:1fr}
  .rows > div{grid-template-columns:1fr;gap:.3rem}
  .mega-foot{flex-direction:column;align-items:flex-start}
}
@media (max-width:768px){
  .drawer{width:100%;border-left:0}
  .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hero-strip{grid-template-columns:1fr}
  .hero-strip div{border-right:0;border-bottom:1px solid var(--line-dark)}
  .hero-strip div:last-child{border-bottom:0}
  .fbot{flex-direction:column;align-items:flex-start;gap:.6rem}
  .acc-a{padding-right:1rem}
  .logos{grid-template-columns:repeat(2,minmax(0,1fr))}
  .steps li{padding-left:clamp(48px,12vw,64px)}
}

/* ---------- 576px ------------------------------------------------------- */
@media (max-width:576px){
  :root{--section:clamp(38px,9vw,58px);--gutter:18px}
  .btn-row{flex-direction:column;align-items:stretch}
  .btn-row .btn{width:100%}
  .stats,.cap-grid,.plate-grid{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr}
  .totop{right:14px;bottom:14px;width:42px;height:42px}
  .sec-head{margin-bottom:24px}
  .callout{font-size:.62rem;padding:.4rem .6rem}
  .tabbar{flex-direction:column}
  .tab{width:100%;text-align:left}
  .proj-meta{gap:.9rem}
}

/* ---------- 480px ------------------------------------------------------- */
@media (max-width:480px){
  .brand-mark{width:40px;height:40px}
  .brand-name{font-size:1.15rem}
  .brand-sub{font-size:.54rem;letter-spacing:.2em}
  .header-cta{display:none}
  .topbar-contact{gap:.9rem;font-size:.72rem}
  .card-body,.tile,.selector-pane,.tabpanel{padding:20px}
  .acc-q{font-size:.96rem;gap:.9rem}
  .logos{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* ---------- 414 / 390 / 375 / 360 --------------------------------------- */
@media (max-width:414px){
  :root{--gutter:16px}
  .topbar-contact a span.lbl{display:none}
  .eyebrow{letter-spacing:.14em}
}

/* ---------- 320px ------------------------------------------------------- */
@media (max-width:359.98px){
  :root{--gutter:14px}
  body{font-size:.94rem}
  .brand-sub{display:none}
  .btn{padding:.9rem 1.1rem;font-size:.66rem}
  .stat .s-n{font-size:2rem}
}

/* ---------- Short viewports --------------------------------------------- */
@media (max-height:620px) and (max-width:1024px){
  .drawer{inset-block-start:0;padding-top:56px}
}

/* ---------- Print -------------------------------------------------------- */
@media print{
  .topbar,.header,.drawer,.scrim,.totop,.cta,.footer-top,.mega{display:none !important}
  body{color:#000;background:#fff}
  .sec-dark,.sec-charcoal,.hero,.banner,.footer,.capability{background:#fff !important;color:#000 !important}
  .sec-dark h2,.hero h1,.banner h1{color:#000 !important}
  a{text-decoration:underline}
  .acc-a[hidden]{display:block !important}
}
