/* ===== Case variable typography (semantic + utility classes) ===== */
/* Divi desktop breakpoint: 980px */

/* ---------- MOBILE (base) ---------- */
:root {
  /* H1 */
  --h1-w: 350; --h1-fs: 40px; --h1-lh: 1.05; --h1-trk: -0.02em;
  /* H2 */
  --h2-w: 350; --h2-fs: 32px; --h2-lh: 1.20; --h2-trk: -0.02em;
  /* H3 */
  --h3-w: 350; --h3-fs: 25px; --h3-lh: 1.20; --h3-trk: -0.01em;

  /* Body */
  --body-w: 350; --body-fs: 16px; --body-lh: 1.45; --body-trk: 0em;
  --body-font: var(--body-w) var(--body-fs)/var(--body-lh) var(--font-sans);

  /* Body – Blog */
  --body-blog-w: 350; --body-blog-fs: 20px; --body-blog-lh: 1.50; --body-blog-trk: 0em;

  /* Footer Links */
  --footer-link-w: 350; --footer-link-fs: 13px; --footer-link-lh: 1.45; --footer-link-trk: 0em;

  /* Link Button */
  --link-button-w: 350; --link-button-fs: 13px; --link-button-lh: 1.00; --link-button-trk: 0em;

  /* Form Input */
  --form-input-w: 350; --form-input-fs: 18px; --form-input-lh: 1.00; --form-input-trk: 0em;

  /* Legal + Legal-Link */
  --legal-w: 350; --legal-fs: 10px; --legal-lh: 1.20; --legal-trk: 0em;

  /* Label */
  --label-w: 350; --label-fs: 13px; --label-lh: 1.00; --label-trk: 0em;
  --label-font: var(--label-w) var(--label-fs)/var(--label-lh) var(--font-sans);

  /* Nav Label */
  --nav-label-w: 350; --nav-label-fs: 10px; --nav-label-lh: 1.00; --nav-label-trk: 0em;

  /* Typography colors */
  --color-body: #B4C0CC;
  --color-heading: #ffffff;

  /* Family token → use alias to avoid collisions */
  --font-sans: "CaseLocal", "Case", system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

/* ---------- DESKTOP overrides (>= 980px) ---------- */
@media (min-width: 980px) {
  :root {
    --h1-w: 350; --h1-fs: 60px; --h1-lh: 1.05; --h1-trk: -0.02em;
    --h2-w: 350; --h2-fs: 40px; --h2-lh: 1.20; --h2-trk: -0.02em;
    --h3-w: 350; --h3-fs: 25px; --h3-lh: 1.20; --h3-trk: -0.01em;

    --body-w: 350; --body-fs: 16px; --body-lh: 1.45; --body-trk: 0em;

    --body-blog-w: 350; --body-blog-fs: 20px; --body-blog-lh: 1.50; --body-blog-trk: 0em;

    --footer-link-w: 350; --footer-link-fs: 13px; --footer-link-lh: 1.45; --footer-link-trk: 0em;

    --link-button-w: 350; --link-button-fs: 16px; --link-button-lh: 1.00; --link-button-trk: 0em;

    --form-input-w: 350; --form-input-fs: 18px; --form-input-lh: 1.00; --form-input-trk: 0em;

    --legal-w: 350; --legal-fs: 10px; --legal-lh: 1.20; --legal-trk: 0em;

    --label-w: 350; --label-fs: 13px; --label-lh: 1.00; --label-trk: 0em;

    --label-font: var(--label-w) var(--label-fs)/var(--label-lh) var(--font-sans);

    --nav-label-w: 350; --nav-label-fs: 10px; --nav-label-lh: 1.00; --nav-label-trk: 0em;
  }
}

/* ---------- Base setup ---------- */
body {
  font-family: var(--font-sans);
  font-size: var(--body-fs);
  line-height: var(--body-lh);
  letter-spacing: var(--body-trk);
  font-weight: var(--body-w);
  color: var(--color-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Semantic tags ---------- */
h1 {
  font-family: var(--font-sans);
  font-weight: var(--h1-w);
  color: var(--color-heading);
  font-size: var(--h1-fs);
  line-height: var(--h1-lh);
  letter-spacing: var(--h1-trk);
  margin: 0 0 0.5em;
}
h2 {
  font-family: var(--font-sans);
  font-weight: var(--h2-w);
  color: var(--color-heading);
  font-size: var(--h2-fs);
  line-height: var(--h2-lh);
  letter-spacing: var(--h2-trk);
  margin: 0 0 0.5em;
}
h3 {
  font-family: var(--font-sans);
  font-weight: var(--h3-w);
  color: var(--color-heading);
  font-size: var(--h3-fs);
  line-height: var(--h3-lh);
  letter-spacing: var(--h3-trk);
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

small {
  font-size: var(--legal-fs);
  line-height: var(--legal-lh);
  letter-spacing: var(--legal-trk);
  font-weight: var(--legal-w);
}

label {
  font-family: var(--font-sans);
  font-size: var(--label-fs);
  line-height: var(--label-lh);
  letter-spacing: var(--label-trk);
  font-weight: var(--label-w);
}

/* Buttons */
button,
.et_pb_button,
.et_pb_promo_button,
.et_contact_bottom_container .et_pb_button {
  font-family: var(--font-sans) !important;
  font-size: var(--link-button-fs);
  line-height: var(--link-button-lh);
  letter-spacing: var(--link-button-trk);
  font-weight: var(--link-button-w);
}

/* Inputs */
input, textarea, select {
  font-family: var(--font-sans);
  font-size: var(--form-input-fs);
  line-height: var(--form-input-lh);
  letter-spacing: var(--form-input-trk);
  font-weight: var(--form-input-w);
}

/* ---------- Utilities ---------- */
.body-blog   { font-size: var(--body-blog-fs); line-height: var(--body-blog-lh); letter-spacing: var(--body-blog-trk); font-weight: var(--body-blog-w); }
.footer-link { font-size: var(--footer-link-fs); line-height: var(--footer-link-lh); letter-spacing: var(--footer-link-trk); font-weight: var(--footer-link-w); color: inherit; }
.link-button { font-size: var(--link-button-fs); line-height: var(--link-button-lh); letter-spacing: var(--link-button-trk); font-weight: var(--link-button-w); }
.form-input  { font-size: var(--form-input-fs); line-height: var(--form-input-lh); letter-spacing: var(--form-input-trk); font-weight: var(--form-input-w); }
.legal       { font-size: var(--legal-fs); line-height: var(--legal-lh); letter-spacing: var(--legal-trk); font-weight: var(--legal-w); }
.legal-link  { font-size: var(--legal-fs); line-height: var(--legal-lh); letter-spacing: var(--legal-trk); font-weight: var(--legal-w); text-decoration: underline; color: inherit; }
.label       { font-size: var(--label-fs); line-height: var(--label-lh); letter-spacing: var(--label-trk); font-weight: var(--label-w); }
.nav-label   { font-size: var(--nav-label-fs); line-height: var(--nav-label-lh); letter-spacing: var(--nav-label-trk); font-weight: var(--nav-label-w); }

/* Links inherit body color by default */
a { color: inherit; text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

/* === Divi compatibility shim === */
.et_pb_text, .et_pb_post_content { font-size: inherit; line-height: inherit; letter-spacing: inherit; color: inherit; }
.et_pb_text p, .et_pb_text li,
.et_pb_post_content p, .et_pb_post_content li { font: inherit; color: inherit; }

/* === (Optional) Force body baseline over Customizer === */
html body{
  font-family: var(--font-sans);
  font-weight: 350;
  font-size: 16px;
  line-height: 145%;
  letter-spacing: 0;
  color: var(--color-body);
}

/* === Font axis + synthesis control (keep once, at the very end) === */
html { 
  font-synthesis-weight: none; 
  font-synthesis-style: none; 
  font-optical-sizing: auto; 
}
body { font-variation-settings: "wght" var(--body-w, 350); }
h1   { font-variation-settings: "wght" var(--h1-w, 350); }
h2   { font-variation-settings: "wght" var(--h2-w, 350); }
h3   { font-variation-settings: "wght" var(--h3-w, 350); }
button, input, textarea, select { font-variation-settings: "wght" var(--link-button-w, 350); }

/* === TEMP: final hard lock to ensure family applies (remove once stable) === */
:where(html, body, h1, h2, h3,
       .et_pb_text, .et_pb_text *,
       .et_pb_post_content, .et_pb_post_content *,
       .et_pb_button, .et_pb_promo_button, button,
       input, textarea, select) {
  font-family: var(--font-sans) !important;
}

/* === GLOBAL FONT OVERRIDE === */
:where(html, body, h1, h2, h3, h4, h5, h6,
       p, a, span, strong, em, small, label,
       button, input, textarea, select,
       .et_pb_text, .et_pb_text *,
       .et_pb_post_content, .et_pb_post_content *,
       .et_pb_button, .et_pb_promo_button,
       .et_pb_module, .et_pb_module * ) {
  font-family: "CaseLocal", "Case", system-ui, -apple-system,
               "Segoe UI", Roboto, "Helvetica Neue", Arial,
               "Noto Sans", "Liberation Sans", sans-serif !important;
}

      /* EXCEPTIONS - Ensure strong/em actually bolds with Case variable font */
      strong, b {
        font-weight: 700 !important;
        font-variation-settings: "wght" 700 !important;
      }

      em, i {
        font-style: italic;
      }

/* ================================
   HEADINGS
================================ */

/* …your h1–h6 rules… */

/* ================================
   PARAGRAPHS & LINKS
================================ */

/* …your p, a rules… */

/* ================================
   LISTS (Article / Body Content Only)
   Spacing + indent for ul/ol items
================================ */

/* Indent applies once to the whole list */
.post-content ul,
.post-content ol,
.et_pb_post_content ul,
.et_pb_post_content ol,
.et_pb_text ul,
.et_pb_text ol {
  padding-left: 30px !important;
  margin: 0;
}

/* Vertical spacing applies to each list item */
.post-content ul li,
.post-content ol li,
.et_pb_post_content ul li,
.et_pb_post_content ol li,
.et_pb_text ul li,
.et_pb_text ol li {
  margin-bottom: 30px;
}

/* If you want to kill gap after the last item, uncomment */
 /*
.post-content ul li:last-child,
.post-content ol li:last-child,
.et_pb_post_content ul li:last-child,
.et_pb_post_content ol li:last-child,
.et_pb_text ul li:last-child,
.et_pb_text ol li:last-child {
  margin-bottom: 0;
}
*/

/* ================================
   BLOG ARTICLE TYPOGRAPHY
   Force all non-heading copy to use body-blog tokens
================================ */
.post-content,
.post-content p,
.post-content li,
.post-content td,
.post-content th,
.post-content blockquote,
.post-content figcaption,
.post-content dd,
.post-content dt,
.post-content span,
.post-content div {
  font-size: var(--body-blog-fs);
  line-height: var(--body-blog-lh);
  font-weight: var(--body-blog-w);
  letter-spacing: var(--body-blog-trk);
}

/* ================================
   TABLES (Baseline for blog content)
   - Consistent padding
   - Text wraps normally
   - Horizontal scroll only if table exceeds container
   - 1em bottom margin + padding
================================ */

/* Scroll wrapper for block tables (WP) */
.post-content figure.wp-block-table,
.et_pb_post_content figure.wp-block-table,
.et_pb_text figure.wp-block-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
}

/* Generic table rules */
.post-content table,
.et_pb_post_content table,
.et_pb_text table {
  border-collapse: collapse;
  width: 100%;
  max-width: 100%;
  min-width: 600px;        /* gives structure, but can be tuned per design */
  margin: 0 0 1em;         /* bottom margin */
  padding: 0 0 1em;        /* bottom padding */
  background: none;
  table-layout: auto;      /* allow natural column widths */
  word-break: normal;
}

/* Table cells */
.post-content th, .post-content td,
.et_pb_post_content th, .et_pb_post_content td,
.et_pb_text th, .et_pb_text td {
  border: 1px solid #f5faff;
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  white-space: normal;     /* allow wrapping */
  word-break: break-word;  /* avoid overflow on long words/URLs */
}

/* Headings */
.post-content th,
.et_pb_post_content th,
.et_pb_text th {
  font-weight: 600;        /* visible, but not heavy */
}

/* 1) Do NOT override fonts inside the WP admin bar */
#wpadminbar, #wpadminbar * { 
  font-family: dashicons, inherit !important;
}

/* 2) Explicitly restore Dashicons on the toolbar + dashicons helpers */
#wpadminbar .ab-icon:before,
#wpadminbar .ab-item:before,
.dashicons,
.dashicons:before,
.dashicons-before:before {
  font-family: dashicons !important;
  font-weight: 400;
  font-style: normal;
}

/* === FIX: Restore Divi ETmodules icons === */
.et-pb-icon,
.et-pb-icon:before,
.et-pb-icon:after,
.et-social-icon a:before {
  font-family: 'ETmodules' !important;
  font-weight: normal;
  font-style: normal;
}