/* B12-04: explicit hero family contracts. Owner markers decide the family; this file normalizes copy width and hero-shell text measure without touching runtime or template structure. */
body[data-spc-hero-family] {
  --spc-hero-copy-max: 62ch;
  --spc-hero-subtitle-max: 58ch;
}

body[data-spc-hero-family="home"],
body[data-spc-hero-family="form"] {
  --spc-hero-copy-max: 60ch;
  --spc-hero-subtitle-max: 54ch;
}

body[data-spc-hero-family="home"] #strona-glowna .hero-text-column,
body[data-spc-hero-family="form"] #strona-glowna :is(.sb-split-text-image__content, .hero-text-column) {
  max-width: min(100%, var(--spc-hero-copy-max));
}

body[data-spc-hero-family="home"] #strona-glowna .hero-text-column > *,
body[data-spc-hero-family="form"] #strona-glowna :is(.sb-split-text-image__content, .hero-text-column) > * {
  max-width: 100%;
}

body[data-spc-hero-family="service"] .sb-component-hero .sb-hero__content-wrapper,
body[data-spc-hero-family="blog"] .sb-component-hero .sb-hero__content-wrapper,
body[data-spc-hero-family="faq"] .sb-component-hero .sb-hero__content-wrapper,
body[data-spc-hero-family="legal"] .sb-component-hero .sb-hero__content-wrapper,
body[data-spc-hero-family="content"] .sb-component-hero .sb-hero__content-wrapper {
  max-width: min(100%, var(--spc-hero-copy-max));
}

body[data-spc-hero-family="service"] .sb-component-hero :is(.sb-subtitle, .sb-hero__subtitle, .sb-paragraph),
body[data-spc-hero-family="blog"] .sb-component-hero :is(.sb-subtitle, .sb-hero__subtitle, .sb-paragraph),
body[data-spc-hero-family="faq"] .sb-component-hero :is(.sb-subtitle, .sb-hero__subtitle, .sb-paragraph),
body[data-spc-hero-family="legal"] .sb-component-hero :is(.sb-subtitle, .sb-hero__subtitle, .sb-paragraph),
body[data-spc-hero-family="content"] .sb-component-hero :is(.sb-subtitle, .sb-hero__subtitle, .sb-paragraph) {
  max-width: min(100%, var(--spc-hero-subtitle-max));
}

@media (min-width: 1024px) {
  body[data-spc-hero-family="service"] .sb-component-hero .sb-cta-wrapper,
  body[data-spc-hero-family="blog"] .sb-component-hero .sb-cta-wrapper,
  body[data-spc-hero-family="faq"] .sb-component-hero .sb-cta-wrapper,
  body[data-spc-hero-family="legal"] .sb-component-hero .sb-cta-wrapper,
  body[data-spc-hero-family="content"] .sb-component-hero .sb-cta-wrapper {
    margin-top: clamp(20px, 2vw, 28px);
  }
}

@media (max-width: 767px) {
  body[data-spc-hero-family="home"] #strona-glowna .hero-text-column,
  body[data-spc-hero-family="form"] #strona-glowna :is(.sb-split-text-image__content, .hero-text-column),
  body[data-spc-hero-family="service"] .sb-component-hero .sb-hero__content-wrapper,
  body[data-spc-hero-family="blog"] .sb-component-hero .sb-hero__content-wrapper,
  body[data-spc-hero-family="faq"] .sb-component-hero .sb-hero__content-wrapper,
  body[data-spc-hero-family="legal"] .sb-component-hero .sb-hero__content-wrapper,
  body[data-spc-hero-family="content"] .sb-component-hero .sb-hero__content-wrapper {
    max-width: 100%;
  }
}
