/* Section/row title weight system (bold + light mix). */

/*
 * One rule for every section and page title (reference: the homepage
 * "Prächtige Luster, stylische Leuchten, Extravagante Lampen"):
 *
 *   - plain text ............ Manrope 600, upright
 *   - emphasised part ....... Manrope 300, italic
 *     (<em>, <i>, .italic-section-title*, .aboutus-info-span, and the
 *     stand-alone second-line headings .section-italic-title*,
 *     .innovation-italic-title)
 *   - <strong>/<b> .......... back to 600 upright, also inside an emphasis
 *
 * Both parts keep the title's size and use letter-spacing -0.02em.
 *
 * The Webflow and design-system rules these replace use !important on
 * selectors up to (0,3,1) (`body:has(.section-startseite…) .aboutus-info-span`),
 * so every rule here is anchored on `:root:not(#mpw-titles) body`, which adds
 * one ID's worth of specificity and wins regardless of file order.
 *
 * Out of scope on purpose: the homepage hero (.banner-title), eyebrows, card
 * titles (.service-title, .team-name, .heading-7 …), FAQ questions, footer,
 * nav, and the career pages (.mpw-jobs-*), which are styled separately.
 */

:root {
  --mpw-title-weight: 600;
  --mpw-title-light: 300;
  --mpw-title-tracking: -0.02em;
}

/* Title containers: plain text is semibold and upright. */
:root:not(#mpw-titles) body :is(
  .section-title,
  .section-title-2,
  .section-title-blog,
  .section-title-left,
  .section-title-left-copy,
  .section-title-left-copy-copy,
  .section-title-right,
  .aboutus-info-title,
  .aboutus-info-title-copy,
  .aboutus-info-title-copy-copy,
  .b2b-info-title,
  .b2c-info-title,
  .image-text,
  .innovation-title,
  h1.subheading,
  h2.subheading,
  .contact-form-title,
  .contact-form-title-two,
  .mpw-reviews__title,
  .breadcrumb-title,
  .breadcrumb-title-partner,
  h1.heading-13,
  h1.heading-14,
  h1.heading-15,
  h2.heading-13:where(.mpw-h1),
  h2.heading-14:where(.mpw-h1),
  h2.heading-15:where(.mpw-h1),
  .mpw-brand__title,
  .mpw-brand__section > h2,
  .mpw-brand__cta h2
) {
  font-family: Manrope, sans-serif;
  font-weight: var(--mpw-title-weight) !important;
  font-style: normal !important;
  letter-spacing: var(--mpw-title-tracking) !important;
}

/* Stand-alone second-line headings ("Gewerbehof" / "Höfer"): light italic. */
:root:not(#mpw-titles) body :is(
  .section-italic-title,
  .section-italic-title-copy,
  .innovation-italic-title,
  h1.italic-section-title-copy,
  h2.italic-section-title-copy:where(.mpw-h1)
) {
  font-family: Manrope, sans-serif;
  font-weight: var(--mpw-title-light) !important;
  font-style: italic !important;
  letter-spacing: var(--mpw-title-tracking) !important;
}

/* Inline emphasis inside a title: light italic at the title's size. */
:root:not(#mpw-titles) body :is(
  .section-title,
  .section-title-2,
  .section-title-blog,
  .section-title-left,
  .section-title-left-copy,
  .section-title-left-copy-copy,
  .section-title-right,
  .aboutus-info-title,
  .aboutus-info-title-copy,
  .aboutus-info-title-copy-copy,
  .b2b-info-title,
  .b2c-info-title,
  .image-text,
  .innovation-title,
  h1.subheading,
  h2.subheading,
  .contact-form-title,
  .contact-form-title-two,
  .mpw-reviews__title,
  .breadcrumb-title,
  .breadcrumb-title-partner,
  h1.heading-13,
  h1.heading-14,
  h1.heading-15,
  h2.heading-13:where(.mpw-h1),
  h2.heading-14:where(.mpw-h1),
  h2.heading-15:where(.mpw-h1),
  .mpw-brand__title,
  .mpw-brand__section > h2,
  .mpw-brand__cta h2
) :is(em, i, .italic-section-title, .italic-section-title-copy, .italic-section-title-copy-copy, .aboutus-info-span) {
  display: inline !important;
  /* same ink as the title (the homepage intro greyed its <em>) */
  color: inherit !important;
  /* the slanted last letter otherwise touches the following word */
  padding-right: 0.06em;
  font-family: inherit;
  font-size: inherit !important;
  line-height: inherit !important;
  font-weight: var(--mpw-title-light) !important;
  font-style: italic !important;
  letter-spacing: inherit !important;
}

