/* =====================================================================
   UWT TYPOGRAPHY — one place for every text size on the website.
   Based on the UWT "01. Typography" style guide.

   Sizes: the style guide sizes are used on PHONES; text grows smoothly to
   larger DESKTOP sizes on wide screens (no jump between breakpoints).
   HOW TO CHANGE A STYLE: edit the numbers in :root below. Every element
   that uses that style updates automatically.

   This file loads after all other theme styles. It only sets font-size,
   font-weight and line-height — never colours, spacing or layout.
   Weights: H2 uses 800 (UWT choice); everything else is Bold (700) or lighter.
   ===================================================================== */

:root {
  /* EDIT HERE. Each style has two sizes in px (numbers only, no 'px'):
       -phone   = size on phones (from the UWT style guide, 390px wide screens)
       -desktop = size on desktops (1440px wide screens and wider)
     In between (tablets, small laptops) the size grows smoothly.
     Line height is a ratio from the style guide, so it grows with the text. */

  /* Page title (H1), one per page */
  --uwt-h1-phone: 32;  --uwt-h1-desktop: 48;  --uwt-h1-lh: 1.125;  --uwt-h1-weight: 700;
  /* Big display text that is not the title (prices, stats) */
  --uwt-display-phone: 32;  --uwt-display-desktop: 48;  --uwt-display-lh: 1.125;  --uwt-display-weight: 500;
  /* Section headings (H2) */
  --uwt-h2-phone: 24;  --uwt-h2-desktop: 46;  --uwt-h2-lh: 1.1667;  --uwt-h2-weight: 800;
  /* Card titles, sub-sections (H3) */
  --uwt-h3-phone: 20;  --uwt-h3-desktop: 34;  --uwt-h3-lh: 1.4;  --uwt-h3-weight: 700;
  /* Card title: project cards, news cards, related posts (its own style, not H3) */
  --uwt-card-title-phone: 20;  --uwt-card-title-desktop: 25;  --uwt-card-title-lh: 1.4;  --uwt-card-title-weight: 700;
  /* Small headings (H4) */
  --uwt-h4-phone: 18;  --uwt-h4-desktop: 20;  --uwt-h4-lh: 1.5;  --uwt-h4-weight: 500;
  /* Intro paragraph under a heading */
  --uwt-lead-phone: 18;  --uwt-lead-desktop: 20;  --uwt-lead-lh: 1.5;  --uwt-lead-weight: 400;
  /* Buttons */
  --uwt-button-phone: 16;  --uwt-button-desktop: 16;  --uwt-button-lh: 1.5;  --uwt-button-weight: 700;
  /* Header menus (desktop menu, mobile menu, donate dropdown) */
  --uwt-nav-phone: 16;  --uwt-nav-desktop: 16;  --uwt-nav-lh: 1.375;  --uwt-nav-weight: 600;
  /* Normal body text */
  --uwt-body-phone: 16;  --uwt-body-desktop: 18;  --uwt-body-lh: 1.5;  --uwt-body-weight: 400;
  /* Labels, breadcrumbs, dates, meta */
  --uwt-label-phone: 14;  --uwt-label-desktop: 15;  --uwt-label-lh: 1.5714;  --uwt-label-weight: 500;
  /* Secondary text: card descriptions, footer links */
  --uwt-small-phone: 14;  --uwt-small-desktop: 16;  --uwt-small-lh: 1.4286;  --uwt-small-weight: 400;
  /* Captions and helper text */
  --uwt-caption-phone: 14;  --uwt-caption-desktop: 14;  --uwt-caption-lh: 1.4286;  --uwt-caption-weight: 300;
  /* Badges, tags, eyebrow labels */
  --uwt-badge-phone: 13;  --uwt-badge-desktop: 13;  --uwt-badge-lh: 1.5385;  --uwt-badge-weight: 500;
  /* Fine print: legal line, privacy links */
  --uwt-fine-phone: 13;  --uwt-fine-desktop: 14;  --uwt-fine-lh: 1.5385;  --uwt-fine-weight: 400;

  /* Calculated sizes: no need to edit below this line. */
  --uwt-h1-size: clamp(calc(var(--uwt-h1-phone) * 1px), calc(var(--uwt-h1-phone) * 1px + (var(--uwt-h1-desktop) - var(--uwt-h1-phone)) * (100vw - 390px) / 1050), calc(var(--uwt-h1-desktop) * 1px));
  --uwt-display-size: clamp(calc(var(--uwt-display-phone) * 1px), calc(var(--uwt-display-phone) * 1px + (var(--uwt-display-desktop) - var(--uwt-display-phone)) * (100vw - 390px) / 1050), calc(var(--uwt-display-desktop) * 1px));
  --uwt-h2-size: clamp(calc(var(--uwt-h2-phone) * 1px), calc(var(--uwt-h2-phone) * 1px + (var(--uwt-h2-desktop) - var(--uwt-h2-phone)) * (100vw - 390px) / 1050), calc(var(--uwt-h2-desktop) * 1px));
  --uwt-h3-size: clamp(calc(var(--uwt-h3-phone) * 1px), calc(var(--uwt-h3-phone) * 1px + (var(--uwt-h3-desktop) - var(--uwt-h3-phone)) * (100vw - 390px) / 1050), calc(var(--uwt-h3-desktop) * 1px));
  --uwt-h4-size: clamp(calc(var(--uwt-h4-phone) * 1px), calc(var(--uwt-h4-phone) * 1px + (var(--uwt-h4-desktop) - var(--uwt-h4-phone)) * (100vw - 390px) / 1050), calc(var(--uwt-h4-desktop) * 1px));
  --uwt-lead-size: clamp(calc(var(--uwt-lead-phone) * 1px), calc(var(--uwt-lead-phone) * 1px + (var(--uwt-lead-desktop) - var(--uwt-lead-phone)) * (100vw - 390px) / 1050), calc(var(--uwt-lead-desktop) * 1px));
  --uwt-button-size: clamp(calc(var(--uwt-button-phone) * 1px), calc(var(--uwt-button-phone) * 1px + (var(--uwt-button-desktop) - var(--uwt-button-phone)) * (100vw - 390px) / 1050), calc(var(--uwt-button-desktop) * 1px));
  --uwt-card-title-size: clamp(calc(var(--uwt-card-title-phone) * 1px), calc(var(--uwt-card-title-phone) * 1px + (var(--uwt-card-title-desktop) - var(--uwt-card-title-phone)) * (100vw - 390px) / 1050), calc(var(--uwt-card-title-desktop) * 1px));
  --uwt-nav-size: clamp(calc(var(--uwt-nav-phone) * 1px), calc(var(--uwt-nav-phone) * 1px + (var(--uwt-nav-desktop) - var(--uwt-nav-phone)) * (100vw - 390px) / 1050), calc(var(--uwt-nav-desktop) * 1px));
  --uwt-body-size: clamp(calc(var(--uwt-body-phone) * 1px), calc(var(--uwt-body-phone) * 1px + (var(--uwt-body-desktop) - var(--uwt-body-phone)) * (100vw - 390px) / 1050), calc(var(--uwt-body-desktop) * 1px));
  --uwt-label-size: clamp(calc(var(--uwt-label-phone) * 1px), calc(var(--uwt-label-phone) * 1px + (var(--uwt-label-desktop) - var(--uwt-label-phone)) * (100vw - 390px) / 1050), calc(var(--uwt-label-desktop) * 1px));
  --uwt-small-size: clamp(calc(var(--uwt-small-phone) * 1px), calc(var(--uwt-small-phone) * 1px + (var(--uwt-small-desktop) - var(--uwt-small-phone)) * (100vw - 390px) / 1050), calc(var(--uwt-small-desktop) * 1px));
  --uwt-caption-size: clamp(calc(var(--uwt-caption-phone) * 1px), calc(var(--uwt-caption-phone) * 1px + (var(--uwt-caption-desktop) - var(--uwt-caption-phone)) * (100vw - 390px) / 1050), calc(var(--uwt-caption-desktop) * 1px));
  --uwt-badge-size: clamp(calc(var(--uwt-badge-phone) * 1px), calc(var(--uwt-badge-phone) * 1px + (var(--uwt-badge-desktop) - var(--uwt-badge-phone)) * (100vw - 390px) / 1050), calc(var(--uwt-badge-desktop) * 1px));
  --uwt-fine-size: clamp(calc(var(--uwt-fine-phone) * 1px), calc(var(--uwt-fine-phone) * 1px + (var(--uwt-fine-desktop) - var(--uwt-fine-phone)) * (100vw - 390px) / 1050), calc(var(--uwt-fine-desktop) * 1px));
}

