/* ============================================================
   KÖRPERLOTSEN – Section-Flow
   Wiederverwendbare Section-Klassen mit Bg-Wechsel-Pattern.
   Nutzung auf allen Subpages. Auf der Landing Page (Liquid-
   Stack) nicht relevant.
   ============================================================ */

/* Alle Selektoren mit .is-subpage prefix → opt-in via body class.
   Verhindert Override der Legacy-Section-Styles in global.css auf
   Pages, die noch nicht auf die Liquid-Foundation migriert sind. */

.is-subpage .section {
  position: relative;
  padding-block: var(--space-20);
}

@media (max-width: 900px) {
  .is-subpage .section {
    padding-block: var(--space-12);
  }
}

.is-subpage .section--lg {
  padding-block: calc(var(--space-20) * 1.5);
}

.is-subpage .section--sm {
  padding-block: var(--space-12);
}

/* --- Bg-Klassen --- */

.is-subpage .section--offwhite {
  background-color: var(--color-offwhite);
  color: var(--color-petrol);
}

.is-subpage .section--mint {
  background-color: var(--color-mint);
  color: var(--color-offwhite);
}

.is-subpage .section--petrol {
  background-color: var(--color-petrol);
  color: var(--color-offwhite);
}

/* --- Headline-Komponente --- */

.is-subpage .section-headline {
  margin-bottom: var(--space-10);
}

.is-subpage .section-headline .eyebrow {
  margin-bottom: var(--space-2);
}

.is-subpage .section-headline__title {
  margin-bottom: var(--space-4);
  font-family: var(--font-headline);
  letter-spacing: -0.02em;
  line-height: 1.15;
  /* Ohne explizite Größe erbte der Titel den globalen h2-Clamp
     (bis text-7xl ≈ 96px) und erschlug damit die H1 jeder Subpage.
     Auf H2-Niveau begrenzen; Sonderrollen (.section--lead als
     Seitentitel, .termin-section) überschreiben per höherer Spezifität. */
  font-size: clamp(var(--text-2xl), 3.5vw, var(--text-4xl));
}

.is-subpage .section-headline__bar {
  display: block;
  width: 64px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
}

/* Bar in mint/petrol-Sections bleibt rot — bewusst, Akzent. */

/* --- Color-Overrides für Mint/Petrol-Sections --- */

.is-subpage .section--mint .eyebrow,
.is-subpage .section--petrol .eyebrow {
  color: color-mix(in oklab, var(--color-offwhite) 60%, transparent);
}

.is-subpage .section--mint h2,
.is-subpage .section--mint h3,
.is-subpage .section--petrol h2,
.is-subpage .section--petrol h3 {
  color: var(--color-offwhite);
}

.is-subpage .section--mint p,
.is-subpage .section--petrol p {
  color: color-mix(in oklab, var(--color-offwhite) 90%, transparent);
}

/* Cards in mint/petrol-Sections: type-selector-Regeln oben (h3, p)
   haben Spezifität 0,2,1 und schlagen card.css (0,2,0). Explizit
   zurücksetzen damit card-interne Farben korrekt bleiben. */
.is-subpage .section--mint .card__title,
.is-subpage .section--petrol .card__title {
  color: var(--color-petrol);
}

.is-subpage .section--mint .card__text,
.is-subpage .section--petrol .card__text {
  color: color-mix(in oklab, var(--color-petrol) 80%, transparent);
}

.is-subpage .section--mint .card__meta,
.is-subpage .section--petrol .card__meta {
  color: var(--color-mint);
}

/* --- Optional: Blob-Deko --- */

.is-subpage .section--with-blob {
  overflow: hidden;
}

.is-subpage .section--with-blob::before {
  content: "";
  position: absolute;
  width: 60vw;
  max-width: 700px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    color-mix(in oklab, var(--color-mint) 100%, transparent) 0%,
    transparent 70%
  );
  opacity: 0.06;
  top: 10%;
  right: -15%;
  pointer-events: none;
  z-index: 0;
}

.is-subpage .section--with-blob > .container {
  position: relative;
  z-index: 1;
}
