/*
 * Schuster Baustellenseite
 * © 2026 Schuster Energieversorgungssysteme GmbH & Co. KG
 * Entwickelt von Mario Schuster · m.schuster@schuster-energie.de
 */

:root {
  --hintergrund: #ffffff;
  /* Blaupause im Hintergrund: Zeichenpapier mit Linien in Pausblau */
  --bp-papier: #f5f8fd;
  --bp-fein: rgba(29, 78, 156, 0.06);
  --bp-grob: rgba(29, 78, 156, 0.11);
  --bp-linie: rgba(29, 78, 156, 0.34);
  --bp-duenn: rgba(29, 78, 156, 0.26);
  --bp-schrift: rgba(29, 78, 156, 0.5);
  --text: #23252f;
  --text-leise: #6b6c73;
  --logo-schrift: #23252f;
  --welle: #8c1a37;
  --kran: #23252f;
  --kran-fenster: #ffffff;
  --boden: #d9d9de;
  --pille-rand: #23252f;
  --pille-hover: #8c1a37;
  --blase: #ffffff;
  --blase-rand: #23252f;
  --arm: #3d3c3f;
  --deko-rand: rgba(35, 37, 47, 0.35);
  --beton: #b4b8be;
  --fuss: #3d3c3f;
  --linie: #e4e4e8;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Schuster-Dunkelgrau (Hausfarbe #3D3C3F); die Blaupause liegt auf demselben Grau,
       damit die Szene nahtlos in die Seite übergeht */
    --hintergrund: #3d3c3f;
    --bp-papier: #3d3c3f;
    --bp-fein: rgba(214, 226, 245, 0.06);
    --bp-grob: rgba(214, 226, 245, 0.1);
    --bp-linie: rgba(214, 226, 245, 0.26);
    --bp-duenn: rgba(214, 226, 245, 0.19);
    --bp-schrift: rgba(214, 226, 245, 0.42);
    --text: #ececef;
    --text-leise: #bdbdc2;
    --logo-schrift: #ffffff;
    --welle: #b3284c;
    --kran: #c9cad1;
    --kran-fenster: #3d3c3f;
    --boden: #605f64;
    --pille-rand: #ececef;
    --pille-hover: #e0546f;
    --blase: #2e2d30;
    --blase-rand: #ececef;
    --linie: #56555a;
    --arm: #c9cad1;
    --deko-rand: rgba(255, 255, 255, 0);
    --beton: #6f737b;
    --fuss: #7a797e;
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--hintergrund);
  color: var(--text);
  font-family: Calibri, Carlito, "Segoe UI", Arial, Helvetica, sans-serif;
  line-height: 1.45;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }

/* ---------- Baustelle ---------- */

.baustelle {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 16px 24px;
}

#szene {
  display: block;
  width: 100%;
  max-width: 1400px;
  max-height: 74vh;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
  cursor: grab;
}
#szene.fertig { cursor: grab; }
#szene.greift { cursor: grabbing; }
#szene:focus-visible { outline: 3px dashed var(--welle); outline-offset: 4px; border-radius: 12px; }

.buchstaben path, .buchstaben rect { fill: var(--logo-schrift) !important; }

.welle, .welle-fest { fill: var(--welle); }

.schlitz {
  fill: none;
  stroke: var(--welle);
  stroke-width: 3.5;
  stroke-dasharray: 9 7;
  opacity: 0.55;
  animation: schlitz-puls 1.6s ease-in-out infinite;
}
.schlitz.nah { opacity: 1; stroke-width: 5; fill: var(--welle); fill-opacity: 0.12; }
.fertig .schlitz { display: none; }

@keyframes schlitz-puls {
  50% { opacity: 0.2; }
}

.kran-linie { fill: none; stroke: var(--kran); stroke-linecap: round; stroke-linejoin: round; }
.kran-flaeche { fill: var(--kran); }
.kran-fenster { fill: var(--kran-fenster); }
.boden { stroke: var(--boden); stroke-width: 4; stroke-linecap: round; }

