/* ── Self-hosted: Geist ───────────────────────────────────── */
@font-face {
  font-family : "Geist";
  src         : url("fonts/geist/Geist-SemiBold.woff2") format("woff2");
  font-weight : 600;
  font-style  : normal;
  font-display: swap;
}
@font-face {
  font-family : "Geist";
  src         : url("fonts/geist/Geist-Bold.woff2") format("woff2");
  font-weight : 700;
  font-style  : normal;
  font-display: swap;
}
@font-face {
  font-family : "Geist";
  src         : url("fonts/geist/Geist-Black.woff2") format("woff2");
  font-weight : 900;
  font-style  : normal;
  font-display: swap;
}

/* ── Self-hosted: Source Sans 3 ───────────────────────────── */
@font-face {
  font-family : "Source Sans 3";
  src         : url("fonts/source-sans-3/SourceSans3-Medium.woff2") format("woff2");
  font-weight : 500;
  font-style  : normal;
  font-display: swap;
}
@font-face {
  font-family : "Source Sans 3";
  src         : url("fonts/source-sans-3/SourceSans3-SemiBold.woff2") format("woff2");
  font-weight : 600;
  font-style  : normal;
  font-display: swap;
}
@font-face {
  font-family : "Source Sans 3";
  src         : url("fonts/source-sans-3/SourceSans3-Bold.woff2") format("woff2");
  font-weight : 700;
  font-style  : normal;
  font-display: swap;
}


:root {

  /* ── Fluid type scale (375px → 1728px) ───────────────────── */
  --text-lg          : clamp(2.250rem, 2.042rem + 0.887vw, 3.000rem);  /* 36px → 48px */
  --text-md          : clamp(1.500rem, 1.154rem + 1.478vw, 2.750rem);  /* 24px → 44px */
  --text-sm          : clamp(1.250rem, 0.973rem + 1.183vw, 2.250rem);  /* 20px → 36px */
  --text-xs          : clamp(1.250rem, 1.042rem + 0.887vw, 2.000rem);  /* 20px → 32px */

  /* Hero display — outside the heading ramp */
  --text-hero        : clamp(2.000rem, 1.134rem + 3.695vw, 5.125rem);  /* 32px → 82px */
  --text-hero-sub    : clamp(1.500rem, 0.669rem + 3.548vw, 4.500rem);  /* 24px → 72px */

  --text-sub-md      : clamp(1.250rem, 1.111rem + 0.591vw, 1.750rem);  /* 20px → 28px */

  --text-body-lg     : clamp(1.500rem, 1.361rem + 0.591vw, 2.000rem);  /* 24px → 32px */
  --text-body-md     : clamp(1.125rem, 0.952rem + 0.739vw, 1.750rem);  /* 18px → 28px */
  --text-body-sm     : clamp(1.000rem, 0.861rem + 0.591vw, 1.500rem);  /* 16px → 24px */

  --text-btn-lg      : clamp(1.500rem, 1.292rem + 0.887vw, 2.250rem);  /* 24px → 36px */
  --text-btn-md      : clamp(1.500rem, 1.361rem + 0.591vw, 2.000rem);  /* 24px → 32px */

  --text-nav-heading : 1.000rem;                                       /* 16px fixed */
  --text-nav-info    : 1.000rem;                                       /* 16px fixed */

}


h1, h2, h3, h4, h5, h6 { padding-bottom: 0; color: inherit; }


/* ── Font weight ──────────────────────────────────────────── */
/* Only 500, 600, 700 and 900 have a font file — the other     */
/* classes fall back to the nearest loaded weight.             */
.font-medium     { font-weight: 500 !important; }
.font-semibold   { font-weight: 600 !important; }
.font-bold       { font-weight: 700 !important; }
.font-black      { font-weight: 900 !important; }

/* ── Line height ──────────────────────────────────────────── */
.leading-none    { line-height: 1; }
.leading-tight   { line-height: 1.1; }
.leading-snug    { line-height: 1.25; }
.leading-normal  { line-height: normal; }
.leading-relaxed { line-height: 1.5; }
.leading-loose   { line-height: 1.75; }

/* ── Type scale ───────────────────────────────────────────── */
/* Every class carries an explicit font-weight — Divi ships    */
/* body { font-weight: 500 }, which would otherwise win over   */
/* the font's own weight.                                      */


/* Headings — Geist */
.heading-lg { font-size: var(--text-lg); font-family: var(--font-geist); font-weight: 700; line-height: 1.292; }

.heading-md { font-size: var(--text-md); font-family: var(--font-geist); font-weight: 700; line-height: 1.273; }

