:root {
  --red: #c4231d;
  --red-dark: #9c1915;
  --gold: #f0a51e;
  --ink: #1e1e20;
  --muted: #5e6166;
  --line: #e3e0da;
  --paper: #faf8f4;
  --dark: #1c1c1f;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--red-dark); }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 22px; }

/* Kopf */
.hero {
  color: #fff;
  background:
    radial-gradient(620px 340px at 12% 0%, rgba(232, 96, 24, .34), transparent 70%),
    var(--dark);
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; min-width: 0; }
.brand img { width: 74px; height: auto; flex: none; }
.brand strong { display: block; font-size: 34px; line-height: 1; font-weight: 800; letter-spacing: -.5px; }
.brand span { display: block; margin-top: 4px; color: #c9c7c2; font-size: 14px; letter-spacing: .3px; }
.call {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.call { transition: transform .18s ease, background-color .18s ease, border-color .18s ease; }
.call svg { width: 18px; height: 18px; flex: none; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linejoin: round; }
.call:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .7); transform: scale(1.07); }
.call:active { transform: scale(1); }
.claim { padding: 44px 0 58px; }
.claim h1 { max-width: 720px; margin: 0 0 12px; font-size: clamp(32px, 5.4vw, 50px); line-height: 1.12; letter-spacing: -.8px; }
.claim p { max-width: 560px; margin: 0; color: #dad8d3; font-size: 19px; }
.band { height: 6px; background: linear-gradient(90deg, var(--red-dark), var(--red) 30%, #ec8a17 70%, var(--gold)); }

/* Leistungen */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: -30px; position: relative; }
.service {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(30, 20, 10, .07);
  font-size: 19px;
  font-weight: 700;
}
.icon { display: grid; place-items: center; width: 60px; height: 60px; flex: none; border-radius: 50%; }
.icon svg { display: block; width: 46px; height: 46px; overflow: visible; }
.icon svg * { transform-box: fill-box; }
.icon-heat { background: #fdeee2; }
.icon-water { background: #e6f2fb; }
.icon-volt { background: #fff5d6; }

/* Animation Heizung: Flammen zuengeln, Funken steigen auf */
.flame-outer { fill: #d32b22; transform-origin: 50% 100%; animation: flame-a 1.5s ease-in-out infinite; }
.flame-inner { fill: var(--gold); transform-origin: 50% 100%; animation: flame-b .95s ease-in-out infinite; }
.spark { fill: #ec8a17; opacity: 0; animation: spark-rise 2.1s ease-out infinite; }
.spark-2 { animation-delay: -.7s; }
.spark-3 { animation-delay: -1.4s; }
@keyframes flame-a {
  0%, 100% { transform: scale(1, 1) skewX(0deg); }
  25% { transform: scale(.96, 1.05) skewX(-3deg); }
  50% { transform: scale(1.03, .96) skewX(2deg); }
  75% { transform: scale(.98, 1.03) skewX(-1deg); }
}
@keyframes flame-b {
  0%, 100% { transform: scale(1, 1) skewX(0deg); }
  30% { transform: scale(.9, 1.12) skewX(4deg); }
  65% { transform: scale(1.08, .9) skewX(-4deg); }
}
@keyframes spark-rise {
  0% { opacity: 0; transform: translate(0, 0) scale(1); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(3px, -20px) scale(.3); }
}

/* Animation Sanitaer: Tropfen faellt, Wasser zieht Kreise */
.drop { fill: #1f86d1; opacity: 1; transform-origin: 50% 0%; animation: drop-fall 2.8s infinite; }
.ripple { fill: none; stroke: #1f86d1; stroke-width: 2; opacity: .35; transform-origin: 50% 50%; animation: ripple-a 2.8s ease-out infinite; }
.ripple-2 { animation-name: ripple-b; }
@keyframes drop-fall {
  0% { opacity: 0; transform: translateY(0) scale(.15); }
  14% { opacity: 1; }
  34% { opacity: 1; transform: translateY(0) scale(1); animation-timing-function: cubic-bezier(.55, 0, .9, .5); }
  56% { opacity: 1; transform: translateY(17px) scale(.82, 1.14); }
  61% { opacity: 1; transform: translateY(21px) scale(1.3, .45); }
  66%, 100% { opacity: 0; transform: translateY(21px) scale(1.3, .3); }
}
@keyframes ripple-a {
  0%, 56% { opacity: 0; transform: scale(.15); }
  60% { opacity: .95; }
  92%, 100% { opacity: 0; transform: scale(1); }
}
@keyframes ripple-b {
  0%, 66% { opacity: 0; transform: scale(.15); }
  70% { opacity: .75; }
  100% { opacity: 0; transform: scale(.75); }
}

/* Animation Elektro: Strom laeuft am Blitz entlang, dann blitzt er auf */
.bolt { fill: var(--gold); stroke: #c97a0a; stroke-width: 1.5; stroke-linejoin: round; transform-origin: 50% 50%; animation: bolt-hit 3.2s infinite; }
.bolt-run { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 16 84; animation: bolt-run 3.2s linear infinite; }
.glow { fill: var(--gold); opacity: 0; transform-origin: 50% 50%; animation: glow-hit 3.2s infinite; }
.ray { fill: none; stroke: #ec8a17; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; animation: ray-out 3.2s infinite; }
@keyframes bolt-run {
  0% { stroke-dashoffset: 100; opacity: 0; }
  6% { opacity: 1; }
  52% { opacity: 1; }
  58%, 100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes bolt-hit {
  0%, 56%, 100% { opacity: 1; transform: scale(1); }
  58% { opacity: .35; transform: scale(1); }
  60% { opacity: 1; transform: scale(1.14); }
  62% { opacity: .5; }
  64% { opacity: 1; transform: scale(1.1); }
  76% { transform: scale(1); }
}
@keyframes glow-hit {
  0%, 56% { opacity: 0; transform: scale(.6); }
  61% { opacity: .55; transform: scale(1.1); }
  84%, 100% { opacity: 0; transform: scale(1.25); }
}
@keyframes ray-out {
  0%, 57% { stroke-dashoffset: 1; }
  68% { stroke-dashoffset: 0; }
  82%, 100% { stroke-dashoffset: -1; }
}

/* Keine Bewegung fuer Besucher, die das im System abgeschaltet haben */
@media (prefers-reduced-motion: reduce) {
  .icon svg * { animation: none !important; }
  .call { transition: none; }
  .call:hover { transform: none; }
}

/* Kontakt */
main.wrap { padding-top: 48px; padding-bottom: 60px; }
.intro { margin-bottom: 24px; }
.intro h2 { margin: 0 0 4px; font-size: 30px; line-height: 1.2; letter-spacing: -.4px; }
.intro p { margin: 0; color: var(--muted); }
.grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.card { padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.card h3 { margin: 0 0 8px; font-size: 19px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row { margin-bottom: 18px; min-width: 0; }
label { display: block; margin-bottom: 5px; font-weight: 600; }
label small { color: var(--muted); font-size: 14px; font-weight: 400; }
input, textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #b7b4ad;
  border-radius: 7px;
  background: #fff;
  color: inherit;
  font: inherit;
}
input:focus, textarea:focus { outline: 3px solid rgba(240, 165, 30, .55); border-color: #ec8a17; }
textarea { min-height: 170px; resize: vertical; }
.invalid { border-color: var(--red); }
.err { display: block; margin-top: 4px; color: var(--red-dark); font-size: 15px; }
button {
  width: 100%;
  padding: 14px 20px;
  border: 0;
  border-radius: 7px;
  background: var(--red);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
button:hover { background: var(--red-dark); }
button:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.note { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.alert { margin-bottom: 20px; padding: 14px 16px; border-radius: 7px; }
.ok { background: #e7f4ea; color: #17622f; }
.bad { background: #fce9e7; color: #8f1a15; }
.hp { position: absolute; left: -9999px; }
address { font-style: normal; }
.phone { display: block; margin: 2px 0 14px; color: var(--red); font-size: 28px; font-weight: 800; line-height: 1.2; text-decoration: none; white-space: nowrap; }
.side-mail { overflow-wrap: anywhere; }

/* Rechtstexte */
.legal { max-width: 760px; padding: 40px 22px 56px; }
.legal h1 { margin: 0 0 20px; font-size: clamp(30px, 5vw, 40px); line-height: 1.15; }
.legal h2 { margin: 32px 0 8px; font-size: 22px; line-height: 1.25; }
.legal h3 { margin: 22px 0 6px; font-size: 18px; }
.legal p, .legal ul { margin: 0 0 12px; }
.legal li { margin-bottom: 4px; }
.legal .stand { color: var(--muted); font-size: 15px; }

/* Fuss */
footer { padding: 22px 0 28px; background: var(--dark); color: #c9c7c2; font-size: 15px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; }
footer a { color: #fff; }
footer nav a { margin-left: 16px; }
footer nav a:first-child { margin-left: 0; }

@media (max-width: 820px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  aside.card { order: -1; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  main.wrap { padding: 32px 16px 44px; }
  .brand img { width: 58px; }
  .brand strong { font-size: 28px; }
  .brand span { font-size: 13px; }
  .call { display: none; }
  .claim { padding: 26px 0 52px; }
  .claim p { font-size: 17px; }
  .services { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .service { padding: 10px 14px; font-size: 17px; }
  .icon { width: 52px; height: 52px; }
  .icon svg { width: 40px; height: 40px; }
  .pair { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .card { padding: 20px; }
  .intro h2 { font-size: 26px; }
  .legal { padding: 28px 16px 44px; }
}
