/* =====================================================================
   Phone-only behaviour.
   Almost all of this site's traffic is on a phone, so these are not
   afterthoughts — the bottom action bar, the quote sheet, the full-screen
   menu and the section chips are the primary interface for most visitors.
   Everything here is inside a max-width query: the desktop is untouched.
   ===================================================================== */

/* ---------- 1. bottom action bar ---------- */
.mbar { display: none; }

@media (max-width: 900px) {
  .mbar {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 95;
    display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,1.25fr); gap: 8px;
    padding: 8px 10px;
    /* safe-area-inset keeps the bar clear of the iPhone home indicator */
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(255,255,255,.94);
    backdrop-filter: saturate(1.5) blur(12px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 24px rgba(12,21,36,.10);
  }

  .mbar__btn {
    /* 52px: comfortably above the 48px minimum for a thumb */
    min-height: 52px; border-radius: 12px;
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding-inline: .4rem;
    font-size: .72rem; font-weight: 600; line-height: 1;
    color: var(--ink); background: var(--surface-2); border: 1px solid var(--line);
    transition: transform .12s var(--ease), background .15s var(--ease);
  }
  .mbar__btn:active { transform: scale(.97); }
  .mbar__btn svg { width: 19px; height: 19px; }
  .mbar__btn--wa { background: #E9F9EF; border-color: #BDEBCE; color: #0B6B2E; }
  .mbar__btn--primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border-color: transparent; color: #fff;
    box-shadow: 0 6px 16px rgba(0,31,154,.3);
  }

  /* The bar covers the last of the page, so the final strip has to be taller.
     The space is added to the copyright bar rather than to <body>, so it stays
     the footer's dark navy instead of showing a white band under it. */
  .ft-copy { padding-bottom: calc(15px + 70px + env(safe-area-inset-bottom, 0px)); }

  /* One WhatsApp button is enough — the floating bubble is now redundant
     and was sitting on top of the bar. */
  .wa-float { display: none; }

  /* The hero at a full 100vh is most of a phone screen spent on one heading.
     svh also stops the address bar collapsing from cutting the layout. */
  .hero { min-height: 88svh; }

  /* Tap targets in the footer are set in footer.css, which owns the whole phone
     layout for it — a blanket rule here only fought with it. (It also used to say
     ".footer a", which matched nothing: the footer's class is .ft.) */
}

/* ---------- 2. quote sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 160; visibility: hidden; }
.sheet.is-open { visibility: visible; }
.sheet__scrim {
  position: absolute; inset: 0; background: rgba(7,20,38,.55);
  opacity: 0; transition: opacity .3s var(--ease);
}
.sheet.is-open .sheet__scrim { opacity: 1; }

.sheet__panel {
  position: absolute; inset-inline: 0; bottom: 0;
  max-height: 92svh; display: flex; flex-direction: column;
  background: #fff; border-radius: 22px 22px 0 0;
  box-shadow: 0 -14px 50px rgba(7,20,38,.3);
  transform: translateY(100%); transition: transform .34s var(--ease);
}
.sheet.is-open .sheet__panel { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .sheet__panel, .sheet__scrim { transition: none; }
}

.sheet__grip {
  width: 42px; height: 4px; border-radius: 99px; background: var(--line);
  margin: 10px auto 2px; cursor: pointer; flex: none;
}
.sheet__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .5rem 1.1rem .75rem; border-bottom: 1px solid var(--line-soft); flex: none;
}
.sheet__head strong { font-size: 1.02rem; }
.sheet__close {
  width: 40px; height: 40px; flex: none; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
}
.sheet__close svg { width: 19px; height: 19px; }

.sheet__body {
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 1.1rem 1.1rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
}
/* the panel inside the sheet is already on a white sheet — drop its own chrome */
.sheet__body .quote__panel { border: 0; box-shadow: none; padding: 0; border-radius: 0; }

/* Where the form normally lives, while it is borrowed by the sheet. */
.quote__slot { display: none; }