.bot { cursor: pointer; transition: opacity 0.6s; }
.bot.frei .arbeit { display: none; }
/* An der Leiter von hinten: kein Gesicht, dafür der Warnstreifen auf dem Rücken */
.bot .rueckenstreifen { display: none; }
.bot.ruecken .rueckenstreifen { display: inline; }
.bot.ruecken .augen, .bot.ruecken .augen-froh, .bot.ruecken .schweissbrille circle, .bot.ruecken .schweissbrille ellipse { display: none; }
/* Chef: Zeigearm bis die Welle sitzt, danach ein normaler Arm */
.bot--chef .normalarm, #szene.fertig .bot--chef .zeigearm { display: none; }
#szene.fertig .bot--chef .normalarm { display: inline; } /* vom Buchstaben gefallen, Werkzeug liegt am Boden */
.bot .augen-froh { display: none; }
.bot.froh .augen-froh { display: inline; }
.bot.froh .augen { display: none; }
.schweissbrille { transition: transform 0.25s; }
.bot.froh .schweissbrille { transform: translateY(-13px); } /* beim Freuen hochgeschoben */
.klammern path { fill: none; stroke: #8d959c; stroke-width: 1.6; }
.strich { fill: none; stroke: var(--arm); stroke-linecap: round; }
.gesicht { fill: none; stroke: var(--auge, #2a2c35); stroke-linecap: round; }
.auge { fill: var(--auge, #2a2c35); }
.fuss { fill: var(--fuss); }
.werkzeug { fill: none; stroke: #8a6a4a; stroke-linecap: round; }
.metall { fill: #6b6c73; }
.deko-rand { stroke: var(--deko-rand); stroke-width: 1.5; }
.blinklicht { animation: blinken 1.1s steps(1) infinite; }
@keyframes blinken { 50% { opacity: 0.2; } }
.bp-papier { fill: var(--bp-papier); }
#blaupause path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
#blaupause .bp-fein { stroke: var(--bp-fein); stroke-width: 0.6; }
#blaupause .bp-grob { stroke: var(--bp-grob); stroke-width: 0.9; }
#blaupause .bp-linie { stroke: var(--bp-linie); stroke-width: 1.1; }
#blaupause .bp-duenn { stroke: var(--bp-duenn); stroke-width: 0.6; }
#blaupause .bp-strich { stroke: var(--bp-duenn); stroke-width: 0.6; stroke-dasharray: 4 2.5; }
#blaupause .bp-achse { stroke: var(--bp-duenn); stroke-width: 0.6; stroke-dasharray: 14 3 2 3; }
.bp-schrift {
  fill: var(--bp-schrift);
  font-family: "Arial Narrow", "Roboto Condensed", Arial, Helvetica, sans-serif;
  font-size: 8px;
  letter-spacing: 0.06em;
}
.beton { fill: var(--beton); }

.blase { opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.blase.an { opacity: 1; }
.blase rect, .blase path { fill: var(--blase); stroke: var(--blase-rand); stroke-width: 2; }
.blase text {
  fill: var(--text);
  font-family: Calibri, Carlito, "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  font-weight: 700;
  text-anchor: middle;
}

/* ---------- Text unter der Szene ---------- */

.botschaft {
  text-align: center;
  margin-top: 4px;
  max-width: 820px; /* der Satz darunter passt auf eine Zeile */
}

.botschaft h1 {
  margin: 0;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 700;
  line-height: 1.2;
}

.botschaft p {
  margin: 0.35em 0 0;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--text-leise);
  text-wrap: balance; /* auf schmalen Bildschirmen zwei gleich lange Zeilen */
}

.knopf {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-top: 1em;
  min-height: 44px; /* Zielfläche am Handy mindestens 44 px */
  padding: 0.6em 1.5em;
  border-radius: 999px;
  background: var(--welle);
  color: #fff;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(140, 26, 55, 0.35);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.knopf span { transition: transform 0.15s; }
.knopf:hover, .knopf:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(140, 26, 55, 0.45); }
.knopf:hover span, .knopf:focus-visible span { transform: translateX(4px); }
.knopf:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Fußzeile ---------- */

.fusszeile {
  border-top: 1px solid var(--linie);
  padding: 3px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--text-leise);
}
/* Zielfläche am Handy mindestens 44 px hoch; Fußzeile bleibt so hoch wie vorher */
.fusszeile a { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.fusszeile a:hover { color: var(--text); text-decoration: underline; }
.fusszeile .logo-klein img { height: 22px; }

/* ---------- Rechtstexte ---------- */

.rechtstext {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}
.rechtstext .kopf { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.rechtstext .kopf img { height: 40px; }
.rechtstext h1 { font-size: 2rem; margin: 28px 0 8px; }
.rechtstext h2 { font-size: 1.1rem; margin: 26px 0 6px; color: var(--welle); }
.rechtstext p, .rechtstext li, .rechtstext address { font-style: normal; margin: 0 0 8px; }
.rechtstext .zurueck { text-decoration: none; border: 1.5px solid var(--pille-rand); border-radius: 999px; padding: 2px 14px; }
.rechtstext .zurueck:hover { color: var(--pille-hover); border-color: var(--pille-hover); }

.logo-hell { display: block; }
.logo-dunkel { display: none; }
@media (prefers-color-scheme: dark) {
  .logo-hell { display: none; }
  .logo-dunkel { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .schlitz, .blinklicht { animation: none; }
}
