/* =============================================================
   DL3MXX – Stylesheet
   Struktur:
     1. Design-Tokens (Farben, Typo, Abstände) – hier zentral ändern
     2. Reset & Grundlagen
     3. Layout-Bausteine (Container, Section, Grid)
     4. Header & Navigation
     5. Hero
     6. Komponenten (Karten, Steckbrief, Galerie, Buttons, Badges)
     7. Footer
     8. Rechtsseiten (Impressum/Datenschutz)
     9. Bewegung & Animation (reduziert-freundlich)
   ============================================================= */

/* ---------- 1. Design-Tokens ------------------------------- */
:root {
  /* Farben – helle Grundfläche, dunkle Akzentflächen, ein Signalton */
  --paper:        #fbf9f6;   /* Seitenhintergrund, warm getönt         */
  --paper-2:      #f2eee7;   /* abgesetzte Flächen                     */
  --card:         #ffffff;
  --ink:          #14181f;   /* Fließtext / Headlines                  */
  --ink-soft:     #4c5665;   /* Sekundärtext (Kontrast ≥ 4.5:1)        */
  --line:         #ddd6cb;   /* Trennlinien                            */

  --night:        #101a26;   /* dunkle Sektionen                       */
  --night-2:      #1b2a3a;
  --night-ink:    #e9eff6;
  --night-soft:   #a9bdd1;

  --signal:       #b23c0a;   /* Akzent auf hellem Grund (AA-tauglich)  */
  --signal-hi:    #ff9d5c;   /* Akzent auf dunklem Grund               */
  --sky:          #1d5b8f;   /* zweiter Akzent (Links)                 */
  --sky-hi:       #7cc0f0;

  /* Typografie – Systemschriften: schnell, kein externer Ladevorgang
     (und damit keine Datenübertragung an Dritte, siehe Datenschutz) */
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas,
          "Liberation Mono", monospace;

  /* Fließende Schriftgrößen (clamp = mobile-first ohne Media Queries) */
  --fs-hero:  clamp(2.9rem, 13vw, 8.5rem);
  --fs-h2:    clamp(1.75rem, 4.6vw, 2.85rem);
  --fs-h3:    clamp(1.15rem, 2.4vw, 1.4rem);
  --fs-lead:  clamp(1.05rem, 2.3vw, 1.3rem);
  --fs-body:  1.0625rem;
  --fs-small: 0.9rem;

  /* Abstände – 8px-Raster */
  --sp-1: .5rem;  --sp-2: 1rem;   --sp-3: 1.5rem;
  --sp-4: 2rem;   --sp-5: 3rem;   --sp-6: 4.5rem;  --sp-7: 6rem;

  --radius:   14px;
  --radius-l: 26px;
  --shadow:   0 1px 2px rgb(20 24 31 / .06), 0 8px 28px -12px rgb(20 24 31 / .18);
  --maxw:     1140px;
  --header-h: 62px;
}

/* ---------- 2. Reset & Grundlagen -------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

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

h1, h2, h3, h4 { line-height: 1.12; margin: 0 0 var(--sp-2); font-weight: 800;
                 letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: -0.01em; }
p  { margin: 0 0 var(--sp-2); text-wrap: pretty; }
ul, ol { margin: 0 0 var(--sp-2); padding-left: 1.25em; }
li + li { margin-top: .35em; }
/* Listen, die als Flex/Grid mit eigenem gap layouten, brauchen den
   li+li-Abstand nicht – sonst sitzt das erste Element anders als der Rest. */
.hero__facts li + li,
.ways li + li,
.news li + li,
.linklist li + li,
.footer ul li + li { margin-top: 0; }

a { color: var(--sky); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--signal); }

/* Sichtbarer Fokus für Tastaturbedienung (WCAG 2.2 – 2.4.11/2.4.13) */
:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 3px;
  border-radius: 4px;
}
.night :focus-visible { outline-color: var(--signal-hi); }