/* ---------------------------------------------------------------------
   Base text (low priority so WPBakery element settings can still win)
   --------------------------------------------------------------------- */
body {
  font-size: var(--uwt-body-size);
  line-height: var(--uwt-body-lh);
  font-weight: var(--uwt-body-weight);
}
h1 { font-size: var(--uwt-h1-size); line-height: var(--uwt-h1-lh); }
h2 { font-size: var(--uwt-h2-size); line-height: var(--uwt-h2-lh); }
h3 { font-size: var(--uwt-h3-size); line-height: var(--uwt-h3-lh); }
h4 { font-size: var(--uwt-h4-size); line-height: var(--uwt-h4-lh); }
h5 { font-size: var(--uwt-nav-size); line-height: var(--uwt-nav-lh); }
h6 { font-size: var(--uwt-label-size); line-height: var(--uwt-label-lh); }
/* The old theme forced every heading to 800 with; replace that. */
h1 { font-weight: var(--uwt-h1-weight); }
h2 { font-weight: var(--uwt-h2-weight); }
h3 { font-weight: var(--uwt-h3-weight); }
h4, h5, h6 { font-weight: var(--uwt-h4-weight); }
figcaption, .wp-caption-text, .wp-element-caption {
  font-size: var(--uwt-caption-size); line-height: var(--uwt-caption-lh); font-weight: var(--uwt-caption-weight);
}

