/* ==========================================================================
   PI2AI type scale: the single source of truth for text size and weight.
   Loaded LAST on every page. Change a size here and every page follows.

   Weights used on the whole site: 400, 500, 600, 700 (never 800 or 900).
   Headings: H1 and H2 are 600, H3 to H6 are 700. Body is 400.
   Sizes are fluid: they scale smoothly between the phone and desktop values.

                      phone (390)   tablet (768)   desktop (1440)
     H1                 28            ~35             48
     H2                 24            ~30             36
     H3                 18            ~19             20
     H4                 17            17              17
     body               16            16              16

   Exceptions: add class "t-custom" to a heading or paragraph to opt out.
   Navigation, footer and mobile menu keep their own sizes.
   ========================================================================== */
:root {
  --fs-h1: clamp(1.75rem, 1.3rem + 1.9vw, 3rem);
  --fs-h2: clamp(1.5rem, 1.15rem + 1.5vw, 2.25rem);
  --fs-h3: clamp(1.125rem, 1.05rem + .3vw, 1.25rem);
  --fs-h4: 1.0625rem;
  --fs-h5: 1rem;
  --fs-h6: .875rem;
  --fs-lead: 1.125rem;
  --fs-body: 1rem;
  --fs-small: .875rem;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
}

h1:not(:is(nav, footer, .sf-wrap, .mobile-menu) *):not(.t-custom) { font-size: var(--fs-h1) !important; font-weight: var(--fw-semibold) !important; line-height: 1.15 !important; letter-spacing: -.02em; text-wrap: balance; }
h2:not(:is(nav, footer, .sf-wrap, .mobile-menu) *):not(.t-custom) { font-size: var(--fs-h2) !important; font-weight: var(--fw-semibold) !important; line-height: 1.2 !important; letter-spacing: -.015em; text-wrap: balance; }
h3:not(:is(nav, footer, .sf-wrap, .mobile-menu) *):not(.t-custom) { font-size: var(--fs-h3) !important; font-weight: var(--fw-bold) !important; line-height: 1.3 !important; }
h4:not(:is(nav, footer, .sf-wrap, .mobile-menu) *):not(.t-custom) { font-size: var(--fs-h4) !important; font-weight: var(--fw-bold) !important; line-height: 1.35 !important; }
h5:not(:is(nav, footer, .sf-wrap, .mobile-menu) *):not(.t-custom) { font-size: var(--fs-h5) !important; font-weight: var(--fw-bold) !important; line-height: 1.4 !important; }
h6:not(:is(nav, footer, .sf-wrap, .mobile-menu) *):not(.t-custom) { font-size: var(--fs-h6) !important; font-weight: var(--fw-bold) !important; line-height: 1.4 !important; }

/* Body text */
body { font-size: var(--fs-body); font-weight: var(--fw-regular); }
p:not(:is(nav, footer, .sf-wrap, .mobile-menu) *):not(.t-custom) { font-size: var(--fs-body) !important; line-height: 1.7; }


/* Lead paragraphs under hero titles */
p.nh-lead:not(:is(nav, footer, .sf-wrap, .mobile-menu) *):not(.t-custom),
p.hero-sub:not(:is(nav, footer, .sf-wrap, .mobile-menu) *):not(.t-custom),
p.pi-subtitle:not(:is(nav, footer, .sf-wrap, .mobile-menu) *):not(.t-custom),
p.cs-hero-lead:not(:is(nav, footer, .sf-wrap, .mobile-menu) *):not(.t-custom) { font-size: var(--fs-lead) !important; line-height: 1.6; }

/* Small notes and captions */
p.nh-v-out:not(:is(nav, footer, .sf-wrap, .mobile-menu) *):not(.t-custom),
p.cf-note:not(:is(nav, footer, .sf-wrap, .mobile-menu) *):not(.t-custom),
p.nh-hero-note:not(:is(nav, footer, .sf-wrap, .mobile-menu) *):not(.t-custom),
p.contact-form-sub:not(:is(nav, footer, .sf-wrap, .mobile-menu) *):not(.t-custom),
p.page-subtitle:not(:is(nav, footer, .sf-wrap, .mobile-menu) *):not(.t-custom) { font-size: var(--fs-small) !important; }

strong, b { font-weight: var(--fw-bold); }
