/* v11: shared hero typography/alignment, section anchors and mobile corrections. */
:root {
  --portal-hero-title-size: clamp(3.25rem, 5.6vw, 5.5rem);
  --portal-hero-top: clamp(32px, calc(8.714vw - 57.23px), 68.25px);
  --portal-hero-left: 4.25vw;
  --portal-anchor-offset: 86px;
}
/* Match Home's existing responsive title scale on every page. */
body main > section:first-child h1 {
  font-size: var(--portal-hero-title-size) !important;
  line-height: 1.08 !important;
  margin: 0 !important;
  letter-spacing: -.035em !important;
  overflow-wrap: normal;
}
body main > section:first-child .hero-copy,
body main > section:first-child .products-quality-copy {
  box-sizing: border-box !important;
  align-self: stretch !important;
  justify-content: flex-start !important;
  height: auto !important;
  padding: var(--portal-hero-top) 24px 32px var(--portal-hero-left) !important;
}
body main > section:first-child .hero-copy > .eyebrow,
body main > section:first-child .products-quality-eyebrow {
  margin-top: 0 !important;
  margin-bottom: 12px !important;
}
/* Let larger shared headings determine height instead of clipping them. */
body main > section:first-child .hero-shell {
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  align-items: stretch !important;
}
body.home-page main > section:first-child .hero-shell { min-height: clamp(440px,44.4vw,660px) !important; }
body.about-page main > section:first-child .hero-shell { min-height: clamp(420px,41.5vw,620px) !important; }
body .reference-page main > section:first-child .hero-media img { object-fit: contain !important; }
body main > section:first-child .products-quality-copy { min-width: 0; }
[data-inactive] { cursor: default !important; }
.portal-section-target { scroll-margin-top: var(--portal-anchor-offset); }
#contact-form { scroll-margin-top: var(--portal-anchor-offset); }
/* Keep strokes centered independently of old page-level flex settings. */
@media (max-width:1050px) {
  #shared-header .menu-btn {
    display: grid !important;
    place-items: center !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    line-height: 0 !important;
  }
  #shared-header .menu-btn svg {
    display: block !important;
    width: 22px !important;
    height: 22px !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    position: static !important;
  }
}
@media (max-width:920px) {
  :root { --portal-hero-title-size: clamp(3rem, 6.2vw, 4.2rem); }
}
@media (max-width:760px) {
  :root { --portal-hero-title-size: clamp(2.8rem, 11vw, 4rem); --portal-hero-top: 32px; --portal-hero-left: 20px; }
  body main > section:first-child .hero-copy,
  body main > section:first-child .products-quality-copy { padding-right: 20px !important; padding-bottom: 24px !important; width: 100% !important; }
  body.home-page main > section:first-child .hero-shell,
  body.about-page main > section:first-child .hero-shell { min-height: 0 !important; }
  .ref-distribution .distribution-steps { align-items: stretch; padding: 8px 14px 20px; gap: 12px; }
  .ref-distribution .distribution-steps .step {
    display: grid !important;
    grid-template-columns: 56px minmax(0,1fr) !important;
    grid-template-rows: auto auto;
    column-gap: 14px;
    row-gap: 4px;
    align-items: center !important;
    padding: 16px !important;
    text-align: left !important;
  }
  .ref-distribution .distribution-steps .icon-circle {
    grid-column: 1; grid-row: 1 / 3;
    position: static !important;
    display: grid !important; place-items: center !important;
    width: 52px !important; height: 52px !important;
    margin: 0 !important; padding: 0 !important;
    justify-self: center; align-self: center;
    transform: none !important;
  }
  .ref-distribution .distribution-steps .icon-circle svg { display: block; width: 30px !important; height: 30px !important; margin: 0 !important; }
  .ref-distribution .distribution-steps .step strong,
  .ref-distribution .distribution-steps .step p { grid-column: 2; margin: 0 !important; min-height: 0 !important; padding: 0 !important; text-align: left !important; }
  .ref-distribution .distribution-steps .step strong { align-self: end; line-height: 1.25 !important; }
  .ref-distribution .distribution-steps .step p { align-self: start; }
  .ref-distribution .distribution-steps .step br { display: none; }
}
/* Override Distribution's older screenshot-locked shell height as well. */
body .page main > section:first-child .hero-shell { height: auto !important; max-height: none !important; }
@media (max-width:1050px) {
  #shared-header .mobile-nav { width: auto !important; box-sizing: border-box; }
}
/* Prevent native smooth hash scrolling from racing the header-aware position. */
html { scroll-behavior: auto; }