/* ---------------------------------------------------------------------
   H1 — page titles and hero titles (32 / 36 Bold)
   --------------------------------------------------------------------- */
body .uwt-page-title,
body .uwt-post-hero h1,
body .uwt-vacancy-hero h1,
body .uwt-listing-hero h1,
body .uwt-search-hero h1,
body .uwt-coming-card h1,
body .uwt-404 h1,
body .uwt-os-banner__copy h1,
body .uwt-project-hero h1,
body .uwt-project-empty-editor-note__inner h1 {
  font-size: var(--uwt-h1-size);
  line-height: var(--uwt-h1-lh);
  font-weight: var(--uwt-h1-weight);
}

/* ---------------------------------------------------------------------
   Display — big numbers that are not headings (32 / 36 Medium)
   --------------------------------------------------------------------- */
body .uwt-masjid-donation-options__price strong {
  font-size: var(--uwt-display-size);
  line-height: var(--uwt-display-lh);
  font-weight: var(--uwt-display-weight);
}

/* ---------------------------------------------------------------------
   H2 — section headings (24 / 28)
   --------------------------------------------------------------------- */
body .uwt-section-title,
body .uwtLatestNews-title,
body .uwt-footer-cta h2,
body .uwt-footer-affiliations h3,
body .uwt-article-card h2,
body .uwt-vacancy-content-card h2,
body .uwt-vacancy-final-cta h2,
body .uwt-search-empty h2,
body .uwt-post-cta h3,
body .uwt-share-section h3,
body .uwt-ptabs__select-current,
body .uwt-prows__title,
body .uwt-pfilter__title,
body .uwt-give-gateway__intro h2,
body .uwt-masjid-donation-options h2 {
  font-size: var(--uwt-h2-size);
  line-height: var(--uwt-h2-lh);
  font-weight: var(--uwt-h2-weight);
}

