/* Grundlage für alle Entwürfe: Rücksetzen, Griffleiste der Entwürfe, vorgeführte Anfrage, Fuß.
   Farben und Schrift setzt jedes Thema über die Variablen. */

:root {
  --grund: #ffffff;
  --schrift: #14181c;
  --leise: #55606a;
  --linie: #c9d0d6;
  --griff: #14181c;
  --griff-schrift: #ffffff;
  --knopf: #14181c;
  --knopf-schrift: #ffffff;
  --rand: 1.25rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--grund);
  color: var(--schrift);
  font: 1rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

/* Wahl der Entwürfe: dunkle Leiste ganz oben, im Fluss der Seite. Sie ist im ersten Bildschirm sichtbar und liegt
   nie über Text. Eine Ziffer je Entwurf, die gewählte ist gefüllt. */

.wahl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0.125rem max(var(--rand), calc((100vw - 76rem) / 2 + var(--rand)));
  background: var(--griff);
  color: var(--griff-schrift);
  font-size: 1rem;
  line-height: 1.2;
}

.wahl-wort {
  font-weight: 700;
}

.wahl-kurz {
  display: none;
}

.wahl-ziffern {
  display: flex;
  gap: 0.25rem;
}

.wahl a {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.wahl a[aria-current] {
  background: var(--griff-schrift);
  color: var(--griff);
  text-decoration: none;
}

.wahl a:not([aria-current]):hover {
  box-shadow: inset 0 0 0 2px var(--griff-schrift);
}

/* Sehr schmal (Zoom 200 % auf dem Telefon): nur die Ziffern */
@media (max-width: 16rem) {
  .wahl .wahl-wort {
    display: none;
  }
}

@media (max-width: 34rem) {
  .wahl-lang {
    display: none;
  }

  .wahl-kurz {
    display: inline;
  }
}

/* Pfeil nach oben: fest unten rechts, 44 px. Wo der Browser es kann, erscheint er erst nach dem ersten Bildschirm
   (scroll-gesteuerte Animation, ohne Skript); sonst ist er immer sichtbar. */

.hoch {
  position: fixed;
  z-index: 20;
  right: 0.75rem;
  bottom: 0.75rem;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 2px solid var(--griff-schrift);
  border-radius: 50%;
  background: var(--griff);
  color: var(--griff-schrift);
}

.hoch svg {
  width: 1.375rem;
  height: 1.375rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@supports (animation-timeline: scroll()) {
  .hoch {
    animation: hoch-zeigen linear both;
    animation-timeline: scroll(root);
    animation-range: 0 60vh;
  }

  @keyframes hoch-zeigen {
    0%,
    85% {
      opacity: 0;
      visibility: hidden;
    }

    100% {
      opacity: 1;
      visibility: visible;
    }
  }
}

/* Vorgeführte Anfrage */

.anfrage {
  display: grid;
  gap: 0.875rem;
  max-width: 30rem;
}

.feld {
  display: grid;
  gap: 0.25rem;
}

.feld label {
  font-weight: 700;
}

.feld input,
.feld select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.625rem;
  border: 2px solid var(--schrift);
  border-radius: 0.25rem;
  background: var(--grund);
  color: var(--schrift);
  font: inherit;
}

.anfrage-knoepfe {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.anfrage button {
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  border: 2px solid var(--knopf);
  border-radius: 0.25rem;
  background: var(--knopf);
  color: var(--knopf-schrift);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.anfrage button.leise {
  background: transparent;
  color: var(--knopf);
}

.anfrage-hinweis {
  margin: 0;
  padding: 0.75rem 0.875rem;
  border-left: 0.375rem solid var(--knopf);
  background: color-mix(in srgb, var(--knopf) 8%, var(--grund));
  font-weight: 700;
}

.anfrage-klein {
  margin: 0;
  color: var(--leise);
  font-size: 0.875rem;
}

/* Fuß */

.fuss {
  margin-top: 4rem;
  padding: 2rem var(--rand) 5rem;
  border-top: 1px solid var(--linie);
  font-size: 0.9375rem;
}

.fuss p {
  margin: 0 0 0.75rem;
  max-width: 44rem;
}

.fuss a {
  display: inline-block;
  padding: 0.375rem 0;
  margin-right: 1rem;
}

.fuss-muster,
.fuss-macher {
  color: var(--leise);
}

/* Wechsel zwischen den Entwürfen: weiches Überblenden, wo der Browser es kann und niemand Ruhe verlangt. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}
