/* ==========================================================================
   ls-base.css – Lübeck Sanieren · Variante 3 „Dachkante“
   Globale Tokens + Basis-Bausteine. Alles gescoped auf body.ls-site.

   Elementor-Hinweis: Klassen werden im Feld „CSS-Klassen“ (Tab Erweitert)
   gesetzt und landen am Widget-/Container-Wrapper. Deshalb sprechen die
   Regeln sowohl das Element selbst (PHP-Templates) als auch das innere
   Elementor-Element an (.elementor-heading-title, .elementor-button …).

   Container-Abstände werden über Elementors eigene Variablen gesetzt
   (--padding-*, --row-gap, --column-gap). So bleiben Werte, die im
   Elementor-Editor eingetragen werden, vorrangig.

   Inhalt
    1. Tokens
    2. Basis
    3. Fokus (V1)
    4. Typografie-Klassen
    5. Label
    6. Buttons
    7. Text-Links
    8. Maßband
    9. Layout (Wrap, Sektionen, Sektionskopf, Split)
   10. Kontext-Klassen (dunkel / Ocker)
   11. Reduzierte Bewegung
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  /* Farben – spiegeln die globalen Farben in Elementor */
  --ls-clr-ink: #121816;
  --ls-clr-ink2: #1A2220;
  --ls-clr-brand: #2ECC8F;
  --ls-clr-acc: #0C7A50;
  --ls-clr-ochre: #E2A32C;
  --ls-clr-onoc: #20180B;
  --ls-clr-onoc-80: rgba(32, 24, 11, .8);
  --ls-clr-onoc-78: rgba(32, 24, 11, .78);
  --ls-clr-onoc-40: rgba(32, 24, 11, .4);
  --ls-clr-onoc-22: rgba(32, 24, 11, .22);
  --ls-clr-bg: #EEF0EE;
  --ls-clr-bg2: #E5E8E5;
  --ls-clr-white: #FFFFFF;
  --ls-clr-soft: #616E69;
  --ls-clr-soft-bg2: #5A6762;          /* V3: Text auf Paper 2 */
  --ls-clr-soft2: #8A948F;             /* V2: nur noch Deko (Ticks, Grafik) */
  --ls-clr-line: #D6DBD7;
  --ls-clr-line-dk: #333D39;
  --ls-clr-ondk-60: rgba(255, 255, 255, .6);   /* V12 */
  --ls-clr-ondk-72: rgba(255, 255, 255, .72);
  --ls-clr-ondk-80: rgba(255, 255, 255, .8);
  --ls-clr-ondk-100: #FFFFFF;
  --ls-clr-ondk-l20: rgba(255, 255, 255, .2);
  --ls-clr-ondk-l22: rgba(255, 255, 255, .22);
  --ls-clr-ondk-l24: rgba(255, 255, 255, .24);
  --ls-clr-ondk-l42: rgba(255, 255, 255, .42);
  --ls-clr-ondk-l45: rgba(255, 255, 255, .45);
  --ls-clr-ondk-hov: #0A1410;
  --ls-clr-brand-50: rgba(46, 204, 143, .5);
  --ls-clr-acc-40: rgba(12, 122, 80, .4);
  --ls-clr-focus: #0C7A50;             /* V1: auf hellem Grund */
  --ls-clr-focus-dk: #FFFFFF;          /* V1: auf dunklem Grund */
  --ls-clr-focus-oc: #121816;          /* V1: auf Ocker */
  --ls-clr-err: #B42318;               /* Fehler (nicht im Template, freigegeben) */
  --ls-clr-err-bg: rgba(180, 35, 24, .06);
  --ls-clr-ok: #0C7A50;                /* Erfolg = Green-dk */
  --ls-clr-ok-bg: rgba(12, 122, 80, .08);

  /* Header */
  --ls-nav-h: 74px;
  --ls-nav-bg: rgba(238, 240, 238, .9);
  --ls-nav-line: rgba(214, 219, 215, .9);
  --ls-nav-hov: rgba(0, 0, 0, .04);

  /* Overlays */
  --ls-ovl-hero:
    linear-gradient(0deg, rgba(9,14,12,.82) 0%, rgba(9,14,12,.28) 26%, rgba(9,14,12,0) 52%),
    linear-gradient(100deg, rgba(9,14,12,.9) 0%, rgba(9,14,12,.62) 32%, rgba(9,14,12,.1) 66%, rgba(9,14,12,.24) 100%);
  --ls-ovl-phero: linear-gradient(95deg, rgba(9,14,12,.88) 0%, rgba(9,14,12,.6) 44%, rgba(9,14,12,.2) 100%);
  --ls-ovl-card: linear-gradient(180deg, rgba(9,14,12,.05) 0%, rgba(9,14,12,.5) 52%, rgba(9,14,12,.88) 100%);
  --ls-ovl-band: linear-gradient(90deg, rgba(8,20,16,.86) 0%, rgba(8,20,16,.55) 46%, rgba(8,20,16,.08) 100%);
  --ls-ovl-facts: rgba(7, 13, 11, .72);

  /* Schriften */
  --ls-font-disp: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --ls-font-sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Schriftgrößen */
  --ls-typ-d1: clamp(44px, 7.2vw, 102px);
  --ls-typ-d1s: clamp(38px, 5.6vw, 76px);
  --ls-typ-d2: clamp(31px, 4.4vw, 56px);
  --ls-typ-d3: clamp(21px, 2.3vw, 28px);
  --ls-typ-card: clamp(24px, 2.4vw, 32px);
  --ls-typ-d4: 19px;
  --ls-typ-d4t: 18.5px;
  --ls-typ-big: clamp(22px, 2.9vw, 35px);
  --ls-typ-lead: clamp(17px, 1.5vw, 20.5px);
  --ls-typ-body: 17px;
  --ls-typ-sm: 15px;
  --ls-typ-sm2: 15.5px;
  --ls-typ-xs: 14.5px;
  --ls-typ-cap: 13.5px;
  --ls-typ-num: clamp(30px, 3.4vw, 44px);
  --ls-typ-num-l: clamp(34px, 4vw, 52px);
  --ls-typ-amt: clamp(48px, 7vw, 86px);
  --ls-typ-lbl: 13.5px;
  --ls-typ-step: 15px;
  --ls-typ-faq: 20px;
  --ls-typ-nav: 14.5px;
  --ls-typ-fhead: 14px;
  --ls-btn-fs: 15px;
  --ls-lnk-fs: 14.5px;

  /* Form & Effekte */
  --ls-rad-s: 3px;
  --ls-rad-xs: 2px;
  --ls-shd-menu: 0 24px 44px rgba(10, 20, 16, .1);
  --ls-ease-rise: cubic-bezier(.2, .7, .2, 1);

  /* Layout */
  --ls-lay-max: 1240px;
  --ls-lay-gut: 28px;
  --ls-lay-sec-l: 82px;
  --ls-lay-sec-s: 52px;
  --ls-lay-head-w: 62ch;
  --ls-lay-head-mb: 38px;
  --ls-lay-head-gap: 16px;
  --ls-cta-gable: 96px;
}