/* ---------------------------------------------------------------------
   H3 — card titles and sub-sections (20 / 28 Medium)
   --------------------------------------------------------------------- */
body .uwt-emergency-project-card h3,
body .uwt-openrole-main h3,
body .uwt-location-card h3,
body .uwt-search-card__body h2,
body .uwt-article-card h3,
body .uwt-vacancy-content-card h3,
body .uwt-404__routes strong,
body .uwt-give-gateway__card h3,
body .uwt-give-gateway__card--top h3,
body .uwt-give-gateway__card--bottom h3,
body .uwt-masjid-donation-options__top h3,
body .uwt-g-cbl__item h3 {
  font-size: var(--uwt-h3-size);
  line-height: var(--uwt-h3-lh);
  font-weight: var(--uwt-h3-weight);
}

/* ---------------------------------------------------------------------
   Card title — project cards, news cards and related posts
   (its own style, phone 20 → desktop 25, Bold)
   --------------------------------------------------------------------- */
body .uwt-project-title,
body .uwtNewsCard-title,
body .uwt-related-title {
  font-size: var(--uwt-card-title-size);
  line-height: var(--uwt-card-title-lh);
  font-weight: var(--uwt-card-title-weight);
}

/* ---------------------------------------------------------------------
   H4 — small headings (18 / 27 Medium)
   --------------------------------------------------------------------- */
body .uwt-footer-column h3,
body .uwt-footer-contact h3,
body .uwt-article-card h4,
body .uwt-vacancy-content-card h4,
body .uwt-post-nav-card strong,
body .uwt-g-cbl__popup-title,
body .uwt-article-card blockquote {
  font-size: var(--uwt-h4-size);
  line-height: var(--uwt-h4-lh);
  font-weight: var(--uwt-h4-weight);
}

/* ---------------------------------------------------------------------
   Lead — intro paragraph under a heading (18 / 27)
   --------------------------------------------------------------------- */
body .uwt-post-intro,
body .uwt-article-card > p:first-child,
body .uwt-article-card .lead,
body .uwt-404__lead,
body .uwt-listing-hero p,
body .uwt-coming-content,
body .uwt-os-banner__copy p,
body .uwt-give-gateway__intro > p {
  font-size: var(--uwt-lead-size);
  line-height: var(--uwt-lead-lh);
  font-weight: var(--uwt-lead-weight);
}

/* ---------------------------------------------------------------------
   Body — normal paragraphs and lists (16 / 24)
   --------------------------------------------------------------------- */
body .uwt-article-card p,
body .uwt-article-card ul,
body .uwt-article-card ol,
body .uwt-vacancy-content-card p,
body .uwt-vacancy-content-card li,
body .uwt-post-cta p,
body .uwt-project-empty-editor-note__inner p,
body .uwt-search-empty p,
body .uwt-location-address,
body .uwt-masjid-donation-options__plan li,
body .uwt-no-related-posts,
body .uwt-emergency-projects__empty {
  font-size: var(--uwt-body-size);
  line-height: var(--uwt-body-lh);
  font-weight: var(--uwt-body-weight);
}
/* keep the intro paragraph at lead size (more specific than the rule above) */
body .uwt-article-card > p:first-child,
body .uwt-article-card p.lead {
  font-size: var(--uwt-lead-size);
  line-height: var(--uwt-lead-lh);
}

/* Form fields: always 16px so phones don't zoom in */
body .uwt-header-search-input,
body .uwt-header-search-form input,
body .uwt-search-page-form input,
body .uwt-g-cbl__searchbar input,
body .uwt-brevo-input-row input {
  font-size: var(--uwt-body-size);
  font-weight: var(--uwt-body-weight);
}

