/* ============================================================================
   SALBEI — base.css
   Reset, Grundtypografie, Layout-Primitive, Signaturelemente der Analyse.
   ============================================================================ */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;   /* dekorative Kreise dürfen über ihren Container ragen */
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--lh-heading);
  color: var(--ink);
  text-wrap: balance;
  hyphens: none;
  overflow-wrap: normal;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
h5 { font-size: var(--fs-h5); }

p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }

a { color: var(--ink); text-decoration: none; transition: color var(--dur-fast) linear; }
a:hover { color: var(--accent); }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--r-1x); }
::selection { background: var(--accent-soft); color: var(--ink); }

.skip-link {
  position: absolute; left: 16px; top: 16px; z-index: 999;
  transform: translateY(-200%);
  background: var(--accent); color: #fff;
  padding: 12px 26px; border-radius: var(--r-pill);
  font-family: var(--font-display); font-size: var(--fs-small);
  transition: transform var(--dur-base) var(--ease);
}
.skip-link:focus { transform: none; color: #fff; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- Layout -- */

.container      { width: 100%; max-width: var(--container);      margin-inline: auto; padding-inline: var(--gutter); }
.container--mid { max-width: var(--container-mid); }
.container--text{ max-width: var(--container-text); }

.section     { padding-block: var(--section-y); }
.section--lg { padding-block: var(--section-y-lg); }   /* Zäsur */
.section--sm { padding-block: var(--section-y-sm); }

/* Zwei helle Sektionen mit gleicher Fläche stoßen sonst hart aneinander —
   die getönte Fläche übernimmt dann den oberen Abstand der folgenden. */
.section[style*="surface-alt"] + .section { padding-top: var(--section-y-lg); }

.measure      { max-width: var(--measure); }
.measure-lead { max-width: var(--measure-lead); }
.measure-head { max-width: var(--measure-head); }

.prose > p + p { margin-top: var(--gap-para); }
.prose p { max-width: var(--measure); }

/* Lead — der erste Absatz eines Abschnitts trägt mehr Gewicht als der
   Folgetext. Das strukturiert lange SEO-Texte, ohne sie zu verändern. */
.lead { font-size: var(--fs-lead); line-height: 1.68; color: var(--ink); }
.prose .lead + p { margin-top: var(--gap-lead-body); }

/* Sektionskopf — einheitlicher Innenrhythmus, unterschiedliche Marker */
.sechead { display: flex; flex-direction: column; align-items: flex-start; }
.sechead--center { align-items: center; text-align: center; }
.sechead > .eyebrow { margin-bottom: var(--gap-marker-head); }
.sechead > h2, .sechead > h3 { margin-bottom: 0; }
.sechead__lead { margin-top: var(--gap-head-lead); }
.sechead + * { margin-top: var(--gap-head-block); }

/* Marker-Variante: nur die Horizontlinie, ohne Label */
.rulemark {
  display: block; width: clamp(4rem, 7vw, 7rem); height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, rgba(51,169,177,.15) 100%);
  border-radius: 2px;
  margin-bottom: var(--gap-marker-head);
  transform: scaleX(0); transform-origin: left center;
  transition: transform var(--dur-slow) var(--ease);
}
.rulemark.is-in { transform: scaleX(1); }
.sechead--center .rulemark { transform-origin: center; background: linear-gradient(90deg, rgba(51,169,177,.15) 0%, var(--accent) 50%, rgba(51,169,177,.15) 100%); }

/* ==========================================================================
   EYEBROW — Signaturmuster der Analyse: Linie 50–84 px + 14-px-Punkt
   ========================================================================== */

/* Das Label steht auf der gemeinsamen linken Achse; Linie und Punkt folgen
   ihm nach rechts, damit der Text nicht von der Zierlinie verschoben wird.
   Größen, Farben und Animation bleiben unverändert. */
.eyebrow {
  display: inline-flex; align-items: center; position: relative;
  font-family: var(--font-display);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  line-height: var(--lh-tight);
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: ""; flex: none; order: 2;
  width: clamp(3.125rem, 2.4186rem + 2.3595vw, 5.25rem);
  height: 1px; margin-left: 26px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left center;
  transition: transform var(--dur-slow) var(--ease);
}
.eyebrow::after {
  content: ""; flex: none; order: 3;
  width: 14px; height: 14px; border-radius: var(--r-full);
  margin-left: -7px;
  background: var(--accent);
  transform: scale(0);
  transition: transform var(--dur-base) var(--ease) 320ms;
}
.eyebrow.is-in::before { transform: scaleX(1); }
.eyebrow.is-in::after  { transform: scale(1); }
.eyebrow--center { justify-content: center; }
.on-deep .eyebrow { color: var(--on-dark-strong); }

/* ==========================================================================
   ZWEIFARBIGE ÜBERSCHRIFT
   Hervorgehobene Wörter in Türkis. Die zeichenweise Staffelung baut
   JavaScript zur Laufzeit — im Quelltext stehen ganze Wörter, damit der
   Text für Suchmaschinen und Screenreader unversehrt bleibt.
   ========================================================================== */

/* inline (nicht inline-block), damit hervorgehobene Passagen normal umbrechen
   und keine verkürzten, versetzt wirkenden Überschriftenzeilen erzwingen */
.hl { color: var(--accent); display: inline; }
/* Jedes Wort bleibt eine Einheit — die zeichenweise Zerlegung darf keine
   Umbrüche innerhalb eines Wortes erzeugen. */
.word { white-space: nowrap; }
.char { display: inline-block; will-change: transform, opacity; }
.js .splitwords .char {
  opacity: 0;
  transform: translateX(40%) scaleX(.6) scaleY(1.2);
  transition: opacity var(--dur-char) var(--ease), transform var(--dur-char) var(--ease);
  transition-delay: calc(var(--c, 0) * 26ms);
}
.js .splitwords.is-in .char { opacity: 1; transform: none; }

/* Kicker — erste Zeile der zweiteiligen Überschrift der Bestandsseite */
.kicker {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  line-height: 1.3;
  color: var(--accent);
  margin-bottom: var(--s-3);
}

/* ==========================================================================
   REVEAL — gerichtete Einblendungen
   ========================================================================== */

.rv { opacity: 0; transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); transition-delay: calc(var(--i, 0) * var(--stagger)); }
.rv-up    { transform: translateY(34px); }
.rv-left  { transform: translateX(-46px); }
.rv-right { transform: translateX(46px); }
.rv-zoom  { transform: scale(.94); }
.rv.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .eyebrow::before { transform: scaleX(1); }
  .eyebrow::after { transform: scale(1); }
  .js .splitwords .char { opacity: 1; transform: none; transition: none; }
}
