/* Typography v2 (site-wide, 2026-11-21). Self-hosted fonts (SIL OFL, via Fontsource) + readable scale.
   Linked last in the document head, after mobile-legibility.css. */
@font-face{font-family:'Anton';src:url('/fonts/anton-latin-400-normal.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Inter';src:url('/fonts/inter-latin-400-normal.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Inter';src:url('/fonts/inter-latin-600-normal.woff2') format('woff2');font-weight:600 700;font-style:normal;font-display:swap}
@font-face{font-family:'IBM Plex Mono';src:url('/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'IBM Plex Mono';src:url('/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');font-weight:500 700;font-style:normal;font-display:swap}

:root{
  --condensed:'Anton',Impact,'Arial Narrow',sans-serif;
  --body:'Inter','Segoe UI',Arial,sans-serif;
  --mono:'IBM Plex Mono',Consolas,'Courier New',monospace;
}
body{font-family:var(--body)}
/* Only one weight per family is shipped for Anton: block faux bold, keep faux italic */
html{font-synthesis:style}
/* Anton is narrower than Impact: no negative tracking needed */
h1,h2,h3,.service-hero h1{letter-spacing:0 !important;font-weight:400;line-height:1.04 !important}
/* Anton has taller accents than Impact: line-height below 1 makes accented capitals collide */

/* Body text: 16px on phones, 17-18px on desktop. :not(.x-a):not(.x-b) only raises specificity above mobile-legibility.css */
.service-lead{font-size:18px !important;line-height:1.6 !important}
main :is(p,li,dd,summary):not(.x-a):not(.x-b),
.service-principle__copy,.service-scope-note,.service-section-head p,.service-location{font-size:17px !important;line-height:1.65 !important}
/* Labels and buttons in mono: floor of 13px */
.service-kicker,.section-no,.service-diagram__meta,.breadcrumb,.service-breadcrumb,
.button,.service-action,.service-next,.action-link{font-size:13px !important;letter-spacing:.06em}

@media (max-width:760px){
  .service-lead{font-size:17px !important}
  main :is(p,li,dd,summary):not(.x-a):not(.x-b),
  .service-principle__copy,.service-scope-note,.service-section-head p,.service-location{font-size:16px !important;line-height:1.6 !important}
  .service-kicker,.section-no,.service-diagram__meta,.breadcrumb,.service-breadcrumb,
  .button,.service-action,.service-next,.action-link{font-size:13px !important}
  /* Keep the fixed bar from covering the end of the page */
  body{padding-bottom:72px}
  /* Hero grid used a content-sized column: long words pushed it past the screen */
  .service-hero{grid-template-columns:minmax(0,1fr) !important}
  .service-hero h1{font-size:clamp(38px,13vw,58px) !important;overflow-wrap:break-word}
}

/* UI fixes (2026-11-21) */
/* While the consent notice is open, hide the floating buttons that overlap it */
body:has(.analytics-consent__notice:not([hidden])) .guided-contact,
.analytics-consent:has(.analytics-consent__notice:not([hidden])) .analytics-consent__trigger{display:none !important}
/* Client cards on the home page: links were 15px tall */
.sector-experience__group a{display:inline-flex;align-items:center;min-height:44px}
@media (max-width:760px){
  /* Consent notice took ~40% of the first screen */
  #analytics-consent-copy{font-size:14px !important;line-height:1.45 !important}
  .analytics-consent__notice{gap:8px !important;padding:10px 12px !important}
  .analytics-consent__policy{min-height:32px !important;margin-top:0 !important}
}

/* Phone header: language switch moves into the logo/menu row (header 139px -> 66px); short codes, full name kept for screen readers */
@media (max-width:760px){
  header.header{grid-template-columns:auto minmax(0,1fr) auto !important}
  .header>.logo-wrap{grid-column:1;grid-row:1}
  .header>.locale-switch{grid-column:2;grid-row:1;justify-self:end;align-self:center;width:auto !important;margin:0 6px 0 0 !important;gap:4px !important}
  .header>.menu-toggle{grid-column:3;grid-row:1}
  .header>.main-nav{grid-column:1/-1}
  .locale-switch a{font-size:0 !important;min-width:44px;min-height:44px;padding:0 6px !important;display:inline-flex !important;align-items:center;justify-content:center}
  .locale-switch a::before{font-size:13px;letter-spacing:.06em;font-family:var(--mono)}
  .locale-switch a[hreflang^="pt"]::before{content:"PT"}
  .locale-switch a[hreflang^="en"]::before{content:"EN"}
  .locale-switch a[hreflang^="zh"]::before{content:"中文"}
  /* Home service cards: 1 column instead of 2 x 169px */
  .service-grid{grid-template-columns:minmax(0,1fr) !important}
}
