/* =========================================================
   Systemfehler Familie – Stylesheet
   Seriöser, journalistisch-ruhiger Look (Marineblau + Ocker).
   Ein Stylesheet für alle Seiten. Farben zentral über Variablen.
   ========================================================= */

:root {
  --bg:        #eef1f5;
  --surface:   #ffffff;
  --ink:       #14202e;
  --text:      #2a3644;
  --muted:     #5f6c7a;
  --line:      #dde3ea;
  --primary:   #1f3a5f;
  --primary-dark:#142943;
  --accent:    #b57314;
  --accent-soft:#f5ecdb;

  --serif: Georgia, "Times New Roman", "Iowan Old Style", serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius: 12px;
  --shadow: 0 8px 26px rgba(20,32,46,.09);
  --max: 1120px;
  --measure: 68ch;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); line-height: 1.22; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.45rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 22px; }
.section { padding-block: clamp(44px, 7vw, 84px); }
.section--alt { background: var(--surface); border-block: 1px solid var(--line); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: var(--measure); }
.page-head { max-width: var(--measure); margin-bottom: 40px; }
.page-head h1 { margin: 0 0 .3em; }

.mission-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.mission-foto img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.mission-foto { margin: 0; }
@media (max-width: 820px) {
  .mission-grid { grid-template-columns: 1fr; gap: 28px; }
  .mission-foto { order: -1; max-height: 340px; overflow: hidden; border-radius: var(--radius); }
}

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 13px 26px; border-radius: 8px; font-weight: 600;
       font-family: var(--sans); border: 2px solid transparent; cursor: pointer;
       transition: background .15s, color .15s, transform .15s; }
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); color: #fff; }
.btn--ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--primary); }

/* ---------- Header / Nav ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94);
               backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; padding-block: 15px; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; color: var(--ink); letter-spacing: -.01em; }
.brand span { color: var(--accent); }
.brand:hover { text-decoration: none; color: var(--ink); }
.nav-links { list-style: none; display: flex; gap: 24px; margin: 0; padding: 0; align-items: center; }
.nav-links a { color: var(--text); font-weight: 500; padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--primary); border-bottom-color: var(--accent); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.7rem; color: var(--primary); cursor: pointer; line-height: 1; }
.nav-links a.nav-cta { background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 9px 18px; font-weight: 700; }
.nav-links a.nav-cta:hover { background: #925c0f; color: #fff; border: 0; text-decoration: none; }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
               background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
               max-height: 0; overflow: hidden; transition: max-height .3s ease; }
  .nav-links.open { max-height: 340px; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 15px 22px; border-bottom: 1px solid var(--line); }
}

/* ---------- Hero ---------- */
.hero { position: relative; color: #eaf0f7; padding: clamp(70px,11vw,140px) 22px;
        background:
          linear-gradient(180deg, rgba(20,32,46,.18) 0%, rgba(20,32,46,.32) 55%, rgba(20,32,46,.62) 100%),
          var(--hero-image, linear-gradient(180deg, #1f3a5f 0%, #142943 100%));
        background-size: cover; background-position: center; }
.hero .eyebrow, .hero h1, .hero p { text-shadow: 0 2px 10px rgba(0,0,0,.55); }
/* Sobald ein eigenes Titelbild vorhanden ist, im <section class="hero"> so setzen:
   style="--hero-image:url('img/titelbild.jpg')" */
.hero-inner { max-width: var(--max); margin-inline: auto; }
.hero .eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 700;
                 color: var(--accent); margin: 0 0 14px; }
.hero h1 { color: #fff; max-width: 16ch; margin: 0 0 18px; }
.hero p { font-size: 1.25rem; max-width: 52ch; margin: 0 0 30px; color: #cfdae7; }
.hero .btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Themen (Startseite) ---------- */
.themen { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(230px,1fr)); }
.thema { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
         padding: 26px 24px; box-shadow: var(--shadow); }
.thema h3 { margin: 0 0 8px; }
.thema p { color: var(--muted); margin: 0; font-size: .97rem; }

/* ---------- Beitrags-Liste ---------- */
.post-list { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(320px,1fr)); }
.featured { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); }
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
             padding: 26px 26px 30px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.post-card h2 { font-size: 1.3rem; margin: 10px 0 10px; }
