@media (max-width: 1024px) {
  .services-grid  { grid-template-columns: repeat(2,1fr); }
  .footer-grid    { grid-template-columns: 1fr 1fr; }
  .steps          { grid-template-columns: 1fr 1fr; gap: 40px; }
  .steps::before  { display: none; }
  .t-grid         { grid-template-columns: 1fr; }
  .expertise-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  nav { padding: 16px 20px; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg-mid);
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 0 20px;
    max-height: 0; overflow: hidden;
    opacity: 0; visibility: hidden;
    transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease;
  }
  #nav.nav-open .nav-links {
    max-height: 60vh; opacity: 1; visibility: visible;
    padding: 8px 20px 16px;
  }
  .nav-links li { border-bottom: 1px solid rgba(255,255,255,0.05); }
  .nav-links a { display: block; padding: 15px 4px; }
  /* The switcher stays visible on mobile — it is the recovery path for a
     visitor who landed on the wrong bay, so it must never hide in a menu. */
  .branch-switch a, .branch-switch span { padding: 7px 9px; font-size: 0.58rem; }
  .nav-logo { gap: 8px; }
  .nav-logo-mark { height: 19px; }
  .nav-div { font-size: 0.6rem; letter-spacing: 0.14em; white-space: nowrap; }
  .nav-wa { font-size: 0; padding: 10px 14px; }
  .nav-wa svg { width: 18px; height: 18px; }
  .nav-wa::after { content: 'WhatsApp'; font-size: 0.68rem; }

  .hero { grid-template-columns: 1fr; height: auto; min-height: 100svh; }
  /* .hero-left is a flex row on desktop (content | absolute stats). Once the
     stats go back into flow they become a second flex item and sit beside
     the copy, overflowing the viewport — so the axis has to flip too. */
  .hero-left {
    min-height: 100svh; padding: 100px 24px 56px;
    flex-direction: column; align-items: flex-start; justify-content: flex-end;
  }
  /* The scroll hint lands on top of the secondary button at this width. */
  .scroll-track { display: none; }
  .hero-left::after { display: none; }
  .hero-right { height: 55vw; min-height: 220px; }
  .hero-title { font-size: clamp(1.9rem, 8.4vw, 3.1rem); }
  .hero-urdu  { font-size: 0.95rem; }
  .hero-desc  { font-size: 0.84rem; max-width: 100%; }
  .hero-stats {
    position: static;
    flex-direction: row; flex-wrap: wrap; justify-content: flex-start;
    gap: 20px 28px; margin-top: 36px;
  }
  .h-stat { text-align: left; }
  .h-stat-num { font-size: 1.5rem; }
  .h-stat-bar { display: none; }
  .hero-actions { flex-direction: column; gap: 12px; }
  .btn-wa, .btn-ghost { width: 100%; justify-content: center; }

  .brand-bar-inner { gap: 36px; }

  .container { padding: 0 20px; }
  .services   { padding: 72px 0; }
  .expertise  { padding: 72px 0; }
  .process    { padding: 72px 0; }
  .testimonials { padding: 72px 0; }
  .cta-section  { padding: 80px 0; }
  footer        { padding: 56px 0 32px; }

  .services-grid { grid-template-columns: 1fr; }
  .svc-card { padding: 32px 24px 36px; }

  .expertise-grid { grid-template-columns: 1fr; gap: 40px; }
  .brands-served  { gap: 8px; }
  .radar-svg-main { max-width: 300px; }

  .steps { grid-template-columns: 1fr 1fr; gap: 32px; }

  .gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, 48vw);
  }
  .gallery .g:first-child { grid-column: 1/3; grid-row: 1; height: 56vw; }

  .t-grid { grid-template-columns: 1fr; gap: 2px; }

  .cta-section h2  { font-size: clamp(1.6rem, 7vw, 2.5rem); }
  .cta-buttons     { flex-direction: column; align-items: center; gap: 12px; }
  .wa-big, .btn-ghost { width: 100%; max-width: 340px; justify-content: center; }

  .footer-grid { grid-template-columns: 1fr; gap: 2px; }
  .footer-panel { padding: 32px 24px; }
  .footer-bottom { padding: 20px 24px; flex-direction: column; gap: 8px; text-align: center; }

  .wa-float { bottom: 20px; right: 20px; width: 52px; height: 52px; }
  .wa-float svg { width: 24px; height: 24px; }
}

@media (max-width: 520px) {
  /* At this width the bar carries logo + switcher + menu + WhatsApp, so the
     logo drops to the parent brand and WhatsApp drops to its icon. */
  .nav-div { display: none; }
  .nav-wa { padding: 9px 11px; }
  .nav-wa::after { content: none; }

  /* Abbreviate to the origin codes so logo + switcher + menu + WhatsApp
     still fit one bar. */
  .branch-switch .bs-de, .branch-switch .bs-jp { font-size: 0; padding: 7px 8px; }
  .branch-switch .bs-de::after { content: 'DE'; font-size: 0.6rem; letter-spacing: 0.1em; }
  .branch-switch .bs-jp::after { content: 'JP'; font-size: 0.6rem; letter-spacing: 0.1em; }
}

@media (max-width: 400px) {
  .hero-title { font-size: 1.8rem; }
  .steps { grid-template-columns: 1fr; }
  .nav-logo-mark { height: 16px; }
  .footer-logo { height: 22px; }
}