@media (max-width: 900px) {
  :root { --ls-cta-gable: 56px; }
}

@media (max-width: 560px) {
  :root { --ls-lay-gut: 22px; }       /* V11 */
}

/* 2. Basis ---------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  html:has(> body.ls-site) { scroll-behavior: smooth; }
}
/* Sprungziele (#rechner, #pv-rechner …) nicht unter dem Sticky-Header */
html:has(> body.ls-site) { scroll-padding-top: 90px; }

body.ls-site {
  margin: 0;
  background: var(--ls-clr-bg);
  color: var(--ls-clr-ink);
  font-family: var(--ls-font-sans);
  font-size: var(--ls-typ-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

.ls-site :is(h1, h2, h3, h4) {
  margin: 0;
  font-family: var(--ls-font-disp);
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.02;
  text-wrap: balance;
}

.ls-site p { margin: 0; }
.ls-site .elementor-widget-text-editor p + p { margin-top: .9em; }

.ls-site a { color: inherit; text-decoration: none; }

/* Heading-Widget als Text (Tag p/span/div): Elementor setzt line-height 1 */
.ls-site :is(p, span, div).elementor-heading-title { line-height: 1.6; }

/* V16: Links im Fließtext erkennbar (WCAG 1.4.1) */
.ls-site .elementor-widget-text-editor a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}
.ls-site .elementor-widget-text-editor a:hover { color: var(--ls-clr-acc); }
.ls-site .ls-ondk .elementor-widget-text-editor a:hover { color: var(--ls-clr-brand); }

.ls-site [hidden] { display: none !important; }

/* 3. Fokus (V1) ----------------------------------------------------------- */
.ls-site :focus-visible {
  outline: 2px solid var(--ls-clr-focus);
  outline-offset: 3px;
  border-radius: var(--ls-rad-xs);
}

/* 4. Typografie-Klassen ---------------------------------------------------
   Im Editor: Klasse am Heading-/Text-Widget. Wird im Widget eine globale
   Schrift gewählt, gewinnt diese (identische Werte). */
.ls-site :is(.ls-d1, .ls-d1 .elementor-heading-title) {
  font-size: var(--ls-typ-d1);
  line-height: .94;
  letter-spacing: -.035em;
}
.ls-site :is(.ls-d1s, .ls-d1s .elementor-heading-title) {
  font-size: var(--ls-typ-d1s);
  line-height: .94;
  letter-spacing: -.035em;
  max-width: 15ch;
}
.ls-site :is(.ls-d2, .ls-d2 .elementor-heading-title) {
  font-size: var(--ls-typ-d2);
  line-height: 1.02;
  letter-spacing: -.03em;
}
.ls-site :is(.ls-d3, .ls-d3 .elementor-heading-title) {
  font-size: var(--ls-typ-d3);
  line-height: 1.12;
}
.ls-site :is(.ls-d-card, .ls-d-card .elementor-heading-title) {
  font-size: var(--ls-typ-card);
}
.ls-site :is(.ls-d4, .ls-d4 .elementor-heading-title) {
  font-size: var(--ls-typ-d4);
  line-height: 1.25;
}
.ls-site :is(.ls-big, .ls-big .elementor-heading-title, .ls-big p) {
  font-family: var(--ls-font-disp);
  font-weight: 500;
  font-size: var(--ls-typ-big);
  line-height: 1.24;
  letter-spacing: -.022em;
}
.ls-site :is(.ls-lead, .ls-lead p) {
  font-size: var(--ls-typ-lead);
  line-height: 1.55;
  color: var(--ls-clr-soft);
  max-width: 56ch;
}
.ls-site :is(.ls-lead--ondk, .ls-lead--ondk p) { color: var(--ls-clr-ondk-80); }

/* 5. Label ----------------------------------------------------------------
   Elementor: Heading-Widget, HTML-Tag „span“ oder „p“, Klasse ls-lbl */
.ls-site :is(span.ls-lbl, p.ls-lbl, .ls-lbl .elementor-heading-title) {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--ls-font-sans);
  font-size: var(--ls-typ-lbl);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0;
  color: var(--ls-clr-soft);
}
.ls-site :is(span.ls-lbl, p.ls-lbl, .ls-lbl .elementor-heading-title)::before {
  content: "";
  flex: none;
  width: 22px;
  height: 2px;
  background: var(--ls-clr-brand);
}
.ls-site :is(span.ls-lbl--ondk, p.ls-lbl--ondk, .ls-lbl--ondk .elementor-heading-title) {
  color: var(--ls-clr-ondk-72);
}

