/* ============================================================
   kurz.seo-manager.info – SEO-Begriffe auf den Punkt
   Designsystem „Textmarker“: Papier, Tinte, Kugelschreiber-Blau,
   Marker-Gelb als Signatur. WCAG-AA, mobile-first, performant.
   ============================================================ */

/* ---------- Font (lokal, variable, latin-Subset) ---------- */
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-var-latin.woff2") format("woff2-variations");
}

/* ---------- Tokens ---------- */
:root {
  --papier: #FCFCF9;
  --tinte: #17191D;
  --grau: #4E545C;
  --linie: #E7E5DE;
  --linie-stark: #D6D3C9;
  --marker: #FFE45E;
  --marker-weich: #FFF8D6;
  --marker-rand: #EFD75B;
  --stift: #1B44C8;
  --stift-dunkel: #12308F;
  --flaeche: #F5F4EF;
  --sans: "Inter Variable", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--papier);
  color: var(--tinte);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; }

h1, h2 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: clamp(1.85rem, 4.6vw, 2.7rem); font-weight: 800; margin: 0.4em 0 0.45em; }
h2 { font-size: 1.3rem; font-weight: 700; margin: 2.3rem 0 0.7rem; }
p { margin: 0 0 1rem; }
ul { margin: 0 0 1rem; padding-left: 1.2rem; }

a { color: var(--stift); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--stift-dunkel); text-decoration-thickness: 2.5px; }
:focus-visible { outline: 3px solid var(--stift); outline-offset: 2px; border-radius: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.kz-skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--tinte); color: var(--papier);
  padding: 0.6rem 1rem; border-radius: 0 0 8px 8px; z-index: 100;
  transition: top 0.15s ease;
}
.kz-skip:focus { top: 0; color: var(--papier); }

.kz-wrap { max-width: 47rem; margin-inline: auto; padding-inline: 1.25rem; }
[id] { scroll-margin-top: 4.3rem; }

/* ---------- Signatur: Textmarker ---------- */
mark.kz-mark {
  color: inherit;
  background: none;
  background-image: linear-gradient(120deg, var(--marker) 0%, var(--marker) 100%);
  background-size: 100% 0.72em;
  background-position: 0 68%;
  background-repeat: no-repeat;
  padding: 0.02em 0.14em;
  margin: 0 -0.05em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.kz-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--grau);
  margin: 0 0 0.4rem;
}

/* ---------- Topbar ---------- */
.kz-topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--papier);
  border-bottom: 1px solid var(--linie);
}
.kz-topbar-in {
  max-width: 47rem; margin-inline: auto; padding: 0 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 3.4rem; gap: 1rem;
}
.kz-brand {
  font-weight: 800; font-size: 1.35rem; letter-spacing: -0.03em;
  color: var(--tinte); text-decoration: none;
}
.kz-brand .kz-punkt { color: var(--stift); }
.kz-brand:hover { color: var(--tinte); }
.kz-brand:hover .kz-punkt { color: var(--stift-dunkel); }

.kz-nav { display: flex; gap: 1.4rem; align-items: center; }
.kz-nav a {
  color: var(--tinte); text-decoration: none;
  font-size: 0.95rem; font-weight: 550;
  padding: 0.35rem 0; border-bottom: 2px solid transparent;
}
.kz-nav a:hover { border-bottom-color: var(--marker); color: var(--tinte); }
.kz-nav .kz-extern { color: var(--grau); font-weight: 450; }
.kz-nav .kz-extern:hover { color: var(--tinte); }

.kz-burger {
  display: none;
  background: none; border: 1px solid var(--linie-stark); border-radius: 8px;
  padding: 0.55rem 0.6rem; cursor: pointer;
}
.kz-burger-balken {
  display: block; width: 1.15rem; height: 2px;
  background: var(--tinte); margin: 3px 0; border-radius: 2px;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

@media (max-width: 820px) {
  .kz-burger { display: block; }
  .kz-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--papier);
    border-bottom: 1px solid var(--linie-stark);
    box-shadow: 0 12px 24px -12px rgba(23, 25, 29, 0.18);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.4rem 0 0.6rem;
  }
  body.kz-nav-offen .kz-nav { display: flex; }
  .kz-nav a {
    padding: 0.85rem 1.4rem; font-size: 1.05rem;
    border-bottom: 1px solid var(--linie);
  }
  .kz-nav a:last-child { border-bottom-color: transparent; }
  body.kz-nav-offen .kz-burger-balken:nth-child(1) { transform: translateY(5px) rotate(45deg); }
  body.kz-nav-offen .kz-burger-balken:nth-child(2) { opacity: 0; }
  body.kz-nav-offen .kz-burger-balken:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
}

