/* AVERAINVEST: Oswald for headings; Raleway for descriptions and UI.
   Both self-hosted families include Latin and Cyrillic subsets. */
:root {
  --heading-font: "Oswald", Arial, sans-serif;
  --body-font: "Raleway", Arial, sans-serif;
  --serif: var(--heading-font);
  --sans: var(--body-font);
  --display-font: var(--serif);
  --numeric: var(--sans);
  --cta-font: var(--sans);
}
body { font-family: var(--sans); font-weight: 400; font-kerning: normal; }
button, input, textarea, select { font-family: var(--sans); }
.leaflet-container, .leaflet-tooltip, .leaflet-popup-content,
.leaflet-control-attribution, .leaflet-bar a { font-family: var(--sans) !important; }

/* Keep script coverage intentional rather than depending on a browser's
   arbitrary default. Language scripts retain the site's existing layout. */
html:lang(zh) { --body-font: "Raleway", "PingFang SC", "Microsoft YaHei", Arial, sans-serif; --heading-font: "Oswald", "PingFang SC", "Microsoft YaHei", Arial, sans-serif; }
html:lang(ar) { --body-font: "Raleway", Tahoma, Arial, sans-serif; --heading-font: "Oswald", Tahoma, Arial, sans-serif; }

/* This title shares a row with a photograph: size it for its column. */
body.business-home .bi-legalization .residence-heading {
  container-type: inline-size;
  min-width: 0;
}

/* The existing named layer owns important responsive typography. */
@layer mobile-standard {
  body:is(.business-home,.business-property,.business-detail,.business-state) :is(h1,h2,h3,h4,h5,h6) {
    font-family: var(--serif) !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    line-height: 1.12 !important;
    text-wrap: balance;
  }
  body.business-home .bi-hero h1 {
    font-size: clamp(3.5rem, 6.05vw, 5.4375rem) !important;
    font-weight: 400 !important;
    line-height: 1.12 !important;
  }
  body.business-home :is(.bi-section h2,.lead-copy h2,.relocation-residency-title h2,.documents-section .section-heading h2) {
    font-size: clamp(2.5rem, 3.65vw, 3.25rem) !important;
    line-height: 1.18 !important;
  }
  body.business-home .bi-legalization .residence-heading h2 {
    font-size: clamp(1.5rem, 3vw, 3rem) !important;
    font-size: clamp(1.5rem, 8.5cqi, 3rem) !important;
    line-height: 1.18 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
    max-width: 100%;
    margin: 18px 0 0;
  }
  body.business-property .property-market-heading h1,
  body.business-detail .property-detail h1,
  body.business-state .state-hero h1 {
    font-size: clamp(3.25rem, 5.4vw, 5.4375rem) !important;
  }
  body.business-property .property-market-direction h2 { font-size: clamp(2.5rem, 3.6vw, 3.25rem) !important; }
  body.business-home :is(.bi-trust-card h3,.document-card h3) {
    font-family: var(--serif) !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    line-height: 1.15 !important;
  }
  body:is(.business-home,.business-property,.business-detail,.business-state) :is(button,.bi-button,.document-card-cta,.editorial-contact-cta,.property-contact-cta) {
    font-family: var(--sans) !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
  }
  body:is(.business-home,.business-property,.business-detail,.business-state) [data-site-header] .editorial-wordmark-name,
  .site-footer .footer-text-wordmark-name {
    font-family: "Oswald", Arial, sans-serif !important;
    font-weight: 500 !important;
  }
  .site-footer .footer-text-wordmark-name {
    letter-spacing: .12em !important;
    line-height: 1.4 !important;
  }
  @media (max-width: 767px) {
    body.business-home .bi-hero h1 { font-size: clamp(2.5rem, 10.8vw, 3.75rem) !important; line-height: 1.12 !important; }
    body.business-home :is(.bi-section h2,.lead-copy h2,.relocation-residency-title h2,.documents-section .section-heading h2) { font-size: clamp(2.1rem, 9vw, 3rem) !important; }
    body.business-property .property-market-heading h1,
    body.business-detail .property-detail h1,
    body.business-state .state-hero h1 { font-size: clamp(2.4rem, 10.5vw, 3.75rem) !important; }
    body.business-property .property-market-direction h2 { font-size: clamp(1.9rem, 8vw, 2.25rem) !important; }
  }
}