.heading-sm { font-size: var(--text-sm); font-family: var(--font-geist); font-weight: 600; line-height: 1.333; }

.heading-xs { font-size: var(--text-xs); font-family: var(--font-geist); font-weight: 700; line-height: 1.25; }

/* Hero display pair — second line is a <span> inside the same <h1>.
   Keep `span` out of the inherit list, or .heading-hero-sub loses on it. */
.heading-hero { font-size: var(--text-hero); font-family: var(--font-geist); font-weight: 700; line-height: normal; }

.heading-hero-sub { display: block; font-size: var(--text-hero-sub); font-family: var(--font-geist); font-weight: 600; line-height: normal; }
/* For the class on a whole text module — beats Divi's global h1{font-size:30px} */

/* Phone override. Keep line-height at 1.15, not 1 — Geist's em box is ~1.31em,
   so wrapped lines overlap at 1. */
@media (max-width: 980px) {
  .heading-hero-sub { font-weight: 700; line-height: 1.15; }
}

/* Subheading — Geist */
.subheading-md { font-size: var(--text-sub-md); font-family: var(--font-geist); font-weight: 600; line-height: 1.286; }

/* Body — Source Sans 3 */
.body-lg { font-size: var(--text-body-lg); font-family: var(--font-source-sans-3); font-weight: 500; line-height: 1.125; }

.body-md { font-size: var(--text-body-md); font-family: var(--font-source-sans-3); font-weight: 700; line-height: 1.214; }

.body-sm { font-size: var(--text-body-sm); font-family: var(--font-source-sans-3); font-weight: 600; line-height: 1.333; }

/* Button text — Geist. Type only; .btn-* visuals live in css/global/buttons.css */
.button-lg { font-size: var(--text-btn-lg); font-family: var(--font-geist); font-weight: 900; line-height: normal; }

.button-md { font-size: var(--text-btn-md); font-family: var(--font-geist); font-weight: 700; line-height: normal; }

/* Nav & footer — desktop-only fixed sizes. Chrome/layout lives in css/global/header.css + footer.css */
.nav-heading { font-size: var(--text-nav-heading); font-family: var(--font-geist); font-weight: 700; line-height: 1.25; letter-spacing: 0.3em; text-transform: uppercase; }
.nav-heading h1, .nav-heading h2, .nav-heading h3,
.nav-heading h4, .nav-heading h5, .nav-heading h6,
.nav-heading a, .nav-heading p, .nav-heading li { font-size: inherit; font-family: inherit; font-weight: inherit; line-height: inherit; letter-spacing: inherit; text-transform: inherit; }

.nav-info { font-size: var(--text-nav-info); font-family: var(--font-source-sans-3); font-weight: 500; line-height: 1.375; letter-spacing: 0.1em; }
.nav-info a, .nav-info p, .nav-info li { font-size: inherit; font-family: inherit; font-weight: inherit; line-height: inherit; letter-spacing: inherit; }


/* ── Inner elements inherit their host's scale ─────────────
   `:is(.a,.b) :is(h1,p)` is 0-1-1 — the same specificity as the
   `.a h1` rules it replaces, so the cascade is unchanged.
   `span` is absent from the heading list on purpose, or
   .heading-hero-sub loses on it. */

:is( .heading-hero, .heading-hero-sub, .heading-lg, .heading-md, .heading-sm, .heading-xs )
:is( h1, h2, h3, h4, h5, h6, p ),
:is( .subheading-md, .body-lg, .body-md, .body-sm ) :is( p, li ),
:is( .button-lg, .button-md ) :is( a, span, p ) { font-size: inherit; font-family: inherit; font-weight: inherit; line-height: inherit; }


/* ── Rich text ────────────────────────────────────────────── */
/* For Code modules and WP editor content outside Divi's control */
.rich-text h1 { font-size: var(--text-lg); font-family: var(--font-geist); font-weight: 700; line-height: 1.292; }
.rich-text h2 { font-size: var(--text-md); font-family: var(--font-geist); font-weight: 700; line-height: 1.273; }
.rich-text h3 { font-size: var(--text-sm); font-family: var(--font-geist); font-weight: 600; line-height: 1.333; }
.rich-text h4,
.rich-text h5,
.rich-text h6 { font-size: var(--text-xs); font-family: var(--font-geist); font-weight: 700; line-height: 1.25; }

.rich-text p,
.rich-text li {
  font-size   : var(--text-body-lg);
  font-family : var(--font-source-sans-3);
  font-weight : 500;
  line-height : 1.125;
}

.rich-text ol,
.rich-text ul  { padding-left: 1.5em; }

.rich-text a   { text-decoration: underline; color: inherit; }
