/* Entwurf 3 «Im Keller». Plan: DESIGN-3.md
   Ohne Farbe: Graphit und Weiß. Die Zeichnung des Heizkreises steht groß und hell auf einer dunklen Fläche;
   Unterschiede tragen Strichstärke, Strichart und Ton. */

@font-face {
  font-family: "Bai Jamjuree";
  src: url("/fonts/bai-jamjuree-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Bai Jamjuree";
  src: url("/fonts/bai-jamjuree-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --papier: #ffffff;
  --graphit: #22262a;
  --blei: #5c646a;
  --strich: #c9ced2;
  --karton: #f1f2f3;
  --hell: #c7cdd1;

  --grund: var(--papier);
  --schrift: var(--graphit);
  --leise: var(--blei);
  --linie: var(--strich);
  --griff: var(--graphit);
  --griff-schrift: var(--papier);
  --knopf: var(--graphit);
  --knopf-schrift: var(--papier);
  --rand: 1.25rem;
  --breite: 76rem;
}

body {
  font-family: "Bai Jamjuree", "Jamjuree Ersatz", Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.55;
}

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

.keller {
  overflow-wrap: anywhere;
}

.keller h1,
.keller h2,
.keller h3 {
  margin: 0;
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.02em;
  overflow-wrap: normal;
  hyphens: manual;
}

.keller p {
  margin: 0;
}

/* Verweise: Graphit, unterstrichen, halbfett – ohne Farbe */
.keller a {
  color: inherit;
  font-weight: 600;
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.18em;
}

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

.gross {
  font-size: 1.3125rem;
  line-height: 1.45;
  max-width: 30em;
}

/* Bühne: Name, was die Firma tut, Nummern, Knopf – daneben die Zeichnung auf dunkler Fläche */

.buehne-text {
  padding: 1rem var(--rand) 1.25rem;
}

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

.was {
  margin-top: 0.375rem !important;
  font-size: clamp(1.1875rem, 4.8vw, 1.625rem);
  font-weight: 600;
  line-height: 1.25;
}

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

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

.keller .nummer {
  display: flex;
  align-items: center;
  max-width: 100%;
  min-height: 3rem;
  padding: 0.375rem 0.875rem;
  background: var(--graphit);
  color: var(--papier);
  font-size: clamp(1.0625rem, 8.2vw, 2.5rem);
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
}

.zeiten {
  font-size: 1.0625rem;
  line-height: 1.35;
}

.knopf {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.5rem;
  max-width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 1.375rem;
  border: 2px solid var(--graphit);
  font-size: 1.1875rem;
  line-height: 1.3;
  text-decoration: none !important;
}

.knopf:hover,
.knopf-voll {
  background: var(--graphit);
  color: var(--papier) !important;
}

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

.karte {
  padding: 1.5rem var(--rand) 1.75rem;
  background: var(--graphit);
  color: var(--papier);
}

.karte-frage {
  margin-bottom: 1rem !important;
  font-size: clamp(1.5rem, 6.6vw, 2.25rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

/* Zeichnung: helle Striche auf Graphit */

.schema {
  display: block;
  width: 100%;
  max-width: 34rem;
  height: auto;
  overflow: visible;
}

.schema .vorlauf {
  fill: none;
  stroke: var(--papier);
  stroke-width: 4;
  stroke-linejoin: round;
}

.schema .vorlauf.duenn {
  stroke-width: 2.5;
}

.schema .ruecklauf {
  fill: none;
  stroke: var(--hell);
  stroke-width: 2;
  stroke-dasharray: 7 5;
  stroke-linejoin: round;
}

.schema .kasten,
.schema .koerper,
.schema .pumpe {
  fill: var(--graphit);
  stroke: var(--papier);
  stroke-width: 2;
}

.schema .rippe {
  fill: none;
  stroke: var(--papier);
  stroke-width: 1.25;
}

.schema .pumpe-pfeil,
.schema .marke {
  fill: var(--papier);
}

.schema .flaeche {
  fill: transparent;
  stroke: none;
}

.schema .wort {
  fill: var(--papier);
  font-size: 13px;
  font-weight: 600;
}

.schema .klein {
  fill: var(--hell);
  font-size: 10.5px;
}

/* Teil mit Abschnitt: gefüllte Fläche, unterstrichenes Wort, Marke; Teil ohne Abschnitt: nur dünn gezeichnet */
.schema .ziel .kasten,
.schema .ziel .koerper {
  fill: var(--papier);
}

.schema .ziel .rippe {
  stroke: var(--graphit);
}

.schema .ziel rect.kasten + text.wort,
.schema .ziel .wort {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2.5px;
}

/* Das Wort im Kasten des Wärmeerzeugers steht auf der hellen Fläche */
.schema .ziel[href="#erzeuger"] .wort {
  fill: var(--graphit);
}

.schema .ziel[href="#erzeuger"] .marke {
  fill: var(--graphit);
}

.schema .stumm .kasten,
.schema .stumm .koerper {
  stroke: var(--hell);
  stroke-width: 1.25;
}

.schema .stumm .rippe {
  stroke: var(--blei);
}

.schema .stumm .wort {
  fill: var(--hell);
  font-weight: 400;
}

.schema .ziel:focus-visible {
  outline: 3px solid var(--papier);
  outline-offset: 3px;
}

.schema .ziel:hover .kasten,
.schema .ziel:hover .koerper {
  stroke-width: 4;
}

.legende {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 0.5rem;
  margin-top: 1rem !important;
  color: var(--hell);
  font-size: 1rem;
}

.probe {
  display: inline-block;
  width: 2rem;
  height: 0;
  border-top: 4px solid var(--papier);
}

.probe-rueck {
  margin-left: 0.75rem;
  border-top: 2px dashed var(--hell);
}

.probe-punkt {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  margin-left: 0.75rem;
  border-radius: 50%;
  background: var(--papier);
}

/* Abschnitte der Anlage */

.teil {
  padding: 3.5rem 0;
  border-top: 4px solid var(--graphit);
  scroll-margin-top: 0;
}

.zeichen {
  display: block;
  width: 5rem;
  height: 5rem;
  margin-bottom: 1rem;
  fill: none;
  stroke: var(--graphit);
  stroke-width: 3;
  stroke-linejoin: round;
}

.zeichen .voll {
  fill: var(--graphit);
  stroke: none;
}

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

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

.eigen {
  margin-bottom: 1.5rem !important;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  max-width: 26em;
}

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

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

.arten li,
.orte li {
  padding: 0.3125rem 0.875rem 0.375rem;
  border: 2px solid currentColor;
  font-weight: 600;
}

.arbeiten {
  display: grid;
  gap: 1.75rem;
  margin-top: 0.5rem;
}

.arbeiten > div {
  padding-top: 0.875rem;
  border-top: 2px solid var(--graphit);
}

.tauschen {
  margin-top: 2.5rem !important;
}

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

.leistung dt {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.2;
}

.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.5rem 1.125rem;
  border: 2px solid var(--graphit);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

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

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

/* Vor dem Heizungstausch */

.tausch {
  margin-bottom: 2rem;
  padding: 1.5rem 1.375rem 1.25rem;
  background: var(--karton);
}

.keller .tausch h3 {
  margin-bottom: 1rem;
  line-height: 1.15;
}

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

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

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

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

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

.tausch-stand {
  font-size: 1rem;
}

/* Foto: grauer Streifen über die ganze Breite */

figure {
  position: relative;
  margin: 0;
}

.streifen {
  aspect-ratio: 16 / 9;
  max-height: 30rem;
  width: 100%;
}

.streifen 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);
  font-size: 1rem;
  line-height: 1.3;
}

/* Bänder */

.band {
  padding: 3.5rem 0;
}

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

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

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

.klein-text,
.angaben small {
  display: block;
  font-size: 1rem;
  color: var(--hell);
}

.nachweise li {
  font-weight: 600;
}

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

.angaben dt {
  font-weight: 600;
}

.angaben dd {
  margin: 0;
}

.zwei > * + * {
  margin-top: 2rem;
}

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

.kontakt a {
  padding: 0.25rem 0;
  font-size: clamp(1.25rem, 9vw, 3.5rem);
  line-height: 1.1;
}

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

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

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

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

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

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

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

@media (max-width: 39.99rem) {
  .buehne-text {
    padding-top: 0.75rem;
    padding-bottom: 1rem;
  }

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

  .karte {
    padding-top: 1rem;
    padding-bottom: 1.25rem;
  }

  .karte-frage {
    margin-bottom: 0.625rem !important;
    font-size: clamp(1.125rem, 5.4vw, 1.375rem);
  }

  .schema {
    max-width: 18.5rem;
  }

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

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

  .teil h2,
  .band h2 {
    font-size: 1.625rem;
  }
}

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

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

  .arbeiten {
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  }

  /* Eine einzelne Leistung nimmt die ganze Breite, mehrere teilen sich Spalten */
  .leistungen {
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  }
}

/* Breiter Bildschirm */

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

  /* Text in der Spalte der Seite, die dunkle Fläche mit der Zeichnung reicht rechts bis an den Rand */
  .buehne {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
  }

  .buehne-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 3rem 3.5rem 3rem max(var(--rand), calc((100vw - var(--breite)) / 2 + var(--rand)));
  }

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

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

  .karte-frage {
    margin-bottom: 1.75rem !important;
  }

  .teil,
  .band {
    padding: 5.5rem 0;
  }

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

  .zwei > * + * {
    margin-top: 0;
  }

  .band-graphit .zwei,
  #anfrage .zwei {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .teil-kopf {
    position: sticky;
    top: 2.5rem;
  }

  .zeichen {
    width: 8rem;
    height: 8rem;
    margin-bottom: 1.5rem;
  }

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

  .arbeiten {
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 2rem;
  }

  .arbeiten .leistungen {
    grid-template-columns: 1fr;
  }

  .tausch {
    padding: 2rem 2.25rem 1.75rem;
  }

  .formular {
    padding: 2rem;
  }
}
