/* ==========================================================================
   EGS TYPOGRAPHY & SECTION CONSISTENCY SYSTEM (v2)
   --------------------------------------------------------------------------
   Fix vs v1: v1 targeted specific heading tags (e.g. ".foo h4"). Several
   pages use a different tag for the same visual role (e.g. index.php's
   "End-to-End NetSuite Solutions..." is an <h2>, not the <h4> the rule
   expected), so those got skipped entirely and fell back to the browser
   default look (thin, near-black, no size clamp) — that's the mismatch
   you saw. This version targets the WRAPPER CLASS with :is(h1..h6), so
   it always catches the heading no matter which tag is used inside it.
   It also forces one shared color for each role, since different pages
   were pulling slightly different "ink"/"green" tokens.

   Link this AFTER assets/css/theme.css (already done in your <head>):
       <link href="assets/css/theme.css" rel="stylesheet">
       <link href="assets/css/egs-consistency.css" rel="stylesheet">

   INTENTIONALLY LEFT ALONE (different job, not part of this system):
   - .egs-hero-v2 / .egs-slide-inner h1..h6        (hero display type)
   - .egs-crm2-hero h1, .egs-msc-hero h1, .egs-tr-hero h1  (page-hero type)
   - .egs-contact-copy h1, .egs-bl-header h1        (page-hero type)
   - stat numbers using var(--egs-mono)             (intentional terminal look)
   ========================================================================== */

:root {
    --egs-color-ink: #1f3d2c;
    /* one shared dark color for all titles */
    --egs-color-green: #4c9a4c;
    /* one shared accent color for eyebrows */

    --egs-fs-eyebrow: 12.5px;
    --egs-fw-eyebrow: 700;
    --egs-ls-eyebrow: 1.4px;

    --egs-fs-section-title: clamp(26px, 2.6vw, 34px);
    --egs-fw-section-title: 800;
    --egs-lh-section-title: 1.25;

    --egs-fs-section-subtitle: 15px;
    --egs-lh-section-subtitle: 1.8;

    --egs-fs-cta-title: clamp(22px, 2.4vw, 28px);
    --egs-fw-cta-title: 800;

    --egs-fs-card-title: 17px;
    --egs-fw-card-title: 700;
    --egs-lh-card-title: 1.35;

    --egs-fs-card-title-sm: 15px;

    --egs-fs-card-text: 13.5px;
    --egs-lh-card-text: 1.65;

    --egs-fs-stat-number: clamp(24px, 2.4vw, 30px);
    --egs-fw-stat-number: 800;
    --egs-fs-stat-label: 12px;
}

/* ---------- EYEBROWS (kicker label above a heading) ---------- */
:is(.egs-eyebrow,
    .egs-ind-eyebrow,
    .egs-ip-eyebrow,
    .egs-msc-eyebrow,
    .egs-imp2-section-eyebrow,
    .egs-tr-eyebrow,
    .egs-bp-eyebrow,
    .egs-isc-eyebrow,
    .egs-crm2-eyebrow,
    .egs-bl-eyebrow,
    .egs-partners-header .eyebrow):not(.on-dark):not(.egs-slide-inner *) {
    /* font-size: var(--egs-fs-eyebrow) !important; */
    font-weight: var(--egs-fw-eyebrow) !important;
    letter-spacing: var(--egs-ls-eyebrow) !important;
    color: var(--egs-color-green) !important;
}

/* on-dark variant keeps a lighter tint for contrast, same size/weight */
:is(.egs-ind-eyebrow.on-dark,
    .egs-ip-eyebrow.on-dark,
    .egs-imp2-section-eyebrow.on-dark,
    .egs-crm2-eyebrow.on-dark,
    .egs-bp-eyebrow--dark) {
    /* font-size: var(--egs-fs-eyebrow) !important; */
    font-weight: var(--egs-fw-eyebrow) !important;
    letter-spacing: var(--egs-ls-eyebrow) !important;
}

/* ---------- SECTION TITLES ---------- */
/* :is(h1..h6) means it doesn't matter which heading tag a page used —
   the wrapper class alone is enough to catch it. */
