/* TOHOL homepage responsive statement — v1.2 / 2026-10-24.
   Replaces homepage-locales-v2.css (do not load both versions).
   Requires the approved tohol-hero-positioning-v4.css, loaded before this file.
   Wide screens: fit one line at a readable size. Phones: wrap whole words.
   Small tablets wrap when the translated sentence cannot fit at 1rem.
   No scroll strip, no new font files, no background, no content changes. */

/* Undo the v1 helper's automatic hyphenation and mid-word breaking.
   This does NOT force entire headings/paragraphs onto a single line. */
html[data-tohol-localized] body,
html[data-tohol-localized] :is(h1, h2, h3, h4, p, li, a, button, span, strong, small),
html[data-tohol-localized] .nav-destination-copy,
html[data-tohol-localized] .mega-sidebar-title,
html[data-tohol-localized] .home-hero .hero-copy > h1,
html[data-tohol-localized] .home-hero .hero-copy > h1 * {
  -webkit-hyphens: none;
  hyphens: none;
  word-break: normal;
  overflow-wrap: normal;
}

html[data-tohol-localized] .hero-copy,
html[data-tohol-localized] .nav-destination-copy,
html[data-tohol-localized] .mega-sidebar-title {
  min-width: 0;
}

/* The statement rule also applies to the English homepage.
   Wrapping is the safe default, including when JavaScript is unavailable.
   The helper enables a single line only after measuring the available width. */
html .home-hero .hero-copy > .hero-product-positioning {
  display: block;
  box-sizing: border-box;
  width: var(--tohol-statement-width, 100%);
  max-width: none;
  min-width: 0;
  margin: -8px 0 13px;
  padding: 8px 2px;
  white-space: normal;
  -webkit-hyphens: none;
  hyphens: none;
  word-break: normal;
  overflow-wrap: normal;
  overflow: visible;
}
html .home-hero .hero-copy > .hero-product-positioning .tohol-statement-line {
  display: inline;
  width: auto;
  max-width: none;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-shadow: inherit;
  white-space: normal;
  -webkit-hyphens: none;
  hyphens: none;
  word-break: normal;
  overflow-wrap: normal;
}
html .home-hero .hero-copy > .hero-product-positioning[data-tohol-statement-mode="single-line-fit"] {
  white-space: nowrap;
}
html .home-hero .hero-copy > .hero-product-positioning[data-tohol-statement-mode="single-line-fit"] .tohol-statement-line {
  display: inline-block;
  width: max-content;
  white-space: nowrap;
}
/* Keep authored hyphenated terms (for example KI-Modellen) intact too. */
html .home-hero .hero-copy > .hero-product-positioning .tohol-statement-word {
  white-space: nowrap;
}
/* An old hidden hint may remain in a manually edited homepage. Never show it. */
html .home-hero .tohol-statement-scroll-hint {
  display: none !important;
}

/* Existing translated product-language note; unchanged from v2. */
html[data-tohol-localized] .home-hero .hero-copy > .tohol-product-language-note {
  max-width: 58ch;
  margin: 12px 0 0;
  font-size: .8125rem;
  font-weight: 400;
  line-height: 1.5;
  color: #465e7b;
}

/* All phone-sized viewports: readable type and natural line wrapping.
   Actual line count depends on the translation and available CSS pixels. */
@media (max-width: 767px) {
  html .home-hero .hero-copy > .hero-product-positioning {
    width: 100%;
    max-width: 100%;
    margin-bottom: 8px;
    font-size: 1.1rem;
    line-height: 1.45;
  }
}
