/* ---------- Fußbereich -------------------------------------------------- */
/* Navy-Fläche mit heller Schrift (Weiß 13,4:1, footer-muted 7,5:1): Marke und
   Einleitung oben, vier schlichte Linklisten, darunter Rechtliches. */
.site-footer {
  --footer-text: #d5dde5;
  --footer-muted: #b8c4cf;
  --footer-line: color-mix(in oklch, #fff 22%, transparent);
  background-color: var(--color-primary-900);
  color: var(--footer-text);
  padding-top: clamp(2.5rem, 2rem + 2.5vw, 4rem);
}

.site-footer :focus-visible {
  outline-color: var(--color-accent-400);
}

.site-footer a {
  text-underline-offset: 3px;
}

.site-footer .brand__name {
  color: #fff;
}

.site-footer .brand__claim {
  color: var(--footer-muted);
}

.site-footer .brand__mark {
  color: #fff;
}

.site-footer .brand__pulse {
  stroke: var(--color-accent-400);
}

.footer-lead {
  display: grid;
  gap: 1.25rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--footer-line);
}

.footer-intro {
  max-width: 54ch;
  font-size: var(--text-fluid-sm);
  color: var(--footer-text);
}

@media (min-width: 48rem) {
  .footer-lead {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 3rem;
  }
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.25rem 2.5rem;
  padding-block: 2.5rem 3rem;
}

@media (min-width: 36rem) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .footer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.footer-title {
  font-size: var(--text-fluid-base);
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}

.footer-title::after {
  content: "";
  display: block;
  width: 2rem;
  height: 3px;
  margin-top: 0.6rem;
  background: var(--color-accent-400);
}

.footer-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  font-size: var(--text-fluid-sm);
}

.footer-list a {
  display: block;
  padding-block: 0.4rem;
  overflow-wrap: anywhere;
}

.footer-list a:hover,
.footer-legal a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-note {
  margin-top: 1rem;
  font-size: var(--text-fluid-xs);
  line-height: 1.7;
  color: var(--footer-muted);
}

/* Unten bleibt Platz für den Knopf „Nach oben“ und – bis 1024 px – für die
   feste Leiste, damit nichts dauerhaft verdeckt wird. */
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 1.5rem 4.75rem;
  border-top: 1px solid var(--footer-line);
  font-size: var(--text-fluid-xs);
  color: var(--footer-muted);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-legal a {
  display: inline-block;
  padding-block: 0.3rem;
  color: #fff;
}

/* Schlanker Fußbereich der Fehlerseite: nur Rechtliches und Copyright. */
.site-footer--bare {
  padding-top: 1rem;
}

.site-footer--bare .footer-bottom {
  border-top: 0;
}

/* ---------- Feste Leiste am Seitenende ----------------------------------- */
/* Schmal und weiß, feine Linie oben, kein Schatten: Text links, gelber Knopf
   rechts. Ab 1024 px trägt die mitlaufende Kopfzeile den Knopf. */
.sticky-cta {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.6rem max(1rem, env(safe-area-inset-right))
    calc(0.6rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: #fff;
  border-top: 1px solid var(--color-ink-200);
}

.sticky-cta__text {
  flex: 1 1 0;
  min-width: 0;
  font-size: var(--text-fluid-xs);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-primary-900);
}

.sticky-cta__actions {
  display: flex;
  flex: none;
  gap: 0.5rem;
}

.sticky-cta__btn {
  min-height: 2.75rem;
  padding-inline: 0.85rem;
}

/* Auf sehr schmalen Telefonen trägt die Leiste nur den Knopf, in voller
   Breite. */
@media (max-width: 22.49rem) {
  .sticky-cta__text {
    display: none;
  }

  .sticky-cta__actions {
    flex: 1 1 auto;
  }

  .sticky-cta__btn {
    flex: 1 1 0;
  }
}

/* Zwei Hauptstrecken: auf dem Handy teilen sie sich die ganze Breite, der Text
   steht erst ab Tablet-Breite daneben. */
.sticky-cta--pair .sticky-cta__text {
  display: none;
}

.sticky-cta--pair .sticky-cta__actions {
  flex: 1 1 auto;
}

.sticky-cta--pair .sticky-cta__btn {
  flex: 1 1 0;
  min-width: 0;
}

@media (min-width: 40rem) {
  .sticky-cta--pair .sticky-cta__text {
    display: block;
  }

  .sticky-cta--pair .sticky-cta__actions {
    flex: none;
  }

  .sticky-cta--pair .sticky-cta__btn {
    flex: none;
    padding-inline: 1.25rem;
  }
}

/* Die Leiste liegt ab dem ersten Bild über dem Seitenende – Fokus, Sprungziele
   und der Fußbereich bleiben oberhalb frei. */
@media (max-width: 63.99rem) {
  html:has(.sticky-cta) {
    scroll-padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
  }

  .sticky-cta ~ .site-footer .footer-bottom {
    padding-bottom: calc(8.5rem + env(safe-area-inset-bottom));
  }
}

@media (min-width: 64rem) {
  .sticky-cta {
    display: none;
  }
}