/* Skip-Link */
.skip-link {
  position: absolute; left: var(--sp-2); top: -100px; z-index: 200;
  background: var(--night); color: #fff; padding: .7rem 1.1rem;
  border-radius: 8px; font-weight: 700; text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: var(--sp-2); color: #fff; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- 3. Layout-Bausteine ---------------------------- */
.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }

.section { padding-block: var(--sp-6); }
@media (min-width: 800px) { .section { padding-block: var(--sp-7); } }

.section--alt   { background: var(--paper-2); }
.section--night { background: var(--night); color: var(--night-ink); }
.section--night h2, .section--night h3 { color: #fff; }
.section--night a { color: var(--sky-hi); }
.section--night a:hover { color: var(--signal-hi); }
.section--night .lead, .section--night .muted { color: var(--night-soft); }

/* Sektionslabel: kleine Überschrift über der eigentlichen H2 */
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--mono); font-size: .78rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--signal); margin: 0 0 var(--sp-2);
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; background: currentColor;
  border-radius: 2px;
}
.section--night .eyebrow { color: var(--signal-hi); }

.lead { font-size: var(--fs-lead); color: var(--ink-soft); max-width: 62ch; }
.muted { color: var(--ink-soft); }
.small { font-size: var(--fs-small); }

/* Zweispaltiges Raster, mobile-first einspaltig */
.grid { display: grid; gap: var(--sp-4); }
@media (min-width: 860px) {
  .grid--2      { grid-template-columns: 1fr 1fr; align-items: start; }
  .grid--text-img { grid-template-columns: 1.15fr .85fr; align-items: center; gap: var(--sp-5); }
  .grid--img-text { grid-template-columns: .85fr 1.15fr; align-items: center; gap: var(--sp-5); }
}
.grid--cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

/* ---------- 4. Header & Navigation ------------------------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-2); min-height: var(--header-h);
}
.brand {
  display: inline-flex; align-items: baseline; gap: .5rem;
  font-family: var(--mono); font-weight: 700; font-size: 1.15rem;
  letter-spacing: .06em; color: var(--ink); text-decoration: none;
}
.brand__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--signal); align-self: center; flex: none;
}
.brand__sub { font-family: var(--font); font-size: .8rem; font-weight: 500;
              color: var(--ink-soft); letter-spacing: 0; }
@media (max-width: 520px) { .brand__sub { display: none; } }

.nav__toggle {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px;
  padding: .6rem .85rem; font: inherit; font-size: .9rem; font-weight: 600;
  cursor: pointer; min-height: 44px;   /* Touch-Zielgröße */
}
.nav__toggle:hover { border-color: var(--ink-soft); }
.nav__burger { display: block; width: 18px; height: 2px; background: currentColor;
               position: relative; border-radius: 2px; }
.nav__burger::before, .nav__burger::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px;
  background: currentColor; border-radius: 2px;
}
.nav__burger::before { top: -6px; } .nav__burger::after { top: 6px; }

.nav__list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: .15rem;
}
.nav__list a {
  display: block; padding: .7rem .6rem; border-radius: 9px;
  color: var(--ink); text-decoration: none; font-weight: 600;
}
.nav__list a:hover { background: var(--paper-2); color: var(--signal); }
.nav__list a[aria-current="true"] { color: var(--signal); }

/* Ohne JavaScript: Navigation immer sichtbar, Schaltfläche ausblenden.
   Damit bleibt das Menü auch dann bedienbar, wenn JS nicht läuft.     */
html:not(.js) .nav,
html:not(.js) .nav[hidden] { display: block; }
html:not(.js) .nav__toggle { display: none; }