/* ---------------------------------------------------------------------
   Buttons (16 / 24 Bold)
   --------------------------------------------------------------------- */
body .uwt-project-donate,
body .uwt-openrole-btn,
body .uwt-location-btn,
body .uwtNewsCard-btn,
body .uwt-post-cta-btn,
body .uwt-related-btn,
body .uwt-coming-btn,
body .uwt-vacancy-hero-btn,
body .uwt-vacancy-final-cta a,
body .uwt-project-empty-editor-note__inner a,
body .uwt-search-page-form button,
body .uwt-search-card__button,
body .uwt-os-banner__copy a,
body .uwt-total-compat-button,
body .uwt-404__home,
body .uwt-emergency-project-card__button,
body .uwt-give-gateway__button,
body .uwt-masjid-donation-options__button,
body .uwt-g-cbl__search-btn,
body .uwt-g-cbl__geo-btn,
body .uwt-g-cbl__directions-btn,
body .uwt-g-cbl__popup-directions,
body .uwt-donate,
body .uwt-shop,
body .uwt-archive-pagination a,
body .uwt-archive-pagination span,
body .uwt-brevo-submit,
body .uwt-header-shop,
body .uwt-header-donate,
body .uwt-mobile-action,
body .uwt-mobile-shop,
body .uwt-mobile-donate,
body .uwt-mobile-phone {
  font-size: var(--uwt-button-size);
  line-height: var(--uwt-button-lh);
  font-weight: var(--uwt-button-weight);
}

/* ---------------------------------------------------------------------
   Header menus (16, SemiBold 600)
   --------------------------------------------------------------------- */
body .uwt-menu > li > a,
body .uwt-menu .sub-menu a,
body .uwt-header-nav a,
body .uwt-header-nav .sub-menu a,
body .uwt-menu-search-btn,
body button.uwt-menu-search-btn,
body .uwt-menu-search-btn span,
body .uwt-donate-menu a,
body .uwt-donate-menu-list a,
body .uwt-donate-menu .uwt-donate-menu-list a,
body .uwt-donate-wrap .uwt-donate-menu-list a,
body .uwt-mobile-nav a,
body .uwt-mobile-donate-menu a,
body .uwt-mobile-donate-menu .uwt-donate-menu-list a {
  font-size: var(--uwt-nav-size);
  line-height: var(--uwt-nav-lh);
  font-weight: var(--uwt-nav-weight);
}

/* Projects by category: picker list, filter bar = menu size, SemiBold */
body .uwt-ptabs__option-text,
body .uwt-pfilter__option-text,
body .uwt-pfilter__cat-name,
body .uwt-pfilter__type,
body .uwt-pfilter__input,
body .uwt-pfilter__clear {
  font-size: var(--uwt-nav-size);
  line-height: var(--uwt-nav-lh);
  font-weight: 600;
}

/* Projects by category: group titles inside "All Projects" = H3 */
body .uwt-ptabs__heading-title,
body .uwt-pfilter__block-title {
  font-size: var(--uwt-h3-size);
  line-height: var(--uwt-h3-lh);
  font-weight: var(--uwt-h3-weight);
}

/* ---------------------------------------------------------------------
   Labels — breadcrumbs, dates, meta, top strip (14 / 22 Medium)
   --------------------------------------------------------------------- */
body .uwt-post-breadcrumb,
body .uwt-vacancy-breadcrumb,
body .uwt-post-meta span,
body .uwt-openrole-chip em,
body .uwt-vacancy-meta em,
body .uwtNewsCard-date,
body .uwt-related-date,
body .uwt-location-contact-text,
body .uwt-location-hours span,
body .uwt-location-card-tag,
body .uwt-g-cbl__searchbar label,
body .uwt-g-cbl__distance,
body .uwt-g-cbl__status,
body .uwt-masjid-donation-options__top span,
body .uwt-coming-contact a,
body .uwt-topbar,
body .follow-text,
body .uwt-topstrip-left a,
body .uwt-topstrip-right a,
body .uwt-topstrip-right span {
  font-size: var(--uwt-label-size);
  line-height: var(--uwt-label-lh);
  font-weight: var(--uwt-label-weight);
}

