/* Schrift lokal vom eigenen Server – keine Verbindung zu Google */
@font-face {
  font-family: "Roboto Slab"; font-style: normal; font-weight: 400;
  font-display: swap;
  src: url("fonts/Roboto_Slab_400.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto Slab"; font-style: normal; font-weight: 700;
  font-display: swap;
  src: url("fonts/Roboto_Slab_700.woff2") format("woff2");
}
@font-face {
  font-family: "mayartnew"; font-style: normal; font-weight: 400;
  font-display: block;
  src: url("fonts/mayartnew-Regular.woff2") format("woff2");
}

:root {
  --bg: #111;
  --fg: #f2f2f2;
  --paper: #fbfaf7;
  --ink: #1d1d1d;
  --accent: #1f6e36;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 17px/1.55 "Roboto Slab", Georgia, serif;
  background: var(--bg);
  color: var(--fg);
}

/* ---------- Startseite ---------- */
.stage { position: fixed; inset: 0; display: flex; cursor: pointer; }
.paused .bird use { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .stage { cursor: default; } }
.stripe {
  flex: 1 1 0;
  height: 100%;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .5s cubic-bezier(.2,.7,.2,1), opacity 1s;
}
.stripe.on { transform: scaleY(1); }
.stage.fade .stripe { opacity: 0; }

.birds { position: fixed; inset: 0; pointer-events: none; transition: opacity 1s; }
.stage.fade + .birds { opacity: 0; }
.bird {
  position: absolute; aspect-ratio: 100 / 60; overflow: visible;
  fill: #151515;
  opacity: 0;
  transition: opacity .6s;
}
.bird.on { opacity: 1; }
.bird use { transform-origin: 50% 70%; animation: flap 1.1s ease-in-out infinite alternate; }
@keyframes flap { from { transform: scaleY(1); } to { transform: scaleY(.55); } }

.brand {
  position: fixed; top: 16px; left: clamp(16px, 4vw, 40px);
  font-family: "mayartnew", "Roboto Slab", serif;
  font-weight: 400; font-size: 1.1rem;
  text-shadow: 0 1px 4px rgba(0,0,0,.7);
}
.overlay {
  position: fixed; left: 0; right: 0; bottom: 0;
  padding: 40px clamp(16px, 4vw, 40px) 18px;
  /* Raster: Jahreszahl / Titel + Menü / Quelle */
  display: grid; grid-template-columns: minmax(0, 40em) auto;
  justify-content: space-between; align-items: center; column-gap: 24px;
  background: linear-gradient(transparent, rgba(0,0,0,.6));
  text-shadow: 0 1px 4px rgba(0,0,0,.7);
}
.caption { display: contents; }
.caption > * { grid-column: 1; transition: opacity .8s; }
.caption.hide > * { opacity: 0; }
.nav { grid-column: 2; grid-row: 2; }
@media (max-width: 640px) {
  .overlay { grid-template-columns: minmax(0, 1fr); }
  .nav { grid-column: 1; grid-row: 4; margin-top: 12px; }
}
.year {
  font-size: clamp(2.4rem, 8vw, 5rem);
  font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.title { font-size: 1.4rem; font-weight: 600; margin-top: .35em; }
.source { font-size: .7rem; color: #ddd; }
.source a { color: inherit; }

.nav { display: flex; gap: 20px; align-items: center; font-size: .9rem; }
.nav a { color: var(--fg); }
.nav button {
  font: inherit; color: var(--fg); background: rgba(0,0,0,.4);
  border: 1px solid rgba(255,255,255,.55); border-radius: 4px;
  padding: 4px 12px; cursor: pointer;
}
.nav button:focus-visible, .nav a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .stripe, .caption > *, .bird { transition: none; }
  .bird use { animation: none; }
}

/* ---------- Textseiten ---------- */
body.text { background: var(--paper); color: var(--ink); height: auto; }
.band { display: flex; height: 16px; }
.band span { flex: 1 1 0; }
main.page { max-width: 44rem; margin: 0 auto; padding: 40px 16px 60px; }
main.page h1 { font-size: 1.8rem; margin: 0 0 1em; }
main.page h2 { font-size: 1.1rem; margin: 1.8em 0 .4em; }
main.page a { color: var(--accent); }
.back { font-size: .9rem; }
footer.page-foot {
  max-width: 44rem; margin: 0 auto; padding: 0 16px 40px;
  font-size: .9rem; display: flex; gap: 18px;
}
footer.page-foot a { color: var(--accent); }
