/* Entwurf 2 «Erst absperren». Plan: DESIGN-2.md
   Eine Farbe: Signalorange. Oben als ganze Fläche mit Name, Nummern und Tagesleisten; darunter trägt Orange nur noch,
   was man tun kann – Nummer, Knopf, besetzte Stunden. */

@font-face {
  font-family: "Zilla Slab";
  src: url("/fonts/zilla-slab-de-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Zilla Slab";
  src: url("/fonts/zilla-slab-de-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --papier: #ffffff;
  --tinte: #1f2426;
  --signal: #f26b1d;
  --signal-dunkel: #b8470a;
  --nebel: #eef0f1;
  --grau: #4f595f;

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

  /* Farben der Tagesleiste; je Fläche neu gesetzt */
  --bahn: var(--nebel);
  --zeit: var(--signal);
  --marke: var(--tinte);
  --skala: var(--grau);
}

body {
  font-family: "Zilla Slab", "Zilla Ersatz", Georgia, serif;
  font-size: 1.1875rem;
  line-height: 1.5;
}

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

.erst {
  overflow-wrap: anywhere;
}

.erst h1,
.erst h2,
.erst h3 {
  margin: 0;
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.015em;
  overflow-wrap: normal;
  hyphens: manual;
}

.erst p {
  margin: 0;
}

.erst a {
  color: inherit;
  text-underline-offset: 0.16em;
}

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

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

.klein {
  margin-top: 0.5rem !important;
  color: var(--grau);
  font-size: 1rem;
}

/* Kopf: orange Fläche mit Name, was die Firma tut, Nummern und Tagesleisten */

.kopf {
  background: var(--signal);
  color: var(--tinte);
  --bahn: rgb(255 255 255 / 0.55);
  --zeit: var(--tinte);
  --marke: var(--papier);
  --skala: var(--tinte);
}

.kopf-innen {
  padding-top: 1rem;
  padding-bottom: 1.5rem;
}

.kopf h1 {
  font-size: clamp(1.75rem, 13vw, 5.75rem);
}

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

.gas-zeile {
  margin-top: 0.5rem !important;
  font-weight: 700;
}

.gas-zeile a {
  display: inline-block;
  padding: 0.5rem 0;
  text-decoration-thickness: 0.12em;
}

.kopf-ruf {
  display: grid;
  gap: 1rem;
  margin-top: 0.5rem;
}

.linie-name {
  margin-bottom: 0.25rem !important;
  font-weight: 700;
}

/* Nummer: Platte mit großen Ziffern */

.nummer {
  display: flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 3rem;
  padding: 0.375rem 0.875rem 0.4375rem;
  background: var(--signal);
  color: var(--tinte) !important;
  font-size: clamp(1.0625rem, 8.6vw, 2.75rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
}

.kopf .nummer {
  background: var(--tinte);
  color: var(--papier) !important;
}

/* Tagesleiste */

.leiste {
  margin-top: 0.5rem;
  max-width: 30rem;
  /* Höhe der gezeichneten Leiste: der feste Text davor belegt denselben Platz, beim Zeichnen verschiebt sich nichts. */
  min-height: 5.875rem;
}

.leiste-bild {
  font-size: 0.9375rem;
  line-height: 1.2;
}

.leiste-skala {
  display: flex;
  justify-content: space-between;
  color: var(--skala);
  font-variant-numeric: tabular-nums lining-nums;
}

.leiste-bahn {
  position: relative;
  height: 1.5rem;
  margin-top: 0.125rem;
  background: var(--bahn);
}

.leiste-zeit {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--zeit);
}

.leiste-jetzt {
  position: absolute;
  top: -0.3125rem;
  bottom: -0.3125rem;
  width: 4px;
  margin-left: -2px;
  background: var(--marke);
  box-shadow: 0 0 0 1.5px var(--tinte);
}

.leiste-marke {
  position: relative;
  height: 1.375rem;
  margin-top: 0.375rem;
  font-weight: 700;
}

.leiste-marke span {
  position: absolute;
  top: 0;
  white-space: nowrap;
}

.leiste-zeile {
  margin-top: 0.125rem !important;
  font-size: 1.0625rem;
  line-height: 1.35;
}

/* Sofort: die eine Anweisung, daneben das Foto bis an den Rand */

.sofort-text {
  padding: 2.5rem var(--rand) 2rem;
}

.sofort h2 {
  font-size: clamp(2.125rem, 10vw, 4.25rem);
}

.sofort .gross {
  margin-top: 1rem;
}

.quelle {
  margin-top: 0.25rem !important;
}

.quelle a {
  display: inline-block;
  padding: 0.625rem 0;
  color: var(--signal-dunkel);
}

.knopf {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.5rem;
  max-width: 100%;
  min-height: 3.25rem;
  margin-top: 0.75rem;
  padding: 0.75rem 1.375rem;
  background: var(--signal);
  color: var(--tinte) !important;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

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

figure {
  position: relative;
  margin: 0;
}

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

.sofort-bild {
  aspect-ratio: 3 / 2;
}

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

/* Gasgeruch: dunkle Fläche über die ganze Breite */

.gas {
  padding: 3rem 0;
  background: var(--tinte);
  color: var(--papier);
  scroll-margin-top: 0;
}

.gas h2 {
  margin-bottom: 1.5rem;
  font-size: clamp(2rem, 9.4vw, 3.5rem);
}

.gas ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.gas-wege li {
  margin-bottom: 1rem;
  max-width: 32em;
}

.gas-wege li:first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  font-size: 1.375rem;
}

.gas-nummer {
  display: inline-block;
  padding: 0.25rem 1rem 0.3125rem;
  background: var(--signal);
  color: var(--tinte) !important;
  font-size: clamp(2.5rem, 12vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
}

.gas a {
  color: var(--signal);
}

.gas-beispiel {
  color: #d5dadc;
}

.gas-regeln {
  margin-top: 1.5rem !important;
  display: grid;
  gap: 0.625rem;
}

.gas-regeln li {
  position: relative;
  padding-left: 1.375rem;
  max-width: 32em;
}

.gas-regeln li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.75rem;
  height: 0.25rem;
  background: var(--signal);
}

.gas-quelle {
  margin-top: 1.5rem !important;
  color: #d5dadc;
  font-size: 1rem;
}

.gas-quelle a {
  display: block;
  width: fit-content;
  padding: 0.5625rem 0;
}

/* Bänder */

.band {
  padding: 3.5rem 0;
}

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

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

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

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

.band-tinte .klein {
  color: #d5dadc;
}

.linien {
  display: grid;
  gap: 2rem;
}

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

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

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

.orte li {
  padding: 0.25rem 0.75rem 0.3125rem;
  background: var(--tinte);
  color: var(--papier);
  font-weight: 700;
}

.nachweise li {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
}

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

.leistung dt {
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.15;
}

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

.mehr {
  margin-top: 1.75rem;
}

.mehr summary {
  display: inline-block;
  min-height: 2.75rem;
  padding: 0.5rem 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.75rem;
}

/* Vor dem Heizungstausch */

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

.erst .tausch h3 {
  margin-bottom: 1rem;
  font-size: 1.75rem;
  line-height: 1.12;
}

.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(--signal);
  font-weight: 700;
}

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

.tausch a {
  color: var(--signal-dunkel);
}

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

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

/* Kontakt und Betrieb */

.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: 700;
  line-height: 1.1;
  text-decoration-color: var(--signal);
  text-decoration-thickness: 0.1em;
}

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

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

