/* lehrpfade — Base-Styles. Mobile-first, WCAG AA Kontrast. */

:root {
  --color-bg: #fafaf7;
  --color-surface: #ffffff;
  --color-text: #1a1f1a;     /* ~16:1 auf bg */
  --color-muted: #545c54;    /* ~7:1 auf bg */
  --color-accent: #2d5a3d;   /* Naturgrün, ~8:1 auf bg */
  --color-accent-hover: #1f3f2a;
  --color-border: #d8ddd6;

  --radius: 8px;
  --space-s: 0.5rem;
  --space-m: 1rem;
  --space-l: 2rem;
  --space-xl: 3rem;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 var(--space-m);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
}
.skip-link:focus {
  left: var(--space-m);
  top: var(--space-m);
  background: var(--color-text);
  color: #fff;
  padding: var(--space-s) var(--space-m);
  border-radius: var(--radius);
  z-index: 1000;
}

a { color: var(--color-accent); text-decoration: underline; }
a:hover, a:focus { color: var(--color-accent-hover); }
a:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

h1, h2, h3 {
  font-family: var(--font-serif);
  line-height: 1.25;
  margin: 0 0 var(--space-m);
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 var(--space-m); }

/* Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-m) 0;
}
.header-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  align-items: flex-start;
}
.brand {
  text-decoration: none;
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-mark { font-weight: 700; font-size: 1.1rem; }
.brand-sub { font-size: 0.85rem; color: var(--color-muted); }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-m);
}
.site-nav a {
  text-decoration: none;
  color: var(--color-text);
  padding: var(--space-s) 0;
}
.site-nav a:hover { color: var(--color-accent); }

@media (min-width: 40rem) {
  .header-inner { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* Main */
main { min-height: 60vh; padding: var(--space-l) 0; }

.hero { padding: var(--space-l) var(--space-m); }
.lead { font-size: 1.15rem; color: var(--color-muted); max-width: 40rem; }
.content { max-width: 44rem; }

.muted { color: var(--color-muted); font-size: 0.9rem; }
.tbd {
  padding: var(--space-m);
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  color: var(--color-muted);
  font-style: italic;
}

/* Card list (Lehrpfade-Übersicht) */
.card-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-m);
  grid-template-columns: 1fr;
}
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-m);
}
.card h2 { margin: 0 0 var(--space-s); }
.card h2 a { text-decoration: none; }
.card-meta { color: var(--color-muted); margin: 0; font-size: 0.9rem; }

@media (min-width: 40rem) {
  .card-list { grid-template-columns: repeat(2, 1fr); }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-l) 0;
  background: var(--color-surface);
  margin-top: var(--space-xl);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  color: var(--color-muted);
  font-size: 0.9rem;
}
.footer-inner p { margin: 0; }
.footer-legal a { margin-right: var(--space-s); }

@media (min-width: 40rem) {
  .footer-inner { flex-direction: row; justify-content: space-between; }
}

/* ------------------------------------------------------------------
   Arten — Übersichts-Grid
   ------------------------------------------------------------------ */
.arten-grid {
  list-style: none;
  padding: 0;
  margin: var(--space-l) 0 0;
  display: grid;
  gap: var(--space-m);
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
}
.art-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.art-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.art-card-link { display: block; text-decoration: none; color: var(--color-text); }

.art-card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--color-bg);
  overflow: hidden;
}
.art-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  background: repeating-linear-gradient(45deg, var(--color-bg), var(--color-bg) 8px, #f0ede5 8px, #f0ede5 16px);
}
.art-card-placeholder-label { font-style: italic; font-size: 0.9rem; }

.art-card-nr {
  position: absolute;
  top: var(--space-s);
  left: var(--space-s);
  background: rgba(26, 31, 26, 0.82);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.art-card-body { padding: var(--space-m); }
.art-card-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin: 0 0 0.25rem;
  line-height: 1.2;
}
.art-card-wiss { margin: 0 0 0.4rem; font-size: 0.9rem; color: var(--color-muted); }
.art-card-stats { margin: 0; font-size: 0.85rem; color: var(--color-muted); }
.badge-platzhalter {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  padding: 0.1rem 0.45rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-muted);
  font-style: italic;
}

/* ------------------------------------------------------------------
   Art — Detailseite
   ------------------------------------------------------------------ */
.breadcrumb { margin-bottom: var(--space-m); font-size: 0.9rem; }
.breadcrumb a { text-decoration: none; }
.breadcrumb-bottom { margin-top: var(--space-xl); padding-top: var(--space-m); border-top: 1px solid var(--color-border); }

.art-detail { max-width: 52rem; }

.art-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-l);
  margin-bottom: var(--space-xl);
  align-items: center;
}
.art-header-img img { width: 100%; max-width: 28rem; height: auto; display: block; margin: 0 auto; }
.art-nr { color: var(--color-muted); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.8rem; margin: 0; }
.art-header h1 { margin: 0.25rem 0 0.5rem; font-size: 2.25rem; }
.art-wiss { margin: 0 0 var(--space-m); color: var(--color-muted); line-height: 1.5; }
.art-stats { font-size: 0.95rem; }

@media (min-width: 48rem) {
  .art-header { grid-template-columns: 1fr 1fr; }
}

.art-detail section { margin-top: var(--space-xl); }
.art-detail h2 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  margin-bottom: var(--space-m);
  padding-bottom: var(--space-s);
  border-bottom: 2px solid var(--color-border);
}

.art-text h2 { border-bottom: 2px solid var(--color-border); padding-bottom: var(--space-s); }
.art-text ul { padding-left: 1.25rem; }

/* Hörbeispiele / xeno-canto */
.xc-grid {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: 1fr;
}
.xc-clip {
  margin: 0;
  padding: var(--space-m);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}
.xc-clip figcaption { margin-bottom: var(--space-s); font-size: 0.9rem; }
.xc-clip iframe { display: block; border-radius: 4px; }

@media (min-width: 40rem) {
  .xc-grid { grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); }
}

/* Foto-Galerie */
.foto-grid {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.foto-grid img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
  background: var(--color-bg);
}

.art-historisch img,
.art-ausmalbild img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
  display: block;
}