/* ---------- 3. full-screen menu ---------- */
@media (max-width: 1199px) {
  .drawer__panel {
    inset-inline: 0; width: 100%;
    border-radius: 0; padding: 0 0 calc(1.5rem + env(safe-area-inset-bottom, 0px));
    display: flex; flex-direction: column;
  }
  .drawer__head {
    position: sticky; top: 0; z-index: 2; background: #fff;
    padding: .9rem 1.1rem; margin: 0; border-bottom: 1px solid var(--line);
  }
  .drawer > .drawer__panel > nav { padding-inline: 1.1rem; }
  .drawer__cta { padding-inline: 1.1rem; }

  /* 52px rows — a menu you can hit without aiming */
  .drawer details > summary,
  .drawer > .drawer__panel > nav > a { min-height: 52px; font-size: 1.02rem; }
  .drawer details a { min-height: 48px; display: flex; align-items: center; font-size: .97rem; }
}

/* Product rows in the menu carry their pack shot: on a phone a thumbnail is a
   faster way to recognise a product than reading six similar names. */
.mnav-prod { display: flex; align-items: center; gap: .8rem; }
.mnav-prod img {
  width: 44px; height: 44px; flex: none; border-radius: 9px; object-fit: cover;
  background: var(--surface-2); border: 1px solid var(--line);
}

.drawer__contact {
  margin-top: 1.5rem; padding: 1.1rem; border-radius: 14px;
  background: var(--navy-900); color: #fff;
}
.drawer__contact h6 {
  margin: 0 0 .75rem; font-size: .72rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: #8FA6C4;
}
.drawer__contact a {
  display: flex; align-items: center; gap: .65rem; min-height: 44px;
  color: #fff; font-size: .95rem; font-weight: 500;
}
.drawer__contact svg { width: 17px; height: 17px; color: var(--yellow); flex: none; }

/* ---------- 4. section chips ---------- */
.chipbar { display: none; }

