/* Öffentliche Spendenseite (#774), Teil 1: Grundlage für alle Ansichten.
   Bühne, Karte, Schritte, Schrift, Knöpfe, Spendenstand, Hinweisseiten, Handy-Blatt.
   Vorlage: Prototyp „Bühne“ (fundraising/prototyp-spendenformular). Das Formular
   steht in spenden-formular.css, die Dankeseite in spenden-danke.css.
   Alles liegt lokal: Schriften unter /fonts, nichts von fremden Servern. */

@font-face {
  font-family: "Value Sans Pro";
  src:
    url("/fonts/value-sans-regular-pro.woff2") format("woff2"),
    url("/fonts/value-sans-regular-pro.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Value Sans Pro";
  src:
    url("/fonts/value-sans-medium-pro.woff2") format("woff2"),
    url("/fonts/value-sans-medium-pro.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Value Sans Pro";
  src:
    url("/fonts/value-sans-bold-pro.woff2") format("woff2"),
    url("/fonts/value-sans-bold-pro.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Value Serif Pro";
  src:
    url("/fonts/value-serif-regular-pro.woff2") format("woff2"),
    url("/fonts/value-serif-regular-pro.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --blau: #28367b;
  --vf-rot: #ea4f3d;
  --gelb: #f9b122;
  --gruen: #6d9254;
  --navy: #172353;
  --text: #33373d;
  --leise: #5f636b;
  --hell: #e9ebf4;
  --rand: #dcdce0;
  --feldrand: #868a91;
  --rot: #c8372a;
  --sans: "Value Sans Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Value Serif Pro", Georgia, "Times New Roman", serif;
  --e: cubic-bezier(0.22, 1, 0.36, 1);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font: 16px/1.6 var(--sans);
  color: var(--text);
  background: var(--gelb);
}

/* Bühne mit den drei Formen des Vereins */
.buehne {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--gelb);
  display: flex;
  align-items: safe center; /* hohe Karte: oben nicht abschneiden */
  justify-content: center;
  position: relative;
  overflow: clip; /* nur die Deko abschneiden, kein eigener Scrollbereich */
  padding: 40px 20px;
}
.bst {
  position: absolute;
  pointer-events: none;
}
.bst svg {
  display: block;
}
.bst-1 {
  top: -170px;
  right: -130px;
}
.bst-2 {
  bottom: -210px;
  left: -150px;
}
.bst-3 {
  bottom: 70px;
  right: calc(50% + 380px);
}
.bst-3 svg {
  transform: rotate(150deg);
}
.logo img,
.logo-oben img {
  display: block;
  height: 44px;
  width: auto;
}
.logo {
  margin-bottom: 18px;
}
.logo-oben {
  display: none;
}

/* Die Karte: weiß, mit fester Breite je Schritt (--b wird vom Skript gesetzt) */
.karte {
  position: relative;
  width: var(--b, 520px);
  max-width: 100%;
  background: #fff;
  border-radius: 14px;
  padding: 40px;
  transition: width 0.55s var(--e);
}
.schritte {
  position: relative;
  transition: height 0.45s var(--e);
}
/* Schritte schieben seitlich: vorwärts kommt der nächste von rechts, zurück von links */
.schritt {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translateX(var(--von, 28px));
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    visibility 0s linear 0.22s;
}
.schritt.raus {
  transform: translateX(var(--nach, -28px));
}
.schritt.aktiv {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    opacity 0.3s ease 0.12s,
    transform 0.45s var(--e) 0.08s,
    visibility 0s;
}
.form {
  display: contents;
}

/* Schrift */
h1 {
  font: 700 clamp(26px, 3vw, 32px) / 1.2 var(--serif);
  color: var(--blau);
  margin: 0 0 10px;
  text-wrap: balance;
}
h1:focus {
  outline: 0;
}
p {
  margin: 0 0 14px;
  font-size: 15px;
  color: var(--leise);
}
.kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rot);
  margin-bottom: 6px;
}
.zeichen {
  font: 400 44px/1 var(--serif);
  color: var(--gruen);
  margin-bottom: 10px;
}
.klein {
  font-size: 13px;
  color: var(--leise);
}
.klein a {
  color: var(--blau);
  text-underline-offset: 3px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--blau);
  outline-offset: 2px;
}

