/* 2026-12-01 visual audit: mobile nav collapse + compact cookie. Indexing unchanged. */

header.sticky {
  background-color: #fff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.br-nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.br-nav-burger {
  display: none;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-left: 0.4rem;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #fff;
}
.br-nav-burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: #0f172a;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
header:has(.br-nav-toggle:checked) .br-nav-burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
header:has(.br-nav-toggle:checked) .br-nav-burger span:nth-child(2) { opacity: 0; }
header:has(.br-nav-toggle:checked) .br-nav-burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
.br-nav-toggle:focus-visible + .br-nav-burger {
  outline: 2px solid #244aa8;
  outline-offset: 2px;
}

@media (max-width: 767px) {
  header.sticky a.btn-primary.btn-sm { margin-left: auto; }
  .br-nav-burger { display: inline-flex; }
  header.sticky { overflow: visible; }
  nav[aria-label="Principal móvel"] {
    display: none;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    padding: 0.25rem 0.75rem 0.6rem;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  }
  header:has(.br-nav-toggle:checked) nav[aria-label="Principal móvel"] {
    display: flex;
  }
  nav[aria-label="Principal móvel"] a {
    display: flex;
    align-items: center;
    min-height: 44px;
    width: 100%;
    border-bottom: 1px solid #f1f5f9;
    padding-inline: 0.5rem;
  }
  nav[aria-label="Principal móvel"] a:last-child { border-bottom: 0; }
}

@media (min-width: 768px) {
  .br-nav-toggle,
  .br-nav-burger { display: none !important; }
}

/* -------------------------------------------------------------------------
   Single compact consent bar. The 12:26 stack of #consent-bar +
   #analytics-consent (Cloudflare Web Analytics copy) covered CTAs, the
   RFQ form and spec tables. Hide the second bar; one slim G10 bar sits
   above the WhatsApp dock and page content is padded by the combined height.
   ------------------------------------------------------------------------- */
:root {
  --wa-dock-h: 0px;
  --consent-h: 0px;
}

#analytics-consent,
#analytics-consent.consent-bar {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.br-consent-stack {
  display: contents;
}

#consent-bar.consent-bar,
#consent-bar {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: var(--wa-dock-h, 0px) !important;
  z-index: 55;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.65rem !important;
  width: 100%;
  padding: 0.4rem 0.85rem !important;
  background: #fff !important;
  border-top: 1px solid #e2e8f0 !important;
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
}
#consent-bar[hidden] {
  display: none !important;
}
#consent-bar p {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: none !important;
  font-size: 0.75rem !important;
  line-height: 1.35 !important;
  margin: 0 !important;
}
#consent-bar .consent-actions,
#consent-bar .flex {
  flex: none !important;
  flex-wrap: nowrap !important;
  gap: 0.4rem !important;
}
#consent-bar button {
  min-height: 40px !important;
  padding: 0.3rem 0.8rem !important;
  font-size: 0.85rem !important;
}

@media (max-width: 767px) {
  :root {
    --wa-dock-h: calc(48px + env(safe-area-inset-bottom, 0px));
    /* Measured cookie bar at 390px is ~95px (text wraps ~5 lines), not 3.25rem. */
    --consent-h-fallback: 5.95rem;
  }
  /* Tie spacing to the visible #consent-bar, not only the JS class.
     13:21 fold shot had the slim bar on, but body.consent-open tightening
     did not apply (hero still used py-14 = 56px top). :has() keeps both
     hero CTAs above the cookie + WhatsApp dock on a 390x800 first view. */
  body.consent-open,
  .consent-open,
  body:has(#consent-bar:not([hidden])) {
    padding-bottom: calc(var(--consent-h, var(--consent-h-fallback)) + var(--wa-dock-h, 3rem) + 0.25rem) !important;
  }
  body.consent-open .hero-band > div,
  body:has(#consent-bar:not([hidden])) .hero-band > div {
    padding-top: 1.15rem !important;
    padding-bottom: 1.15rem !important;
  }
  body.consent-open .hero-band h1,
  body:has(#consent-bar:not([hidden])) .hero-band h1 { margin-top: 0.35rem !important; }
  body.consent-open .hero-band .text-lg,
  body:has(#consent-bar:not([hidden])) .hero-band .text-lg {
    margin-top: 0.55rem !important;
    margin-bottom: 0.55rem !important;
    line-height: 1.5 !important; /* leading-8 is 32px; 1.5 at 18px is still readable and frees ~40px across 8 lines as buffer */
  }
  /* 13:30 fold: compact mobile cookie bar (~95px / 5 lines -> ~60px)
     so the hero WhatsApp CTA clears the bar. Do not shrink
     body.consent-open padding-bottom (contato / spec tables). */
  #consent-bar.consent-bar,
  #consent-bar {
    padding: 0.3rem 0.7rem !important;
    gap: 0.45rem !important;
  }
  #consent-bar p {
    font-size: 0.75rem !important;
    line-height: 1.35 !important;
  }
  #consent-bar button {
    min-height: 40px !important;
    padding: 0.25rem 0.5rem !important;
    font-size: 0.8rem !important;
  }
  body.consent-open .hero-band .my-6,
  body:has(#consent-bar:not([hidden])) .hero-band .my-6 {
    margin-top: 0.7rem !important;
    margin-bottom: 0.7rem !important;
    gap: 0.5rem !important; /* was gap-4 16px; RFQ has ~42px spare */
  }
  :where(a[href], button, summary, input, select, textarea, table, [tabindex]:not([tabindex="-1"])) {
    scroll-margin-bottom: calc(var(--consent-h, var(--consent-h-fallback)) + var(--wa-dock-h, 3rem) + 0.75rem);
  }
}

@media (min-width: 768px) {
  :root { --wa-dock-h: 0px; }
  body.consent-open,
  .consent-open {
    padding-bottom: max(4.5rem, var(--consent-h, 4.5rem)) !important;
  }
  body.consent-open .wa-fab {
    bottom: calc(var(--consent-h, 4.5rem) + 1.25rem) !important;
  }
}

/* 2026-12-01 P2: professional H1 line breaks. Does not change hero fold
   spacing, cookie bar, or hamburger. */
.u-nowrap { white-space: nowrap; }

.hero-band h1 .h1-p1,
.hero-band h1 .h1-p2,
.hero-band h1 .h1-p3 {
  display: block;
}

/* At 390, 1.6rem leaves "Matérias-primas" alone on line 1. A slight
   reduction lets the three phrases each sit on one line without overflow
   at 390, and still wraps if the viewport is narrower than 390. */
@media (max-width: 767px) {
  .hero-band h1 {
    font-size: 1.5rem !important;
    line-height: 1.25 !important;
  }
}

/* 2026-12-01 typography: Qualidade H2 "Pureza ≠ teor".
   Self-hosted IBM Plex Sans latin subsets do not include U+2260, so
   the heading fell back to a system glyph that rendered as "=/".
   Serve a one-glyph SemiBold IBM Plex face for that character only.
   Do not change the site-wide font stack. */
@font-face {
  font-family: "IBM Plex Sans Neq";
  src: url("/assets/fonts/ibm-plex-sans-neq-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+2260;
}
.sym-neq {
  font-family: "IBM Plex Sans Neq", "IBM Plex Sans", sans-serif;
  font-weight: 600;
  font-style: normal;
  letter-spacing: 0;
  font-feature-settings: normal;
  font-variant: normal;
}