:is(.egs-services-main .section-head,
    .egs-why-us-head,
    .egs-partners-header,
    .egs-process .section-head,
    .egs-isc-head,
    .egs-imp2-collage-head,
    .egs-imp2-roadmap-head,
    .egs-msc-rail-head,
    .egs-msc-assess-copy,
    .egs-tr-curriculum-head,
    .egs-bp-intro-copy,
    .egs-bp-punch-head,
    .egs-bp-rack-head,
    .egs-bp-scale-copy,
    .egs-crm2-timeline-head,
    .egs-ip-overview-copy,
    .egs-ip-section-head,
    .egs-about-v2-text,
    .egs-industries,
    .egs-trusted-marquee,
    .egs-section-heading) :is(h1, h2, h3, h4, h5, h6) {
    font-family: "Plus Jakarta Sans", sans-serif !important;
    /* font-size: var(--egs-fs-section-title) !important; */
    font-weight: var(--egs-fw-section-title) !important;
    line-height: var(--egs-lh-section-title) !important;
    letter-spacing: -0.02em !important;
    /* color: var(--egs-color-ink) !important; */
}

/* ---------- SECTION SUBTITLES / INTRO PARAGRAPHS ---------- */
:is(.egs-services-main .section-head,
    .egs-why-us-head,
    .egs-partners-header,
    .egs-process .section-head,
    .egs-isc-head,
    .egs-imp2-collage-head,
    .egs-msc-rail-head,
    .egs-tr-curriculum-head,
    .egs-bp-punch-head,
    .egs-bp-rack-head,
    .egs-ip-section-head,
    .egs-svc-intro,
    .egs-section-heading)>p {
    /* font-size: var(--egs-fs-section-subtitle) !important; */
    line-height: var(--egs-lh-section-subtitle) !important;
}

/* ---------- CTA BLOCK HEADINGS (size/weight only — bg color varies) ---------- */
:is(.egs-svc-cta-box,
    .egs-imp2-cta,
    .egs-tr-certificate,
    .egs-crm2-cta-card,
    .egs-msc-terminal-body,
    .egs-bp-cta-box,
    .egs-ip-cta-copy,
    .egs-isc-cta-left) :is(h1, h2, h3, h4, h5, h6) {
    /* font-size: var(--egs-fs-cta-title) !important; */
    font-weight: var(--egs-fw-cta-title) !important;
}

/* ---------- CARD TITLES ---------- */
:is(.egs-service-card .egs-card-top,
    .egs-service-card,
    .egs-svc-card,
    .egs-msc-service-card,
    .egs-isc-card,
    .egs-imp2-tilt-card-body,
    .egs-imp2-step-card,
    .egs-row-text,
    .egs-crm2-item-copy,
    .egs-ip-story-left,
    .egs-tr-module-copy,
    .egs-imp2-why-list-card) :is(h1, h2, h3, h4, h5, h6) {
    /* font-size: var(--egs-fs-card-title) !important; */
    font-weight: var(--egs-fw-card-title) !important;
    line-height: var(--egs-lh-card-title) !important;
}

/* Compact / chip-style mini card titles */
:is(.egs-imp2-feature-chip,
    .egs-ip-challenge-card,
    .egs-ip-feature-row,
    .egs-ip-solution,
    .egs-bp-module,
    .egs-msc-benefit-card,
    .egs-post-sidebar .widget-item) :is(h1, h2, h3, h4, h5, h6) {
    /* font-size: var(--egs-fs-card-title-sm) !important; */
    font-weight: var(--egs-fw-card-title) !important;
}

/* ---------- CARD BODY TEXT ---------- */
:is(.egs-service-card,
    .egs-svc-card,
    .egs-msc-service-card,
    .egs-isc-card,
    .egs-imp2-feature-chip,
    .egs-imp2-step-card,
    .egs-imp2-tilt-card-body,
    .egs-ip-challenge-card,
    .egs-ip-feature-row,
    .egs-ip-solution,
    .egs-bp-module,
    .egs-msc-benefit-card)>p,
.egs-industry-pill span {
    /* font-size: var(--egs-fs-card-text) !important; */
    line-height: var(--egs-lh-card-text) !important;
}

/* ---------- STAT NUMBERS + LABELS (non-monospace ones only) ---------- */
:is(.egs-stat-block,
    .egs-ip-story-stat) :is(.num, strong) {
    /* font-size: var(--egs-fs-stat-number) !important; */
    font-weight: var(--egs-fw-stat-number) !important;
}

/* :is(.egs-stat-block,
    .egs-ip-story-stat) :is(.lbl, span) {
    font-size: var(--egs-fs-stat-label) !important;
} */