/* Knöpfe: gelb und groß für den nächsten Schritt, leise für den Weg zurück */
.haupt {
  appearance: none;
  display: block;
  border: 0;
  cursor: pointer;
  width: 100%;
  padding: 17px 24px;
  border-radius: 999px;
  background: var(--gelb);
  color: var(--navy);
  font: 700 17px/1 var(--sans);
  text-align: center;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(249, 177, 34, 0.45);
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.haupt:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(249, 177, 34, 0.55);
}
.haupt:disabled {
  cursor: progress;
  opacity: 0.7;
  transform: none;
}
.leise {
  display: block;
  margin: 10px auto 0;
  background: none;
  border: 0;
  padding: 8px 12px;
  font: 400 14px/1.4 var(--sans);
  color: var(--leise);
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  border-radius: 8px;
}
.leise:hover {
  color: var(--blau);
}

/* Fusszeile in der Karte: Impressum und Datenschutz, leise (#805) */
.fuss {
  margin: 18px 0 0;
  display: flex;
  justify-content: center;
  gap: 18px;
  font-size: 13px;
  line-height: 1.4;
}
.fuss a {
  color: var(--leise);
  text-underline-offset: 3px;
}
.fuss a:hover {
  color: var(--blau);
}

/* Spendenstand: Zahlen und Balken (Formular und Dankeseite) */
.ziel {
  margin: 16px 0 4px;
}
.ziel-zahlen {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--leise);
  margin-bottom: 6px;
}
.ziel-zahlen b {
  color: var(--blau);
  font-size: 15px;
}
.balken {
  height: 10px;
  border-radius: 5px;
  background: var(--hell);
  overflow: hidden;
}
.balken i {
  display: block;
  height: 100%;
  width: 0; /* das Skript setzt die Breite, dann wächst der Balken */
  border-radius: 5px;
  background: linear-gradient(90deg, var(--gelb), var(--vf-rot));
  transition: width 1.4s var(--e) 0.3s;
}

/* Hinweisseiten (Aktion aus, Zahlung nicht abgeschlossen ...): eine ruhige Karte */
.hinweis-karte {
  --b: 520px;
}
.hinweis-karte .haupt {
  margin-top: 18px;
}
.hinweis-karte .zeichen.warn {
  color: var(--gelb);
}

/* Ohne JavaScript geht die Spende nicht: dann nur diese Meldung */
.ohne-js {
  padding: 12px 14px;
  border-radius: 8px;
  border: 2px solid var(--rot);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

/* HANDY: die Karte kommt als Blatt von unten */
@media (max-width: 699px) {
  .buehne {
    align-items: flex-end;
    padding: 0;
  }
  .bst-3 {
    display: none;
  }
  .logo-oben {
    display: block;
    position: absolute;
    top: 22px;
    left: 22px;
  }
  .karte {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 90vh;
    max-height: 90dvh;
    overflow-y: auto;
    overflow-x: hidden; /* ausgeblendete Schritte sind 28 px nach rechts geschoben */
    border-radius: 22px 22px 0 0;
    padding: 24px 20px max(24px, env(safe-area-inset-bottom));
    box-shadow: 0 -12px 40px rgba(23, 35, 83, 0.28);
    animation: blatt-rein 0.7s var(--e) both;
  }
  .karte .logo {
    display: none;
  }
}
@keyframes blatt-rein {
  from {
    transform: translateY(105%);
  }
  to {
    transform: none;
  }
}
@media (min-width: 700px) {
  .logo-oben {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .karte,
  .schritte,
  .schritt,
  .balken i {
    transition: none;
    animation: none;
  }
}
