/* ============================================================
   CHIFFREX LOGISTICS — Mobile optimisation layer
   Loaded LAST. Refines the base responsive rules for phones
   and small tablets. Touch-target, no horizontal-scroll,
   readable type, comfortable spacing.
   ============================================================ */

/* Header height as a token so the mobile menu always aligns */
:root { --header-h: 78px; }

/* Never allow sideways scroll from decorative glows / wide grids.
   `clip` (not hidden) keeps the sticky header working. */
html { overflow-x: clip; }
body { overflow-x: clip; }

/* ---------- Tablet & below ---------- */
@media (max-width: 980px) {
  .nav { height: var(--header-h); }
  .mobile-menu { inset: var(--header-h) 0 0 0; }
}

/* ---------- Small tablet / large phone ---------- */
@media (max-width: 860px) {
  :root { --header-h: 68px; }

  /* Floating hero cards: keep them inside the frame, smaller */
  .hero__visual { margin-top: 8px; }
  .hero__badge { padding: 14px 16px; max-width: 230px; }
  .hero__badge .ico { width: 40px; height: 40px; }
  .hero__chip { padding: 9px 16px; font-size: .84rem; }

  /* Section rhythm tightens a touch on smaller screens */
  .section { padding-block: clamp(56px, 11vw, 88px); }
}

/* ---------- Phones ---------- */
@media (max-width: 600px) {
  :root { --header-h: 64px; }

  .nav__logo img { height: 38px; }

  /* Comfortable reading + generous tap zones */
  .lead { font-size: 1.05rem; }
  .btn { padding: 14px 22px; }
  .btn--lg { padding: 16px 24px; font-size: 1rem; }

  /* Primary actions go full-width so they're easy to tap */
  .hero__actions,
  .cta-band__actions,
  .page-hero__inner > div[style*="flex"] {
    width: 100%;
  }
  .hero__actions .btn,
  .cta-band__actions .btn,
  .page-hero__inner .btn { flex: 1 1 100%; }

  /* Hero trust row: 3 even columns reads better than wrap */
  .hero__trust { gap: 18px 24px; }
  .hero__trust-item b { font-size: 1.5rem; }

  /* Hero floating cards sit in normal flow at the corners cleanly */
  .hero__badge { position: static; max-width: none; margin-top: 14px; box-shadow: var(--sh-2); }
  .hero__chip { top: 14px; right: 14px; }

  /* Tracking widget: stack the field above the button */
  .track-form { flex-direction: column; }
  .track-form .btn { width: 100%; }

  /* Stats band: single column, lighter padding */
  .statsband__cell { padding: 26px 20px; }

  /* Service feature rows: image first, body below, no fixed media height */
  .svc-feature__media { min-height: 220px; }

  /* Testimonials: hide the duplicate top-right nav proxy if present */
  #tnav-proxy { display: none; }

  /* FAQ: a hair tighter */
  .faq__q { padding: 18px 18px; font-size: 1.02rem; }
  .faq__a-inner { padding: 0 18px 20px; }

  /* CTA band padding */
  .cta-band { padding: 36px 24px; }

  /* Footer: align language + bottom row */
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: 12px; }

  /* Legal: turn the spec table into stacked rows (no overflow) */
  .legal-table, .legal-table tbody, .legal-table tr, .legal-table th, .legal-table td { display: block; width: 100%; }
  .legal-table tr { padding: 4px 0; }
  .legal-table th { background: transparent; padding: 14px 16px 4px; width: 100%; }
  .legal-table td { padding: 0 16px 14px; }

  /* Map a little taller so it's usable on a phone */
  .map-embed { aspect-ratio: 4 / 3; }

  /* Contact info icons + text breathe */
  .contact-info__card { padding: 18px; }
}

/* ---------- Very small phones ---------- */
@media (max-width: 400px) {
  .display { font-size: clamp(2.1rem, 11vw, 2.6rem); }
  .h1 { font-size: clamp(1.85rem, 8.5vw, 2.2rem); }
  .nav { gap: 10px; }
  .cta-band { padding: 32px 20px; }
  .hero__chip { display: none; }
}
