/* W4Live – gemeinsame Vorlage für alle Unterseiten.
   CI-Richtlinien, dezent: Graustufen tragen, Rot nur als Akzent, Cyan/Grün nur in Diagrammen.
   Schrift: Hausschrift sobald freigegeben, bis dahin Archivo (Headlines) und Inter (Text). Standard dunkel. */
:root {
  --w-red: #CC0000; --w-black: #000; --w-dark: #605D5C; --w-grey: #959595; --w-light: #DEDEDE; --w-white: #fff;
  --bg: #0b0b0b; --stage: #000; --surface: #151515; --sunken: #1d1d1d; --ink: #f4f4f4; --muted: #a9a7a6; --faint: #6f6d6c;
  --line: #2a2928; --accent: #E0302A; --accent-soft: rgba(204, 0, 0, .14);
  --good: #b9c900; --warn: #e0a43a;
  /* Diagramme (validiert gegen die Fläche, siehe dataviz-Check) */
  --c1: #009EE0; --c2: #8c9a00; --grid: rgba(255, 255, 255, .07);
  --f-head: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --r: 14px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f5f5f5; --stage: #fff; --surface: #fff; --sunken: #f0f0f0; --ink: #000; --muted: var(--w-dark); --faint: var(--w-grey);
    --line: var(--w-light); --accent: var(--w-red); --accent-soft: rgba(204, 0, 0, .06);
    --good: #6b7500; --warn: #9a6200; --c1: #0088c2; --c2: #8a9600; --grid: rgba(0, 0, 0, .07);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f5f5f5; --stage: #fff; --surface: #fff; --sunken: #f0f0f0; --ink: #000; --muted: var(--w-dark); --faint: var(--w-grey);
  --line: var(--w-light); --accent: var(--w-red); --accent-soft: rgba(204, 0, 0, .06);
  --good: #6b7500; --warn: #9a6200; --c1: #0088c2; --c2: #8a9600; --grid: rgba(0, 0, 0, .07);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: url('../bilder/linien-textur.svg') 0 0/140px repeat, var(--bg); color: var(--ink); font: 16px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--f-head); font-stretch: 80%; font-weight: 800; letter-spacing: -.005em; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.05; }
h3 { font-size: 21px; font-stretch: 85%; font-weight: 700; line-height: 1.2; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.wrap { max-width: 1160px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 40px); }

/* Kopfleiste mit Logo, Ökoversum-Standort und Hell/Dunkel */
.bar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--stage) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { font-family: var(--f-head); font-stretch: 80%; font-weight: 800; font-size: 22px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.brand span { color: inherit; font-weight: 600; }
.brand .dot { display: inline-block; width: .3em; height: .3em; margin: 0 .16em 0 .14em; vertical-align: .14em; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #ff7a73 0, #e01a12 28%, #CC0000 55%, #6e0000 100%); box-shadow: 0 0 .32em rgba(204,0,0,.55); animation: w4live 2.6s ease-in-out infinite; }
@keyframes w4live { 50% { box-shadow: 0 0 .08em rgba(204,0,0,.25); transform: scale(.82); } }
.eco { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; text-decoration: none; color: var(--muted); font-size: 13px; }
.eco svg { width: 40px; height: 40px; flex: none; }
.eco svg .o { fill: none; stroke: var(--line); }
.eco svg .n { fill: var(--sunken); stroke: var(--faint); stroke-width: 1; }
.eco svg .n.on { fill: var(--w-red); stroke: var(--w-red); }
.eco svg .c { fill: var(--ink); }
.eco b { color: var(--ink); font-weight: 600; }
.eco span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eco:hover b { text-decoration: underline; text-decoration-color: var(--accent); }
.theme { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13px; cursor: pointer; flex: none; }
.theme:hover { color: var(--ink); }

/* Hero */
.hero { background: var(--stage); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.hero .wrap { padding-block: clamp(40px, 7vw, 88px) clamp(36px, 6vw, 72px); position: relative; }
.hero .waves { position: absolute; right: -10%; bottom: -35%; width: 80%; height: 120%; opacity: .55; pointer-events: none; }
.hero .waves path { fill: none; stroke: var(--line); }
.kicker { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 12px; }
.kicker::before { content: ""; width: 28px; height: 2px; background: var(--accent); flex: none; }
.hero h1 { font-size: clamp(38px, 6.2vw, 76px); line-height: .98; margin: 16px 0 16px; max-width: 14ch; }
.hero .lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 56ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 12px; padding: 12px 22px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 15px; font-weight: 500; background: transparent; cursor: pointer; font-family: inherit; transition: border-color .2s, background .2s; }
.btn::after { content: "→"; color: var(--accent); transition: transform .2s; }
.btn:hover, .btn:focus-visible { border-color: var(--accent); outline: none; }
.btn:hover::after { transform: translateX(3px); }
.btn.primary { background: var(--w-red); border-color: var(--w-red); color: #fff; }
.btn.primary::after { color: #fff; }
.btn.primary:hover { background: #b00000; }

/* Abschnitte */
section.block { padding-block: clamp(44px, 7vw, 88px); border-bottom: 1px solid var(--line); }
section.block > .wrap > header { margin-bottom: 28px; display: grid; gap: 10px; }
section.block > .wrap > header p { color: var(--muted); max-width: 64ch; }

/* Kennzahlen */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.kpi { background: var(--surface); padding: 20px 22px; display: grid; gap: 4px; align-content: start; }
.kpi .v { font-family: var(--f-head); font-stretch: 78%; font-weight: 800; font-size: clamp(32px, 3.6vw, 44px); line-height: 1; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: .5em; font-weight: 700; margin-left: 3px; }
.kpi .s { font-size: 14px; color: var(--muted); }
.kpi.accent { box-shadow: inset 3px 0 0 var(--accent); }

/* Karten & Raster */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: grid; gap: 12px; align-content: start; }
.card p, .card li { color: var(--muted); font-size: 15px; }
.card ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.card .price { font-family: var(--f-head); font-stretch: 78%; font-weight: 800; font-size: 40px; line-height: 1; }
.card .price small { font-family: var(--f-body); font-size: 14px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.card.feature { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.badge { justify-self: start; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; color: var(--muted); }

/* Schritte */
.steps { counter-reset: s; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.step { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-top: 2px solid var(--line); border-radius: var(--r); padding: 22px; display: grid; gap: 8px; align-content: start; }
.step::before { content: counter(s, decimal-leading-zero); font-family: var(--f-head); font-stretch: 78%; font-weight: 800; font-size: 15px; color: var(--accent); }
.step:first-child { border-top-color: var(--accent); }
.step p { color: var(--muted); font-size: 15px; }

/* Checkliste */
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; color: var(--ink); }
.checks li::before { content: ""; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; border: 1.5px solid var(--good); background: radial-gradient(circle, var(--good) 0 3px, transparent 4px); }
.checks li small { display: block; color: var(--muted); font-size: 14px; }

/* Hinweis */
.note { border-left: 2px solid var(--accent); padding: 12px 16px; background: var(--accent-soft); border-radius: 0 10px 10px 0; font-size: 15px; }
.note b { font-weight: 600; }
.fine { font-size: 13px; color: var(--faint); }

/* Diagramm: horizontale Balken (eine Reihe) */
.chart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: grid; gap: 14px; position: relative; }
.chart h3 { font-size: 18px; }
.chart .sub { font-size: 14px; color: var(--muted); margin-top: -8px; }
.hbars { display: grid; gap: 12px; }
.hbar { display: grid; grid-template-columns: minmax(110px, 160px) 1fr; gap: 14px; align-items: center; font-size: 14px; }
.hbar .lab { color: var(--muted); }
.hbar .track { position: relative; height: 22px; background: linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 25% 100%; }
.hbar .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--c1); border-radius: 0 4px 4px 0; transform-origin: left; animation: grow 1s cubic-bezier(.2,.7,.2,1) both; }
.hbar .val { position: absolute; top: 50%; transform: translateY(-50%); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 8px; }
.hbar:hover .fill { filter: brightness(1.12); }
@keyframes grow { from { transform: scaleX(0); } }
.chart details { font-size: 14px; color: var(--muted); }
.chart summary { cursor: pointer; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* Gestapelter Balken (2 Reihen) */
.stack { display: flex; gap: 2px; height: 24px; }
.stack div { height: 100%; transition: flex-basis .4s cubic-bezier(.2,.7,.2,1); min-width: 0; }
.stack div:first-child { border-radius: 4px 0 0 4px; }
.stack div:last-child { border-radius: 0 4px 4px 0; }
.stack div:only-child { border-radius: 4px; }

/* Tabellen */
table.t { width: 100%; border-collapse: collapse; font-size: 15px; }
table.t th, table.t td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t th { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
table.t td.num, table.t th.num { text-align: right; }
.tablewrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }

/* Formularelemente / Rechner */
.calc { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; }
.field label { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--muted); }
.field output { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
/* Schieberegler dezent: graue Spur, nur der Knopf in Rot */
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; margin: 0; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: var(--line); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 3px; background: var(--line); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6.5px; border-radius: 50%; background: var(--surface); border: 2px solid var(--w-red); }
input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--w-red); }
input[type="range"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.fields { display: grid; gap: 18px; }

/* Tooltip */
.tip { position: fixed; z-index: 50; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.35); opacity: 0; transition: opacity .12s; }
.tip.on { opacity: 1; }
.tip b { font-weight: 600; }

/* Weiter-Navigation & Fuß */
.next { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.next a { text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; display: grid; gap: 4px; transition: border-color .2s; }
.next a:hover { border-color: var(--accent); }
.next a small { color: var(--muted); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.next a b { font-family: var(--f-head); font-stretch: 82%; font-size: 22px; }
footer.foot { padding-block: 36px 48px; font-size: 13px; color: var(--faint); }
footer.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Sprungziele nicht unter den klebenden Leisten verstecken */
section[id], [id].card { scroll-margin-top: 120px; }

/* Platz für den Chat-Knopf unten rechts */
footer.foot { padding-bottom: 96px; }

/* Interesse-Formular (js/interesse.js) */
.iform { gap: 16px; }
.iform fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.iform legend { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.ichoice { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.ichoice label { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; background: var(--sunken); }
.ichoice label:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ichoice input { accent-color: var(--w-red); margin: 4px 0 0; }
.ichoice b { font-weight: 600; display: block; font-size: 15px; }
.ichoice small { color: var(--muted); font-size: 13px; }
.irow { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.ifield { display: grid; gap: 6px; }
.ifield label { font-size: 14px; color: var(--muted); }
.ifield .opt { font-size: 12px; color: var(--faint); }
.ifield input, .ifield select, .ifield textarea { width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: var(--sunken); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.ifield input:focus-visible, .ifield select:focus-visible, .ifield textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ifield small { font-size: 13px; color: var(--muted); }
.icode input { font-family: var(--f-head); font-stretch: 85%; font-weight: 700; font-size: 22px; letter-spacing: .08em; }
.ierr { color: var(--accent); font-size: 14px; }
.iform .btn.primary { justify-self: start; }
.idone { border-left: 2px solid var(--good); padding: 12px 16px; background: var(--sunken); border-radius: 0 10px 10px 0; font-size: 15px; display: grid; gap: 10px; justify-items: start; }

/* Branchen-Kacheln */
.btiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 16px; }
.btile { position: relative; display: grid; gap: 12px; align-content: start; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; transition: border-color .2s, transform .2s; }
.btile:hover, .btile:focus-visible { border-color: var(--accent); transform: translateY(-2px); outline: none; }
.btile.first { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.btile .no { position: absolute; top: 16px; right: 18px; font-family: var(--f-head); font-stretch: 78%; font-weight: 800; font-size: 14px; color: var(--faint); }
.btile svg.ico { width: 46px; height: 46px; stroke: var(--ink); fill: none; stroke-width: 1.6; }
.btile svg.ico .accent { stroke: var(--w-red); }
.btile h3 { font-size: 24px; }
.btile p { color: var(--muted); font-size: 15px; }
.btile .spark { width: 100%; height: 54px; }
.btile .spark path.l { fill: none; stroke: var(--c1); stroke-width: 1.6; }
.btile .spark path.a { fill: color-mix(in srgb, var(--c1) 14%, transparent); stroke: none; }
.btile .mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.btile .mini b { display: block; font-family: var(--f-head); font-stretch: 80%; font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; }
.btile .mini span { font-size: 12px; color: var(--muted); }
.btile .go { font-size: 14px; font-weight: 600; display: inline-flex; gap: 8px; }
.btile .go::after { content: "→"; color: var(--accent); transition: transform .2s; }
.btile:hover .go::after { transform: translateX(4px); }

/* Bezugshinweis zur W4 */
.avail { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 14px; font-weight: 600; color: var(--ink); }
.avail::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--w-red); box-shadow: 0 0 8px rgba(204,0,0,.55); flex: none; }
.avail a { text-decoration: none; }
.avail a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
section.block > .wrap > header p.avail { color: var(--ink); }
