/* =============================================================================
   V5 Chrome responsive — header, nav drawer, footer (all pages)
   ============================================================================= */

@media (min-width: 1025px) {
  .mega-menu.collections-mega {
    top: calc(100% + 8px);
    padding: clamp(20px, 2.5vw, 28px);
  }
  .menu-toggle { display: none !important; }
  .nav-overlay { display: none !important; }
  #mobileNavMount { display: none; }
  .mobile-nav-header { display: none !important; }
  .main-nav {
    position: static !important;
    transform: none !important;
    width: auto !important;
    padding: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    inset: auto !important;
    visibility: visible !important;
    pointer-events: auto !important;
    background: transparent !important;
    z-index: auto !important;
  }
  .main-nav .nav-list {
    padding: 0;
    background: transparent;
  }
  .nav-list {
    flex-direction: row !important;
    align-items: center !important;
  }
  .nav-link {
    width: auto !important;
    border-left: none !important;
    border-radius: 0 !important;
  }
}
@media (min-width: 1600px) {
  :root { --max: 1480px; --section-pad: clamp(40px, 3.5vw, 60px); }
  .mega-menu.product-mega { width: min(780px, calc(100vw - 48px)); max-width: min(780px, calc(100vw - 48px)); }
  .nav-link { font-size: 0.74rem; padding: 12px 14px; }
  .header-nav-inner { gap: 28px; }
  .brand-text strong { font-size: 1.55rem; }
  /* large screen â€” keep cards compact */
  .ba-grid { max-width: 1200px; gap: 26px; }
}
@media (min-width: 1440px) and (max-width: 1599px) {
  :root { --max: 1380px; }
  .nav-link { font-size: 0.72rem; padding: 12px 12px; }
  .header-nav-inner { gap: 24px; }
  .collections-mega { width: min(880px, calc(100vw - 2 * var(--gutter))); }
  .ba-grid { max-width: 1140px; gap: 24px; }
}
@media (max-width: 1366px) {
  .collections-mega .mega-grid.cols-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .collections-mega { width: min(760px, calc(100vw - 32px)); }
  .nav-link { padding: 11px 9px; font-size: 0.68rem; letter-spacing: 0.04em; }
  .header-nav-inner { gap: 14px; }
  .brand-text strong { font-size: 1.28rem; }
  .brand-text span { display: none; }
  .header-brand .brand-logo { height: 44px; width: 44px; max-width: 44px; min-width: 44px; }
  .process-step h4 { font-size: 0.76rem; }
  .step-num { width: 50px; height: 50px; font-size: 0.9rem; }
  .about-grid { gap: 48px; }
  .section-head { margin-bottom: 28px; }
  .ba-grid { max-width: 1020px; gap: 20px; }
}
@media (max-width: 1280px) {
  :root { --max: 1200px; }
  .collections-mega .mega-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collections-mega { width: min(640px, calc(100vw - 32px)); }
  .collections-mega .mega-col a { white-space: normal; }
  .mega-menu.product-mega { width: min(640px, calc(100vw - 32px)); max-width: min(640px, calc(100vw - 32px)); }
  .product-mega-grid { grid-template-columns: repeat(4, 1fr); }
  .nav-link { padding: 11px 8px; font-size: 0.65rem; }
  .nav-label-full { display: none; }
  .nav-label-short { display: inline; }
  .project-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 210px; }
  .project-card:nth-child(1) { grid-row: span 1; }
  .project-card:nth-child(5) { grid-column: span 1; }
  .section-head { flex-wrap: wrap; }
  .hero-copy h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); max-width: 900px; }
  .collection-body { padding: 22px; }
  .collection-body h3 { font-size: 1.55rem; }
  .service-body { padding: 22px; }
  .footer-grid { gap: 32px; }
  .ba-grid { max-width: 960px; gap: 18px; }
}
@media (min-width: 1025px) and (max-width: 1280px) {
  .nav-link { font-size: clamp(0.62rem, 0.72vw, 0.68rem); padding: 11px clamp(6px, 0.6vw, 9px); }
  .header-nav-inner { gap: 10px; }
  .collections-mega { width: min(600px, calc(100vw - 28px)); padding: 18px 20px; }
  .collections-mega .mega-grid.cols-4 { gap: 14px 20px; }
}
@media (max-width: 1200px) {
  :root {
    --header-nav-h: 64px;
    --header-total: calc(var(--utility-h) + var(--header-nav-h));
  }
  html { scroll-padding-top: var(--header-nav-h); }
  .utility-bar .utility-badge { display: none; }
  .header-brand { flex: 1; min-width: 0; margin-right: 0; }
  .header-brand .brand-text span { display: none; }
  .collection-grid,
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .process-steps { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .process-steps::before { display: none; }
  .process-visual { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .process-visual::before { display: none; }
  .process-card .step-num { width: 66px; height: 66px; font-size: 1.4rem; }
  .process-card { padding: 28px 14px 20px; }
  .project-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .hero { height: 115svh; min-height: 640px; }
  .hero-content { padding: 44px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-map-col { grid-column: 1 / -1; }
  .cta-band { padding: 48px 0; }
  .stats { padding: 32px 0; }
}
@media (max-width: 1024px) {
  #mobileNavMount { display: contents; }
  .header-nav-wrap { display: block; }
  .menu-toggle { display: flex !important; }
  .main-nav { justify-content: flex-end; }

  /* Lock page scroll when menu open */
  html.mobile-nav-open,
  body.mobile-nav-open {
    overflow: hidden !important;
    overscroll-behavior: none;
  }

  /* Mobile drawer â€” fixed to viewport, pure white */
  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(340px, 92vw);
    left: auto;
    height: 100dvh;
    max-height: 100dvh;
    background: #ffffff;
    padding: 0;
    transform: translateX(105%);
    transition: transform 0.35s var(--ease);
    overflow: hidden;
    z-index: 9999;
    box-shadow: -6px 0 32px rgba(0,0,0,0.1);
    color: var(--ink);
    visibility: hidden;
    pointer-events: none;
    display: flex;
    flex-direction: column;
  }
  .main-nav.open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }
  .mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: #ffffff;
    border-bottom: 1px solid #e8e8e8;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
  }
  .mobile-nav-header span {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink);
  }
  .mobile-nav-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink);
    font-size: 1.4rem;
    line-height: 1;
    display: grid;
    place-items: center;
    flex-shrink: 0;
  }
  .main-nav .nav-list {
    background: #ffffff;
    padding: 12px 16px 32px;
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    justify-content: flex-start;
  }
  .nav-label-full { display: inline; }
  .nav-label-short { display: none; }
  .nav-item {
    position: relative;
    background: #ffffff;
  }
  .nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    border-bottom: none;
    border-left: 3px solid transparent;
    margin-bottom: 0;
    border-radius: 8px;
    width: 100%;
    color: var(--ink-soft);
    background: var(--white);
  }
  .nav-link::after { display: none; }
  .nav-link:hover,
  .nav-link.active {
    border-left-color: var(--green);
    background: var(--green-light);
    color: var(--ink);
  }
  .nav-item > .nav-link svg { transition: transform 0.25s; flex-shrink: 0; }
  .nav-item.open > .nav-link {
    border-left-color: var(--green);
    background: var(--green-light);
    color: var(--ink);
  }
  .nav-item.open > .nav-link svg { transform: rotate(180deg); }

  /* Accordion submenus */
  .nav-item > .mega-menu {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 8px !important;
    margin: 0 8px 8px !important;
    padding: 0 14px !important;
    background: var(--green-light) !important;
    border-left: 3px solid var(--green) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: none;
    display: block !important;
    overflow: hidden !important;
    max-height: 0 !important;
    transition: max-height 0.35s var(--ease), padding 0.35s var(--ease);
  }
  .nav-item.open > .mega-menu,
  .nav-item.open > .mega-menu.product-mega,
  .mega-menu.mobile-open {
    max-height: 3000px !important;
    margin-top: 10px !important;
    padding: 12px 14px 14px !important;
    pointer-events: auto !important;
    overflow: hidden !important;
  }
  .mega-menu.product-mega {
    position: static !important;
    transform: none !important;
    left: auto !important;
    background: var(--green-light) !important;
  }
  .product-mega-inner { width: 100%; padding: 12px 0 8px; }
  .product-mega-head { display: none; }
  .product-mega-body { display: block; }
  .product-mega-grid { grid-template-columns: 1fr; gap: 0; }
  .product-mega-col {
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
  }
  .product-mega-col h4 { border-bottom: none; margin-bottom: 8px; padding-bottom: 0; }
  .product-mega-col ul { padding-left: 12px; }
  .product-mega-more { margin-top: 8px; padding-top: 12px; }
  .product-mega-tags { flex-direction: column; gap: 6px; }
  .product-mega-tags a {
    border-radius: 0;
    background: transparent;
    border: none;
    padding: 8px 0;
    font-size: 0.86rem;
  }
  .mega-grid, .mega-grid.cols-4, .mega-grid.cols-2 { grid-template-columns: 1fr; gap: 12px; }
  .mega-menu.mega-compact { width: 100%; max-width: none; }
  .mega-menu.mega-compact .mega-col a { white-space: normal; }
  .mega-col a,
  .product-mega-col ul li a,
  .product-mega-tags a {
    padding: 8px 0;
    font-size: 0.86rem;
  }
  .product-mega-col h4 { font-size: 0.75rem; }
  .product-mega-more h4 { font-size: 0.68rem; margin-top: 4px; }
}
@media (max-width: 768px) {
  :root {
    --header-nav-h: 56px;
    --utility-h: 76px;
    --header-total: calc(var(--utility-h) + var(--header-nav-h));
    --section-pad: 44px;
  }
  .utility-bar { border-bottom: 1px solid rgba(255,255,255,0.08); }
  .utility-bar .container {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    text-align: center;
  }
  .utility-bar a {
    width: 100%;
    justify-content: center;
    font-size: 0.68rem;
    letter-spacing: 0.02em;
    line-height: 1.4;
    max-width: 100%;
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
    word-break: break-word;
  }
  .utility-bar svg { width: 13px; height: 13px; }
  .header-brand .brand-logo { height: 40px; width: 40px; max-width: 40px; min-width: 40px; }
  .header-brand .brand-mark { width: 40px; height: 40px; font-size: 0.95rem; }
  .menu-toggle {
    width: 42px;
    height: 42px;
    border-color: rgba(255, 255, 255, 0.3);
  }
