/* Geissenzaun, Richtung A «Fotoalbum» nach Iris' Spezifikation (Gestaltung-Spezifikation.md, 28.11.2026).
   Basis: Iris' Skizze (skizze.css), ergänzt um Zustände, die erst im Bau entstehen (unten «Ergänzungen Leo»).
   Nur hell (Spec 2.4). Farben nur in :root. */
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-grotesk-latin-wght.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
}
:root {
  color-scheme: only light;
  --grund: #FFFFFF;
  --flaeche: #F2F1EC;
  --platzhalter: #ECEAE3;
  --linie: #DCDAD2;
  --rahmen: #7C7E77;
  --spur: #E3E1D9;
  --tinte: #1B1C1A;
  --mut: #5B5D57;
  --signal: #FFC61A;
  --signal-hover: #F2B600;
  --fehler: #B3261E;
  --band: #FFE680;
  --schrift: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --text: 40rem;
  --weit: 64rem;
  --rand: 20px;
  --r: 6px;
  --knopf-h: 52px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--grund); color: var(--tinte); font: 400 17px/1.55 var(--schrift); font-variant-numeric: tabular-nums; }
@media (min-width: 48rem) { body { font-size: 18px; } }
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--tinte); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h2 { font-size: 26px; line-height: 1.15; font-weight: 750; letter-spacing: -.005em; margin-bottom: 16px; }
@media (min-width: 48rem) { h2 { font-size: 34px; margin-bottom: 20px; } }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--tinte); outline-offset: 3px; }
.ph { color: var(--mut); }

.modus-band { background: var(--band); color: var(--tinte); padding: 10px var(--rand); font-size: 15px; font-weight: 600; text-align: center; }

/* ---------- Knöpfe ---------- */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: var(--knopf-h); padding: 0 20px;
  border-radius: var(--r); border: 2px solid transparent; font: 700 17px/1.1 var(--schrift); text-decoration: none; cursor: pointer; text-align: center; }
.knopf-signal { background: var(--signal); color: var(--tinte); border-color: var(--signal); }
.knopf-signal:hover { background: var(--signal-hover); border-color: var(--signal-hover); }
.knopf-tinte { background: var(--tinte); color: #fff; border-color: var(--tinte); }
.knopf-tinte:hover { background: #000; }
.knopf-umriss { background: var(--grund); color: var(--tinte); border-color: var(--tinte); }
.knopf-umriss:hover { background: var(--flaeche); }
.knopf svg { width: 20px; height: 20px; flex: none; fill: currentColor; }
.knopf-paar { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }

/* ---------- Hero ---------- */
.hero-bild { position: relative; height: clamp(200px, 36svh, 380px); background: var(--platzhalter); overflow: hidden; }
.hero-bild img { width: 100%; height: 100%; object-fit: cover; object-position: var(--hero-fokus, 50% 45%); }
.hero-text { padding: 20px var(--rand) 32px; }
.ort { font-size: 15px; font-weight: 550; color: var(--mut); margin: 0 0 6px; }
.hero h1 { font-size: 34px; line-height: 1.06; font-weight: 800; letter-spacing: -.015em; margin-bottom: 18px; }
.lead { font-size: 18px; line-height: 1.5; margin: 20px 0 0; }
@media (min-width: 60rem) {
  .hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); min-height: min(86vh, 780px); }
  .hero-bild { height: auto; }
  /* Bild bestimmt die Zeilenhöhe nicht (Hochkant-Foto würde den Hero sonst 1300 px hoch machen) */
  .hero-bild img { position: absolute; inset: 0; }
  .hero-text { align-self: center; padding: 48px 56px; max-width: 34rem; }
  .hero h1 { font-size: 54px; margin-bottom: 28px; }
  .ort { font-size: 17px; }
}

/* ---------- Zähler ---------- */
.zaehler { margin: 0 0 20px; }
.zahl-zeile { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 10px; }
.zahl-zeile strong { font-size: 40px; line-height: 1; font-weight: 800; letter-spacing: -.02em; }
.zahl-zeile span { font-size: 17px; color: var(--mut); }
.balken { height: 12px; background: var(--spur); border-radius: 2px; overflow: hidden; }
.balken > div { height: 100%; background: var(--tinte); width: 0; transition: width .8s ease-out; }
@media (prefers-reduced-motion: reduce) { .balken > div { transition: none; } }
.detail-zeile { display: flex; justify-content: space-between; gap: 12px; margin: 10px 0 0; font-size: 15px; color: var(--mut); }
.detail-zeile b { color: var(--tinte); font-weight: 700; }
@media (min-width: 60rem) { .zahl-zeile strong { font-size: 52px; } .detail-zeile { font-size: 16px; } }

