/* Shared navigation, contact details and page-end navigation. */
:root {
  --noda-chrome-height: 88px;
  --noda-chrome-offset: calc(var(--noda-chrome-height) + env(safe-area-inset-top, 0px));
}

#nav.n8-header .n8-row {
  min-height: calc(var(--noda-chrome-height) - 1px);
  padding-inline: max(24px, env(safe-area-inset-left, 0px)) max(24px, env(safe-area-inset-right, 0px));
  gap: clamp(14px, 1.5vw, 25px);
}
#nav.n8-header .n8-brand {
  gap: 10px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: .025em;
}
#nav.n8-header .n8-brand svg { width: 48px; height: 48px; }
#nav.n8-header .n8-links > a { font-size: 14px; min-height: 48px; padding-inline: clamp(8px, .7vw, 12px); }
#nav.n8-header .n8-links > .n8-home { padding-inline: 16px; }
#nav.n8-header .n8-contacts { gap: clamp(12px, 1.3vw, 22px); }
#nav.n8-header .n8-phone { font-size: 14px; }
#nav.n8-header .n8-request { min-height: 48px; padding-inline: 18px; font-size: 14px; }
#nav.n8-header .n8-burger.nav-burger { flex-basis: 48px; width: 48px !important; height: 48px !important; }
#n8MobileMenu { padding-top: calc(var(--noda-chrome-offset) + 14px); }
#n8MobileMenu .n8-mobile-links > a { font-size: 15px; }

/* Retain the menu script's breakpoint. Allow the contact column to grow
   to its translated label's intrinsic width before centering the links. */
@media (min-width: 1321px) {
  #nav.n8-header .n8-row { grid-template-columns: auto minmax(max-content, 1fr) auto; gap: 16px; }
}
@media (min-width: 1321px) and (max-width: 1440px) {
  #nav.n8-header .n8-row { padding-inline: 20px; gap: 12px; }
  #nav.n8-header .n8-links > a { padding-inline: 7px; }
  #nav.n8-header .n8-links > .n8-home { padding-inline: 12px; }
  #nav.n8-header .n8-contacts { gap: 10px; }
}
@media (min-width: 601px) and (max-width: 1320px) {
  :root { --noda-chrome-height: 80px; }
}

header.top > .wrap { height: calc(var(--noda-chrome-height) - 1px); }
header.top :is(.logo, .brand) { font-size: 25px; gap: 10px; }
header.top :is(.logo, .brand) svg { width: 46px; height: 46px; }
header.top .top-phone { font-size: 14px; }
header.top .top-phone small { font-size: 12px; }
header.top .ico-btn { width: 48px; height: 48px; }
header.top .top-cta { min-height: 48px; font-size: 14px; }
header.top:has(> .top-links) { box-sizing: border-box; min-height: var(--noda-chrome-height); padding-block: 12px; }
header.top .top-links a { font-size: 14px; }
header.top > .noda-mobile-call { display: none; }
html:has(header.top > .wrap), html:has(.crm-intro) { scroll-padding-top: calc(var(--noda-chrome-offset) + 10px); }
.crm-page .crm-intro { padding-top: var(--noda-chrome-offset); }

/* A fixed header sits above the journal's content; the journal's own hero
   spacing is independent of the header's measured-height variables. */
body:has(> .bfoot) > main.wrap { margin-top: 0; padding-top: var(--noda-chrome-offset); }
body:has(> .bfoot) :is(.bhero, .art-hero) { padding-top: clamp(24px, 3.5vw, 48px); }

