/* Beta Cases, Scalamento-Hausstil */

@font-face {
  font-family: "Byrd";
  src: url("fonts/byrd-extrabold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-var.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --tanne: #004323;
  --lime: #d4ff62;
  --papier: #f6f6f2;
  --nebel: #e6ece9;
  --tinte: #010e08;
  --grau: #6f7a74;
  --linie: #d5ddd8;

  --ampel-gruen: #004323;
  --ampel-gelb: #9a6300;
  --ampel-rot: #9b2418;
  --ampel-offen: #6f7a74;

  --rand: clamp(1.25rem, 5vw, 3.5rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--papier);
  color: var(--tinte);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Byrd", "Inter", sans-serif;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--tanne);
  margin: 0;
}

a { color: var(--tanne); }
a:focus-visible,
.karte:focus-visible {
  outline: 3px solid var(--tanne);
  outline-offset: 3px;
}

.huelle {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--rand);
}

/* ---------- Kopf ---------- */

.kopf {
  background: var(--tanne);
  color: var(--papier);
  padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3.5rem);
}
.kopf h1 {
  color: var(--papier);
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  max-width: 16ch;
}
.kopf .unterzeile {
  margin: 1.25rem 0 0;
  max-width: 62ch;
  font-size: clamp(1.02rem, 2.2vw, 1.2rem);
  color: #e3ece7;
}
.kopf .lime { color: var(--lime); }
.stempel {
  margin-top: 1.75rem;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a9bdb2;
}

/* ---------- Legende ---------- */

.legende {
  border-bottom: 1px solid var(--linie);
  padding: 1.5rem 0;
  background: var(--papier);
}
.legende ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 0.7rem 1.75rem;
}
.legende li {
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--grau);
}
.legende li strong { color: var(--tinte); }
.legende .punkt {
  margin-right: 0.45rem;
  vertical-align: 0.02em;
}
.legende-text::before { content: ": "; }

/* ---------- Ampel ---------- */

.ampel {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.22rem 0.7rem 0.26rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
}
.ampel::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.ampel-gruen { background: var(--ampel-gruen); }
.ampel-gelb  { background: var(--ampel-gelb); }
.ampel-rot   { background: var(--ampel-rot); }
.ampel-offen { background: var(--ampel-offen); }

.punkt {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}
.punkt-gruen { background: var(--ampel-gruen); }
.punkt-gelb  { background: var(--ampel-gelb); }
.punkt-rot   { background: var(--ampel-rot); }
.punkt-offen { background: var(--ampel-offen); }

/* ---------- Karten ---------- */

.gruppe {
  padding: clamp(2.25rem, 5vw, 3.5rem) 0 0;
}
.gruppe h2 {
  font-size: clamp(1.25rem, 2.6vw, 1.55rem);
  margin-bottom: 1.15rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.6rem;
}
.gruppe h2 .erklaerung {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--grau);
  letter-spacing: 0;
}

.karten {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  grid-auto-rows: 1fr;
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.karte {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  background: #fff;
  border: 1px solid var(--linie);
  border-radius: 14px;
  padding: 1.5rem 1.5rem 1.35rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
  height: 100%;
}
.karte:hover {
  border-color: var(--tanne);
  transform: translateY(-2px);
}
.karte h3 {
  font-size: 1.32rem;
  margin: 0;
}
.karte .ort {
  font-size: 0.85rem;
  color: var(--grau);
  margin: -0.55rem 0 0;
}
.karte .kern {
  margin: 0;
  font-size: 0.97rem;
}
.karte .fuss {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid var(--linie);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--grau);
}
.karte .fuss > span:first-child { min-width: 0; }
.karte .weiter {
  font-weight: 600;
  color: var(--tanne);
  white-space: nowrap;
  flex: none;
}

.zahlen {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.zahlen li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.9rem;
  border-bottom: 1px dotted var(--linie);
  padding-bottom: 0.3rem;
}
.zahlen .wert {
  font-weight: 700;
  color: var(--tanne);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.zahlen .jahr {
  color: var(--grau);
  font-weight: 400;
  font-size: 0.82rem;
  margin-left: 0.4rem;
}

/* ---------- Detailseite ---------- */

.zurueck {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: #a9bdb2;
  text-decoration: none;
}
.zurueck:hover { color: var(--lime); }

.fall {
  max-width: 760px;
  padding: clamp(2rem, 5vw, 3.25rem) 0 1rem;
}
.fall section { margin-bottom: 2.5rem; }
.fall h2 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--grau);
  margin-bottom: 0.7rem;
}
.fall p { margin: 0 0 0.9rem; }
.fall .kern {
  font-size: clamp(1.12rem, 2.6vw, 1.32rem);
  line-height: 1.5;
  border-left: 4px solid var(--lime);
  padding-left: 1.1rem;
  margin: 0;
}

.kasten {
  background: var(--nebel);
  border-radius: 14px;
  padding: 1.35rem 1.5rem;
}
.kasten.warnung { background: #f6e9e6; }
.kasten p:last-child { margin-bottom: 0; }

.belege { list-style: none; margin: 0; padding: 0; }
.belege li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--linie);
  font-size: 0.95rem;
}
.belege .datum {
  color: var(--grau);
  font-size: 0.85rem;
  margin-left: 0.4rem;
}
.offen {
  color: var(--ampel-gelb);
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0;
}

/* ---------- Fuß ---------- */

.fuss-bereich {
  margin-top: clamp(3rem, 7vw, 5rem);
  border-top: 1px solid var(--linie);
  padding: 2rem 0 3rem;
  font-size: 0.86rem;
  color: var(--grau);
}
.fuss-bereich p { margin: 0 0 0.4rem; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  html { scroll-behavior: auto; }
}
