/* Bliesgau Fassglut - Grundstil: Tokens, Skalen, EIN Knopf-System, Felder, Symbole.
   Gilt fuer alle oeffentlichen Seiten (die Verwaltung hat eigenes admin.css). */

@font-face {
  font-family: "Montserrat";
  src: url("/fonts/montserrat-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Kaushan Script";
  src: url("/fonts/kaushan-script-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Farben (Namen gemeinsam mit admin.css); --creme exakt = Logo-Hintergrund rgb(252,251,247) */
  --creme: #fcfbf7;
  --papier: #ffffff;
  --tinte: #1b1d1a;
  --tanne: #1f3d1c;
  --tanne-dunkel: #14280f;
  --blatt: #5a7d2a;
  --glut: #e8892b;
  --glut-dunkel: #c66a12;
  --holz: #8a4b1f;
  --linie: #e4dfd2;
  --grau: #5f635c;
  --rot: #b3261e;
  --text-weich: #3a3d37;
  --flaeche: #f4f2ec;
  --radius: 14px;
  --radius-feld: 10px;

  /* Schriften: genau zwei Familien */
  --schrift: "Montserrat", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --pinsel: "Kaushan Script", "Segoe Script", cursive;

  /* Groessenskala */
  --fs-klein: .875rem;
  --fs-text: 1rem;
  --fs-gross: 1.125rem;
  --fs-h3: 1.125rem;
  --fs-h2: clamp(1.75rem, 3.4vw, 2.625rem);
  --fs-h1: clamp(2.125rem, 5.4vw, 3.75rem);
  /* Gewichte */
  --fw-text: 400;
  --fw-ui: 600;
  --fw-stark: 700;
  --fw-titel: 800;

  /* Abstandsraster (Vielfache von 4 px) */
  --a1: .25rem;
  --a2: .5rem;
  --a3: .75rem;
  --a4: 1rem;
  --a5: 1.5rem;
  --a6: 2rem;
  --a7: 3rem;
  --abschnitt: clamp(3.5rem, 7vw, 6rem);

  /* Bedienelemente */
  --h-knopf: 3rem;
  --h-feld: 3rem;
  --ikon: 1.25rem;
  --ikon-gross: 3rem;
  --strich: 1.8;

  --schatten: 0 1px 2px rgba(27, 29, 26, .06), 0 8px 24px rgba(27, 29, 26, .07);
  --kopf-h: 4.5rem;
  --breite: 96rem;
  --rand: clamp(1rem, 4vw, 3rem);
  color-scheme: light;
}

/* Grosse Bildschirme: alles waechst mit (rem-basiert) statt schmalem Block */
@media (min-width: 2100px) { html { font-size: 112.5%; } }
@media (min-width: 2400px) { html { font-size: 125%; } }
@media (min-width: 3200px) { html { font-size: 150%; } }

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--kopf-h) + var(--a3));
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--creme);
  color: var(--tinte);
  font-family: var(--schrift);
  font-size: var(--fs-text);
  font-weight: var(--fw-text);
  line-height: 1.6;
  overflow-wrap: break-word;
}

/* Scrollleisten im Stil der Seite: schmal, Daumen Tanne (Hover Glut) auf Creme, runde Enden.
   Gilt auch fuer innere Bereiche (Vorschlagslisten, Nachrichtenfeld). */
html { scrollbar-gutter: stable; }
* { scrollbar-width: thin; scrollbar-color: var(--tanne) var(--creme); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--creme); }
::-webkit-scrollbar-thumb { background: var(--tanne); border-radius: 99px; border: 2px solid var(--creme); }
::-webkit-scrollbar-thumb:hover { background: var(--glut-dunkel); }

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: var(--fw-titel); letter-spacing: -.01em; }
h3 { font-size: var(--fs-h3); font-weight: var(--fw-stark); letter-spacing: 0; line-height: 1.3; }
p { margin: 0 0 1em; }

a { color: var(--tanne); text-underline-offset: .18em; }
a:hover { color: var(--holz); }

:focus-visible {
  outline: 3px solid var(--glut-dunkel);
  outline-offset: 3px;
  border-radius: 6px;
}

.pinsel {
  font-family: var(--pinsel);
  font-weight: 400;
  letter-spacing: 0;
  color: var(--tanne);
}

