/* =====================================================================
   MyFlyYatra - site-wide typography (2026-11-23)
   ---------------------------------------------------------------------
   One type system for every public page. Linked LAST in <head> by
   header-new.php, header-new-home.php and header.php so it wins over
   the older per-page stylesheets.

   Fonts (both already used by the site):
     Headings / display numbers  -> Bricolage Grotesque
     Everything else (text, nav, buttons, forms, tables) -> DM Sans

   Specificity note: legacy CSS sets font-family with !important at
   many specificities. Selectors here carry :not(#mfy-t) (one fake ID)
   so they win without touching those files. Headings use two fake IDs
   so they beat the general body rule. Icon fonts are excluded.
   ===================================================================== */

:root {
  --mfy-font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mfy-font-heading: 'Bricolage Grotesque', 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Re-point the variables the 2026 internal stylesheets already use */
  --i-font: var(--mfy-font-body);
  --i-font-body: var(--mfy-font-body);
  --i-font-display: var(--mfy-font-heading);

  /* Type scale */
  --mfy-fs-section: clamp(1.6rem, 1.1rem + 1.8vw, 2.4rem);   /* page section H2: 25.6px -> 38.4px */
  --mfy-fs-article-h2: clamp(1.45rem, 1.15rem + 1.1vw, 2rem); /* long-form H2: 23px -> 32px */
  --mfy-fs-article-h3: clamp(1.2rem, 1.08rem + .5vw, 1.4rem); /* long-form H3: 19px -> 22px */
  --mfy-fs-article-h4: 1.125rem;
  --mfy-fs-article-body: 1.0625rem;                            /* 17px reading text */
  --mfy-lh-body: 1.65;
  --mfy-lh-article: 1.75;
  --mfy-lh-heading: 1.2;
}

/* ---------- Base rendering ---------- */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html body {
  font-family: var(--mfy-font-body) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}

/* ---------- 1. Body font on every element (icons excluded) ---------- */
html body *:not(#mfy-t):not(.fa):not([class^="fa"]):not([class*=" fa"]):not([class^="glyphicon"]):not([class*=" glyphicon"]):not(code):not(pre):not(kbd):not(samp) {
  font-family: var(--mfy-font-body) !important;
}

/* ---------- 2. Heading font: headings + display numbers/codes/prices ---------- */
html body :is(h1, h2, h3, h4, h5, h6,
  .cta-number,
  .uxi-pull, .uxi-fact__num, .uxi-handle__num, .uxi-board__city, .uxi-board__codes b,
  .uxi-dest__code, .uxi-dest__code2, .uxi-time__node,
  .mfy-lf-desttile__code, .mfy-lf-tl-dot,
  .mfy-eub-route__code, .mfy-ac__code,
  .ef-offer-price):not(#mfy-t):not(#mfy-h) {
  font-family: var(--mfy-font-heading) !important;
}
/* Text wrapped inside a heading (span, a, strong...) inherits the heading font */
html body :is(h1, h2, h3, h4, h5, h6) *:not(#mfy-t):not(#mfy-h):not(.fa):not([class^="fa"]):not([class*=" fa"]):not([class^="glyphicon"]):not([class*=" glyphicon"]) {
  font-family: inherit !important;
}

/* ---------- 3. Default rhythm (low specificity: designed components keep their own values) ---------- */
h1, h2, h3, h4, h5, h6 {
  line-height: var(--mfy-lh-heading);
  text-wrap: balance;
}
p, li, dd, blockquote {
  line-height: var(--mfy-lh-body);
}
p {
  text-wrap: pretty;
}
b, strong {
  font-weight: 700;
}
input, select, textarea, button {
  font-size: inherit;
}

/* ---------- 4. Section headings: one size across homepage + internal pages ---------- */
html body :is(
  .deals-heading, .features-heading, .cheapest-heading, .why-text h2,
  .fds-heading h2, .mfy-news__title, section.new-trending .container > h2,
  .container_Amenities > h2, .heading_container h2, h2.heading_container,
  h2.page-header, section.paper .page-header h2,
  section.reviews-section .container > h2,
  section.ef-flight-deals .ef-header h2, .mfy-lf-head h2,
  section.banner_image_bg .banner_inner h2, .mfy-seats__head,
  .uxi__head h2, .mfy-related__head h2, .mfy-rel__head h2,
  .airport-guide.ag-listing .ag-shead h2
):not(#mfy-t) {
  font-size: var(--mfy-fs-section) !important;
  font-weight: 800 !important;
  line-height: 1.18 !important;
  letter-spacing: -.02em !important;
}

/* Hero titles: keep each hero's designed size, unify weight + spacing */
html body .mfy-hero h1.mfy-hero__title:not(#mfy-t),
html body .headline h1:not(#mfy-t) {
  font-weight: 800 !important;
  letter-spacing: -.02em !important;
}

/* ---------- 5. Long-form reading scale: blog articles + airport guides ---------- */
html body :is(.inner-blog-left, .airport-guide .ag-main) > h2:not(#mfy-t) {
  font-size: var(--mfy-fs-article-h2) !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  letter-spacing: -.015em !important;
}
html body :is(.inner-blog-left, .airport-guide .ag-main) > h3:not(#mfy-t) {
  font-size: var(--mfy-fs-article-h3) !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  letter-spacing: -.01em !important;
}
html body :is(.inner-blog-left, .airport-guide .ag-main) > :is(h4, h5, h6):not(#mfy-t) {
  font-size: var(--mfy-fs-article-h4) !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
}
html body :is(.inner-blog-left, .airport-guide .ag-main) > p:not(#mfy-t),
html body :is(.inner-blog-left, .airport-guide .ag-main) > :is(ul, ol) > li:not(#mfy-t) {
  font-size: var(--mfy-fs-article-body) !important;
  line-height: var(--mfy-lh-article) !important;
}
