/*
 * Shared typography for the public site, client portal and admin.
 * Load this stylesheet LAST on every page so it settles the type system in one place:
 *   --font-display  headings, numbers and short labels (Plus Jakarta Sans)
 *   --font-body     paragraphs, forms and interface text (Inter)
 * Selectors with :not(#artic-type) add ID-level weight so these rules win over older
 * page-specific class rules without !important. The readable-font and text-spacing
 * accessibility preferences use !important, so they still override everything here.
 */
:root{
  --font-body:Inter,"Segoe UI",system-ui,-apple-system,Arial,sans-serif;
  --font-display:"Plus Jakarta Sans",Inter,"Segoe UI",system-ui,Arial,sans-serif;
}

html{
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  text-rendering:optimizeLegibility;
  font-feature-settings:"cv11","ss01","ss03";
}

/* Low specificity on purpose: monospace and preview rules elsewhere keep their own family. */
:where(body,button,input,select,textarea,optgroup){
  font-family:var(--font-body);
}

/* Headings: lighter, airier display type with balanced line breaks. */
body :is(h1,h2,h3,h4,h5,h6):not(#artic-type){
  font-family:var(--font-display);
  font-weight:650;
  letter-spacing:-.022em;
  text-wrap:balance;
  font-feature-settings:normal;
}
body h1:not(#artic-type){line-height:1.08;font-weight:650;letter-spacing:-.018em}
body h2:not(#artic-type){line-height:1.14;font-weight:600;letter-spacing:-.016em}
body :is(h3,h4):not(#artic-type){line-height:1.3;letter-spacing:-.012em;font-weight:600}
body :is(h5,h6):not(#artic-type){line-height:1.4;letter-spacing:0;font-weight:600}

/* Body copy: regular weight with room to breathe. (No text-wrap:pretty: it makes every
   paragraph's layout noticeably slower on low-end phones.) */
body :is(p,dd,blockquote,figcaption):not(#artic-type){
  font-weight:400;
}
body main :is(p,blockquote,figcaption):not(#artic-type),
body footer p:not(#artic-type){
  line-height:1.75;
  letter-spacing:-.003em;
}
body :is(p,li,dd) :is(strong,b):not(#artic-type){font-weight:600}

/* Small uppercase labels ("Why Artic Technologies"): lighter and more open. */
body :is(.section-kicker,.eyebrow,.kicker):not(#artic-type){
  font-family:var(--font-display);
  font-weight:600;
  letter-spacing:.16em;
}

/* Interface text: medium weight instead of extra-bold. */
body :is(button,.button,.primary,.secondary,.pill-link,.text-link,.header-button,.portal-button,.primary-action,.secondary-action):not(#artic-type){
  font-weight:600;
  letter-spacing:-.003em;
}
body :is(input,select,textarea):not(#artic-type){font-weight:450}
body :is(input,select,textarea)::placeholder{font-weight:400}

/* The readable-font preview must keep showing Arial. */
body .font-preview-readable p:not(#artic-type){font-family:Arial,Helvetica,sans-serif}

/* Words styled inside a heading (highlighted phrases, links) keep the heading typeface. */
body :is(h1,h2,h3,h4,h5,h6) *:not(#artic-type):not(svg,svg *,code,kbd){font-family:inherit}

/* Headings in narrow side columns (Why Artic, FAQ): smaller so they sit on two or three calm lines. */
body :is(.choose-intro,.faq-heading) h2:not(#artic-type){
  max-width:13em;
  font-size:clamp(32px,3.1vw,46px);
  line-height:1.12;
}
body :is(.choose-intro,.faq-heading) h2 + p:not(#artic-type){margin-top:20px;font-size:clamp(16px,1.2vw,18px)}