.post-card h2 a { color: var(--ink); }
.post-card h2 a:hover { color: var(--primary); text-decoration: none; }
.post-card p { color: var(--muted); margin: 0 0 18px; font-size: .98rem; }
.post-card .more { margin-top: auto; font-weight: 600; }
.kat { display: inline-block; align-self: flex-start; font-size: .72rem; font-weight: 700; text-transform: uppercase;
       letter-spacing: .06em; color: var(--primary); background: var(--accent-soft); border: 1px solid #e7d9bd;
       padding: 4px 10px; border-radius: 999px; }

/* ---------- Artikel ---------- */
.article { max-width: var(--measure); margin-inline: auto; }
.article .crumb { font-size: .95rem; margin: 0 0 20px; }
.article h1 { margin: 14px 0 .4em; }
.article .lead { font-size: 1.28rem; color: var(--muted); font-family: var(--serif); font-style: italic; margin-bottom: 30px; }
.article-body { font-size: 1.075rem; line-height: 1.8; color: #303c4b; }
.article-body h2 { margin: 1.8em 0 .5em; }
.article-body h3 { margin: 1.5em 0 .4em; font-size: 1.18rem; }
.article-body p { margin: 1.05em 0; }
.article-body ul { margin: 1.05em 0; padding-left: 1.3em; }
.article-body li { margin: .5em 0; }
.article-body strong { color: var(--ink); }

/* ---------- Hinweis / Solidaritaet ---------- */
.note { background: var(--accent-soft); border: 1px solid #e7d9bd; border-radius: var(--radius);
        padding: 16px 20px; margin: 34px 0; font-size: .97rem; color: #6a4a12; }
.note strong { color: var(--accent); }
.merken { background: var(--bg); border-left: 4px solid var(--primary); border-radius: var(--radius);
          padding: 18px 22px; margin: 1.8em 0; }
.merken a { color: var(--primary); font-weight: 700; }
.solidar { background: var(--primary); color: #eaf0f7; border-radius: var(--radius); padding: clamp(30px,5vw,54px);
           text-align: center; }
.solidar h2 { color: #fff; margin: 0 0 12px; }
.solidar p { max-width: 55ch; margin: 0 auto 24px; color: #cfdae7; font-size: 1.1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c7d2de; padding-block: 46px 26px; margin-top: 60px; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 30px; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); margin-bottom: 24px; }
.site-footer h4 { color: #fff; margin: 0 0 12px; font-size: 1rem; }
.site-footer p { color: #9fb0c0; margin: 0; font-size: .95rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.disclaimer { border-top: 1px solid rgba(255,255,255,.14); padding-top: 18px; margin-top: 8px;
              font-size: .85rem; color: #90a1b2; }
.footer-bottom { text-align: center; font-size: .85rem; color: #7d8fa1; margin-top: 8px; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; } .btn:hover { transform: none; } }

/* =========================================================
   Momente-Karussell (animierter Foto-Stapel mit Geschichte)
   ========================================================= */
.momente {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  max-width: 960px;
  margin-inline: auto;
}
@media (max-width: 780px) { .momente { grid-template-columns: 1fr; gap: 30px; } }

.m-media { position: relative; width: 100%; aspect-ratio: 1/1; }
.m-slide {
  position: absolute; inset: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: linear-gradient(160deg, #24425f, #142943);
  opacity: 0;
  transform: scale(.9) rotate(0deg);
  transition: opacity .55s ease, transform .55s ease;
  display: grid; place-items: center;
}
.m-slide img { width: 100%; height: 100%; object-fit: cover; }
.m-slide .m-fallback {
  font-family: var(--serif); font-style: italic;
  color: #cfe0ee; font-size: 1.5rem; text-align: center;
  padding: 24px; line-height: 1.4;
}
.m-slide.is-active { opacity: 1; transform: scale(1); z-index: 3; }
.m-slide.is-prev   { opacity: .3; transform: scale(.9) rotate(-6deg); z-index: 1; }
.m-slide.is-next   { opacity: .3; transform: scale(.9) rotate(6deg);  z-index: 1; }

.m-body h3 {
  font-family: var(--serif); font-style: italic;
  color: var(--primary); font-size: 1.6rem; margin: 0 0 12px;
}
.m-text { font-size: 1.1rem; color: var(--text); min-height: 4.5em; margin: 0 0 18px; }
.m-text .word { display: inline-block; opacity: 0; filter: blur(6px); transform: translateY(6px); }
.m-text.animate .word { animation: mWordIn .4s ease forwards; }
@keyframes mWordIn { to { opacity: 1; filter: blur(0); transform: translateY(0); } }

.m-link { font-weight: 600; }
.m-controls { display: flex; gap: 12px; margin-top: 22px; }
.m-btn {
  width: 46px; height: 46px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--primary); font-size: 1.15rem; cursor: pointer;
  display: grid; place-items: center; box-shadow: var(--shadow);
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.m-btn:hover { transform: translateY(-2px); background: var(--primary); color: #fff; }
.m-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Foto-Hintergrund-Hilfsklasse für beliebige Sektionen */
.bg-photo {
  background-size: cover;
  background-position: center;
  position: relative;
}
.bg-photo::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(20, 32, 46, .62);
}
.bg-photo > * { position: relative; }

@media (prefers-reduced-motion: reduce) {
  .m-slide { transition: opacity .2s ease; transform: none !important; }
  .m-text .word { animation: none !important; opacity: 1; filter: none; transform: none; }
}

/* =========================================================
   Animationen: Scroll-Reveal, Hero-Auftritt, Scroll-Text
   ========================================================= */

/* Sanftes Einblenden beim Scrollen */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.in { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .12s; }
.reveal-delay-2 { transition-delay: .24s; }
.reveal-delay-3 { transition-delay: .36s; }

/* Hero-Auftritt beim Laden */
@keyframes heroIn {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
.hero .eyebrow { animation: heroIn .7s ease .1s backwards; }
.hero h1       { animation: heroIn .8s ease .25s backwards; }
.hero p        { animation: heroIn .8s ease .45s backwards; }
.hero .btn-row { animation: heroIn .8s ease .65s backwards; }

/* Scroll-Text: Worte leuchten beim Scrollen auf (Poem-Effekt) */
.scrolltext {
  background: linear-gradient(180deg, #142943 0%, #0e1f33 100%);
  color: #eaf0f7;
  padding-block: clamp(60px, 10vw, 120px);
}
.scrolltext .st-inner {
  max-width: 820px;
  margin-inline: auto;
  padding-inline: 20px;
}
.scrolltext p.st-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.4rem, 3.2vw, 2.1rem);
  line-height: 1.75;
  margin: 0;
}
.scrolltext .st-word { transition: opacity .35s ease, text-shadow .35s ease; }
.scrolltext.armed .st-word { opacity: .16; }
.scrolltext.armed .st-word.lit { opacity: 1; }
.scrolltext .st-word.hl { color: #e8a24b; }
.scrolltext .st-word.hl.lit { text-shadow: 0 0 22px rgba(232,162,75,.35); }
.scrolltext .st-sig {
  margin-top: 34px;
  font-size: 1rem;
  color: #9db2c6;
  font-family: var(--sans);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero .eyebrow, .hero h1, .hero p, .hero .btn-row { animation: none; }
  .scrolltext .st-word { opacity: 1; transition: none; }
}

/* Fotos in Beiträgen */
.article-body figure { margin: 1.8em 0; }
.article-body figure img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.article-body figcaption { font-size: .88rem; color: var(--muted); margin-top: 8px; font-style: italic; text-align: center; }
.foto-paar { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 620px) { .foto-paar { grid-template-columns: 1fr; } }

/* =========================================================
   Themen als klickbare Kacheln
   ========================================================= */
a.thema { text-decoration: none; color: inherit; display: flex; flex-direction: column;
          transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
a.thema:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary); text-decoration: none; }
.thema-mehr { margin-top: 12px; color: var(--accent); font-weight: 700; font-size: .92rem; }

/* =========================================================
   Beitrags-Karussell (horizontal wischbar + Pfeile)
   ========================================================= */
.bc { position: relative; }
.bc-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 6px 4px 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.bc-card {
  scroll-snap-align: start;
  flex: 0 0 300px;
  max-width: 88vw;
}
.bc-arrow {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--primary);
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: grid; place-items: center;
  z-index: 4;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.bc-arrow:hover { background: var(--primary); color: #fff; transform: translateY(-50%) scale(1.05); }
.bc-arrow:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.bc-prev { left: -6px; }
.bc-next { right: -6px; }
@media (max-width: 720px) {
  .bc-arrow { display: none; }         /* auf dem Tablet/Handy einfach wischen */
  .bc-track { padding-inline: 2px; }
}

/* =========================================================
   Gutachter- & Anwalts-Verzeichnis
   ========================================================= */
.guta-suchfeld {
  width: 100%;
  max-width: 480px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  margin: 0 auto 28px;
  display: block;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.guta-suchfeld:focus { outline: 2px solid var(--primary); border-color: transparent; }

.guta-liste { display: grid; gap: 20px; }
.guta-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 26px;
  box-shadow: var(--shadow);
}
.guta-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 16px; }
.guta-head h3 { margin: 0; font-family: var(--serif); color: var(--primary); }
.guta-ort {
  font-size: .82rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--accent); font-weight: 700;
}
.guta-fach { color: var(--muted); font-size: .95rem; margin-top: 4px; }
.guta-adresse { color: var(--muted); font-size: .9rem; margin-top: 6px; }
.guta-kommentare { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.guta-kommentar {
  background: var(--bg); border-radius: 10px; padding: 12px 16px;
  border-left: 3px solid var(--accent);
}
.guta-kommentar p { margin: 0 0 4px; font-style: italic; }
.guta-kommentar span { font-size: .82rem; color: var(--muted); }
.guta-keine { color: var(--muted); font-style: italic; text-align: center; padding: 20px 0; }

.guta-quelle {
  margin: 16px 0 0; padding: 12px 16px; background: var(--bg);
  border-radius: 10px; font-size: .88rem; color: var(--muted);
}
.guta-quelle a { color: var(--primary); font-weight: 600; }

.guta-hinweis-box {
  background: var(--accent-soft, #f5ecdb);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 32px;
  font-size: .95rem;
}

/* =========================================================
   Urteilsübersicht
   ========================================================= */
.urteile-toc {
  columns: 2; column-gap: 32px; list-style: none; margin: 0 0 40px; padding: 20px 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.urteile-toc li { break-inside: avoid; padding: 4px 0; }
.urteile-toc a { color: var(--primary); font-weight: 600; }
@media (max-width: 640px) { .urteile-toc { columns: 1; } }

.table-wrap { overflow-x: auto; margin: 0 0 44px; -webkit-overflow-scrolling: touch; }
table.urteile-tabelle { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 560px; }
table.urteile-tabelle th {
  text-align: left; padding: 10px 14px; background: var(--bg); color: var(--primary);
  font-family: var(--serif); border-bottom: 2px solid var(--line); white-space: nowrap;
}
table.urteile-tabelle td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.urteile-tabelle td:first-child { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
table.urteile-tabelle tr:hover td { background: var(--bg); }

.guta-formular {
  margin-top: 64px;
  padding: 36px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* =========================================================
   Berater-Verzeichnis
   ========================================================= */
.berater-card { display: flex; flex-direction: column; }
.berater-thema { font-weight: 600; color: var(--ink); }
.berater-preis { font-weight: 700; color: var(--accent); }
.berater-erfahrung { color: var(--muted); margin: 10px 0 0; }
.berater-buchen-zeile { margin-top: 18px; }
.berater-buchen { display: inline-block; }

/* =========================================================
   Musterbriefe / Downloads
   ========================================================= */
.downloads-liste { display: grid; gap: 20px; max-width: 780px; margin-inline: auto; }
.downloads-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 26px; box-shadow: var(--shadow);
}
.downloads-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 16px; }
.downloads-head h3 { margin: 0; font-family: var(--serif); color: var(--primary); }
.downloads-preis { font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 4px 12px; border-radius: 999px; }
.downloads-preis--frei { background: var(--accent-soft, #f5ecdb); color: var(--accent); }
.downloads-preis--bezahlt { background: var(--bg); color: var(--primary); }
.downloads-text { color: var(--muted); margin: 10px 0 18px; }