/* ---------------------------------------------------------------------
   Secondary text — card descriptions, footer links (14 / 20)
   --------------------------------------------------------------------- */
body .uwt-project-desc-slot,
body .uwt-emergency-project-card p,
body .uwt-give-gateway__card p,
body .uwtNewsCard-text,
body .uwt-related-text,
body .uwt-search-card__body p,
body .uwt-404__routes a > span:not(.uwt-404__arrow),
body .uwt-footer-brand p,
body .uwt-footer-column a,
body .uwt-contact-row > span,
body .uwt-contact-row strong,
body .uwt-contact-row a,
body .uwt-contact-row p,
body .uwt-g-cbl__item-address,
body .uwt-g-cbl__popup-address,
body .uwt-brevo-message {
  font-size: var(--uwt-small-size);
  line-height: var(--uwt-small-lh);
  font-weight: var(--uwt-small-weight);
}

/* ---------------------------------------------------------------------
   Captions and helper text (14 / 20 Light)
   --------------------------------------------------------------------- */
body .uwt-consent-text,
body .uwt-brevo-error-text {
  font-size: var(--uwt-caption-size);
  line-height: var(--uwt-caption-lh);
  font-weight: var(--uwt-caption-weight);
}

/* ---------------------------------------------------------------------
   Badges, tags, eyebrow labels (13 / 20 Medium)
   --------------------------------------------------------------------- */
body .uwt-project-badge,
body .uwt-project-meta,
body .uwt-openrole-type,
body .uwt-openrole-chip strong,
body .uwt-vacancy-label,
body .uwt-vacancy-meta strong,
body .uwt-post-category,
body .uwt-section-eyebrow,
body .uwt-listing-eyebrow,
body .uwt-search-eyebrow,
body .uwt-search-card__type,
body .uwt-search-empty span,
body .uwt-coming-eyebrow,
body .uwt-post-cta span,
body .uwt-vacancy-final-cta span,
body .uwt-post-nav-card span,
body .uwt-footer-cta-text span,
body .uwt-project-empty-editor-note__inner span,
body .uwt-os-banner__copy span,
body .uwt-give-gateway__eyebrow,
body .uwt-give-gateway__label,
body .uwt-masjid-donation-options__price span,
body .uwt-g-cbl__nearest-badge,
body .uwt-g-cbl__nearest-popup,
body .uwt-location-hours strong,
body .uwt-ptabs__label,
body .uwt-pfilter__cat-label {
  font-size: var(--uwt-badge-size);
  line-height: var(--uwt-badge-lh);
  font-weight: var(--uwt-badge-weight);
}

/* ---------------------------------------------------------------------
   Fine print (13 / 20)
   --------------------------------------------------------------------- */
body .uwt-footer-bottom p,
body .uwt-footer-legal a {
  font-size: var(--uwt-fine-size);
  line-height: var(--uwt-fine-lh);
  font-weight: var(--uwt-fine-weight);
}

/* Not changed on purpose: icons, arrows, chevrons, the large decorative
   "404" number, image placeholders and superscript date suffixes. */

/* ---------------------------------------------------------------------
   3-line card descriptions: the box is exactly 3 lines tall at the
   current text size, so no half line shows underneath.
   --------------------------------------------------------------------- */
body .uwtNewsCard-text {
  min-height: calc(3em * var(--uwt-small-lh));
  max-height: calc(3em * var(--uwt-small-lh));
}
body .uwt-project-desc-slot {
  height: calc(2em * var(--uwt-small-lh));
}
