/* ============================================================
   resamp — Theme-Sync / theme.css  (wird auf allen Seiten zuletzt geladen)
   Die ganze Seite morpht beim Scrollen zwischen Hell und Dunkel
   (body.is-bg-dark). Damit dabei nie Text in Hintergrundfarbe entsteht:
   1. Transparente Bereiche übernehmen ihre Textfarben vom Seitenhintergrund.
   2. Elemente mit eigener Fläche (helle Karten, dunkle Kacheln) bringen
      ihre passenden Farben selbst mit – egal, wie die Seite gerade aussieht.
   ============================================================ */

/* ---- Hell (Standard) ----------------------------------------- */
:root {
  --fg-faint: rgba(11, 11, 12, .46);   /* vorher .34 – war zu blass */
  --fg-inverse: var(--bone);
  --lime-text: #2f8f1f;                /* Lime-Akzent, auf hellem Grund lesbar */
  --lime-head: var(--ink);             /* Lime-Überschriftswort: dunkel + Marker */
  --mark: var(--lime);                 /* Textmarker hinter Lime-Akzentwörtern */
  --violet-text: var(--violet-600);
}

/* ---- Seite dunkel → alle Tokens auf hell ---------------------- */
body.is-bg-dark {
  --fg: var(--bone);
  --fg-muted: rgba(244, 243, 238, .7);
  --fg-faint: rgba(244, 243, 238, .46);
  --fg-inverse: var(--ink);
  --line: var(--line-invert);
  --line-strong: rgba(255, 255, 255, .26);
  --bg-raised: var(--ink-800);
  --lime-text: var(--lime);
  --lime-head: var(--lime);
  --mark: transparent;
  --violet-text: var(--violet);
}

/* ---- 1) Transparente Scroll-Akte folgen der Seite -------------
   (Projekte, Prozess, Footer, Druck-Section …: früher fest hell
   beschriftet → auf noch hellem Grund unsichtbar) */
[data-bg-dark] {
  --fg: inherit; --fg-muted: inherit; --fg-faint: inherit; --fg-inverse: inherit;
  --line: inherit; --line-strong: inherit; --bg: inherit; --bg-raised: inherit;
  --lime-text: inherit; --lime-head: inherit; --mark: inherit; --violet-text: inherit;
  color: var(--fg);
}
.site-footer a:not(.btn) { color: var(--fg); }
.process__intro h2 { color: var(--fg); }
.pressure__text, .pressure__ready { color: var(--fg); }
.pressure__text .pw--accent { color: var(--lime-text); }

/* ---- 2a) Immer dunkle Flächen --------------------------------- */
.step-card,
.on-dark:not([data-bg-dark]),
.mega__promo,
.rs-frame,
.lp-player,
.lp-step--first {
  --fg: var(--bone);
  --fg-muted: rgba(244, 243, 238, .7);
  --fg-faint: rgba(244, 243, 238, .46);
  --fg-inverse: var(--ink);
  --line: var(--line-invert);
  --line-strong: rgba(255, 255, 255, .26);
  --lime-text: var(--lime);
  --lime-head: var(--lime);
  --mark: transparent;
  --violet-text: var(--violet);
  color: var(--fg);
}

/* ---- 2b) Immer helle Flächen ---------------------------------- */
.mega,
.lp-check__item,
.lp-check__result.is-hit,
.lp-contrast__col--before,
.lp-quote,
.lp-step:not(.lp-step--first),
.lp-gets,
.lp-g,
.lp-guarantee > .container,
.guarantee-panel,
.guarantee-card {
  --fg: var(--ink);
  --fg-muted: rgba(11, 11, 12, .6);
  --fg-faint: rgba(11, 11, 12, .46);
  --fg-inverse: var(--bone);
  --line: rgba(11, 11, 12, .12);
  --line-strong: rgba(11, 11, 12, .22);
  --bg-raised: var(--paper);
  --lime-text: #2f8f1f;
  --lime-head: var(--ink);
  --mark: var(--lime);
  --violet-text: var(--violet-600);
  color: var(--fg);
}

/* ---- Akzentfarben, die auf Hell unlesbar waren ---------------- */
/* Lime-Wort in Überschriften: auf Dunkel lime, auf Hell dunkel mit Lime-Marker */
.tx-lime,
.quote .hl {
  color: var(--lime-head);
  background-image: linear-gradient(var(--mark), var(--mark));
  background-repeat: no-repeat; background-size: 100% .3em; background-position: 0 90%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.split-feature__list .k,
.value-card__no { color: var(--lime-text); }
.tx-violet,
.prose a,
.faq__item.is-open .faq__q { color: var(--violet-text); }

/* ---- Startseiten-Resampler: Schalter auf hellem und dunklem Grund lesbar */
.rs-side { color: var(--fg-muted); }
.rs-side:hover { color: var(--fg); }
.hero__resampler:not(.is-on) .rs-side[data-set="off"] { color: var(--fg); }
.hero__resampler.is-on .rs-side[data-set="on"] { color: var(--lime-text); }
.rs-toggle { background: var(--line); border-color: var(--line-strong); }
.hero__resampler:not(.is-on) .rs-knob { background: var(--fg); }
.hero__resampler:not(.is-on) .rs-knob svg { color: var(--fg-inverse); opacity: .6; }

/* ---- Violetter CTA-Block: eine Stufe dunkler, damit weißer Text lesbar ist
   (vorher Kontrast ~2,5, jetzt ~4,8) ---- */
.cta { background: var(--violet-600); }

/* ---- Große Blüten-Kontur im Hero: auf Handy/Tablet ausgeblendet
   (liegt dort über Text und Schalter) ---- */
@media (max-width: 1024px) {
  .hero__bigclover { display: none; }
}

/* ---- Resampler-Vorteile auf dem Handy: eine Spalte, je Satz eine Zeile ---- */
@media (max-width: 600px) {
  .rs-gains { grid-template-columns: auto; justify-content: center; gap: .5rem; }
  .rs-gains li { font-size: .9rem; }
}

/* ---- Tippflächen auf Touch-Geräten: mind. ~44 px, Optik bleibt gleich ---- */
@media (pointer: coarse), (max-width: 1024px) {
  .rs-side { padding-block: .75rem; }
  .rs-toggle::after { content: ""; position: absolute; inset: -8px; }
  .arrow-link { padding-block: .7rem; }
  .page-hero__crumbs a { display: inline-block; padding-block: .75rem; margin-block: -.75rem; }
  .footer-contact a, .footer-col a { display: inline-block; padding-block: .55rem; }
  .footer-bottom__legal a { display: inline-block; padding-block: .75rem; }
}
