/* SIL Warehouse – gemeinsames Stylesheet für alle Sprachversionen
 *
 * FARBEN: Alle Farben sind ausschließlich hier in :root definiert
 * (hell als Standard, dunkel im @media-Block darunter).
 * Farbänderungen passieren NUR an dieser Stelle. Im restlichen Projekt
 * keine festen Hex-Werte, sondern immer var(--color-...).
 *
 *   --color-bg            Seitenhintergrund
 *   --color-surface       Flächen (Karten, Boxen)
 *   --color-text          Fließtext
 *   --color-text-muted    Sekundärtext
 *   --color-accent        Akzent (Links, Buttons)
 *   --color-accent-hover  Akzent bei Hover
 *   --color-on-accent     Text auf Akzentfläche
 *   --color-stone         Linien, Rahmen, Icons
 *   --color-border        Rahmen (folgt --color-stone)
 */

:root {
  /* Farben hell (Standard) */
  --color-bg: #F4F3EF;
  --color-surface: #FBFAF7;
  --color-text: #4A4A4A;
  --color-text-muted: #6B6B6B;
  --color-accent: #4C5C2D;
  --color-accent-hover: #3D4A24;
  --color-on-accent: #FFFFFF;
  /* --color-stone nie als Textfarbe auf hellem Grund, Kontrast zu schwach.
     Nur für Linien, Rahmen, Icons. */
  --color-stone: #A8A492;
  --color-border: var(--color-stone);

  /* Schrift (Systemschriften, keine Webfonts) */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Schriftgrößen */
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;

  /* Abstände */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  /* Radien */
  --radius: 6px;

  /* Layout */
  --max-width: 1120px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Farben dunkel */
    --color-bg: #1C1E18;
    --color-surface: #26291F;
    --color-text: #E8E6DF;
    --color-text-muted: #A8A492;
    --color-accent: #9DB06A;
    --color-accent-hover: #B2C27F;
    --color-on-accent: #1C1E18;
    --color-stone: #6E6B5E;
  }
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

/* Grundstil */
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-accent);
}

a:hover {
  color: var(--color-accent-hover);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

h1 {
  font-size: var(--text-2xl);
}

h2 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-5);
}

h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}

p + p {
  margin-top: var(--space-4);
}

.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-4);
}

.brand {
  color: var(--color-text);
  font-size: var(--text-lg);
  font-weight: 700;
  text-decoration: none;
}

.brand:hover {
  color: var(--color-text);
}

.lang {
  display: flex;
  gap: var(--space-1);
  list-style: none;
  padding: 0;
  font-size: var(--text-sm);
  font-weight: 600;
}

.lang a,
.lang span {
  display: block;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius);
  text-decoration: none;
}

.lang a[aria-current] {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.lang [aria-disabled="true"] {
  color: var(--color-text-muted);
  cursor: not-allowed;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius);
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-weight: 600;
  text-decoration: none;
}

.btn:hover {
  background: var(--color-accent-hover);
  color: var(--color-on-accent);
}

/* Hero */
.hero__inner {
  display: grid;
  gap: var(--space-6);
  padding-block: var(--space-6);
}

.hero__text > * + * {
  margin-top: var(--space-4);
}

.hero__img {
  width: 100%;
  border-radius: var(--radius);
}

.badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius);
  color: var(--color-accent);
  font-size: var(--text-sm);
  font-weight: 600;
}

.lead {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
}

/* Abschnitte */
.section {
  padding-block: var(--space-7);
}

.section--surface {
  background: var(--color-surface);
  border-block: 1px solid var(--color-border);
}

.list {
  padding-left: var(--space-5);
}

.list li + li {
  margin-top: var(--space-2);
}

/* Kennzahlen */
.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.fact {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: var(--space-1);
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.fact dd {
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.2;
}

.fact dt {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* Zweispaltig */
.split,
.columns {
  display: grid;
  gap: var(--space-6);
}

.split__img {
  width: 100%;
  max-height: 32rem;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Galerie */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  list-style: none;
  padding: 0;
}

.gallery a {
  display: block;
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Kontakt */
.note {
  font-weight: 700;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
  list-style: none;
  padding: 0;
}

/* Footer */
.site-footer {
  padding-block: var(--space-6);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* Lightbox */
.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  padding: var(--space-4);
  border: 0;
  background: var(--color-bg);
  color: var(--color-text);
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  max-width: 100%;
  max-height: 100%;
}

.lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - var(--space-8) * 2);
  width: auto;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox__caption {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  text-align: center;
}

.lightbox__btn {
  position: absolute;
  width: var(--space-7);
  height: var(--space-7);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: var(--text-xl);
  line-height: 1;
  cursor: pointer;
}

.lightbox__btn:hover {
  color: var(--color-accent);
}

.lightbox__close {
  top: var(--space-4);
  right: var(--space-4);
}

.lightbox__prev,
.lightbox__next {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__prev {
  left: var(--space-4);
}

.lightbox__next {
  right: var(--space-4);
}

/* Ab Tablet */
@media (min-width: 40rem) {
  .facts {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .columns {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Ab Desktop */
@media (min-width: 56rem) {
  h1 {
    font-size: var(--text-3xl);
  }

  .hero__inner {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding-block: var(--space-8);
  }

  .split {
    grid-template-columns: 3fr 2fr;
    align-items: start;
  }

  .gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}