/* ---------- Abschnitte ---------- */
.abschnitt { padding: 56px var(--rand); border-top: 1px solid var(--linie); }
.abschnitt > * { max-width: var(--text); margin-left: auto; margin-right: auto; }
@media (min-width: 48rem) { .abschnitt { padding: 88px var(--rand); } }
.bild-breit { margin: 24px auto 0; }
.bild-breit img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--platzhalter); }
@media (max-width: 47.99rem) { .bild-breit { margin-left: calc(-1 * var(--rand)); margin-right: calc(-1 * var(--rand)); } .bild-breit figcaption { padding: 0 var(--rand); } }
@media (min-width: 48rem) { .bild-breit img { border-radius: 4px; } }
figcaption { font-size: 15px; color: var(--mut); margin-top: 8px; }
/* «Wer wir sind»: Quervideo 16:9 (Iris, Runde 2). Doppelte Klasse, weil .video-karte { margin: 0 } weiter unten steht. */
.video-karte.video-quer { margin: 0 auto 24px; }
.video-quer .video-rahmen { aspect-ratio: 16 / 9; }
@media (max-width: 47.99rem) {
  .video-karte.video-quer { margin-left: calc(-1 * var(--rand)); margin-right: calc(-1 * var(--rand)); }
  .video-quer .video-rahmen { border-radius: 0; }
  .video-quer figcaption { padding: 0 var(--rand); }
}
@media (min-width: 48rem) { .video-karte.video-quer { margin-bottom: 32px; } }

/* Zaun-Skizze (Iris, Runde 3): ganzes Bild zeigen, nicht wie .bild-breit auf 4:3 schneiden */
.skizze img { aspect-ratio: 1000 / 540; object-fit: contain; background: none; }
.bild-breit.skizze { margin-bottom: 24px; } /* Abstand Legende → Einleitungssatz (Iris, Abnahme R3) */
/* Hochformat in «Dringend» (Iris, Runde 4): am Desktop schmaler und bündig links mit der Textspalte */
.bild-breit.hoch img { aspect-ratio: 4 / 5; }
@media (min-width: 48rem) {
  .bild-breit.hoch { max-width: 26rem; margin-left: max(0px, calc(50% - 20rem)); margin-right: auto; }
}

/* «Was ein guter Geissenzaun braucht»: einfache Liste */
.liste { padding-left: 1.2em; margin-top: 0; margin-bottom: 0; }
.liste li { margin-bottom: .6em; padding-left: .2em; }
.liste li::marker { color: var(--mut); }
.kosten-satz { margin-top: 24px; } /* Kostentext am Ende von #zaun (Daniel, 28.11.2026) */

/* Galerie */
.galerie-abschnitt > .galerie, .galerie-abschnitt > .videos { max-width: var(--weit); }
.galerie { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; margin-top: 8px; }
.galerie button { all: unset; cursor: zoom-in; display: block; }
.galerie button:focus-visible { outline: 3px solid var(--tinte); outline-offset: 2px; }
/* Abnahme Iris R1 (7): randlose Galerie am Handy, Ring nach innen. Weisser Innenring über ::after,
   weil ein inset-box-shadow vom Bild verdeckt würde (Outline liegt über dem Inhalt, Schatten darunter). */
.galerie button { position: relative; }
@media (max-width: 47.99rem) {
  .galerie button:focus-visible { outline-offset: -3px; box-shadow: inset 0 0 0 6px #fff; }
  .galerie button:focus-visible::after { content: ""; position: absolute; inset: 3px; box-shadow: inset 0 0 0 3px #fff; pointer-events: none; }
}
.galerie img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--platzhalter); }
@media (max-width: 47.99rem) { .galerie { margin-left: calc(-1 * var(--rand)); margin-right: calc(-1 * var(--rand)); } }
@media (min-width: 48rem) { .galerie { grid-template-columns: repeat(3, 1fr); gap: 8px; } .galerie img { border-radius: 3px; } }