.nur-vorleser {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.huelle {
  width: 100%;
  max-width: var(--breite);
  margin-inline: auto;
  padding-inline: var(--rand);
}

/* ---------- Symbole: eine Strichstaerke, zwei Groessen ---------- */
.ikon { width: var(--ikon); height: var(--ikon); flex: none; stroke-width: var(--strich); }
.ikon-gross { width: var(--ikon-gross); height: var(--ikon-gross); flex: none; stroke-width: var(--strich); }

/* ---------- EIN Knopf-System ----------
   Alle Knoepfe: gleiche Hoehe, Pillenform, Schrift 1rem/700, Inhalt exakt mittig. */
.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--a2);
  height: var(--h-knopf);
  min-height: var(--h-knopf);
  padding: 0 var(--a5);
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--schrift);
  font-size: var(--fs-text);
  font-weight: var(--fw-stark);
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.knopf .ikon { margin-left: -.15rem; }
.knopf:hover { transform: translateY(-1px); }
.knopf-glut { background: var(--glut); color: var(--tinte); }
.knopf-glut:hover { background: #f09a44; color: var(--tinte); }
.knopf-tanne { background: var(--tanne); color: #fff; }
.knopf-tanne:hover { background: var(--tanne-dunkel); color: #fff; }
.knopf-rand { background: transparent; color: var(--tanne); border-color: var(--tanne); }
.knopf-rand:hover { background: var(--tanne); color: #fff; }
.knopf-hell { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.knopf-hell:hover { background: #fff; color: var(--tanne); border-color: #fff; }
.knopf-breit { width: 100%; }
.knopf[disabled], .knopf[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.knopf-reihe { display: flex; flex-wrap: wrap; gap: var(--a3); align-items: center; }
@media (max-width: 380px) { .knopf { padding: 0 var(--a4); } }

/* Runder Pfeilknopf (Kalender blaettern) */
.kal-pfeil {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--linie); border-radius: 50%; background: var(--papier); color: var(--tanne); cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.kal-pfeil:hover { background: var(--flaeche); border-color: var(--tanne); }
.kal-pfeil:active { transform: scale(.94); }
.kal-pfeil[disabled] { opacity: .35; cursor: not-allowed; background: var(--papier); border-color: var(--linie); transform: none; }

/* Textknopf (z. B. "Zurück", "ändern") */
.link-knopf {
  display: inline-flex; align-items: center; gap: var(--a1);
  min-height: 44px;
  padding: 0;
  border: 0; background: none;
  color: var(--tanne);
  font-family: var(--schrift); font-size: var(--fs-text); font-weight: var(--fw-ui);
  text-decoration: underline; text-underline-offset: .18em;
  cursor: pointer;
}
.link-knopf:hover { color: var(--holz); }

/* Kleine Auswahl-Pille (Vorschlaege) */
.pille {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px;
  padding: 0 var(--a4);
  border: 1px solid var(--linie);
  border-radius: 999px;
  background: var(--papier);
  font-family: var(--schrift); font-size: .95rem; font-weight: var(--fw-ui); line-height: 1;
  color: var(--tinte);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.pille:hover { border-color: var(--tanne); background: var(--flaeche); }

/* ---------- Felder ---------- */
.feld { min-width: 0; }
.feld > label, .feld-titel { display: block; font-weight: var(--fw-stark); margin-bottom: var(--a1); }
input[type="text"], input[type="tel"], input[type="email"], input[type="search"], textarea {
  width: 100%;
  min-height: var(--h-feld);
  padding: .7rem .9rem;
  border: 1.5px solid #cfc9b9;
  border-radius: var(--radius-feld);
  background: var(--papier);
  color: var(--tinte);
  font-family: var(--schrift);
  font-size: var(--fs-text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { resize: vertical; min-height: 5rem; line-height: 1.45; }
input:hover, textarea:hover { border-color: #a9a291; }
input:focus-visible, textarea:focus-visible { outline: none; border-color: var(--tanne); box-shadow: 0 0 0 3px rgba(198, 106, 18, .45); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--rot); }
::placeholder { color: #757a72; opacity: 1; }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.pflicht { color: var(--rot); }
.optional { font-weight: var(--fw-text); color: var(--grau); font-size: var(--fs-klein); }
.feld-fehler { margin: var(--a1) 0 0; color: var(--rot); font-size: var(--fs-klein); font-weight: var(--fw-ui); }

/* Hinweis-Kaesten */
.hinweis { padding: var(--a3) var(--a4); border-radius: var(--radius-feld); background: var(--flaeche); border-left: 5px solid var(--grau); }
.hinweis.ja { background: #eef3e6; border-left-color: var(--blatt); color: var(--tanne-dunkel); }
.hinweis.nein { background: #fbf0e3; border-left-color: var(--glut-dunkel); color: #5a2f08; }
.hinweis.fehler { background: #fbe9e7; border-left-color: var(--rot); color: #5c120d; }

/* Platzhalter, die nicht live gehen duerfen: deutlich gelb */
mark.offen {
  background: #ffe14d;
  color: var(--tinte);
  padding: .05em .3em;
  border-radius: 4px;
  font-weight: var(--fw-stark);
}
