/* Gemeinsamer Fuss aller Seiten. Das Markup erzeugt scripts/footer.mjs, nicht von
   Hand in die Seiten schreiben. Die Farben und Schriften kommen aus styles.css,
   damit der Fuss zum Rest der Seite passt.
   Aufbau: vier Spalten (Wortmarke mit Kontakt, Angebot, Branchen, Ueber routinefrei),
   unten Copyright und Rechtliches. Keine Einladungszeile: die steht als Kasten am
   Ende jeder Seite bzw. als Formular auf der Startseite. */
.rf-footer {
  /* Dunkler Fuss (29.09.2026, Wunsch: "Fuss in derselben Farbe wie der Kontakt-Abschnitt"):
     Tinte als Grund, helle Schrift. Das Akzentorange ist fuer den dunklen Grund aufgehellt
     (#f08a5d, 6.5:1 auf #14233a, AA fuer kleine Schrift); vorher auf hellem Grund #a1300f. */
  --ff-paper: var(--ink, #14233a);
  --ff-ink: var(--paper, #f6f1e8);
  --ff-muted: rgba(246, 241, 232, 0.72);
  --ff-line: rgba(246, 241, 232, 0.16);
  --ff-accent: #f08a5d;
  background: var(--ff-paper);
  color: var(--ff-ink);
  border-top: 1px solid var(--ff-line);
  margin: 72px 0 0;
  font-family: var(--body, 'Instrument Sans', 'Segoe UI', sans-serif);
  font-size: 0.94rem;
  line-height: 1.65;
  text-align: start;
}
.rf-footer-inner { max-width: var(--max, 1140px); margin-inline: auto; padding: 8px var(--wrap-pad, 28px) 24px; }

.rf-footer a:not(.btn) { color: inherit; text-decoration: none; transition: color 0.18s ease; }
.rf-footer a:not(.btn):hover { color: var(--ff-accent); text-decoration: underline; text-underline-offset: 5px; }
.rf-footer a:focus-visible { outline: 2px solid var(--ff-accent); outline-offset: 4px; border-radius: 4px; }

/* Vier Spalten: die erste (Wortmarke, Beschreibung, Kontakt) etwas breiter. */
.rf-footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1.15fr 1fr; gap: 32px 40px;
  padding: 36px 0 34px;
}
.rf-footer-brand { display: inline-flex; align-items: center; min-height: 44px; font-size: 1.6rem; line-height: 1.3; }
.rf-footer-description { max-width: 30ch; margin: 12px 0 0; color: var(--ff-muted); font-size: 0.88rem; }
.rf-footer-identity .rf-footer-heading { margin-top: 22px; }

.rf-footer-heading {
  margin: 0 0 12px; color: var(--ff-muted);
  font-family: var(--body, 'Instrument Sans', sans-serif);
  font-size: 0.8rem; font-weight: 600; line-height: 1.5; letter-spacing: 0;
}
.rf-footer nav ul { list-style: none; margin: 0; padding: 0; }
.rf-footer nav li a { display: inline-flex; align-items: center; min-height: 36px; padding: 3px 0; }
.rf-footer nav li a[aria-current="page"] { color: var(--ff-accent); }
.rf-footer address { font-style: normal; font-size: 0.88rem; line-height: 1.7; }
.rf-footer address a { display: inline-block; min-height: 36px; padding-top: 6px; overflow-wrap: anywhere; }
.rf-footer address > span:last-child { color: var(--ff-muted); }

.rf-footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding-top: 18px; border-top: 1px solid var(--ff-line);
  color: var(--ff-muted); font-size: 0.78rem;
}
.rf-footer-bottom p { margin: 0; }
.rf-footer-legal { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.rf-footer-legal a { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; }
.rf-footer [dir='ltr'] { unicode-bidi: isolate; }

/* Methodenhinweis von /demo und /check, frueher der eigene Seitenfuss. */
.rf-method-note {
  max-width: 900px; margin: 36px auto 0; padding: 22px var(--wrap-pad, 28px) 0;
  border-top: 1px solid var(--line, rgba(20, 35, 58, 0.10));
  color: var(--ink-2, #46566e); font-size: 0.85rem; line-height: 1.7;
}

/* Tablet: Wortmarke und Kontakt ueber die volle Breite, die drei Listen darunter. */
@media (max-width: 900px) {
  .rf-footer-grid { grid-template-columns: repeat(3, 1fr); gap: 28px 32px; }
  .rf-footer-identity { grid-column: 1 / -1; }
  .rf-footer-description { max-width: 40ch; }
}

/* Handy: alles untereinander, jede Linkliste zweispaltig, Tippziele 44px. */
@media (max-width: 720px) {
  .rf-footer { margin-top: 48px; }
  .rf-footer-inner { padding-top: 4px; }
  .rf-footer-grid { grid-template-columns: 1fr; gap: 26px; padding: 28px 0 24px; }
  .rf-footer-heading { margin-bottom: 6px; }
  .rf-footer nav ul { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .rf-footer nav li a, .rf-footer-legal a, .rf-footer address a { min-height: 44px; }
  .rf-footer address a { display: inline-flex; align-items: center; padding-top: 0; }
  .rf-footer-bottom { display: block; }
  .rf-footer-legal { margin-top: 8px; }
}
/* Platz fuer die Chat-Blase am unteren Rand, nur auf Seiten, die eine haben
   (Startseiten). Ueberall sonst liess der Abstand einen leeren Streifen unter dem Fuss. */
@media (max-width: 700px) { body:has(.rf-launch) .rf-footer-inner { padding-bottom: 88px; } }
@media (prefers-reduced-motion: reduce) { .rf-footer a { transition: none; } }

/* Handy kompakter (29.09.2026, Wunsch: "weniger Leerraum im Fuss"): Linkzeilen 34px statt 44px
   (Zielgroesse bleibt ueber 24px, WCAG 2.5.8), kleinere Abstaende zwischen den Gruppen, und
   unten nur so viel Platz, dass die Chat-Blase (48px, 12px ueber dem Rand) die Zeile mit
   Impressum/Datenschutz nicht verdeckt. */
@media (max-width: 720px) {
  .rf-footer-grid { gap: 18px; padding: 22px 0 18px; }
  .rf-footer-identity .rf-footer-heading { margin-top: 16px; }
  .rf-footer nav li a, .rf-footer-legal a { min-height: 34px; padding: 0; }
  .rf-footer address { line-height: 1.5; }
  .rf-footer address a { min-height: 30px; }
  .rf-footer-bottom { padding-top: 14px; gap: 6px; }
  .rf-footer-legal { margin-top: 2px; }
}
@media (max-width: 700px) { body:has(.rf-launch) .rf-footer-inner { padding-bottom: 68px; } }

/* Wortmarke im dunklen Fuss: "frei" im helleren Logo-Orange (4.4:1, grosse Schrift) */
.rf-footer .wordmark .frei { color: var(--accent, #e4572e); }
