/* ========= Type scale & families (Frontend only) ========= */

/* Tweak sizes quickly */
:root {
  --h1-size: 62px;
  --h1-lh: 120%;
  --h2-size: 48px;
  --h2-lh: 120%;
  --h3-size: 24px;
  --h3-lh: 120%;
  --h4-size: 20px;
  --h4-lh: 120%;
  --body-size: 18px;
  --body-lh: 140%;
  --sm-size: 16px;
  --sm-lh: 140%;
  --xs-size: 14px;
  --xs-lh: 140%;
  --cap-size: 12px;
  --cap-lh: 140%;
}

/* Apply only when our body class is present (frontend) */
.use-local-fonts {
  font-family: 'Plus Jakarta Display', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: var(--body-size);
  line-height: var(--body-lh);
  letter-spacing: 0;
}

/* Inherit Jakarta for common text elements */
.use-local-fonts body,
.use-local-fonts p,
.use-local-fonts div,
.use-local-fonts span,
.use-local-fonts li,
.use-local-fonts a,
.use-local-fonts input,
.use-local-fonts textarea,
.use-local-fonts button {
  font-family: inherit;
}

/* Headings H1/H2 -> Editor's Note */
.use-local-fonts h1,
.use-local-fonts h2 {
  font-family: 'Editors Note', 'Plus Jakarta Display', serif;
  font-weight: 500; /* Medium */
  letter-spacing: 0;
}
.use-local-fonts h1 { font-size: var(--h1-size); line-height: var(--h1-lh); }
.use-local-fonts h2 { font-size: var(--h2-size); line-height: var(--h2-lh); }

/* H3/H4 -> Jakarta, Medium */
.use-local-fonts h3,
.use-local-fonts .h3 {
  font-family: 'Plus Jakarta Display', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-weight: 500;
  font-size: var(--h3-size);
  line-height: var(--h3-lh);
  letter-spacing: 0;
}
.use-local-fonts h4,
.use-local-fonts .h4 {
  font-family: 'Plus Jakarta Display', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-weight: 500;
  font-size: var(--h4-size);
  line-height: var(--h4-lh);
  letter-spacing: 0;
}

/* Utility helpers */
.use-local-fonts .text-sm  { font-weight: 500; font-size: var(--sm-size); line-height: var(--sm-lh); }
.use-local-fonts .text-xs  { font-weight: 500; font-size: var(--xs-size); line-height: var(--xs-lh); }
.use-local-fonts .text-cap { font-weight: 400; font-size: var(--cap-size); line-height: var(--cap-lh); }

/* Kadence blocks follow page font unless overridden in block settings */
.use-local-fonts .wp-block-heading,
.use-local-fonts .kt-adv-heading,
.use-local-fonts .kt-btn {
  font-family: inherit;
}

/* Force families when needed */
.use-local-fonts .font-jakarta { font-family: 'Plus Jakarta Display', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; }
.use-local-fonts .font-editors { font-family: 'Editors Note', 'Plus Jakarta Display', serif; }
