/* legal.pocket-systems.com
   Schriften liegen lokal in assets/fonts – keine externen Quellen. */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("fonts/playfair-display-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Caveat";
  src: url("fonts/caveat-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Farben laut Designkonzept */
  --primaer: #1f2937;
  --sekundaer: #a7b1a5;
  --grund: #fafaf8;
  --akzent: #c9a96a;

  --text: #1f2937;
  --text-leise: #6b7280;
  --linie: #e6e5e0;
  --karte: #ffffff;
  --flaeche: #f1f1ed;
  --flaeche-gruen: #e8eae5;
  --hero: #161b22;
  --warn: #f6eedd;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --hand: "Caveat", "Segoe Script", cursive;

  --breite: 76rem;
  --radius: 12px;
  color-scheme: light;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font: 400 1rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 3px; border-radius: 4px; }

.icon { width: 1.15rem; height: 1.15rem; flex: none; }

.rahmen { max-width: var(--breite); margin: 0 auto; padding: 0 1.5rem; }

.skip { position: absolute; left: -999px; top: 0; background: var(--karte); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

.label {
  margin: 0 0 .6rem;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-leise);
}
.label-hell { color: rgba(255, 255, 255, .7); }
.label-strich::before { content: "— "; color: var(--sekundaer); }

/* --- Kopf --------------------------------------------------------- */

.kopf { background: var(--karte); border-bottom: 1px solid var(--linie); position: relative; z-index: 5; }
.kopf-innen { display: flex; align-items: center; gap: 2rem; min-height: 4.25rem; }
.marke img { display: block; height: 30px; width: auto; }
.kopf-nav { display: flex; gap: 2.25rem; margin: 0 auto; font-size: .9rem; }
.kopf-nav a { text-decoration: none; color: var(--text); }
.kopf-nav a:hover { color: var(--text-leise); }
.kopf-aktionen { display: flex; align-items: center; gap: .75rem; margin-left: auto; }

.pille {
  background: var(--primaer);
  color: #fff;
  text-decoration: none;
  font-size: .88rem;
  font-weight: 500;
  padding: .55rem 1.35rem;
  border-radius: 10px;
}
.pille:hover { background: #374151; }
.sprache { font-size: .8rem; font-weight: 600; text-decoration: none; border: 1px solid var(--linie); border-radius: 8px; padding: .3rem .55rem; }

/* Mobiles Menü ohne JavaScript */
.menue { display: none; position: relative; }
.menue summary { list-style: none; cursor: pointer; padding: .4rem; display: flex; }
.menue summary::-webkit-details-marker { display: none; }
.menue .icon { width: 1.5rem; height: 1.5rem; }
.menue .icon-zu, .menue[open] .icon-auf { display: none; }
.menue[open] .icon-zu { display: block; }
.menue nav {
  position: absolute;
  right: 0;
  top: calc(100% + .75rem);
  min-width: 12rem;
  background: var(--karte);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(31, 41, 55, .12);
  padding: .5rem;
  display: flex;
  flex-direction: column;
}
.menue nav a { padding: .6rem .8rem; border-radius: 8px; text-decoration: none; }
.menue nav a:hover { background: var(--flaeche); }

/* --- Hero --------------------------------------------------------- */

.hero {
  position: relative;
  color: #fff;
  background-color: var(--hero);
  background-image:
    radial-gradient(ellipse 55% 90% at 82% 70%, rgba(201, 169, 106, .16), transparent 70%),
    radial-gradient(ellipse 40% 60% at 70% 20%, rgba(167, 177, 165, .10), transparent 70%),
    linear-gradient(110deg, #10141a 0%, #1b222c 55%, #262e38 100%);
  overflow: hidden;
}
/* Dezente Linienstruktur als Ersatz für das Foto */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(-24deg, transparent 0 46px, rgba(255, 255, 255, .025) 46px 47px);
  mask-image: linear-gradient(90deg, transparent 35%, #000 85%);
  pointer-events: none;
}
.hero-bild {
  background-image:
    linear-gradient(90deg, rgba(16, 20, 26, .92) 0%, rgba(16, 20, 26, .7) 45%, rgba(16, 20, 26, .15) 100%),
    url("hero.jpg");
  background-size: cover;
  background-position: 70% 28%;
}
.hero-bild::after { display: none; }
@media (max-width: 40rem) {
  .hero-bild {
    background-image:
      linear-gradient(180deg, rgba(16, 20, 26, .9) 0%, rgba(16, 20, 26, .78) 100%),
      url("hero.jpg");
    background-position: 75% 30%;
  }
}

.hero-innen { position: relative; z-index: 1; padding-top: 3.5rem; padding-bottom: 3.5rem; }
.hero-gross .hero-innen { padding-top: 4.5rem; padding-bottom: 5rem; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.12;
  margin: 0 0 1.1rem;
  max-width: 18ch;
}
.hero-gross h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); }
.hero-text { max-width: 34rem; margin: 0; color: rgba(255, 255, 255, .85); font-size: 1.02rem; }
.hero-meta { margin: 1rem 0 0; font-size: .9rem; color: rgba(255, 255, 255, .65); }
.hero-meta a { color: #fff; display: inline-flex; align-items: center; gap: .4rem; }

/* --- Raster: Seitenleiste + Inhalt ------------------------------- */

.raster {
  display: grid;
  grid-template-columns: 16.5rem minmax(0, 1fr);
  gap: 3rem;
  padding-top: 1.5rem;
  padding-bottom: 3.5rem;
  margin-top: 0;
}
.raster-seite { display: flex; flex-direction: column; gap: 1rem; align-self: start; position: sticky; top: 1.5rem; max-height: calc(100vh - 3rem); overflow-y: auto; }
.raster-haupt { padding-top: 1.75rem; min-width: 0; }
.raster-einfach { padding-top: 2.5rem; padding-bottom: 3rem; }

.karte { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); }

.leiste { padding: 1.1rem .75rem .75rem; }
.leiste .label { padding: 0 .55rem; margin-bottom: .5rem; }
.leiste ul, .leiste ol { list-style: none; margin: 0 0 .75rem; padding: 0; }
.leiste ul:last-child, .leiste ol:last-child { margin-bottom: 0; }
.leiste ul + .label, .leiste ul + ul { margin-top: .5rem; padding-top: .9rem; border-top: 1px solid var(--linie); }
.leiste ul + .label { margin-left: .55rem; margin-right: .55rem; padding-left: 0; padding-right: 0; }
.leiste li a {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .62rem .6rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: .9rem;
  color: #374151;
}
.leiste li a span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leiste li a .icon { color: var(--text-leise); }
.leiste li a .icon-pfeil { width: .95rem; height: .95rem; opacity: .7; }
.leiste li a:hover { background: var(--flaeche); }
.leiste li a[aria-current] { background: var(--flaeche); font-weight: 600; color: var(--text); }

/* Abschnitte eines Dokuments */
.toc ol { counter-reset: abschnitt; }
.toc li a { font-size: .86rem; padding: .45rem .6rem; line-height: 1.35; align-items: baseline; }
.toc-nummeriert li a::before { display: none; }
.toc li a::before {
  counter-increment: abschnitt;
  content: counter(abschnitt, decimal-leading-zero);
  font-size: .72rem;
  color: var(--sekundaer);
  font-variant-numeric: tabular-nums;
  min-width: 1.3rem;
}

/* --- Übersicht ---------------------------------------------------- */

.featured { padding-bottom: 2.25rem; border-bottom: 1px solid var(--linie); }
.featured h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 2.6vw, 2rem); line-height: 1.2; margin: 0 0 .9rem; }
.featured p:not(.label) { color: var(--text-leise); max-width: 36rem; margin: 0 0 1.4rem; }