/* 6. Buttons --------------------------------------------------------------
   PHP/HTML:  <a class="ls-btn ls-btn--light"> bzw. <button type="button">
   Elementor: Button-Widget, CSS-Klassen „ls-btn“ (+ Variante),
              im Stil-Tab nichts einstellen. */
.ls-site :is(a, button).ls-btn,
.ls-site .ls-btn .elementor-button {
  --_bg: var(--ls-clr-ink);
  --_fg: #fff;
  --_bd: var(--ls-clr-ink);
  --_bg-h: var(--ls-clr-acc);
  --_fg-h: #fff;
  --_bd-h: var(--ls-clr-acc);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 13px 22px;
  background: var(--_bg);
  color: var(--_fg);
  border: 1.5px solid var(--_bd);
  border-radius: var(--ls-rad-s);
  font-family: var(--ls-font-sans);
  font-size: var(--ls-btn-fs);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s, color .18s, border-color .18s;
}
.ls-site :is(a, button).ls-btn:hover,
.ls-site .ls-btn .elementor-button:hover {
  background: var(--_bg-h);
  color: var(--_fg-h);
  border-color: var(--_bd-h);
}
.ls-site .ls-btn .elementor-button .elementor-button-content-wrapper { gap: 9px; }

.ls-site :is(a, button).ls-btn--ghost,
.ls-site .ls-btn--ghost .elementor-button {
  --_bg: transparent; --_fg: var(--ls-clr-ink); --_bd: var(--ls-clr-line);
  --_bg-h: var(--ls-clr-ink); --_fg-h: #fff; --_bd-h: var(--ls-clr-ink);
}
.ls-site :is(a, button).ls-btn--light,
.ls-site .ls-btn--light .elementor-button {
  --_bg: #fff; --_fg: var(--ls-clr-ink); --_bd: #fff;
  --_bg-h: var(--ls-clr-brand); --_fg-h: var(--ls-clr-ondk-hov); --_bd-h: var(--ls-clr-brand);
}
.ls-site :is(a, button).ls-btn--ol-dk,
.ls-site .ls-btn--ol-dk .elementor-button {
  --_bg: transparent; --_fg: #fff; --_bd: var(--ls-clr-ondk-l42);
  --_bg-h: #fff; --_fg-h: var(--ls-clr-ink); --_bd-h: #fff;
}