/* ---------- Hauptbereich ---------- */
.kz-main { max-width: 47rem; margin-inline: auto; padding: 0 1.25rem 3rem; }

/* ---------- Startseite: Hero + Suche ---------- */
.kz-hero { padding: 2.6rem 0 1.4rem; }
.kz-claim { font-size: 1.14rem; color: var(--grau); max-width: 38rem; }

.kz-suche { margin: 1.4rem 0 0.4rem; }
.kz-suche input[type="search"] {
  width: 100%;
  font: inherit; font-size: 1.08rem;
  color: var(--tinte); background: #FFFFFF;
  border: 2px solid var(--tinte); border-radius: 12px;
  padding: 0.85rem 1.1rem;
  box-shadow: 4px 4px 0 var(--marker);
}
.kz-suche input[type="search"]::placeholder { color: var(--grau); opacity: 1; }
.kz-suche input[type="search"]:focus-visible { outline-offset: 4px; }

/* A–Z-Register */
.kz-rail {
  display: flex; flex-wrap: wrap; gap: 0.15rem;
  font-family: var(--mono); font-size: 0.88rem;
  margin: 1.3rem 0 0.2rem;
}
.kz-rail a, .kz-rail .kz-rail-leer {
  display: inline-block; min-width: 1.7rem; text-align: center;
  padding: 0.25rem 0.2rem; border-radius: 6px;
}
.kz-rail a { color: var(--tinte); text-decoration: none; font-weight: 650; }
.kz-rail a:hover { background: var(--marker); }
.kz-rail .kz-rail-leer { color: var(--linie-stark); }

/* Kategorie-Filter */
.kz-kats { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.9rem 0 0.4rem; }
.kz-kats button {
  font: inherit; font-size: 0.86rem; font-weight: 550;
  color: var(--tinte); background: var(--papier);
  border: 1.5px solid var(--linie-stark); border-radius: 999px;
  padding: 0.32rem 0.85rem; cursor: pointer;
}
.kz-kats button:hover { border-color: var(--tinte); background: var(--marker-weich); }
.kz-kats button[aria-pressed="true"] {
  background: var(--tinte); color: var(--papier); border-color: var(--tinte);
}

/* Begriffs-Verzeichnis */
.kz-verzeichnis { padding-top: 0.6rem; }
.kz-gruppe { margin-top: 1.6rem; }
.kz-buchstabe {
  font-family: var(--mono); font-weight: 700; font-size: 0.95rem;
  color: var(--grau);
  border-bottom: 2px solid var(--tinte);
  padding-bottom: 0.3rem; margin: 0 0 0.2rem;
}
.kz-liste { list-style: none; margin: 0; padding: 0; }
.kz-liste li { border-bottom: 1px solid var(--linie); }
.kz-eintrag {
  display: flex; align-items: baseline; gap: 0.9rem;
  padding: 0.8rem 0.15rem;
  text-decoration: none; color: var(--tinte);
}
.kz-eintrag-name {
  font-weight: 650; white-space: nowrap;
  text-decoration: underline; text-decoration-thickness: 2px;
  text-decoration-color: var(--linie-stark); text-underline-offset: 4px;
}
.kz-eintrag:hover .kz-eintrag-name { text-decoration-color: var(--marker); }
.kz-eintrag:hover { background: var(--marker-weich); }
.kz-eintrag-teaser {
  flex: 1; color: var(--grau); font-size: 0.92rem; line-height: 1.5;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.kz-eintrag-pfeil { color: var(--grau); font-weight: 700; }
#kz-leer { color: var(--grau); padding: 1.4rem 0; }

/* ---------- Begriffsseite ---------- */
.kz-crumb {
  font-size: 0.88rem; color: var(--grau);
  padding: 1.3rem 0 0;
}
.kz-crumb a { color: var(--grau); }
.kz-crumb a:hover { color: var(--stift-dunkel); }

.kz-artikel { padding-top: 0.9rem; }
.kz-dict {
  font-family: var(--mono); font-size: 0.82rem;
  color: var(--grau); letter-spacing: 0.02em;
  margin: -0.1rem 0 1.5rem;
}

.kz-antwort {
  background: var(--marker-weich);
  border: 1px solid var(--marker-rand);
  border-left: 6px solid var(--marker);
  border-radius: 12px;
  padding: 1.25rem 1.45rem 0.6rem;
  margin: 0 0 1.6rem;
}
.kz-antwort-label {
  font-family: var(--mono); font-size: 0.7rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--grau); margin: 0 0 0.55rem;
}
.kz-antwort-text {
  font-size: 1.19rem; line-height: 1.65; font-weight: 460;
  margin: 0 0 0.7rem;
}