footer:is(.wd-foot, .ai-foot, .bfoot, .crm-footer),
footer:has(> .wrap.foot) { padding-block: clamp(40px, 3.5vw, 60px); }
footer .brand, footer .crm-footer-brand { font-size: 26px; font-weight: 800; line-height: 1.12; }
footer .brand :is(svg, .mark) { width: 44px; height: 44px; }
footer:is(.wd-foot, .ai-foot) .brand .mark { width: 44px; height: 44px; }
footer :is(.wd-foot-tag, .ai-foot-tag, .wd-foot-c, .ai-foot-c, .cr), footer > .wrap.foot > span { font-size: 15px; }
footer :is(.wd-foot-mail, .ai-foot-mail),
footer :is(.nex-footer-socials, .foot-links, .bfoot-links, nav) > a { font-size: 16px; }
footer :is(.nex-footer-socials, .foot-links, .bfoot-links, nav) > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
footer .nex-footer-socials { gap: 8px 19px; flex-wrap: wrap; }
footer .nex-footer-socials img { width: 26px; height: 26px; }
footer :is(.bfoot-links, .foot-links), footer.crm-footer nav { gap: 2px 20px; }
footer.bfoot .cr { color: #a8a4b6; }
@media (min-width: 901px) {
  footer:has(> .wrap.foot), footer.foot { box-sizing: border-box; min-height: 225px; align-content: center; }
}
footer.foot { padding-block: 48px; font-size: 16px; line-height: 1.55; }
footer.foot p b { font-size: 23px; }
footer.foot .wrap { gap: 16px 32px; }
footer.foot .wrap > div { min-width: 0; overflow-wrap: anywhere; }

@media (min-width: 641px) and (max-width: 820px) {
  header.top .top-phone { display: none; }
  header.top .top-tel { display: inline-flex; }
  header.top > .wrap { gap: 8px; }
}
@media (max-width: 600px) {
  :root { --noda-chrome-height: 70px; }
  #nav.n8-header .n8-row {
    gap: 7px;
    padding-inline: max(12px, env(safe-area-inset-left, 0px)) max(12px, env(safe-area-inset-right, 0px));
  }
  #nav.n8-header .n8-brand { width: auto; min-width: 44px; gap: 5px; font-size: 21px; }
  #nav.n8-header .n8-brand > span { display: inline; }
  #nav.n8-header .n8-brand svg { width: 44px; height: 44px; }
  #nav.n8-header .n8-contacts { gap: 6px; }
  #nav.n8-header .n8-request { min-height: 44px; font-size: 13px; padding-inline: 12px; }
  #nav.n8-header .n8-burger.nav-burger { flex-basis: 44px; width: 44px !important; height: 44px !important; }

  header.top :is(.logo, .brand) { font-size: 22px; gap: 7px; }
  header.top :is(.logo, .brand) svg { width: 40px; height: 40px; }
  header.top .ico-btn { width: 44px; height: 44px; }
  header.top .top-links { gap: 1px; }
  header.top .top-links a { font-size: 13px; padding-inline: 5px; }

  footer:is(.wd-foot, .ai-foot, .bfoot, .crm-footer),
  footer:has(> .wrap.foot) { padding-block: 28px; }
  footer:is(.wd-foot, .ai-foot) :is(.wd-foot-in, .ai-foot-in),
  footer .bfoot-in, footer > .wrap.foot { gap: 10px 16px; justify-content: flex-start; }
  footer .brand, footer .crm-footer-brand { font-size: 24px; }
  footer :is(.wd-foot-c, .ai-foot-c, .cr), footer > .wrap.foot > span { font-size: 14px; }
  footer :is(.wd-foot-mail, .ai-foot-mail),
  footer :is(.nex-footer-socials, .foot-links, .bfoot-links, nav) > a { font-size: 15px; }
  footer :is(.nex-footer-socials, .foot-links, .bfoot-links, nav) { justify-content: flex-start; gap: 0 14px; }
  footer.crm-footer { flex-wrap: wrap; align-items: center; gap: 8px 20px; }
  footer.crm-footer nav { justify-content: flex-start; }
  footer.foot { padding: 30px 0 calc(92px + env(safe-area-inset-bottom, 0px)); font-size: 15px; }
}

/* The call action sits next to the menu at every width with a hamburger. */
@media (max-width: 1320px) {
  #nav.n8-header .n8-request { order: -1; }
  #nav.n8-header .n8-phone, header.top > .noda-mobile-call {
    display: inline-flex;
    align-items: center;
    flex: 0 0 44px;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-size: 0;
    border: 1px solid rgba(184, 169, 238, .23);
    border-radius: 12px;
  }
  #nav.n8-header .n8-phone::before, header.top > .noda-mobile-call::before {
    content: "";
    width: 21px;
    height: 21px;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 16.9v2.7a1.8 1.8 0 0 1-2 1.8A17.8 17.8 0 0 1 3 5.2a1.8 1.8 0 0 1 1.8-2h2.7c.9 0 1.6.6 1.8 1.4l.6 3a1.8 1.8 0 0 1-.5 1.7L8.1 10.6a14.5 14.5 0 0 0 5.4 5.3l1.3-1.3c.4-.4 1.1-.6 1.7-.5l3.1.7c.8.2 1.4 1 1.4 2.1Z'/%3E%3C/svg%3E") center / contain no-repeat;
  }
}
@media (max-width: 600px) {
  header.top:has(> .top-links) { gap: 5px; flex-wrap: nowrap; }
  header.top > .top-links { margin-left: auto; }
  header.top > .noda-mobile-call { color: inherit; }
}
@media (min-width: 601px) {
  header.top > .noda-mobile-call { display: none; }
}
@media (max-width: 410px) {
  header.top > .brand > .noda-wordmark { display: none; }
  #nav.n8-header .n8-row { gap: 5px; padding-inline: max(10px, env(safe-area-inset-left, 0px)) max(10px, env(safe-area-inset-right, 0px)); }
  #nav.n8-header .n8-contacts { gap: 4px; }
}
@media (max-width: 389px) {
  #nav.n8-header .n8-brand > span { display: none; }
}
