/* ============================================================
   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; }

/* Desktop hero photo geometry lives in index.html: the hero is locked to
   the photo's 2:1 aspect ratio and the image is anchored right/bottom, so
   the machine keeps the same relative size and position at every width. */

/* ------------------------------------------------------------
   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; }
  /* keep the machine centred even when the uplink console is open and the
     hero (and therefore the cover-scaled photo) grows much taller */
  .alley-photo { background-position: 84% top; }
  .hero-top { grid-template-columns: 1fr; gap: 26px; }
  .hero-right { flex-direction: column; align-items: stretch; gap: 12px; }
  .stat-card { min-width: 0; flex: 1 1 28%; }
  .hero-stats { gap: 12px; margin-top: 24px; }
  .hero-stats .stat-card { flex: 1 1 28%; }
  /* uplink console stays holstered on small screens until a #contact
     link (Book Free Site Visit / nav Contact) summons it */
  .uplink {
    max-width: 520px;
    max-height: 0;
    opacity: 0;
    padding: 0 18px;
    border-width: 0;
    pointer-events: none;
    transition: max-height .6s cubic-bezier(.25,.7,.3,1), opacity .45s ease, padding .45s ease, border-width .45s ease;
  }
  .uplink.open {
    max-height: 1400px;
    opacity: 1;
    padding: 18px;
    border-width: 1px;
    pointer-events: auto;
  }
  .uplink-sub { font-size: 9px; }
  .uplink .cf-input { font-size: 15px; }
  .uplink-meta { font-size: 9px; }

  /* ---------- 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 carousel — fade edges use page bg on phone */
  .bs-track-wrap::before { background: linear-gradient(to right, var(--bg-1), transparent); }
  .bs-track-wrap::after  { background: linear-gradient(to left, var(--bg-1), transparent); }
  /* 6 tiles visible at once — minimal gap and padding */
  .brand-tile { width: 52px; height: 40px; padding: 2px; }
  .brand-tile::before, .brand-tile::after { width: 5px; height: 5px; }
  .bs-track { gap: 2px; }
  .hero-content { padding: 84px 18px 50px; }
  .alley-photo { background-position: 74% top; }
  /* 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; }
  .hero-stats { gap: 10px; margin-top: 20px; }
  .uplink { max-width: 100%; }
  .uplink.open { padding: 16px; }
  .uplink-head .t { font-size: 12px; }
  /* 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; }
}

/* ============ INLINE ENQUIRY FORM (subpages) ============ */
.lead-cta {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 72px;
  scroll-margin-top: 90px;
}
.lead-cta h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 26px;
  letter-spacing: 0.04em;
  color: #4ff5c8;
  margin: 0 0 10px;
  text-shadow: 0 0 14px rgba(79,245,200,0.45);
}
.lead-cta p.lead-sub {
  font-family: 'Rajdhani', sans-serif;
  font-size: 17px;
  color: #8aa39a;
  margin: 0 0 24px;
  line-height: 1.55;
}
.lead-cta form { display: flex; flex-direction: column; gap: 14px; }
.lead-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lead-cta label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #4ff5c8;
  margin-bottom: 6px;
}
.lead-cta input,
.lead-cta textarea {
  width: 100%;
  background: rgba(10,6,20,0.85);
  border: 1px solid rgba(79,245,200,0.28);
  color: #e7f7f0;
  font-family: 'Rajdhani', sans-serif;
  font-size: 16px;
  padding: 12px 14px;
  border-radius: 2px;
}
.lead-cta textarea { min-height: 110px; resize: vertical; }
.lead-cta input:focus,
.lead-cta textarea:focus {
  outline: none;
  border-color: #4ff5c8;
  box-shadow: 0 0 0 2px rgba(79,245,200,0.22);
}
.lead-cta .lead-alt {
  font-family: 'Rajdhani', sans-serif;
  font-size: 15px;
  color: #8aa39a;
  margin: 4px 0 0;
}
.lead-cta .lead-alt a { color: #4ff5c8; }
.lead-msg { font-family: 'Rajdhani', sans-serif; font-size: 16px; display: none; }
.lead-msg.ok { color: #4ff5c8; }
.lead-msg.err { color: #ff2d95; }
@media (max-width: 620px) {
  .lead-row { grid-template-columns: 1fr; }
  .lead-cta { padding: 40px 18px 56px; }
}

/* ============ STICKY MOBILE CALL BAR ============ */
.call-bar { display: none; }
@media (max-width: 820px) {
  .call-bar {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 200;
    border-top: 1px solid rgba(79,245,200,0.3);
    background: rgba(5,3,9,0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .call-bar a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 10px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    color: #4ff5c8;
  }
  .call-bar a.enquire {
    color: #ff2d95;
    border-left: 1px solid rgba(79,245,200,0.2);
  }
  .call-bar a:active { background: rgba(79,245,200,0.12); }
  body { padding-bottom: 54px; }
}

/* Discreet "last updated" stamp in the footer legal line */
.site-updated { opacity: 0.55; font-size: 0.92em; }

/* hCaptcha widget inside the inline enquiry form */
.lead-captcha { margin: 2px 0 4px; }
.lead-captcha .h-captcha { display: inline-block; }