.kz-fakten { list-style: none; padding: 0; margin: 0 0 1rem; }
.kz-fakten li {
  position: relative;
  padding: 0.28rem 0 0.28rem 1.5rem;
}
.kz-fakten li::before {
  content: "";
  position: absolute; left: 0.1rem; top: 0.78em;
  width: 0.58em; height: 0.58em;
  background: var(--marker);
  border: 1px solid var(--marker-rand);
  border-radius: 2px;
}

.kz-chips { list-style: none; padding: 0; margin: 0 0 1.2rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.kz-chips a {
  display: inline-block;
  border: 1.5px solid var(--linie-stark); border-radius: 999px;
  padding: 0.34rem 0.9rem;
  font-size: 0.92rem; font-weight: 550;
  color: var(--tinte); text-decoration: none;
}
.kz-chips a:hover { border-color: var(--stift); background: var(--marker-weich); color: var(--stift-dunkel); }

.kz-tiefe {
  border: 1.5px dashed var(--linie-stark); border-radius: 12px;
  background: var(--flaeche);
  padding: 1rem 1.3rem;
  margin: 2.2rem 0 0;
  font-size: 0.97rem;
}
.kz-tiefe p { margin: 0; }

.kz-stand {
  font-family: var(--mono); font-size: 0.78rem;
  color: var(--grau); margin-top: 1.6rem;
}

/* ---------- Recht & 404 ---------- */
.kz-prosa h2 { font-size: 1.15rem; margin-top: 2rem; }
.kz-prosa address { font-style: normal; }
.kz-404 { text-align: center; padding: 4.5rem 0 2rem; }
.kz-404-code {
  font-size: clamp(4rem, 14vw, 7rem); font-weight: 800; letter-spacing: -0.04em;
  line-height: 1; margin: 0 0 0.6rem;
}
.kz-404-code .kz-punkt { color: var(--stift); }

/* ---------- Footer ---------- */
.kz-footer {
  border-top: 1px solid var(--linie);
  background: var(--flaeche);
  margin-top: 3.5rem;
  font-size: 0.93rem; color: var(--grau);
}
.kz-footer-in { max-width: 47rem; margin-inline: auto; padding: 1.8rem 1.25rem 2.2rem; }
.kz-footer-nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin: 0.7rem 0; }
.kz-footer a { color: var(--grau); }
.kz-footer a:hover { color: var(--stift-dunkel); }
.kz-footer-note { font-family: var(--mono); font-size: 0.76rem; margin: 0.8rem 0 0; }

/* ---------- Klein ---------- */
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .kz-hero { padding-top: 1.9rem; }
  .kz-eintrag { flex-wrap: wrap; gap: 0.15rem 0.9rem; }
  .kz-eintrag-teaser { flex-basis: 100%; }
  .kz-eintrag-pfeil { display: none; }
  .kz-antwort { padding: 1.05rem 1.1rem 0.5rem; border-radius: 10px; }
  .kz-antwort-text { font-size: 1.1rem; }
}

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
