/* ==========================================================================
   Formium Alliance — Typography system (loaded last, on every page)
   One font (Geist) and ONE size per role, everywhere:

     Title      h1, h2, .text-heading-1..3      34px -> 56px (fluid)
     Subtitle   h3-h6, .text-heading-4..6       20px -> 26px (fluid)
     Paragraph  p, .text-tagline-1/2, text-base 16px
     Small      .text-tagline-3, text-sm        14px
     Micro      text-xs, badges (Geist Mono)    12px

   Scale informed by 1367studio.com: Geist, regular weight, tight tracking,
   16/1.6 body. Replaces the old Bricolage Grotesque + mixed sizes.
   ========================================================================== */

@font-face { font-family: 'Geist'; src: url(/fonts/Geist-latin-ext.woff2) format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Geist'; src: url(/fonts/Geist-latin.woff2) format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Geist Mono'; src: url(/fonts/GeistMono-latin-ext.woff2) format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Geist Mono'; src: url(/fonts/GeistMono-latin.woff2) format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --fa-font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fa-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --fa-title: clamp(34px, calc(23px + 2.4vw), 56px);
  --fa-title-lh: 1.06;
  --fa-title-ls: -0.03em;
  --fa-subtitle: clamp(20px, calc(17.6px + 0.6vw), 26px);
  --fa-subtitle-lh: 1.22;
  --fa-subtitle-ls: -0.02em;
  --fa-body: 16px;
  --fa-body-lh: 1.6;
  --fa-small: 14px;
  --fa-micro: 12px;

  /* swap the theme's font token (the page's inline style sets it with !important) */
  --font-inter-tight: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif !important;
  --font-sans: var(--fa-font);
  --default-font-family: var(--fa-font);

  /* remap the theme's size tokens so every utility class lands on the scale */
  --text-heading-1: var(--fa-title);    --text-heading-1--line-height: var(--fa-title-lh);
  --text-heading-2: var(--fa-title);    --text-heading-2--line-height: var(--fa-title-lh);
  --text-heading-3: var(--fa-title);    --text-heading-3--line-height: var(--fa-title-lh);
  --text-heading-4: var(--fa-subtitle); --text-heading-4--line-height: var(--fa-subtitle-lh);
  --text-heading-5: var(--fa-subtitle); --text-heading-5--line-height: var(--fa-subtitle-lh);
  --text-heading-6: var(--fa-subtitle); --text-heading-6--line-height: var(--fa-subtitle-lh);
  --text-tagline-1: var(--fa-body);     --text-tagline-1--line-height: var(--fa-body-lh);
  --text-tagline-2: var(--fa-body);     --text-tagline-2--line-height: var(--fa-body-lh);
  --text-tagline-3: var(--fa-small);    --text-tagline-3--line-height: 1.5;
  --text-xs: var(--fa-micro);           --text-xs--line-height: 1.4;
  --text-sm: var(--fa-small);           --text-sm--line-height: 1.5;
  --text-base: var(--fa-body);          --text-base--line-height: var(--fa-body-lh);
  --text-lg: var(--fa-body);            --text-lg--line-height: var(--fa-body-lh);
  --text-xl: var(--fa-subtitle);        --text-xl--line-height: var(--fa-subtitle-lh);
  --text-2xl: var(--fa-subtitle);       --text-2xl--line-height: var(--fa-subtitle-lh);
  --text-3xl: var(--fa-title);          --text-3xl--line-height: var(--fa-title-lh);
  --text-4xl: var(--fa-title);          --text-4xl--line-height: var(--fa-title-lh);
  --text-5xl: var(--fa-title);          --text-5xl--line-height: var(--fa-title-lh);
  --text-6xl: var(--fa-title);          --text-6xl--line-height: var(--fa-title-lh);
  --text-7xl: var(--fa-title);          --text-7xl--line-height: var(--fa-title-lh);
}

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--fa-font);
  font-size: var(--fa-body);
  line-height: var(--fa-body-lh);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
}

/* Headings that carry an explicit size class follow the remapped tokens above.
   Headings with no size class get the scale default for their level. */
:is(h1, h2):not([class*="text-heading"]):not([class*="text-tagline"]):not([class*="text-xs"]):not([class*="text-sm"]):not([class*="text-base"]):not([class*="text-lg"]):not([class*="text-xl"]):not([class*="text-2xl"]):not([class*="text-3xl"]):not([class*="text-4xl"]):not([class*="text-5xl"]):not([class*="text-6xl"]):not([class*="text-7xl"]) {
  font-size: var(--fa-title);
  line-height: var(--fa-title-lh);
  font-weight: 400;
}
:is(h3, h4, h5, h6):not([class*="text-heading"]):not([class*="text-tagline"]):not([class*="text-xs"]):not([class*="text-sm"]):not([class*="text-base"]):not([class*="text-lg"]):not([class*="text-xl"]):not([class*="text-2xl"]):not([class*="text-3xl"]):not([class*="text-4xl"]):not([class*="text-5xl"]):not([class*="text-6xl"]):not([class*="text-7xl"]) {
  font-size: var(--fa-subtitle);
  line-height: var(--fa-subtitle-lh);
  font-weight: 450;
}
h1, h2 { font-family: var(--fa-font); letter-spacing: var(--fa-title-ls); }
h3, h4, h5, h6 { font-family: var(--fa-font); letter-spacing: var(--fa-subtitle-ls); }
/* classes that stand in for headings on non-heading tags */
.text-heading-1, .text-heading-2, .text-heading-3 { letter-spacing: var(--fa-title-ls); font-weight: 400; }
.text-heading-4, .text-heading-5, .text-heading-6 { letter-spacing: var(--fa-subtitle-ls); font-weight: 450; }

/* ---------- Micro labels: Geist Mono, like the reference ---------- */
.badge, [class*="badge-"] { font-family: var(--fa-mono); font-size: var(--fa-micro); letter-spacing: 0.02em; font-weight: 450; }

/* never touch icon fonts */
[class^="icon-"], [class*=" icon-"], .swiper-button-next:after, .swiper-button-prev:after { font-family: 'next-sass', 'swiper-icons' !important; }

/* ---------- Page-level rules that hard-coded their own sizes (they use !important) ---------- */
#hero .hero-sub { font-size: var(--fa-body) !important; line-height: var(--fa-body-lh) !important; max-width: min(560px, 90vw) !important; }
#services p.text-tagline-1 { font-size: var(--fa-body) !important; }
#services h5 { font-size: var(--fa-subtitle) !important; line-height: var(--fa-subtitle-lh) !important; }
.fa-tmc-quote { font-size: var(--fa-body); height: calc(var(--fa-body) * 1.68 * 4); }
.fa-tmc-name { font-size: var(--fa-small); }
.fa-tmc-co { font-size: var(--fa-micro); }

/* ---------- Page titles: one size, whatever the page's own CSS says ---------- */
h1, #hero h1, .blog-title, .bd-title {
  font-size: var(--fa-title) !important;
  line-height: var(--fa-title-lh) !important;
  letter-spacing: var(--fa-title-ls) !important;
  font-weight: 400 !important;
}