.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(--tinte);
  font-size: 1rem;
}

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

.angaben dt {
  font-weight: 700;
}

.angaben dd {
  margin: 0;
}

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

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

  .kopf-ruf {
    gap: 0.625rem;
  }

  .kopf .leiste {
    min-height: 4.25rem;
  }

  .kopf .leiste[data-besetzt] .leiste-zeile {
    display: none;
  }
}

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

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

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

  .kopf-ruf,
  .linien {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
  }

  /* Zwei Linien nebeneinander: die Ziffern richten sich nach der Spalte */
  .kopf-ruf .nummer,
  .linien .nummer {
    font-size: clamp(1.5rem, 2.6vw, 2.5rem);
  }

  .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;
  }

  .kopf-innen {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 30rem;
    column-gap: 4rem;
    align-items: center;
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  /* Die Linien stehen untereinander: jede Nummer und ihre Tagesleiste in voller Breite der Spalte */
  .kopf-ruf {
    grid-template-columns: 1fr;
    margin-top: 0;
    gap: 1.5rem;
  }

  .gas-zeile {
    margin-top: 1.25rem !important;
    font-size: 1.375rem;
  }

  .kopf-ruf .nummer {
    font-size: 2.75rem;
  }

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

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

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

  /* Anweisung links in der Spalte der Seite, Foto rechts bis an den Rand des Bildschirms */
  .sofort {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
  }

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

  .sofort-bild {
    aspect-ratio: auto;
    min-height: 28rem;
  }

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

  .gas {
    padding: 5rem 0;
  }

  .gas h2 {
    margin-bottom: 0;
  }

  .band {
    padding: 5.5rem 0;
  }

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

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

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

  .tausch ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 2.5rem;
  }

  .formular {
    padding: 2rem;
  }
}
