/* ===========================================================================
   BackitUPS  |  assets/css/responsive.css
   Breakpoints: 1200 (laptop) / 1024 (tablet) / 768 (mobile) / 480 (small)
   Loaded after style.css so these rules win at equal specificity.
   =========================================================================== */

/* --- LAPTOP -------------------------------------------------------------- */
@media (max-width: 1200px) {

  .nav__list { gap: 0; }
  .nav__link { font-size: 14px; padding: 9px 11px; }
  .mega__grid { grid-template-columns: minmax(0, 0.7fr) minmax(0, 2fr); }

  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .usecase-scroller { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero__bar { gap: 16px; }
}

/* --- TABLET -------------------------------------------------------------- */
@media (max-width: 1024px) {

  /* Header collapses to the hamburger */
  .nav { display: none; }
  .mega { display: none; }
  .mega-backdrop { display: none; }
  .menu-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .brand { margin-right: auto; }

  .hero { min-height: 78vh; padding-top: 120px; }
  .hero__grid { grid-template-columns: 1fr; align-items: start; gap: 26px; }
  .hero__title { max-width: 18ch; }
  .hero__aside { padding-bottom: 0; }

  .section-head { grid-template-columns: 1fr; align-items: start; gap: 16px; }

  .split,
  .split--wide-media { grid-template-columns: 1fr; gap: 32px; }
  .split--reverse .split__media { order: 0; }

  .statement { grid-template-columns: 1fr; gap: 20px; }

  .solutions { grid-template-columns: 1fr; }
  .solution-card,
  .solution-card:nth-child(2),
  .solution-card:nth-child(3) { min-height: 400px; margin-top: 0; }

  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .finder__grid { grid-template-columns: 1fr; }
  .finder__panel + .finder__panel { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.12); }

  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step__num { margin-bottom: 34px; }

  .metric-row { grid-template-columns: 1fr; max-width: 460px; }

  .testimonial { grid-template-columns: 1fr; }
  .testimonial__media { aspect-ratio: 4 / 3; }
  .testimonial__media .data-card--float { right: 16px; }

  .pdp { grid-template-columns: 1fr; }

  .compare-grid { grid-template-columns: 1fr; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow__node:nth-child(2)::after { display: none; }

  .stat-row { grid-template-columns: 1fr; }

  .footer-top { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }

  .shop-controls { top: 70px; }

  /* Horizontal swipe rows on touch widths */
  .usecase-scroller {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    margin-right: calc(var(--gutter) * -1);
    padding-right: var(--gutter);
    scrollbar-width: none;
  }
  .usecase-scroller::-webkit-scrollbar { display: none; }
  .usecase { flex: 0 0 62%; scroll-snap-align: start; aspect-ratio: 3 / 4; }
}

/* --- MOBILE -------------------------------------------------------------- */
@media (max-width: 768px) {

  :root { --fs-body: 17px; }

  .site-header__inner { padding-top: 12px; padding-bottom: 12px; }

  .hero { min-height: 640px; padding-top: 104px; }
  .hero__wordmark { margin-bottom: 24px; }
  .hero__copy { font-size: 16.5px; }
  .hero__trust { gap: 8px 18px; }
  .hero__bar { flex-direction: column; align-items: flex-start; gap: 20px; }
  .charge-pill { padding: 8px 9px 8px 16px; gap: 12px; }
  .charge-pill__label { font-size: 15.5px; }
  .charge-pill__ring { width: 38px; height: 38px; }
  .btn-row .btn { flex: 1 1 auto; }

  .grid-4,
  .grid-3,
  .grid-2 { grid-template-columns: 1fr; }

  /* Product cards stay two-up on phones, they read better than one giant card */
  .product-grid,
  .product-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-card__body { padding: 16px 16px 18px; }
  .product-card__name { font-size: 17px; }
  .product-card__blurb { display: none; }
  .spec-strip { gap: 14px; margin-bottom: 14px; padding-top: 12px; }
  .product-card__foot { flex-direction: column; align-items: stretch; gap: 10px; }
  .product-card__foot .btn { width: 100%; }
  .product-card__price { font-size: 19px; }

  .steps { grid-template-columns: 1fr; }
  .step { padding-top: 18px; }
  .step__num { margin-bottom: 18px; }

  .flow { grid-template-columns: 1fr; }
  .flow__node { min-height: 0; }
  .flow__node::after { right: 50%; top: auto; bottom: -14px; width: 2px; height: 14px; transform: translateX(50%); }

  .form-grid { grid-template-columns: 1fr; }
  .pdp__specs { grid-template-columns: 1fr; }

  .gallery__thumb { width: 68px; height: 68px; }

  .shop-controls {
    position: static;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .filter-list {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    /* min-width:0 is required. As a flex child its default min-width is auto,
       which makes it refuse to shrink below its content and pushes the whole
       page wider than the viewport. */
    min-width: 0;
    max-width: 100%;
    margin-right: calc(var(--gutter) * -1);
    padding-right: var(--gutter);
    scrollbar-width: none;
  }
  .filter-list::-webkit-scrollbar { display: none; }
  .sort-wrap { justify-content: space-between; }

  .finder__panel { padding: 26px 20px; }
  .chip span { padding: 11px 16px; font-size: 14px; }

  .search-panel__form { flex-direction: column; }

  .footer-cols { grid-template-columns: 1fr; }
  .footer-legal { flex-direction: column; }
  .signup-form { flex-direction: column; }
  .signup-form .btn { width: 100%; }

  .usecase { flex: 0 0 76%; }

  .timeline__item { grid-template-columns: 1fr; gap: 8px; }

  .runtime-table td { font-size: 15.5px; }

  /* Keep tap targets comfortable */
  .btn { padding: 16px 26px; }
  .btn--sm { padding: 12px 18px; }
}

/* --- SMALL MOBILE -------------------------------------------------------- */
@media (max-width: 480px) {

  :root { --gutter: 18px; }

  .hero { min-height: 560px; }
  /* No font-size override here. The base clamp in style.css is already tuned
     to keep "BackitUPS" inside the gutters at these widths. */

  .product-grid,
  .product-grid--3 { grid-template-columns: 1fr; }
  .product-card__blurb { display: block; }
  .product-card__media { aspect-ratio: 4 / 3; }

  .icon-btn { width: 38px; height: 38px; }
  .menu-toggle { width: 38px; height: 38px; }

  .usecase { flex: 0 0 84%; }

  .metric-card { padding: 18px; }
  .data-card { padding: 16px 18px; }

  .testimonial__media .data-card--float { position: static; width: auto; margin-top: 14px; box-shadow: none; }
  .testimonial__media { aspect-ratio: 1 / 1; }
}

/* --- PRINT --------------------------------------------------------------- */
@media print {
  .site-header, .mobile-menu, .site-footer, .cta-band, .finder { display: none; }
  body { color: #000; }
}