/* Mobile: Panel unter dem Header */
@media (max-width: 859px) {
  html:not(.js) .nav { position: static; box-shadow: none; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: var(--sp-2) 0 var(--sp-3);
    box-shadow: var(--shadow);
  }
  .nav[hidden] { display: none; }
  .nav .nav__list { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
}
/* Desktop: waagerechte Leiste, Toggle verschwindet */
@media (min-width: 860px) {
  .nav__toggle { display: none; }
  .nav { display: block !important; }
  .nav[hidden] { display: block; }
  .nav__list { flex-direction: row; align-items: center; gap: .15rem; }
  .nav__list a { padding: .45rem .7rem; font-size: .95rem; }
}

/* ---------- 5. Hero ---------------------------------------- */
.hero {
  position: relative; isolation: isolate;
  background: var(--night); color: var(--night-ink);
  display: grid; align-items: end;
  min-height: 560px;                        /* Rückfallwert für alte Browser */
  min-height: clamp(520px, 78svh, 760px);
  overflow: hidden;
}
.hero__media {
  position: absolute; inset: 0; z-index: -2;
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 65%; }
.hero__scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgb(16 26 38 / .55) 0%, rgb(16 26 38 / .25) 38%, rgb(16 26 38 / .92) 100%);
}
.hero__inner { padding-block: var(--sp-5) var(--sp-6); }

.hero__titel { margin: 0 0 var(--sp-2); }
.hero__call {
  display: block;
  font-size: var(--fs-hero); font-weight: 900; line-height: .88;
  letter-spacing: -0.045em; margin: 0 0 var(--sp-2); color: #fff;
  text-shadow: 0 2px 30px rgb(0 0 0 / .45);
}
.hero__call span { color: var(--signal-hi); }
.hero__claim {
  font-size: var(--fs-lead); color: #e6edf5; max-width: 46ch;
  margin: 0 0 var(--sp-3); text-shadow: 0 1px 12px rgb(0 0 0 / .5);
}
.hero__facts {
  list-style: none; display: flex; flex-wrap: wrap; align-items: stretch;
  gap: .5rem; padding: 0; margin: 0 0 var(--sp-3);
}
.badge {
  box-sizing: border-box;
  display: inline-flex; align-items: center; font-family: var(--mono);
  font-size: .8rem; line-height: 1;
  font-weight: 600; letter-spacing: .04em;
  padding: .38rem .7rem; border-radius: 999px;
  background: rgb(255 255 255 / .12); color: #fff;
  border: 1px solid rgb(255 255 255 / .22);
  backdrop-filter: blur(4px);
}
/* Hero-Badges: exakt gleiche Höhe und Breite
   (margin-top aus dem "li + li"-Reset muss hier zurückgesetzt werden) */