@media (max-width: 900px) {
  .chipbar {
    display: block; position: sticky; z-index: 30;
    /* sits directly under the sticky header once it has re-attached, and slides
       up to the top of the screen whenever the header hides itself */
    top: 66px;
    background: rgba(255,255,255,.95);
    backdrop-filter: saturate(1.5) blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .chipbar__in {
    display: flex; gap: .5rem; overflow-x: auto;
    padding: .6rem var(--gut);
    scrollbar-width: none; -ms-overflow-style: none;
  }
  .chipbar__in::-webkit-scrollbar { display: none; }
  .chipbar a {
    flex: none; min-height: 38px; display: inline-flex; align-items: center;
    padding-inline: .95rem; border-radius: 100px;
    background: var(--surface-2); border: 1px solid var(--line);
    font-size: .85rem; font-weight: 600; color: var(--ink-soft); white-space: nowrap;
    transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
  }
  .chipbar a.is-on {
    background: var(--brand); border-color: var(--brand); color: #fff;
  }

  body.head-hidden .chipbar { top: 0; }

  /* the chip bar is 51px tall, so anchors need to clear the header AND it */
  section[id] { scroll-margin-top: 120px; }
}

/* =====================================================================
   5. The homepage sections on a phone.

   Stacked one under another, every block on this page turns into the same
   thing: a heading, then a column of identical full-width boxes. It reads
   as one long undifferentiated scroll. Each rule below gives a section the
   shape that suits a narrow screen instead of just letting it stack.
   ===================================================================== */
@media (max-width: 699px) {

  /* ---------- rhythm ----------
     48px above and below every section means ~96px of nothing between each
     one. On a 640px-tall screen that is a sixth of the viewport spent on gaps. */
  .section { padding-block: 2.5rem; }
  .about    { padding-block: 2.5rem; }
  .sec-head { margin-bottom: 1.5rem; }
  .sec-head h2 { margin-bottom: .35rem; }
  .sec-lead { font-size: .95rem; }

  /* ---------- hero ----------
     The header is 66px and the chip bar another 51px; without this the
     badge starts halfway down the screen. */
  .hero__in { padding-block: 7.5rem 3rem; }
  .hero__badge { font-size: .88rem; margin-bottom: .85rem; }
  .hero h2 { font-size: 1rem; }
  .hero__text { font-size: .9rem; }

  /* ---------- about ---------- */
  .about__grid { gap: 1.5rem; }
  .about__title { margin-bottom: .75rem; }
  .about__body p { font-size: .93rem; margin-bottom: .8rem; }
  .about__card { padding: 1.25rem 1rem; border-radius: 14px; }
  .about__stat h3 { font-size: 1.6rem; }
  .about__stat p { font-size: 11.5px; line-height: 1.3; }
  .about__card hr { margin-block: 1.1rem; }
  .about__small { font-size: .88rem; }

  /* ---------- why choose us ----------
     Four full-width cards is four screenfuls of scrolling for four short
     sentences. Two by two, all four are visible at once and the section
     reads as a set rather than a list. */
  #why .grid--4 { grid-template-columns: repeat(2, minmax(0,1fr)); gap: .7rem; }
  #why .feature { padding: 1.1rem .85rem; border-radius: 14px; }
  #why .feature__icon { width: 38px; height: 38px; margin-bottom: .7rem; border-radius: 10px; }
  #why .feature__icon svg { width: 19px; height: 19px; }
  #why .feature h3 { font-size: .95rem; line-height: 1.25; margin-bottom: .25rem; }
  #why .feature p { font-size: .81rem; line-height: 1.45; }

  /* ---------- private label ---------- */
  .split { gap: 1.5rem; }
  .split__body p { font-size: .93rem; }
  .ticks li { font-size: .9rem; }
  .split__media img { border-radius: 14px; }

  /* ---------- process ----------
     Four numbered boxes stacked lose the one thing that matters about them:
     that they are a sequence. A connected timeline says "four steps, in
     order" at a glance and takes half the height. */
  .steps { gap: 0; }
  .step-card {
    position: relative; background: transparent; border: 0; border-radius: 0;
    padding: 0 0 1.4rem; padding-inline-start: 3.1rem;
  }
  .step-card::before {
    position: absolute; inset-inline-start: 0; top: 0; margin: 0;
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--brand); color: #fff;
    display: grid; place-items: center;
    font-size: .82rem; font-weight: 700; letter-spacing: 0;
  }
  /* the line joining one step to the next */
  .step-card::after {
    content: ""; position: absolute; inset-inline-start: 17px; top: 42px; bottom: 0;
    width: 2px; background: var(--line);
  }
  .step-card:last-child { padding-bottom: 0; }
  .step-card:last-child::after { display: none; }
  .step-card h3 { font-size: 1rem; margin-bottom: .15rem; padding-top: .45rem; }
  .step-card p { font-size: .88rem; }

  /* ---------- industries ---------- */
  .chips-row { gap: .45rem; }
  .chip { padding: .5rem .85rem; font-size: .84rem; }

  /* ---------- factory ---------- */
  .section--navy .stats { border-radius: 12px; }
  .section--navy .stat { padding: 1.1rem .6rem; }

  /* ---------- quote ----------
     The panel beside the form repeats the phone number, the email and the
     WhatsApp link — all three of which are already pinned to the bottom of
     the screen. Repeating them here only pushes the form further down. */
  .quote { gap: 1.25rem; }
  .quote__aside .ticks,
  .quote__contact { display: none; }
  .quote__panel { padding: 1.1rem; border-radius: 16px; }
  .qstep__title { font-size: 1.05rem; margin-bottom: .85rem; }
  .choice span { padding: .55rem .9rem; font-size: .87rem; }

  /* ---------- seo note ---------- */
  .seo-note { padding-block: 1.75rem; }
  .seo-note__grid { gap: 1.1rem; }
}

/* Two feature tiles side by side stop working once the text is bigger than
   the box; below 340px they go back to one column. */
@media (max-width: 339px) {
  #why .grid--4 { grid-template-columns: minmax(0,1fr); }
}