/* <strong>/<b> inside any title part is the semibold part again
   (the reference's "Extravagante" sits inside the light span). */
:root:not(#mpw-titles) body :is(
  .section-title,
  .section-title-2,
  .section-title-blog,
  .section-title-left,
  .section-title-left-copy,
  .section-title-left-copy-copy,
  .section-title-right,
  .aboutus-info-title,
  .aboutus-info-title-copy,
  .aboutus-info-title-copy-copy,
  .b2b-info-title,
  .b2c-info-title,
  .image-text,
  .innovation-title,
  h1.subheading,
  h2.subheading,
  .contact-form-title,
  .contact-form-title-two,
  .mpw-reviews__title,
  .breadcrumb-title,
  .breadcrumb-title-partner,
  h1.heading-13,
  h1.heading-14,
  h1.heading-15,
  h2.heading-13:where(.mpw-h1),
  h2.heading-14:where(.mpw-h1),
  h2.heading-15:where(.mpw-h1),
  .section-italic-title,
  .section-italic-title-copy,
  .innovation-italic-title,
  h1.italic-section-title-copy,
  h2.italic-section-title-copy:where(.mpw-h1),
  .mpw-brand__title,
  .mpw-brand__section > h2,
  .mpw-brand__cta h2
) :is(strong, b) {
  font-family: inherit;
  font-size: inherit !important;
  line-height: inherit !important;
  font-weight: var(--mpw-title-weight) !important;
  font-style: normal !important;
  letter-spacing: inherit !important;
}

/* ------------------------------------------------------------------------ */
/* Sizes: both halves of a title share one size                              */
/* ------------------------------------------------------------------------ */

/* The second line of a split title was pinned to 40px under a 60px first
   line (B2B/B2C hero, about-us, Gewerbehof, Konfektionierung …). */
:root:not(#mpw-titles) body :is(.section-title, .b2b-info-title, .b2c-info-title) + .section-italic-title,
:root:not(#mpw-titles) body :is(.b2b-info-title, .b2c-info-title) + .section-title-block + .section-italic-title {
  font-size: var(--mpw-page-title) !important;
  line-height: 1.1 !important;
  margin-top: 0 !important;
}

/* Lichtberechnung: "Moderne Software" (40px) over a 16px italic line. */
:root:not(#mpw-titles) body h1.heading-13,
:root:not(#mpw-titles) body h1.heading-13 + h1.italic-section-title-copy,
:root:not(#mpw-titles) body h2.heading-13:where(.mpw-h1),
:root:not(#mpw-titles) body :is(h1, h2:where(.mpw-h1)).heading-13 + h2.italic-section-title-copy:where(.mpw-h1) {
  font-size: clamp(1.75rem, 3vw, 2.5rem) !important;
  line-height: 1.2 !important;
}

/* A design-system list meant for <strong> children also set
   `font-size: inherit` on .section-title-left and the regional page
   headings themselves, so they rendered at body size (16px). */
:root:not(#mpw-titles) body .section-title-left,
:root:not(#mpw-titles) body .mpw-local__section h2.subheading,
:root:not(#mpw-titles) body .faq h2.subheading:where(:not(.mpw-h1)) {
  font-size: var(--mpw-title) !important;
  line-height: 1.15 !important;
}

:root:not(#mpw-titles) body .inner-section-title .section-title-left {
  font-size: var(--mpw-page-title) !important;
  line-height: 1.1 !important;
}

/* ------------------------------------------------------------------------ */
/* Demoted page headings (lib/mirror/headings.ts)                            */
/* ------------------------------------------------------------------------ */

/* Webflow used <h1> as a text style. Every <h1> after the page title now
   renders as <h2 class="… mpw-h1">; it keeps the h1 look. `h2:where(.mpw-h1)`
   has the specificity of a bare `h1`/`h2` (0,0,1) and comes after the Webflow
   tag rules, so class rules win over it exactly as they won over `h1`. The
   Webflow h1 and h2 tag rules differ only in size. Rules written for `h1.x`
   carry an `h2.x:where(.mpw-h1)` twin next to them. */
h2:where(.mpw-h1) {
  font-size: 40px;
  line-height: 48px;
}

/* The second line of a split page title, added to the <h1> for search engines
   and screen readers while the visible line stays as it was. */
.mpw-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