.hero__facts li,
.hero__facts li + li { display: flex; flex: 0 0 11.5rem; margin: 0; }
.hero__facts .badge {
  width: 100%; height: 2.375rem;
  justify-content: center; padding-block: 0;
}
.badge--light {
  background: var(--paper-2); color: var(--ink-soft);
  border-color: var(--line); backdrop-filter: none;
}

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  box-sizing: border-box; justify-content: center;
  min-height: 46px; padding: .7rem 1.25rem;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: .97rem; text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background-color .15s ease, border-color .15s ease;
}
.hero__inner .actions .btn { min-width: 16rem; }
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--signal); color: #fff; }
.btn--primary:hover { background: #92300a; color: #fff; }
.btn--ghost { border-color: rgb(255 255 255 / .45); color: #fff; background: transparent; }
.btn--ghost:hover { background: rgb(255 255 255 / .12); color: #fff; }
.btn--outline { border-color: var(--line); color: var(--ink); background: var(--card); }
.btn--outline:hover { border-color: var(--ink-soft); color: var(--signal); }
@media (prefers-reduced-motion: reduce) { .btn:hover { transform: none; } }
@media (max-width: 520px) {
  .hero__inner .actions { display: grid; }
  .hero__inner .actions .btn { min-width: 0; width: 100%; }
  .hero__facts li { flex: 0 0 auto; }
}

/* Pfeil-Hinweis am Hero-Fuß */
.hero__more {
  display: inline-flex; align-items: center; gap: .45rem;
  margin-top: var(--sp-3); color: #cfdcea; font-size: .85rem;
  font-family: var(--mono); letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none;
}
.hero__more:hover { color: var(--signal-hi); }
.hero__more::after { content: "↓"; animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .hero__more::after { animation: none; } }

/* ---------- 6. Komponenten --------------------------------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: var(--sp-3);
  box-shadow: var(--shadow);
}
.section--night .card {
  background: var(--night-2); border-color: rgb(255 255 255 / .12);
  box-shadow: none; color: var(--night-ink);
}

.figure { margin: 0; }
.figure img { border-radius: var(--radius); box-shadow: var(--shadow); }
.figure figcaption {
  margin-top: .6rem; font-size: var(--fs-small); color: var(--ink-soft);
}
.section--night .figure figcaption { color: var(--night-soft); }

/* Steckbrief als Definitionsliste */
.facts { margin: 0; display: grid; gap: 0; }
.facts > div {
  display: grid; grid-template-columns: minmax(9rem, 34%) 1fr;
  gap: var(--sp-2); padding: .65rem 0; border-bottom: 1px solid var(--line);
}
.facts > div:last-child { border-bottom: 0; }
.facts dt { font-weight: 700; color: var(--ink); margin: 0; }
.facts dd { margin: 0; color: var(--ink-soft); }
@media (max-width: 420px) {
  .facts > div { grid-template-columns: 1fr; gap: .15rem; }
}

/* QSL-Wege */
.ways { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.ways li { display: flex; gap: .7rem; align-items: baseline; }
.ways .way__tag {
  font-family: var(--mono); font-size: .78rem; font-weight: 700;
  letter-spacing: .06em; color: var(--signal);
  min-width: 5.5rem; flex: none;
}

/* Galerie */
.gallery {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: var(--sp-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}
.gallery figure { margin: 0; height: 100%; display: flex; flex-direction: column; }
.gallery img {
  border-radius: 10px; border: 1px solid var(--line);
  background: #fff; width: 100%; aspect-ratio: 14/9; object-fit: cover;
}
.gallery figcaption { margin-top: .6rem; font-size: var(--fs-small); color: var(--ink-soft); }
.gallery figcaption b { display: block; color: var(--ink); font-family: var(--mono);
                        letter-spacing: .04em; font-size: .95rem; }
.gallery button {
  padding: 0; border: 0; background: none; cursor: zoom-in; display: block; width: 100%;
  border-radius: 10px;
}

/* Lightbox */
.lightbox {
  border: 0; padding: 0; background: transparent;
  max-width: min(94vw, 1000px); max-height: 92vh;
}
.lightbox::backdrop { background: rgb(10 14 20 / .86); }
.lightbox__inner { position: relative; background: var(--card);
                   border-radius: var(--radius); padding: var(--sp-2); }
.lightbox img { border-radius: 8px; margin-inline: auto; max-height: 74vh; width: auto; }
.lightbox__cap { margin: .8rem .2rem 0; font-size: var(--fs-small); color: var(--ink-soft); }
.lightbox__close {
  position: absolute; top: .55rem; right: .55rem;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font-size: 1.25rem; line-height: 1; cursor: pointer;
}

/* Aktuelles / Timeline
   Derzeit nicht verwendet – die Regeln bleiben erhalten, damit ein
   News-Bereich jederzeit ohne CSS-Arbeit wieder ergänzt werden kann
   (siehe PFLEGE.md). */
.news { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-2); }
.news__item {
  display: grid; gap: .35rem var(--sp-3); padding: var(--sp-3);
  background: var(--night-2); border: 1px solid rgb(255 255 255 / .12);
  border-left: 3px solid var(--signal-hi); border-radius: var(--radius);
}
@media (min-width: 720px) { .news__item { grid-template-columns: 10.5rem 1fr; } }
.news__date {
  font-family: var(--mono); font-size: .82rem; font-weight: 700;
  letter-spacing: .06em; color: var(--signal-hi); text-transform: uppercase;
}
.news__item h3 { margin: 0 0 .3rem; font-size: 1.08rem; }
.news__item p  { margin: 0; color: var(--night-soft); }

/* Kennzahlen */
.stats { list-style: none; padding: 0; margin: var(--sp-3) 0 0;
         display: grid; gap: var(--sp-3);
         grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.stats b { display: block; font-size: clamp(1.7rem, 5vw, 2.4rem); font-weight: 900;
           letter-spacing: -.03em; line-height: 1.05; color: var(--signal); }
.section--night .stats b { color: var(--signal-hi); }
.stats span { font-size: var(--fs-small); color: var(--ink-soft); }
.section--night .stats span { color: var(--night-soft); }

/* Link-Liste mit Pfeil */
.linklist { list-style: none; padding: 0; margin: var(--sp-2) 0 0; display: grid; gap: .5rem; }
.linklist a { font-weight: 600; text-decoration: none; display: inline-flex; gap: .4rem; }
.linklist a:hover { text-decoration: underline; }
.linklist a::after { content: "↗"; font-size: .85em; opacity: .7; }

/* Kontakt */
.contact__mail {
  font-family: var(--mono); font-size: clamp(1.05rem, 3.4vw, 1.6rem);
  font-weight: 700; letter-spacing: -.01em; word-break: break-all;
}

/* ---------- 7. Footer -------------------------------------- */
.footer {
  background: var(--night); color: var(--night-soft);
  padding-block: var(--sp-5) var(--sp-3); font-size: var(--fs-small);
}
.footer a { color: var(--night-ink); text-decoration: none; }
.footer a:hover { color: var(--signal-hi); text-decoration: underline; }
.footer h2 { font-size: .82rem; letter-spacing: .14em; text-transform: uppercase;
             color: #fff; font-family: var(--mono); margin-bottom: var(--sp-2); }
.footer__grid { display: grid; gap: var(--sp-4);
                grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.footer__bottom {
  margin-top: var(--sp-4); padding-top: var(--sp-3);
  border-top: 1px solid rgb(255 255 255 / .14);
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3);
  justify-content: space-between; align-items: center;
}

/* ---------- 8. Rechtsseiten -------------------------------- */
.page-head { background: var(--paper-2); border-bottom: 1px solid var(--line);
             padding-block: var(--sp-5); }
.prose { max-width: 72ch; }
.prose h2 { font-size: clamp(1.35rem, 3.4vw, 1.75rem); margin-top: var(--sp-4); }
.prose h3 { margin-top: var(--sp-3); }
.prose h2:first-child { margin-top: 0; }
.placeholder {
  background: #fff3d6; border: 1px dashed #b8860b; color: #6b4e00;
  padding: .1em .45em; border-radius: 5px; font-weight: 600;
  font-family: var(--mono); font-size: .92em;
}
.notice {
  background: var(--card); border: 1px solid var(--line);
  border-left: 3px solid var(--signal); border-radius: var(--radius);
  padding: var(--sp-3); margin-bottom: var(--sp-4);
}

/* ---------- 9. Bewegung ------------------------------------ */
/* Sanftes Einblenden beim Scrollen – nur wenn JS aktiv und
   der Nutzer keine reduzierte Bewegung angefordert hat.        */
.js .reveal { opacity: 0; transform: translateY(16px); }
.js .reveal.is-visible {
  opacity: 1; transform: none;
  transition: opacity .55s ease, transform .55s cubic-bezier(.22,.7,.3,1);
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Druck ------------------------------------------ */
@media print {
  .header, .hero__media, .hero__scrim, .nav, .hero__more, .footer__grid { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding-block: 1rem; }
}