.knopf {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  background: var(--primaer);
  color: #fff;
  padding: .75rem 1.3rem;
  border-radius: 10px;
  text-decoration: none;
  font-size: .92rem;
  font-weight: 500;
  transition: background .15s;
}
.knopf:hover { background: #374151; }
.knopf .icon { width: 1rem; height: 1rem; }

.zeilen { list-style: none; margin: 0; padding: 0; }
.zeilen + .zeilen, .zeilen-label { margin-top: 0; }
.zeilen-label { padding-top: 2rem; }
.zeilen li + li .zeile, .zeilen-oben li:first-child .zeile { border-top: 0; }
.zeile {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem .25rem;
  border-bottom: 1px solid var(--linie);
  text-decoration: none;
  color: inherit;
  transition: background .15s;
}
.zeile:hover { background: linear-gradient(90deg, transparent, var(--flaeche) 30%, var(--flaeche) 70%, transparent); }
.zeile:hover .icon-pfeil { transform: translateX(3px); }
.zeile-icon {
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 50%;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  flex: none;
}
.zeile-icon .icon { width: 1.3rem; height: 1.3rem; }
.zeile-text { flex: 1; display: flex; flex-direction: column; gap: .2rem; }
.zeile-titel { font-family: var(--serif); font-size: 1.15rem; line-height: 1.3; }
.zeile-beschreibung { font-size: .88rem; color: var(--text-leise); max-width: 36rem; }
.zeile .icon-pfeil { color: var(--text-leise); transition: transform .15s; }

/* Etikett: Entwurf, Coming Soon … */
.etikett {
  display: inline-block;
  vertical-align: middle;
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--warn);
  color: #7a5b1e;
  border: 1px solid #e6d2a6;
  border-radius: 5px;
  padding: .05rem .4rem;
  margin-left: .35rem;
}

