/* Entwurf 1 «Wasser, Wärme, Luft». Plan: DESIGN.md
   Die drei Farben der Teile tragen die ganze Seite: drei große Flächen im ersten Bildschirm, darunter je Teil
   ein Abschnitt in seiner Farbe über die volle Breite. */

@font-face {
  font-family: "Libre Franklin";
  src: url("/fonts/libre-franklin-de-wght.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

/* Ersatzschrift mit angeglichener Laufweite, damit der Wechsel zur geladenen Schrift nichts verschiebt. */
@font-face {
  font-family: "Franklin Ersatz";
  src: local("Arial");
  size-adjust: 103%;
  ascent-override: 94%;
  descent-override: 24%;
  line-gap-override: 0%;
}

:root {
  --papier: #ffffff;
  --tinte: #17212b;
  --wasser: #1b5fae;
  --waerme: #c2331f;
  --luft: #f3c52e;
  --wasser-hell: #e6eff9;
  --waerme-hell: #fbeae6;
  --luft-hell: #fdf3cf;
  --zink: #e9edf0;
  --grau: #4d5761;

  --grund: var(--papier);
  --schrift: var(--tinte);
  --leise: var(--grau);
  --linie: #c3cbd2;
  --griff: var(--tinte);
  --griff-schrift: var(--papier);
  --knopf: var(--tinte);
  --knopf-schrift: var(--papier);
  --rand: 1.25rem;
  --breite: 76rem;
}

body {
  font-family: "Libre Franklin", "Franklin Ersatz", Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.5;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

.wwl {
  overflow-wrap: anywhere;
}

.wwl a {
  color: inherit;
}

.wwl h1,
.wwl h2,
.wwl h3 {
  margin: 0;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  hyphens: none;
  overflow-wrap: normal;
}

.wwl p {
  margin: 0;
}

/* Knöpfe */

.knopf {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.5rem;
  max-width: 100%;
  min-height: 3.25rem;
  padding: 0.8125rem 1.375rem;
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.knopf-klein {
  font-weight: 400;
}

.knopf-rand {
  border: 2px solid var(--tinte);
}

.knopf-rand:hover {
  background: var(--tinte);
  color: var(--papier);
}

/* Bühne: Name, was die Firma tut, beide Nummern – daneben das Foto, darunter die drei Flächen */

.buehne-innen {
  max-width: var(--breite);
  margin: 0 auto;
  padding: 1.25rem var(--rand) 0;
}

.buehne h1 {
  font-size: clamp(1.5rem, 12.5vw, 6.5rem);
}

.was {
  margin-top: 0.5rem !important;
  font-size: clamp(1.1875rem, 4.8vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
}

.spruch,
.zusatz {
  margin-top: 0.25rem !important;
  color: var(--grau);
}

.rufe {
  display: grid;
  gap: 0.5rem;
  margin: 0.75rem 0 0.75rem;
}

.ruf {
  padding: 0.3125rem 0.875rem 0.5rem;
  background: var(--tinte);
  color: var(--papier);
}

.ruf-nummer {
  display: flex;
  align-items: flex-end;
  min-height: 2.75rem;
  font-size: clamp(1.0625rem, 8.2vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  font-variant-numeric: lining-nums;
  text-decoration: none;
  white-space: nowrap;
}

/* Eine Zeile, auch bevor das Skript den Satz «jetzt erreichbar» einsetzt: so verschiebt sich darunter nichts.
   Die vollständigen Zeiten stehen im Abschnitt «Der Betrieb». */
.ruf .jetzt {
  max-width: 100%;
  font-size: 1rem;
  line-height: 1.3;
}

/* Der Satz «jetzt erreichbar …» darf zwei Zeilen haben; ihre Höhe ist vorgehalten, bevor das Skript ihn einsetzt.
   Der feste Text ohne Skript (alle Zeiten) wird auf zwei Zeilen begrenzt – vollständig steht er in «Der Betrieb». */
.ruf .jetzt[data-jetzt] {
  min-height: 2.6em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.ruf .jetzt[data-offen] {
  display: block;
  overflow: visible;
}

.ruf {
  min-width: 0;
  max-width: 100%;
}

.ruf .jetzt[data-offen="ja"]::before {
  content: "";
  display: inline-block;
  width: 0.625rem;
  height: 0.625rem;
  margin-right: 0.4375rem;
  border-radius: 50%;
  background: var(--luft);
}

.buehne-bild {
  margin: 0;
}

/* Telefon und mittlere Breite: erst Text und die drei Flächen (erste 600 px), dann das Foto über die volle Breite. */
@media (max-width: 63.99rem) {
  .buehne {
    display: flex;
    flex-direction: column;
  }

  .buehne-innen {
    display: contents;
  }

  .buehne-text {
    order: 1;
    padding: 0.875rem var(--rand) 0;
  }

  .tafeln {
    order: 2;
    width: 100%;
  }

  .buehne-bild {
    order: 3;
    aspect-ratio: 3 / 2;
    margin-top: 0;
  }
}

figure {
  position: relative;
}

figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 0.25rem 0.625rem;
  background: var(--papier);
  color: var(--tinte);
  font-size: 0.9375rem;
  line-height: 1.3;
}

/* Die drei Flächen */

.tafeln {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  max-width: var(--breite);
  margin: 0.875rem auto 0;
}

.tafel {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 3.5rem;
  padding: 0.375rem 0.75rem 0.5rem;
  text-decoration: none;
}

.zeichen {
  width: 1.75rem;
  height: 1.75rem;
  margin-bottom: auto;
  fill: currentColor;
}

.zeichen.strich {
  fill: none;
  stroke: currentColor;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tafel-wort {
  display: block;
  margin-top: 0.375rem;
  font-size: clamp(1.25rem, 6.4vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.tafel-inhalt {
  display: none;
}

.wwl .tafel-wasser,
.teil-wasser .teil-kopf {
  background: var(--wasser);
  color: var(--papier);
}

.wwl .tafel-waerme,
.teil-waerme .teil-kopf {
  background: var(--waerme);
  color: var(--papier);
}

.wwl .tafel-luft,
.teil-luft .teil-kopf {
  background: var(--luft);
  color: var(--tinte);
}

/* Teile: Kopf in voller Farbe, Körper im hellen Ton derselben Farbe */

.teil {
  scroll-margin-top: 0;
}

.teil-wasser {
  background: var(--wasser-hell);
  --farbe: var(--wasser);
}

.teil-waerme {
  background: var(--waerme-hell);
  --farbe: var(--waerme);
}

.teil-luft {
  background: var(--luft-hell);
  --farbe: var(--tinte);
}

.teil-kopf {
  padding: 2rem var(--rand) 1.75rem;
}

.teil-kopf-innen {
  display: grid;
  gap: 1rem;
}

.teil-kopf .zeichen {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0;
}

.teil-kopf h2 {
  font-size: clamp(2rem, 19vw, 8rem);
}

.knopf-teil {
  justify-self: start;
  border: 2px solid currentColor;
}

.knopf-teil:hover {
  background: var(--papier);
  color: var(--tinte);
  border-color: var(--papier);
}

.teil-koerper {
  padding: 2rem var(--rand) 2.75rem;
}

.leistungen {
  display: grid;
  gap: 1.5rem 2.5rem;
  margin: 0;
}

.leistung dt {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.leistung dd {
  margin: 0.375rem 0 0;
  max-width: 34em;
}

.mehr {
  margin-top: 1.5rem;
}

.mehr summary {
  display: inline-block;
  min-height: 2.75rem;
  padding: 0.5625rem 1.125rem;
  border: 2px solid var(--tinte);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.mehr summary::-webkit-details-marker {
  display: none;
}

.mehr[open] summary {
  margin-bottom: 1.5rem;
}

.teil-bild {
  margin: 0;
  aspect-ratio: 4 / 3;
}

/* Vor dem Heizungstausch */

.tausch {
  margin-top: 2.25rem;
  padding: 1.5rem 1.375rem 1.25rem;
  background: var(--papier);
  border-top: 0.5rem solid var(--waerme);
}

.wwl .tausch h3 {
  margin-bottom: 0.875rem;
  font-size: 1.5rem;
  line-height: 1.15;
}

.tausch ol {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  counter-reset: schritt;
  display: grid;
  gap: 0.625rem;
}

.tausch li {
  position: relative;
  padding-left: 2.75rem;
  min-height: 2rem;
  counter-increment: schritt;
}

.tausch li::before {
  content: counter(schritt);
  position: absolute;
  left: 0;
  top: -0.0625rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  background: var(--waerme);
  color: var(--papier);
  font-weight: 800;
}

.tausch p {
  margin-bottom: 0.625rem;
  max-width: 38em;
}

.tausch-firma {
  font-weight: 700;
}

.tausch-stand {
  color: var(--grau);
  font-size: 1rem;
}

/* Bänder: Außerdem, Betrieb, Kontakt */

.band-innen {
  max-width: var(--breite);
  margin: 0 auto;
  padding: 3rem var(--rand);
}

.band h2 {
  margin-bottom: 1.25rem;
  font-size: clamp(2.25rem, 10vw, 4rem);
}

.band h3 {
  margin-bottom: 0.625rem;
  font-size: 1.5rem;
}

.band p {
  max-width: 34em;
  margin-bottom: 1rem;
}

.band-zink {
  background: var(--zink);
}

.band-tinte {
  background: var(--tinte);
  color: var(--papier);
}

.gross {
  font-size: 1.3125rem;
  line-height: 1.45;
}

.orte,
.nachweise {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.orte {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.orte li {
  padding: 0.3125rem 0.75rem;
  border: 2px solid currentColor;
  font-weight: 700;
}

.angaben {
  display: grid;
  gap: 1.25rem;
  margin: 1.5rem 0 0;
}

.angaben dt {
  margin-bottom: 0.125rem;
  font-weight: 800;
}

.angaben dd {
  margin: 0;
}

.angaben small,
.erfunden {
  display: block;
  margin-top: 0.375rem;
  font-size: 1rem;
  color: #c8d0d8;
}

.kontakt {
  display: grid;
  justify-items: start;
  gap: 0.25rem;
}

.kontakt a {
  padding: 0.25rem 0;
  font-size: clamp(1.25rem, 9vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.12em;
}

.kontakt .kontakt-mail {
  padding: 0.75rem 0;
  font-size: clamp(1.1875rem, 5vw, 1.75rem);
  font-weight: 700;
}

.formular {
  padding: 1.5rem 1.25rem;
  background: var(--zink);
}

.formular .anfrage {
  max-width: none;
}

.formular .feld input,
.formular .feld select {
  background: var(--papier);
  min-height: 3rem;
}

.formular .anfrage button {
  min-height: 3rem;
  padding: 0.625rem 1.25rem;
  font-size: 1.0625rem;
}

.formular .anfrage-klein {
  color: var(--tinte);
  font-size: 1rem;
}

.fuss {
  max-width: var(--breite);
  margin: 0 auto;
  border-top: 0;
  padding: 2.5rem var(--rand) 3rem;
}

@media (max-width: 22rem) {
  .wwl,
  .wwl h1,
  .wwl h2,
  .wwl h3 {
    hyphens: auto;
    overflow-wrap: anywhere;
  }

  .band h2 {
    font-size: 1.75rem;
  }
}

/* Mittlere Breite */

@media (min-width: 40rem) {
  :root {
    --rand: 2rem;
  }

  .rufe {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .ruf {
    padding: 0.75rem 1.25rem 0.875rem;
  }

  .tafeln {
    padding: 0 var(--rand);
    gap: 0.75rem;
  }

  .tafel {
    min-height: 11rem;
    padding: 1.25rem 1.25rem 1.375rem;
  }

  .zeichen {
    width: 3.25rem;
    height: 3.25rem;
  }

  .tafel-inhalt {
    display: block;
    margin-top: 0.5rem;
    font-size: 1.0625rem;
    line-height: 1.35;
  }

  .leistungen {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .angaben {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Breiter Bildschirm */

@media (min-width: 64rem) {
  :root {
    --rand: 3rem;
  }

  /* Der Text steht in der Spalte der Seite, das Foto reicht rechts bis an den Rand des Bildschirms. */
  .buehne-innen {
    display: grid;
    grid-template-columns: minmax(0, 36rem) minmax(0, 1fr);
    column-gap: 4rem;
    align-items: stretch;
    max-width: none;
    padding: 2rem 0 0 max(var(--rand), calc((100vw - var(--breite)) / 2 + var(--rand)));
  }

  .buehne-text {
    padding-bottom: 1rem;
  }

  .was {
    margin-top: 0.75rem !important;
  }

  .rufe {
    margin: 1.75rem 0 1.25rem;
  }

  .buehne-bild {
    display: block;
    min-height: 24rem;
  }

  .buehne-bild picture {
    position: absolute;
    inset: 0;
  }

  .tafeln {
    margin-top: 2rem;
    gap: 1rem;
  }

  .tafel {
    min-height: 13rem;
    padding: 1.5rem 1.5rem 1.75rem;
  }

  .zeichen {
    width: 4rem;
    height: 4rem;
  }

  /* Teil: links die Farbe mit dem Wort, rechts der Inhalt – die Farbe reicht bis an den Rand des Bildschirms */
  .teil {
    margin-top: 0;
  }

  .tafeln + * {
    margin-top: 0;
  }

  main {
    margin-top: 4rem;
  }

  .teil-innen {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    max-width: none;
  }

  .teil-kopf-innen {
    position: sticky;
    top: 3rem;
    gap: 1.5rem;
  }

  .teil-kopf {
    padding: 4.5rem 3rem 4rem max(var(--rand), calc((100vw - var(--breite)) / 2 + var(--rand)));
  }

  .teil-kopf h2 {
    font-size: clamp(3.5rem, 5vw, 5.25rem);
  }

  .teil-kopf .zeichen {
    width: 5.5rem;
    height: 5.5rem;
  }

  .teil-koerper {
    padding: 4.5rem max(var(--rand), calc((100vw - var(--breite)) / 2 + var(--rand))) 4.5rem 3.5rem;
  }

  /* Das Foto im Teil «Wasser» steht unter dem farbigen Kopf, in derselben Spalte */
  .teil-wasser .teil-innen {
    grid-template-rows: auto 1fr;
  }

  .teil-wasser .teil-kopf {
    grid-row: 1 / 3;
  }

  .teil-wasser .teil-koerper {
    grid-column: 2;
    padding-bottom: 3rem;
  }

  .teil-bild {
    grid-column: 2;
    aspect-ratio: auto;
    min-height: 22rem;
  }

  .teil-bild picture {
    position: absolute;
    inset: 0;
  }

  /* Jeder zweite Teil gespiegelt: Rhythmus statt dreimal dasselbe */
  .teil-waerme .teil-innen {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }

  .teil-waerme .teil-kopf {
    order: 2;
    padding: 4.5rem max(var(--rand), calc((100vw - var(--breite)) / 2 + var(--rand))) 4rem 3rem;
  }

  .teil-waerme .teil-koerper {
    padding: 4.5rem 3.5rem 4.5rem max(var(--rand), calc((100vw - var(--breite)) / 2 + var(--rand)));
  }

  .band-innen {
    padding: 5rem var(--rand);
  }

  .band-innen.zwei {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: 4rem;
    align-items: start;
  }

  .band-tinte .band-innen.zwei,
  .band-kontakt .band-innen.zwei {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .formular {
    padding: 2rem;
  }
}