/* Hochkant-Videos */
.videos { display: grid; grid-auto-flow: column; grid-auto-columns: 68%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 40px calc(-1 * var(--rand)) 0; padding: 0 var(--rand) 8px; scroll-padding: 0 var(--rand); }
.video-karte { margin: 0; scroll-snap-align: start; }
.video-rahmen { position: relative; aspect-ratio: 9 / 16; border-radius: var(--r); overflow: hidden; background: var(--platzhalter); }
.video-rahmen img { width: 100%; height: 100%; object-fit: cover; }
.abspielen { position: absolute; left: 12px; bottom: 12px; width: 56px; height: 56px; border-radius: 50%; background: var(--tinte); border: 0; display: grid; place-items: center; cursor: pointer; }
.abspielen svg { width: 22px; height: 22px; fill: #fff; margin-left: 3px; }
.video-karte figcaption { color: var(--tinte); font-size: 16px; font-weight: 600; margin-top: 10px; }
.video-karte figcaption span { color: var(--mut); font-weight: 400; }
@media (min-width: 48rem) { .videos { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; margin-left: auto; margin-right: auto; padding: 0; max-width: 48rem; } .galerie-abschnitt > .videos { max-width: 48rem; } }

/* ---------- Spenden ---------- */
.spenden { background: var(--flaeche); }
.spendenkarte { background: var(--grund); border: 1px solid var(--linie); border-radius: 8px; padding: 24px 20px; max-width: 32rem !important; }
@media (min-width: 48rem) { .spendenkarte { padding: 32px; } }
.mini-stand { font-size: 15px; color: var(--mut); margin: -6px 0 20px; }
.mini-stand b { color: var(--tinte); }
fieldset { border: 0; margin: 0; padding: 0; }
legend { font-weight: 700; margin-bottom: 10px; padding: 0; }
.betraege { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 20px; }
@media (min-width: 30rem) { .betraege { grid-template-columns: repeat(4, 1fr); } }
.betraege label { position: relative; }
.betraege input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.betraege span { display: flex; align-items: center; justify-content: center; min-height: 56px; border: 2px solid var(--rahmen); border-radius: var(--r); font-weight: 700; font-size: 18px; background: var(--grund); }
.betraege input:hover + span { border-color: var(--tinte); }
.betraege input:checked + span { background: var(--tinte); border-color: var(--tinte); color: #fff; }
.betraege input:focus-visible + span { outline: 3px solid var(--tinte); outline-offset: 3px; }
.frei-label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.frei { display: flex; align-items: stretch; height: 56px; border: 2px solid var(--rahmen); border-radius: var(--r); overflow: hidden; margin-bottom: 20px; }
.frei:focus-within { border-color: var(--tinte); outline: 3px solid var(--tinte); outline-offset: 2px; }
.frei span { display: grid; place-items: center; padding: 0 14px; background: var(--flaeche); color: var(--mut); font-weight: 600; border-right: 1px solid var(--linie); }
.frei input { flex: 1; min-width: 0; border: 0; padding: 0 14px; font: 600 18px var(--schrift); color: var(--tinte); background: var(--grund); outline: none; }
.spenden-knopf { width: 100%; min-height: 56px; font-size: 18px; }
.zahlarten { font-size: 15px; color: var(--mut); margin: 12px 0 0; }
.klein { font-size: 15px; color: var(--mut); }
.spendenkarte .klein { margin: 8px 0 0; }

/* ---------- FAQ ---------- */
details { border-top: 1px solid var(--linie); }
details:last-of-type { border-bottom: 1px solid var(--linie); }
summary { list-style: none; display: flex; gap: 10px; align-items: baseline; min-height: 52px; padding: 14px 0; font-weight: 650; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; flex: none; width: 1em; font-weight: 700; }
details[open] summary::before { content: "–"; }
details p { padding-left: calc(1em + 10px); margin-bottom: 18px; }

/* ---------- Teilen ---------- */
.nachricht { background: var(--flaeche); border-radius: var(--r); padding: 14px 16px; font-size: 15px; line-height: 1.5; margin: 0 0 16px; }
@media (min-width: 48rem) { .nachricht { max-width: 30rem; } }
.nachricht small { display: block; font-size: 14px; color: var(--mut); margin-bottom: 4px; font-weight: 600; }
.teilen { display: grid; gap: 8px; }
.teilen .knopf { width: 100%; }
.teilen-raster { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.teilen-raster .knopf { border-color: var(--rahmen); font-size: 16px; font-weight: 650; padding: 0 12px; }
.teilen-raster .knopf:hover { border-color: var(--tinte); }
.teilen > .knopf-umriss { border-color: var(--rahmen); font-size: 16px; font-weight: 650; }
.kopiert { font-size: 15px; font-weight: 600; min-height: 1.4em; margin: 4px 0 0; }
@media (min-width: 48rem) { .teilen { max-width: 30rem; } }

/* Blatt (Dialog) */
.blatt { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 100%; max-height: 88svh; border-radius: 12px 12px 0 0; background: var(--grund); color: var(--tinte); }
.blatt::backdrop { background: rgba(27, 28, 26, .55); }
.blatt-innen { padding: 16px var(--rand) calc(20px + env(safe-area-inset-bottom)); }
.blatt-kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.blatt-kopf h2 { margin: 0; font-size: 22px; }
.zu { width: 44px; height: 44px; border: 0; background: var(--flaeche); border-radius: 50%; font: 600 22px/1 var(--schrift); cursor: pointer; color: var(--tinte); }
@media (min-width: 48rem) { .blatt { margin: auto; max-width: 30rem; border-radius: 8px; } }

/* Klebende Handy-Leiste */
.leiste { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--grund); border-top: 1px solid var(--linie);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); transform: translateY(110%); transition: transform .2s ease-out; }
.leiste.an { transform: none; }
@media (prefers-reduced-motion: reduce) { .leiste { transition: none; } }
@media (min-width: 60rem) { .leiste { display: none; } }

/* Fuss */
.fuss { background: var(--flaeche); padding: 48px var(--rand) calc(96px + env(safe-area-inset-bottom)); font-size: 15px; }
.fuss > * { max-width: var(--text); margin-left: auto; margin-right: auto; }
.fuss h2 { font-size: 18px; margin-bottom: 10px; }
address { font-style: normal; margin-bottom: 16px; line-height: 1.6; }
@media (min-width: 60rem) { .fuss { padding-bottom: 56px; } }

/* Danke-Seite */
.danke-bild { height: clamp(140px, 22svh, 280px); background: var(--platzhalter); overflow: hidden; }
.danke-bild img { width: 100%; height: 100%; object-fit: cover; object-position: var(--danke-fokus, 50% 30%); }
/* Abnahme Iris R1 (3): ab 48rem nur in der Textspalte */
@media (min-width: 48rem) { .danke-bild { width: calc(100% - 2 * var(--rand)); max-width: var(--text); margin: 24px auto 0; border-radius: 4px; height: 260px; } }
.danke { padding: 24px var(--rand) 48px; max-width: calc(var(--text) + 2 * var(--rand)); margin: 0 auto; }
.danke h1 { font-size: 40px; line-height: 1.05; font-weight: 800; letter-spacing: -.015em; margin-bottom: 12px; }
.danke h2 { font-size: 22px; margin: 28px 0 12px; }
.danke .zaehler { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--linie); }