.etikett-klein { font-size: .58rem; letter-spacing: .03em; padding: 0 .3rem; margin: 0; white-space: nowrap; flex: none; }
.etikett-klein + .icon-pfeil { display: none; }
.hero .etikett { margin-left: 0; }

/* Vertrauens-Box */
.vertrauen {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.75rem;
  background: var(--flaeche-gruen);
  border-radius: var(--radius);
  padding: 1.75rem 2.25rem;
  margin-bottom: 1.5rem;
}
.vertrauen-icon { display: grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 50%; background: #8d968b; color: #fff; }
.vertrauen-icon .icon { width: 1.5rem; height: 1.5rem; }
.vertrauen h2 { font-family: var(--serif); font-weight: 400; font-size: 1.4rem; margin: 0 0 .35rem; }
.vertrauen p { margin: 0; font-size: .9rem; color: #4b5563; max-width: 30rem; }
.handschrift {
  font-family: var(--hand);
  font-size: 1.65rem;
  line-height: 1.05;
  color: #4b5563;
  transform: rotate(-7deg);
  max-width: 11rem;
  margin: 0 1rem 0 0;
}
.handschrift svg { display: block; width: 6rem; margin: .3rem 0 0 1.5rem; color: #6b7280; }

/* --- Dokument ----------------------------------------------------- */

.pfad { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .82rem; color: var(--text-leise); margin-bottom: 1.75rem; }
.pfad a { color: var(--text-leise); text-decoration: none; }
.pfad a:hover { color: var(--text); text-decoration: underline; }
.pfad .icon { width: .8rem; height: .8rem; opacity: .6; }
.pfad [aria-current] { color: var(--text); }

.hinweis {
  background: var(--flaeche-gruen);
  border-left: 3px solid var(--sekundaer);
  border-radius: 8px;
  padding: .85rem 1.1rem;
  margin: 0 0 2rem;
  font-size: .92rem;
}
.hinweis-entwurf { background: var(--warn); border-left-color: var(--akzent); }

.prosa { max-width: 46rem; overflow-wrap: anywhere; hyphens: auto; font-size: .98rem; }
.prosa h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.75rem;
  line-height: 1.25;
  margin: 3.25rem 0 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--linie);
}
.prosa > h2:first-child, .prosa > blockquote:first-child + h2 { margin-top: 0; padding-top: 0; border-top: 0; }
.prosa > blockquote:first-child + h2 { margin-top: 2rem; }
.prosa h3 { font-family: var(--serif); font-weight: 500; font-size: 1.2rem; margin: 2.25rem 0 .6rem; }
.prosa h4 { font-size: 1rem; margin: 1.5rem 0 .4rem; }
.prosa p, .prosa ul, .prosa ol { margin: 0 0 1rem; }
.prosa ul, .prosa ol { padding-left: 1.3rem; }
.prosa li { margin: .3rem 0; }
.prosa li::marker { color: var(--sekundaer); }
.prosa li > ul, .prosa li > ol { margin: .3rem 0 0; }
.prosa strong { font-weight: 600; }
.prosa a { color: var(--primaer); text-decoration-color: var(--akzent); }
.prosa a:hover { text-decoration-thickness: 2px; }
.prosa hr { border: 0; border-top: 1px solid var(--linie); margin: 2rem 0; }
.prosa code { font-size: .88em; background: var(--flaeche); border-radius: 4px; padding: .1em .35em; }
.prosa blockquote {
  margin: 0 0 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--karte);
  border: 1px solid var(--linie);
  border-left: 3px solid var(--akzent);
  border-radius: 8px;
  font-size: .93rem;
}
.prosa blockquote > :last-child { margin-bottom: 0; }

