/*
 * Alfa Core Master Typography 0.21.2
 * Mobile-first semantic typography for every Alfa frontend page except protected page 34.
 * Visual reference: Kezdolap V2 / Master Gold (page 13154).
 * Accessibility baseline: readable relative sizing, unitless leading and AA-or-better text contrast.
 */

body.alfa-master-typography {
  /* Font family */
  --alfa-type-font: Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Master Gold colors, tightened for mobile readability. */
  --alfa-type-heading: #0F281D;
  --alfa-type-body: #48594F;
  --alfa-type-muted: #5D6B63;
  --alfa-type-link: #0F7A47;
  --alfa-type-inverse-heading: #FFFFFF;
  --alfa-type-inverse-body: #D7E7DD;
  --alfa-type-inverse-link: #9FCB47;

  /* Mobile-first Master Gold scale. 1rem follows the user's browser font setting. */
  --alfa-type-h1-size: clamp(2.125rem, 1.804rem + 1.607vw, 3.25rem); /* 34 -> 52 */
  --alfa-type-h1-line: 1.06;
  --alfa-type-h1-weight: 800;
  --alfa-type-h1-track: -0.035em;

  --alfa-type-h2-size: clamp(1.6875rem, 1.634rem + 0.268vw, 1.875rem); /* 27 -> 30 */
  --alfa-type-h2-line: 1.15;
  --alfa-type-h2-weight: 800;
  --alfa-type-h2-track: -0.02em;

  --alfa-type-h3-size: clamp(1.125rem, 1.089rem + 0.179vw, 1.25rem); /* 18 -> 20 */
  --alfa-type-h3-line: 1.28;
  --alfa-type-h3-weight: 800;
  --alfa-type-h3-track: -0.01em;

  --alfa-type-h4-size: 1.0625rem; /* 17 */
  --alfa-type-h4-line: 1.35;
  --alfa-type-h4-weight: 700;

  --alfa-type-h5-size: 1rem; /* 16 */
  --alfa-type-h5-line: 1.4;
  --alfa-type-h5-weight: 700;

  --alfa-type-h6-size: 0.9375rem; /* 15 */
  --alfa-type-h6-line: 1.45;
  --alfa-type-h6-weight: 700;

  --alfa-type-body-size: 1rem; /* 16px at the normal browser default */
  --alfa-type-body-line: 1.6;
  --alfa-type-body-weight: 400;
  --alfa-type-lead-size: clamp(1rem, 0.982rem + 0.089vw, 1.0625rem); /* 16 -> 17 */
  --alfa-type-small-size: 0.8125rem; /* 13, metadata only */
  --alfa-type-label-size: 1rem; /* 16, mobile-safe form/UI label */
  --alfa-type-prose-max: 68ch;

  font-family: var(--alfa-type-font) !important;
  font-size: var(--alfa-type-body-size) !important;
  line-height: var(--alfa-type-body-line) !important;
  font-weight: var(--alfa-type-body-weight) !important;
  color: var(--alfa-type-body) !important;
  font-kerning: normal;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/*
 * Typography owns page CONTENT only. Header and footer stay fully owned by Master Shell.
 * The higher-specificity content scopes intentionally beat legacy page-specific !important rules.
 */
body.alfa-master-typography :is(.alfa-page-shell__content,.alfa-v2:not(.alfa-master-shell),.alfa-faq-native,.alfa-about-native,.entry-content,.site-main)
:where(h1,h2,h3,h4,h5,h6,p,li,dt,dd,blockquote,figcaption,a,label,input,textarea,select,button,strong,b,em,i,small,span) {
  font-family: var(--alfa-type-font);
  font-kerning: normal;
}

/* Span is never an independent text size. It inherits the semantic role of its parent. */
body.alfa-master-typography :is(.alfa-page-shell__content,.alfa-v2:not(.alfa-master-shell),.alfa-faq-native,.alfa-about-native,.entry-content,.site-main) span {
  font-size: inherit;
  line-height: inherit;
  font-weight: inherit;
  color: inherit;
  letter-spacing: inherit;
}

/* Headings */
body.alfa-master-typography :is(.alfa-page-shell__content,.alfa-v2:not(.alfa-master-shell),.alfa-faq-native,.alfa-about-native,.entry-content,.site-main) h1 {
  color: var(--alfa-type-heading) !important;
  font-family: var(--alfa-type-font) !important;
  font-size: var(--alfa-type-h1-size) !important;
  line-height: var(--alfa-type-h1-line) !important;
  font-weight: var(--alfa-type-h1-weight) !important;
  font-style: normal !important;
  letter-spacing: var(--alfa-type-h1-track) !important;
  text-transform: none !important;
  text-wrap: balance;
}

body.alfa-master-typography :is(.alfa-page-shell__content,.alfa-v2:not(.alfa-master-shell),.alfa-faq-native,.alfa-about-native,.entry-content,.site-main) h2 {
  color: var(--alfa-type-heading) !important;
  font-family: var(--alfa-type-font) !important;
  font-size: var(--alfa-type-h2-size) !important;
  line-height: var(--alfa-type-h2-line) !important;
  font-weight: var(--alfa-type-h2-weight) !important;
  font-style: normal !important;
  letter-spacing: var(--alfa-type-h2-track) !important;
  text-transform: none !important;
  text-wrap: balance;
}

body.alfa-master-typography :is(.alfa-page-shell__content,.alfa-v2:not(.alfa-master-shell),.alfa-faq-native,.alfa-about-native,.entry-content,.site-main) h3 {
  color: var(--alfa-type-heading) !important;
  font-family: var(--alfa-type-font) !important;
  font-size: var(--alfa-type-h3-size) !important;
  line-height: var(--alfa-type-h3-line) !important;
  font-weight: var(--alfa-type-h3-weight) !important;
  font-style: normal !important;
  letter-spacing: var(--alfa-type-h3-track) !important;
  text-transform: none !important;
  text-wrap: balance;
}

body.alfa-master-typography :is(.alfa-page-shell__content,.alfa-v2:not(.alfa-master-shell),.alfa-faq-native,.alfa-about-native,.entry-content,.site-main) h4 {
  color: var(--alfa-type-heading) !important;
  font-family: var(--alfa-type-font) !important;
  font-size: var(--alfa-type-h4-size) !important;
  line-height: var(--alfa-type-h4-line) !important;
  font-weight: var(--alfa-type-h4-weight) !important;
  letter-spacing: 0 !important;
  text-wrap: balance;
}

body.alfa-master-typography :is(.alfa-page-shell__content,.alfa-v2:not(.alfa-master-shell),.alfa-faq-native,.alfa-about-native,.entry-content,.site-main) h5 {
  color: var(--alfa-type-heading) !important;
  font-family: var(--alfa-type-font) !important;
  font-size: var(--alfa-type-h5-size) !important;
  line-height: var(--alfa-type-h5-line) !important;
  font-weight: var(--alfa-type-h5-weight) !important;
  letter-spacing: 0 !important;
}

body.alfa-master-typography :is(.alfa-page-shell__content,.alfa-v2:not(.alfa-master-shell),.alfa-faq-native,.alfa-about-native,.entry-content,.site-main) h6 {
  color: var(--alfa-type-heading) !important;
  font-family: var(--alfa-type-font) !important;
  font-size: var(--alfa-type-h6-size) !important;
  line-height: var(--alfa-type-h6-line) !important;
  font-weight: var(--alfa-type-h6-weight) !important;
  letter-spacing: 0 !important;
}

/* Body copy */
body.alfa-master-typography :is(.alfa-page-shell__content,.alfa-v2:not(.alfa-master-shell),.alfa-faq-native,.alfa-about-native,.entry-content,.site-main) :is(p,li,dd) {
  color: var(--alfa-type-body) !important;
  font-family: var(--alfa-type-font) !important;
  font-size: var(--alfa-type-body-size) !important;
  line-height: var(--alfa-type-body-line) !important;
  font-weight: var(--alfa-type-body-weight) !important;
  font-style: normal !important;
  letter-spacing: 0 !important;
}

body.alfa-master-typography :is(.alfa-page-shell__content,.alfa-v2:not(.alfa-master-shell),.alfa-faq-native,.alfa-about-native,.entry-content,.site-main) :is(dt,strong,b) {
  color: inherit;
  font-family: var(--alfa-type-font) !important;
  font-weight: 700 !important;
  letter-spacing: inherit;
}

body.alfa-master-typography :is(.alfa-page-shell__content,.alfa-v2:not(.alfa-master-shell),.alfa-faq-native,.alfa-about-native,.entry-content,.site-main) blockquote {
  color: var(--alfa-type-heading) !important;
  font-family: var(--alfa-type-font) !important;
  font-size: var(--alfa-type-lead-size) !important;
  line-height: 1.6 !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
}

/* Secondary metadata may be smaller, but never used as the main reading size. */
body.alfa-master-typography :is(.alfa-page-shell__content,.alfa-v2:not(.alfa-master-shell),.alfa-faq-native,.alfa-about-native,.entry-content,.site-main) :is(small,figcaption,.alfa-type-meta) {
  color: var(--alfa-type-muted) !important;
  font-family: var(--alfa-type-font) !important;
  font-size: var(--alfa-type-small-size) !important;
  line-height: 1.5 !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
}

/* Form text stays at 1rem on mobile to avoid tiny controls and browser zoom surprises. */
body.alfa-master-typography :is(.alfa-page-shell__content,.alfa-v2:not(.alfa-master-shell),.alfa-faq-native,.alfa-about-native,.entry-content,.site-main) label {
  color: var(--alfa-type-heading) !important;
  font-family: var(--alfa-type-font) !important;
  font-size: var(--alfa-type-label-size) !important;
  line-height: 1.4 !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
}

body.alfa-master-typography :is(.alfa-page-shell__content,.alfa-v2:not(.alfa-master-shell),.alfa-faq-native,.alfa-about-native,.entry-content,.site-main) :is(input,textarea,select) {
  color: var(--alfa-type-heading) !important;
  font-family: var(--alfa-type-font) !important;
  font-size: 1rem !important;
  line-height: 1.5 !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
}

body.alfa-master-typography :is(.alfa-page-shell__content,.alfa-v2:not(.alfa-master-shell),.alfa-faq-native,.alfa-about-native,.entry-content,.site-main) button {
  font-family: var(--alfa-type-font) !important;
  font-weight: 700;
}

/* Text links inherit the surrounding size and use one accessible brand color. */
body.alfa-master-typography :is(.alfa-page-shell__content,.alfa-v2:not(.alfa-master-shell),.alfa-faq-native,.alfa-about-native,.entry-content,.site-main)
a:not(.alfa-btn):not(.lp-btn):not(.alfa-phone):not(.lp-cta-phone):not(.alfa-footer-contact-row):not(.alfa-nav-submenu a):not(.alfa-mobile-menu a) {
  color: var(--alfa-type-link);
  font-family: var(--alfa-type-font);
  font-weight: 600;
  letter-spacing: 0;
}

/* Cross-template semantic roles derived from the Master Gold homepage. */
body.alfa-master-typography :is(.alfa-lead,.lp-hero-lead,.alfa-type-lead) {
  color: var(--alfa-type-body) !important;
  font-family: var(--alfa-type-font) !important;
  font-size: var(--alfa-type-lead-size) !important;
  line-height: 1.55 !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
}

body.alfa-master-typography :is(.alfa-eyebrow,.lp-eyebrow,.alfa-type-eyebrow) {
  color: var(--alfa-type-link) !important;
  font-family: var(--alfa-type-font) !important;
  font-size: 0.75rem !important; /* 12px at default root */
  line-height: 1.35 !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
}

body.alfa-master-typography :is(.alfa-type-muted,.text-muted) {
  color: var(--alfa-type-muted) !important;
}

/* Long-form copy utility: Google/web.dev recommends roughly 45-75 characters per line. */
body.alfa-master-typography :is(.alfa-type-prose,.alfa-prose) {
  max-inline-size: var(--alfa-type-prose-max);
}

body.alfa-master-typography :is(.alfa-type-prose,.alfa-prose) :is(p,li) {
  max-inline-size: var(--alfa-type-prose-max);
}

/* Dark/inverse components preserve hierarchy while switching to high-contrast colors. */
body.alfa-master-typography :is(.alfa-cta,.lp-cta,.alfa-dark-section,[data-alfa-theme="dark"]) {
  --alfa-type-heading: var(--alfa-type-inverse-heading);
  --alfa-type-body: var(--alfa-type-inverse-body);
  --alfa-type-muted: var(--alfa-type-inverse-body);
  --alfa-type-link: var(--alfa-type-inverse-link);
}

/* The Master Shell owns Header/Footer typography and is intentionally excluded above. */

/* ========================================================================== 
   Service template -> Master Gold typography role mapping
   The Lomtalanitas V2 markup keeps its lp-* structural classes, but all
   readable text roles are owned by Master Typography. These selectors are
   intentionally more specific than legacy service !important pixel-QA rules.
   ========================================================================== */
body.alfa-master-typography .alfa-lp {
  --alfa-service-type-support-size: 0.875rem; /* 14px equivalent */
  --alfa-service-type-meta-size: 0.8125rem;  /* 13px equivalent */
  font-family: var(--alfa-type-font) !important;
  font-size: var(--alfa-type-body-size) !important;
  line-height: var(--alfa-type-body-line) !important;
  font-weight: var(--alfa-type-body-weight) !important;
  color: var(--alfa-type-body) !important;
  font-kerning: normal;
}

body.alfa-master-typography .alfa-lp .lp-hero h1 {
  color: var(--alfa-type-heading) !important;
  font-family: var(--alfa-type-font) !important;
  font-size: var(--alfa-type-h1-size) !important;
  line-height: var(--alfa-type-h1-line) !important;
  font-weight: var(--alfa-type-h1-weight) !important;
  font-style: normal !important;
  letter-spacing: var(--alfa-type-h1-track) !important;
  text-transform: none !important;
  text-wrap: balance;
}

body.alfa-master-typography .alfa-lp h2 {
  color: var(--alfa-type-heading) !important;
  font-family: var(--alfa-type-font) !important;
  font-size: var(--alfa-type-h2-size) !important;
  line-height: var(--alfa-type-h2-line) !important;
  font-weight: var(--alfa-type-h2-weight) !important;
  font-style: normal !important;
  letter-spacing: var(--alfa-type-h2-track) !important;
  text-transform: none !important;
  text-wrap: balance;
}

body.alfa-master-typography .alfa-lp h3 {
  color: var(--alfa-type-heading) !important;
  font-family: var(--alfa-type-font) !important;
  font-size: var(--alfa-type-h3-size) !important;
  line-height: var(--alfa-type-h3-line) !important;
  font-weight: var(--alfa-type-h3-weight) !important;
  font-style: normal !important;
  letter-spacing: var(--alfa-type-h3-track) !important;
  text-transform: none !important;
  text-wrap: balance;
}

body.alfa-master-typography .alfa-lp p {
  color: var(--alfa-type-body) !important;
  font-family: var(--alfa-type-font) !important;
  font-size: var(--alfa-type-body-size) !important;
  line-height: var(--alfa-type-body-line) !important;
  font-weight: var(--alfa-type-body-weight) !important;
  font-style: normal !important;
  letter-spacing: 0 !important;
}

body.alfa-master-typography .alfa-lp .lp-hero-lead {
  color: var(--alfa-type-body) !important;
  font-family: var(--alfa-type-font) !important;
  font-size: var(--alfa-type-lead-size) !important;
  line-height: 1.55 !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
}

body.alfa-master-typography .alfa-lp .lp-sub {
  color: var(--alfa-type-muted) !important;
  font-family: var(--alfa-type-font) !important;
  font-size: var(--alfa-type-body-size) !important;
  line-height: 1.55 !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
}

body.alfa-master-typography .alfa-lp .lp-eyebrow {
  color: var(--alfa-type-link) !important;
  font-family: var(--alfa-type-font) !important;
  font-size: 0.75rem !important;
  line-height: 1.35 !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
}

/* FAQ is reading content, not compact metadata. */
body.alfa-master-typography .alfa-lp .lp-faq-item summary {
  color: var(--alfa-type-heading) !important;
  font-family: var(--alfa-type-font) !important;
  font-size: 1rem !important;
  line-height: 1.45 !important;
  font-weight: 700 !important;
  font-style: normal !important;
  letter-spacing: 0 !important;
}

body.alfa-master-typography .alfa-lp .lp-faq-answer {
  color: var(--alfa-type-body) !important;
  font-family: var(--alfa-type-font) !important;
  font-size: 1rem !important;
  line-height: 1.6 !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
}

/* Compact support roles may be smaller than body copy, but never carry prose. */
body.alfa-master-typography .alfa-lp :is(
  .lp-quick-title > div > span,
  .lp-quick-item b,
  .lp-info-band,
  .lp-check,
  .lp-team-check,
  .lp-city,
  .lp-ba-label,
  .lp-rating
) {
  font-family: var(--alfa-type-font) !important;
  font-size: var(--alfa-service-type-support-size) !important;
  line-height: 1.45 !important;
  letter-spacing: 0 !important;
}

body.alfa-master-typography .alfa-lp :is(
  .lp-quick-item b,
  .lp-info-band-right,
  .lp-check,
  .lp-team-check,
  .lp-city,
  .lp-ba-label
) {
  font-weight: 700 !important;
}

body.alfa-master-typography .alfa-lp :is(
  .lp-quick-item small,
  .lp-quick-action > small,
  .lp-take-item small,
  .lp-rating small,
  .lp-step-num,
  .lp-num
) {
  font-family: var(--alfa-type-font) !important;
  font-size: var(--alfa-service-type-meta-size) !important;
  line-height: 1.45 !important;
  letter-spacing: 0 !important;
}

body.alfa-master-typography .alfa-lp :is(.lp-quick-title strong,.lp-take-item strong) {
  color: var(--alfa-type-heading) !important;
  font-family: var(--alfa-type-font) !important;
  font-size: 1rem !important;
  line-height: 1.4 !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
}

body.alfa-master-typography .alfa-lp blockquote {
  color: var(--alfa-type-heading) !important;
  font-family: var(--alfa-type-font) !important;
  font-size: var(--alfa-type-lead-size) !important;
  line-height: 1.6 !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
}

/* CTA inherits inverse Master Typography colors while keeping Gold sizing. */
body.alfa-master-typography .alfa-lp .lp-cta {
  --alfa-type-heading: var(--alfa-type-inverse-heading);
  --alfa-type-body: var(--alfa-type-inverse-body);
  --alfa-type-muted: var(--alfa-type-inverse-body);
  --alfa-type-link: var(--alfa-type-inverse-link);
}

/* Decorative handwritten notes remain a component-owned exception. */
body.alfa-master-typography .alfa-lp .lp-hand {
  font-family: 'Caveat', 'Segoe Print', 'Bradley Hand', cursive !important;
}