/* ---------- Ergänzungen Leo ---------- */
[hidden] { display: none !important; }
.ph { font-style: normal; }
.stand-fehler { font-size: 15px; color: var(--mut); margin: 8px 0 0; }
.fehler { color: var(--fehler); font-weight: 600; font-size: 15px; margin: -8px 0 12px; }
.frei.ungueltig { border-color: var(--fehler); }
.hinweis { background: var(--band); color: var(--tinte); border-radius: var(--r); padding: 12px 14px; font-size: 15px; margin: 16px 0 0; }
.spenden-knopf:disabled { opacity: .7; cursor: wait; }
.knopf:focus-visible, .zu:focus-visible, .pfeil:focus-visible, .pause:focus-visible, .abspielen:focus-visible { outline: 3px solid var(--tinte); outline-offset: 3px; }

/* Hero-Loop-Video (nur wenn media/hero-loop.mp4 existiert) + Pause-Knopf (WCAG 2.2.2) */
.hero-bild video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--hero-fokus, 50% 45%); }
.pause { position: absolute; right: 12px; bottom: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--tinte); color: #fff; display: grid; place-items: center; cursor: pointer; }
.pause svg { width: 18px; height: 18px; fill: #fff; }
.pause:focus-visible { outline-color: #fff; box-shadow: 0 0 0 6px var(--tinte); }

/* Videos: Player nach dem Antippen */
.video-rahmen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.video-karte figcaption .ph { font-weight: 400; }
.video-karte figcaption .dauer { color: var(--mut); font-weight: 400; }

/* Galerie: «Alle Bilder zeigen», Bild gross */
.galerie button.mehr { display: none; }
.galerie.alle button.mehr { display: block; }
.alle-bilder { display: flex; margin: 16px auto 0; border-color: var(--rahmen); font-size: 16px; font-weight: 650; }
.bild-dialog { border: 0; padding: 0; margin: 0; width: 100vw; height: 100svh; max-width: 100vw; max-height: 100svh; background: var(--tinte); }
.bild-dialog::backdrop { background: var(--tinte); }
.bild-dialog img { width: 100%; height: 100%; object-fit: contain; }
.zu-hell { position: absolute; top: 12px; right: 12px; }
.pfeil { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--grund); color: var(--tinte); font: 600 28px/1 var(--schrift); cursor: pointer; display: none; }
.pfeil-links { left: 12px; } .pfeil-rechts { right: 12px; }
@media (min-width: 48rem) { .pfeil { display: grid; place-items: center; } }
.bild-dialog .zu:focus-visible, .bild-dialog .pfeil:focus-visible { outline-color: #fff; }

/* Teilen: Danke-Seite Nachricht unter den Knöpfen */
.danke .nachricht { margin: 16px 0 0; }
.teilen-hinweis { font-size: 14px; color: var(--mut); margin: 0; }

/* Einfache Unterseiten (Abbruch, Datenschutz, 404) */
.einfach { max-width: calc(var(--text) + 2 * var(--rand)); margin: 0 auto; padding: 48px var(--rand); }
.einfach h1 { font-size: 34px; line-height: 1.1; font-weight: 800; letter-spacing: -.015em; margin-bottom: 16px; }