/* 7. Text-Links („… ansehen“) --------------------------------------------- */
.ls-site :is(a.ls-lnk, span.ls-lnk, .ls-lnk .elementor-heading-title) {
  --_c: var(--ls-clr-brand);
  --_l: var(--ls-clr-brand-50);
  display: inline-block;
  align-self: flex-start;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--_l);
  color: var(--_c);
  font-family: var(--ls-font-sans);
  font-size: var(--ls-lnk-fs);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0;
}
.ls-site :is(a.ls-lnk--acc, span.ls-lnk--acc, .ls-lnk--acc .elementor-heading-title) {
  --_c: var(--ls-clr-acc);
  --_l: var(--ls-clr-acc-40);
}
.ls-site :is(a.ls-lnk--onoc, span.ls-lnk--onoc, .ls-lnk--onoc .elementor-heading-title) {
  --_c: var(--ls-clr-onoc);
  --_l: var(--ls-clr-onoc-40);
}

/* 8. Maßband (Deko-Lineal) ------------------------------------------------
   Elementor: leerer Container, Klasse ls-tape (bzw. ls-tape ls-tape--ondk) */
.ls-site .ls-tape {
  --_t1: var(--ls-clr-line);
  --_t2: var(--ls-clr-soft2);
  --_base: var(--ls-clr-line);
  --padding-top: 0px; --padding-bottom: 0px; --padding-left: 0px; --padding-right: 0px;
  --min-height: 20px;
  height: 20px;
  min-height: 20px;
  padding: 0;
  background:
    repeating-linear-gradient(90deg, var(--_t1) 0 1px, transparent 1px 14px) bottom / 100% 8px no-repeat,
    repeating-linear-gradient(90deg, var(--_t2) 0 1px, transparent 1px 70px) bottom / 100% 16px no-repeat,
    linear-gradient(var(--_base), var(--_base)) bottom / 100% 1px no-repeat;
}
.ls-site .ls-tape--ondk {
  --_t1: var(--ls-clr-ondk-l22);
  --_t2: var(--ls-clr-ondk-l45);
  --_base: var(--ls-clr-ondk-l22);
}

/* 9. Layout ---------------------------------------------------------------
   Aufbau in Elementor: äußerer Container „Volle Breite“ mit ls-sec /
   ls-sec-s, darin ein Container mit ls-wrap. */
.ls-site .ls-wrap {
  --padding-left: var(--ls-lay-gut);
  --padding-right: var(--ls-lay-gut);
  width: 100%;
  max-width: var(--ls-lay-max);
  margin-left: auto;
  margin-right: auto;
}
.ls-site .ls-wrap:not(.e-con) {
  padding-left: var(--ls-lay-gut);
  padding-right: var(--ls-lay-gut);
}

.ls-site .ls-sec   { --padding-top: var(--ls-lay-sec-l); --padding-bottom: var(--ls-lay-sec-l); }
.ls-site .ls-sec-s { --padding-top: var(--ls-lay-sec-s); --padding-bottom: var(--ls-lay-sec-s); }
.ls-site .ls-sec:not(.e-con)   { padding-top: var(--ls-lay-sec-l); padding-bottom: var(--ls-lay-sec-l); }
.ls-site .ls-sec-s:not(.e-con) { padding-top: var(--ls-lay-sec-s); padding-bottom: var(--ls-lay-sec-s); }

.ls-site .ls-head {
  --row-gap: var(--ls-lay-head-gap);
  --column-gap: var(--ls-lay-head-gap);
  --flex-direction: column;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--ls-lay-head-gap);
  max-width: var(--ls-lay-head-w);
  margin-bottom: var(--ls-lay-head-mb);
}

/* Split: Label links, Inhalt rechts (Startseite, Über uns) */
.ls-site .ls-split {
  display: grid;
  grid-template-columns: .72fr 2fr;
  gap: 44px;
  align-items: start;
}
@media (max-width: 860px) {
  .ls-site .ls-split { grid-template-columns: 1fr; gap: 18px; }
}

/* 10. Kontext-Klassen ------------------------------------------------------
   ls-ondk  = Fläche dunkel (Hero, Foto-Band, Kontaktinfo, CTA, Footer)
   ls-onoc  = Fläche Ocker (Wärmepumpe-Karte, Prämie)
   Setzen Text- und Fokusfarbe für alles darin. */
.ls-site .ls-ondk { color: #fff; }
.ls-site .ls-ondk :focus-visible,
.ls-site .ls-ondk:focus-visible { outline-color: var(--ls-clr-focus-dk); }

.ls-site .ls-onoc { color: var(--ls-clr-onoc); }
.ls-site .ls-onoc :focus-visible,
.ls-site .ls-onoc:focus-visible { outline-color: var(--ls-clr-focus-oc); }

/* Screenreader-only (z. B. für versteckte Labels) */
.ls-site .ls-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 11. Reduzierte Bewegung ------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .ls-site *,
  .ls-site *::before,
  .ls-site *::after {
    animation: none !important;
    transition: none !important;
  }
}
