/* B12-06: predictable typography contracts for hero and entry headings. Scoped by family markers so B12 generated core stays only as structural baseline. */
body[data-spc-typo-family] {
  --spc-hero-h1-desktop: clamp(2.4rem, 3.25vw, 3.35rem);
  --spc-hero-h1-mobile: clamp(1.95rem, 7vw, 2.45rem);
  --spc-hero-subtitle-size: clamp(1rem, 0.96rem + 0.25vw, 1.125rem);
  --spc-entry-h2-desktop: clamp(1.6rem, 2vw, 2.15rem);
  --spc-entry-h2-mobile: clamp(1.4rem, 5.5vw, 1.8rem);
}

body[data-spc-typo-family="home"] {
  --spc-hero-h1-desktop: clamp(2.8rem, 4.2vw, 4.1rem);
  --spc-hero-h1-mobile: clamp(2rem, 7.8vw, 2.7rem);
  --spc-entry-h2-desktop: clamp(1.75rem, 2.4vw, 2.35rem);
  --spc-entry-h2-mobile: clamp(1.45rem, 5.8vw, 1.95rem);
}

body[data-spc-typo-family="home"] #strona-glowna h1,
body[data-spc-typo-family="service"] #products-hero h1,
body[data-spc-typo-family="blog"] #blog-hero h1,
body[data-spc-typo-family="faq"] #faq-hero h1,
body[data-spc-typo-family="legal"] :is(#privacy-policy-hero, #blank-hero) h1,
body[data-spc-typo-family="form"] #strona-glowna h1 {
  font-size: var(--spc-hero-h1-desktop);
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

body[data-spc-typo-family="home"] #strona-glowna :is(.sb-subtitle, .sb-paragraph p),
body[data-spc-typo-family="service"] #products-hero :is(.sb-subtitle, .sb-hero__subtitle, .sb-paragraph p),
body[data-spc-typo-family="blog"] #blog-hero :is(.sb-subtitle, .sb-hero__subtitle, .sb-paragraph p),
body[data-spc-typo-family="faq"] #faq-hero :is(.sb-subtitle, .sb-hero__subtitle, .sb-paragraph p),
body[data-spc-typo-family="legal"] :is(#privacy-policy-hero, #blank-hero) :is(.sb-subtitle, .sb-hero__subtitle, .sb-paragraph p),
body[data-spc-typo-family="form"] #strona-glowna :is(.sb-subtitle, .sb-paragraph p) {
  font-size: var(--spc-hero-subtitle-size);
  line-height: 1.6;
}

body[data-spc-typo-family="home"] #o-nas h2,
body[data-spc-typo-family="service"] :is(#products, #service-local-trust, #service-faq-process, #service-safety-proof, #service-proof-cases) h2,
body[data-spc-typo-family="blog"] #blog h2,
body[data-spc-typo-family="faq"] #faq h2,
body[data-spc-typo-family="legal"] section:not(#Header):not(#Footer) h2,
body[data-spc-typo-family="content"] section:not(#Header):not(#Footer) h2,
body[data-spc-typo-family="form"] section:not(#Header):not(#Footer) h2 {
  font-size: var(--spc-entry-h2-desktop);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

@media (max-width: 767px) {
  body[data-spc-typo-family="home"] #strona-glowna h1,
  body[data-spc-typo-family="service"] #products-hero h1,
  body[data-spc-typo-family="blog"] #blog-hero h1,
  body[data-spc-typo-family="faq"] #faq-hero h1,
  body[data-spc-typo-family="legal"] :is(#privacy-policy-hero, #blank-hero) h1,
  body[data-spc-typo-family="form"] #strona-glowna h1 {
    font-size: var(--spc-hero-h1-mobile);
  }

  body[data-spc-typo-family="home"] #o-nas h2,
  body[data-spc-typo-family="service"] :is(#products, #service-local-trust, #service-faq-process, #service-safety-proof, #service-proof-cases) h2,
  body[data-spc-typo-family="blog"] #blog h2,
  body[data-spc-typo-family="faq"] #faq h2,
  body[data-spc-typo-family="legal"] section:not(#Header):not(#Footer) h2,
  body[data-spc-typo-family="content"] section:not(#Header):not(#Footer) h2,
  body[data-spc-typo-family="form"] section:not(#Header):not(#Footer) h2 {
    font-size: var(--spc-entry-h2-mobile);
  }
}
