/* ============================================================
   VENDRHQ — RESPONSIVE LAYER  (shared across all pages)
   Loaded AFTER the inline <style> so it overrides desktop rules.
   The desktop design renders the root at zoom:1.5; on tablet and
   phone we drop zoom to 1 so the device width is used natively,
   then restyle every block to stack cleanly.
   ============================================================ */

/* Hamburger is desktop-hidden; the checkbox never shows */
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
.nav-burger { display: none; }

/* ------------------------------------------------------------
   TABLET & BELOW  (≤ 980px)
   ------------------------------------------------------------ */
@media (max-width: 980px) {
  html { zoom: 1; }

  /* ---------- NAV → hamburger drawer ---------- */
  .nav {
    padding: 12px 18px;
    gap: 14px;
    flex-wrap: nowrap;
  }
  .nav .brand { font-size: 19px; margin-right: auto; }
  .nav > .btn { display: none; }                 /* Deploy lives in the drawer */

  .nav-burger {
    display: inline-flex; flex-direction: column; justify-content: center;
    gap: 5px;
    width: 46px; height: 42px; padding: 11px 9px;
    cursor: pointer; flex: 0 0 auto;
    border: 1px solid rgba(79,245,200,0.4);
    background: rgba(5,3,9,0.55);
    clip-path: polygon(6px 0,100% 0,100% calc(100% - 6px),calc(100% - 6px) 100%,0 100%,0 6px);
  }
  .nav-burger span {
    display: block; height: 2px; width: 100%;
    background: var(--mint); box-shadow: 0 0 6px var(--mint);
    transition: transform .25s ease, opacity .2s ease;
  }
  .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav ul {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    margin: 0; padding: 6px 0;
    flex-direction: column; gap: 0;
    background: rgba(5,3,9,0.98);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid rgba(79,245,200,0.18);
    border-bottom: 1px solid rgba(79,245,200,0.25);
    box-shadow: 0 24px 40px rgba(0,0,0,0.55);
    font-size: 15px; letter-spacing: 0.18em;
  }
  .nav-toggle:checked ~ ul { display: flex; }
  .nav ul li { width: 100%; }
  .nav ul a {
    display: block; padding: 15px 22px;
    border-bottom: 1px solid rgba(79,245,200,0.07);
  }
  .nav ul li:last-child a { border-bottom: none; }
  .nav ul a::before { display: none; }

  /* ---------- SECTION rhythm ---------- */
  section.block { padding: 66px 28px; }
  .cta-band { padding: 66px 28px; }
  footer { padding-left: 28px; padding-right: 28px; }
  .container { max-width: 100%; }

  /* ---------- TYPE ---------- */
  h2.title { font-size: 38px; }
  .section-sub { font-size: 16px; margin-bottom: 40px; }

  /* ---------- GRIDS ---------- */
  .about-grid { grid-template-columns: 1fr; gap: 30px; }
  .why-grid, .steps { grid-template-columns: 1fr; gap: 20px; }
  .bmatrix { grid-template-columns: repeat(5, 1fr); }
  .brand-stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px 40px; }
  .unicef-band { grid-template-columns: 1fr; gap: 26px; padding: 28px; }
  .unicef-logo-wrap { max-width: 200px; }

  /* ---------- HERO ---------- */
  .hero { min-height: 0; }
  .hero-content { min-height: 0; padding: 92px 28px 60px; }
  .hero-top { grid-template-columns: 1fr; gap: 22px; }
  .hero-right { flex-direction: row; flex-wrap: wrap; align-items: stretch; gap: 12px; }
  .stat-card { min-width: 0; flex: 1 1 28%; }

  /* ---------- STANDALONE PAGE HEADERS (team / faq / machines) ---------- */
  .page-header { padding: 118px 28px 56px !important; }
  .page-title { font-size: 40px !important; }
}

/* ------------------------------------------------------------
   PHONE  (≤ 600px)
   ------------------------------------------------------------ */
@media (max-width: 600px) {
  .nav .brand { font-size: 17px; }

  section.block { padding: 50px 18px; }
  .cta-band { padding: 50px 18px; }
  footer { padding-left: 18px; padding-right: 18px; }

  /* TYPE */
  h2.title { font-size: 29px; line-height: 1.12; }
  .section-sub { font-size: 14px; margin-bottom: 32px; }
  .eyebrow { font-size: 11px; }

  /* GRIDS → single / paired columns */
  .bmatrix { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .brand-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }

  /* brands grid collapses to 2 columns on phone */
  .bs-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-content { padding: 84px 18px 50px; }
  /* darker scrim so overlaid copy stays legible on the busy photo */
  .alley-scrim {
    background:
      linear-gradient(180deg, rgba(4,3,8,0.62) 0%, rgba(4,3,8,0.30) 30%, rgba(4,3,8,0.42) 64%, rgba(4,3,8,0.86) 100%),
      linear-gradient(90deg, rgba(4,3,8,0.55) 0%, transparent 24%, transparent 76%, rgba(4,3,8,0.55) 100%);
  }
  .hero-left h1 { font-size: 32px; }
  .hero-left .tag { font-size: 14px; max-width: 100%; }
  .hero-actions { flex-wrap: wrap; gap: 10px; }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; padding: 13px 16px; }
  .hero-right { gap: 10px; }
  .stat-card { flex: 1 1 28%; padding: 10px 12px; }
  .stat-card .val { font-size: 20px; }
  /* TICKER a touch tighter */
  .ticker span { font-size: 11px; }

  /* PRODUCT filter chips wrap comfortably */
  .brand-filter { gap: 6px; }
  .bf-btn { font-size: 11px; padding: 6px 10px; }

  /* CTA actions stack */
  .cta-band .actions { flex-direction: column; align-items: stretch; gap: 12px; }
  .cta-band .actions .btn { justify-content: center; }

  /* Standalone page headers */
  .page-header { padding: 100px 18px 44px !important; }
  .page-title { font-size: 31px !important; }
}

/* ------------------------------------------------------------
   SMALL PHONE  (≤ 380px)
   ------------------------------------------------------------ */
@media (max-width: 380px) {
  .bmatrix { grid-template-columns: repeat(2, 1fr); }
  .hero-left h1 { font-size: 28px; }
  h2.title { font-size: 26px; }
}
