/* ===================================================================
   picxum — Responsive / mobile layer. Loaded LAST so it wins.
   Fixes: hamburger nav + fullscreen menu, responsive header,
   tel: phone, full-width CTA, hero stacking, no horizontal scroll.
   =================================================================== */

/* ---- global overflow guard ----
 * NOTE: overflow-x must live on BODY only. Putting it on <html> forces
 * computed overflow-y:auto on the root, which turns <html> into a scroll
 * container and BREAKS position:sticky (the Transformation visual column).
 * body{overflow-x:hidden} clips horizontal overflow without that side effect. */
body { overflow-x: hidden; }
html, body { max-width: 100%; }

/* ===================================================================
   Header — desktop base (flat flex: logo | links | phone | cta | burger)
   =================================================================== */
.px-nav__inner { display: flex; align-items: center; gap: var(--space-5); height: 78px; justify-content: flex-start; }
.px-nav__logo { display: flex; align-items: center; flex: none; }
.px-nav__logo img { height: 46px; width: auto; display: block; }
.px-nav__links { display: flex; align-items: center; gap: var(--space-7); margin-left: auto; }
.px-nav__phone { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: var(--fw-bold); font-size: var(--text-sm); color: var(--text-strong); white-space: nowrap; text-decoration: none; flex: none; }
.px-nav__phone i { width: 16px; height: 16px; color: var(--brand); }
.px-nav__cta { display: flex; flex: none; }
.px-nav__burger { display: none; }

/* ===================================================================
   Tablet & mobile (≤ 920px) — links → hamburger, phone → icon button
   =================================================================== */
@media (max-width: 920px) {
  .px-nav__links { display: none !important; }
  .px-nav__phone { margin-left: auto; }
  .px-nav__phone-num { display: none; }   /* icon-only */
  .px-nav__phone {
    width: 46px; height: 46px; justify-content: center; gap: 0;
    border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
    transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
  }
  .px-nav__phone i { width: 20px; height: 20px; }
  .px-nav__phone:active { background: var(--brand-subtle); border-color: var(--brand); }

  /* hamburger button */
  .px-nav__burger {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 46px; height: 46px; flex: none; padding: 0 12px;
    background: var(--surface-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md); cursor: pointer;
  }
  .px-nav__burger span { display: block; height: 2.5px; width: 100%; background: var(--text-strong); border-radius: 2px; transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-fast) var(--ease-out); }
  .px-nav__burger.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .px-nav__burger.is-open span:nth-child(2) { opacity: 0; }
  .px-nav__burger.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

  /* compact CTA so it never gets clipped */
  .px-nav__cta button, .px-nav__cta a { font-size: var(--text-sm); }
}

/* ===================================================================
   Small mobile (≤ 560px) — two rows: [logo · phone · burger] / [CTA]
   =================================================================== */
@media (max-width: 560px) {
  .px-nav__inner { flex-wrap: wrap; height: auto; padding-block: 12px; column-gap: var(--space-3); row-gap: 10px; }
  .px-nav__logo { margin-right: auto; order: 1; }
  .px-nav__logo img { height: 38px; }
  .px-nav__phone { order: 2; margin-left: 0; }
  .px-nav__burger { order: 3; }
  .px-nav__cta { order: 4; flex-basis: 100%; width: 100%; }
  .px-nav__cta button, .px-nav__cta a { width: 100%; justify-content: center; }
}

/* ===================================================================
   Fullscreen mobile menu overlay — portaled to <body>, so it escapes the
   sticky header's stacking context and covers ALL content.
   =================================================================== */
.px-menu { position: fixed; inset: 0; z-index: 2147483000; background: #07162B; display: none; flex-direction: column; }
.px-menu.is-open { display: flex; }
@media (min-width: 921px) { .px-menu, .px-menu.is-open { display: none; } }

/* top bar: logo hard-left, X hard-right — never centered */
.px-menu__top { flex: none; display: flex; flex-direction: row; align-items: center; justify-content: space-between;
  width: 100%; padding: 16px max(20px, env(safe-area-inset-left)); }
.px-menu__logo { height: 30px; width: auto; }
.px-menu__close { width: 46px; height: 46px; flex: none; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.16); border-radius: var(--radius-md); color: #fff; cursor: pointer; transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out); }
.px-menu__close:hover, .px-menu__close:active { background: var(--brand); border-color: var(--brand); }
.px-menu__close i { width: 24px; height: 24px; }

/* links: centered, stacked, vertically middle */
.px-menu__links { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 20px; }
.px-menu__link { background: none; border: 0; color: #fff; cursor: pointer; text-align: center;
  font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1.2; letter-spacing: -0.01em;
  padding: 4px 8px; transition: color var(--dur-fast) var(--ease-out); }
.px-menu__link:hover, .px-menu__link:active { color: var(--orange-300); }

.px-menu__foot { flex: none; padding: var(--space-6) max(20px, env(safe-area-inset-left)) calc(var(--space-8) + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: var(--space-4); border-top: 1px solid rgba(255,255,255,0.09); }
.px-menu__phone { display: inline-flex; align-items: center; justify-content: center; gap: 9px; color: #fff; font-weight: 700; font-size: var(--text-base); text-decoration: none; }
.px-menu__phone i { width: 18px; height: 18px; color: var(--brand); }

/* ===================================================================
   Hero — mobile stacking, full-width actions, contained floats
   =================================================================== */
@media (max-width: 920px) {
  .px-hero { padding-top: var(--space-12); padding-bottom: var(--space-16); }
}
@media (max-width: 560px) {
  .px__container { padding-inline: 20px; }
  .px-hero h1 { font-size: clamp(2rem, 10vw, 2.6rem); }
  .px-hero__sub { font-size: var(--text-lg); }
  .px-hero__actions { gap: 10px; }
  .px-hero__actions button, .px-hero__actions a { width: 100%; justify-content: center; }

  /* keep the floating proof cards inside the viewport */
  .px-float { padding: 9px 12px; gap: 9px; }
  .px-float__icon { width: 32px; height: 32px; }
  .px-float__icon i { width: 17px; height: 17px; }
  .px-float__big { font-size: var(--text-sm); }
  .px-float__sm { font-size: 10px; }
  .px-float--tl { top: -14px; left: 2px; }
  .px-float--br { bottom: -14px; right: 2px; }
}

/* ===================================================================
   Section paddings + stacking on small screens
   =================================================================== */
@media (max-width: 560px) {
  .px-section { padding: var(--space-16) 0; }
  /* stat groups stack */
  .px-ref__stats { flex-direction: column; gap: var(--space-5); }
  /* business-check result actions full width */
  .px-result__actions button, .px-result__actions a,
  .px-cta__head .px-btn { width: 100%; }
  /* CTA trustline wraps cleanly */
  .px-cta__trustline { gap: var(--space-2) var(--space-4); }

  /* final CTA panel + lead form must shrink to the viewport */
  .px-cta__panel { padding: 24px 20px; }
  .px-cta__panel > *, .px-cta__head, .px-form { min-width: 0; }
  .px-cta__head h2 { overflow-wrap: anywhere; }
  .px-form__row { grid-template-columns: 1fr; }
  .px-form input, .px-form textarea, .px-form select { min-width: 0; width: 100%; box-sizing: border-box; }
}