.table-wrap { overflow-x: auto; margin: 0 0 1.5rem; background: var(--karte); border: 1px solid var(--linie); border-radius: 8px; }
.prosa table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.prosa th, .prosa td { text-align: left; padding: .65rem .9rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
.prosa th { background: var(--flaeche); font-weight: 600; font-size: .8rem; letter-spacing: .02em; }
.prosa tr:last-child td { border-bottom: 0; }

.fassungen { max-width: 46rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--linie); font-size: .92rem; }
.fassungen h2 { font-family: var(--serif); font-weight: 400; font-size: 1.2rem; margin: 0 0 .6rem; }
.fassungen ul { margin: 0; padding-left: 1.2rem; }

.nach-oben { margin-top: 2.5rem; font-size: .88rem; }
.nach-oben a { display: inline-flex; align-items: center; gap: .4rem; color: var(--text-leise); text-decoration: none; }
.nach-oben a:hover { color: var(--text); }
.nach-oben .icon { width: 1rem; height: 1rem; }

/* --- Fuß ---------------------------------------------------------- */

.fuss { background: var(--hero); color: rgba(255, 255, 255, .62); font-size: .85rem; padding-top: 3.25rem; }
.fuss-raster { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr auto; gap: 2.5rem; padding-bottom: 2.75rem; }
.fuss-marke img { height: 28px; width: auto; filter: brightness(0) invert(1); opacity: .95; }
.fuss-marke p { margin: 1rem 0 0; line-height: 1.7; }
.fuss h2 { color: #fff; font-size: .82rem; font-weight: 600; margin: 0 0 .8rem; }
.fuss ul { list-style: none; margin: 0; padding: 0; }
.fuss li { margin: .3rem 0; }
.fuss a { color: rgba(255, 255, 255, .62); text-decoration: none; }
.fuss a:hover { color: #fff; }
.social { display: flex; gap: .9rem; align-self: start; }
.social li { margin: 0; }
.social a { display: flex; color: #fff; opacity: .85; }
.social a:hover { opacity: 1; }
.fuss-unten {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  padding: 1.25rem 0 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .78rem;
}
.fuss-unten span span { margin: 0 .5rem; opacity: .5; }

/* --- Responsiv ---------------------------------------------------- */

@media (max-width: 62rem) {
  .kopf-nav { display: none; }
  .menue { display: block; }
  .raster { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 1.5rem; }
  .raster-seite { position: static; max-height: none; overflow: visible; }
  .raster-haupt { padding-top: 2rem; }
  .raster-seite-dok .leiste-global { display: none; }
  .fuss-raster { grid-template-columns: 1fr 1fr; }
  .fuss-marke { grid-column: 1 / -1; }
  .vertrauen { grid-template-columns: auto 1fr; }
  .handschrift { grid-column: 1 / -1; justify-self: end; }
}

@media (max-width: 40rem) {
  .rahmen { padding-left: 1rem; padding-right: 1rem; }
  .kopf-innen { gap: 1rem; }
  .marke img { height: 24px; }
  .pille { padding: .45rem 1rem; }
  .hero-innen, .hero-gross .hero-innen { padding-top: 2.5rem; padding-bottom: 2.75rem; }
  .hero-text { font-size: .95rem; }
  .zeile { gap: 1rem; padding: 1.2rem 0; }
  .zeile-icon { width: 2.5rem; height: 2.5rem; }
  .vertrauen { grid-template-columns: 1fr; padding: 1.5rem; gap: 1rem; }
  .handschrift { justify-self: start; }
  .fuss-raster { grid-template-columns: 1fr; gap: 1.75rem; }
  .prosa h2 { font-size: 1.45rem; }
}

/* --- Druck -------------------------------------------------------- */

@media print {
  .kopf, .raster-seite, .nach-oben, .fuss, .skip, .vertrauen, .pfad { display: none !important; }
  body { background: #fff; font-size: 10.5pt; }
  .hero { background: none !important; color: #000; }
  .hero::after { display: none; }
  .hero .label-hell, .hero-text, .hero-meta { color: #444; }
  .hero-innen { padding: 0 0 1rem; }
  .raster { display: block; padding: 0; }
  .prosa a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; color: #444; }
  .prosa h2, .prosa h3 { break-after: avoid; }
  .prosa blockquote, .prosa table { break-inside: avoid; }
}
