/* ============================================================================
 * Experto Mundi - Legal Style (Datenschutz, Impressum, KI-Hinweis, Cookies, AGB)
 * (c) 2026 Marcel Peter. Alle Rechte vorbehalten.
 *
 * Editorial-clean Dark-Brand:
 *  - Palette + Gold-Akzente von der Glitch-Landing
 *  - Lesbarkeitsfokussiert: Serif-Headings, ruhiger Body, max-720 Spaltenbreite
 *  - KEINE Glitch-Effekte auf Lauftext
 *
 * Greift NUR auf body.em-legal (per mu-plugin gesetzt).
 * Landing wird damit garantiert nicht beruehrt.
 * ============================================================================ */

/* --- Brand-Tokens (mirror landing.html, ohne Glitch) ------------------------ */
body.em-legal {
  --el-bg:       #0a0a0a;
  --el-bg-2:     #0d0d12;
  --el-surface:  #14141d;
  --el-surface-2:#1a1a26;
  --el-text:     #f1f1f6;
  --el-muted:    #b8b8c4;
  --el-muted-2:  #8e8e9a;
  --el-gold:     #c9a86a;
  --el-gold-2:   #f0d292;
  --el-line:     rgba(255,255,255,0.08);
  --el-line-soft:rgba(255,255,255,0.05);

  --em-font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua",
                   Palatino, "EB Garamond", Georgia, serif;
  --em-font-sans:  -apple-system, BlinkMacSystemFont, "Segoe UI",
                   system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --em-font-mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo,
                   Consolas, "Liberation Mono", monospace;

  --em-measure: 72ch; /* ~720px Lauftext */
  --em-radius: 14px;
}

/* --- Page-Frame ------------------------------------------------------------- */
body.em-legal {
  background: var(--el-bg) !important;
  color: var(--el-text) !important;
  font-family: var(--em-font-sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* TT25 macht oft einen "wp-site-blocks"-Wrapper - sicherstellen, dass nix
   einen helleren Hintergrund druckt */
body.em-legal .wp-site-blocks,
body.em-legal .wp-block-group,
body.em-legal main,
body.em-legal .wp-block-post-content,
body.em-legal .entry-content {
  background: transparent !important;
  color: var(--el-text);
}

/* --- Header / Site-Brand ---------------------------------------------------- */
body.em-legal header,
body.em-legal .wp-block-template-part[data-type="header"],
body.em-legal .wp-block-site-title,
body.em-legal .wp-block-navigation {
  background: var(--el-bg) !important;
  color: var(--el-text) !important;
}

body.em-legal .wp-block-site-title,
body.em-legal .wp-block-site-title a {
  font-family: var(--em-font-serif);
  font-weight: 600;
  letter-spacing: 0.005em;
  color: var(--el-text) !important;
  text-decoration: none;
}

body.em-legal .wp-block-navigation a,
body.em-legal .wp-block-navigation .wp-block-navigation-item__content {
  color: var(--el-muted) !important;
  font-family: var(--em-font-sans);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: color .2s ease;
}
body.em-legal .wp-block-navigation a:hover,
body.em-legal .wp-block-navigation a:focus {
  color: var(--el-gold-2) !important;
}

/* --- Headings (Serif, gold-akzentuiert) ------------------------------------- */
body.em-legal h1,
body.em-legal h2,
body.em-legal h3,
body.em-legal h4,
body.em-legal h5,
body.em-legal h6,
body.em-legal .wp-block-post-title {
  font-family: var(--em-font-serif);
  color: var(--el-text);
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.18;
  margin: 1.8em 0 0.6em;
}

body.em-legal h1,
body.em-legal .wp-block-post-title {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem);
  margin-top: 0.4em;
  margin-bottom: 0.5em;
  letter-spacing: -0.015em;
}

/* Gold-Underline auf H1 + nummerierten Section-Headings */
body.em-legal h1::after,
body.em-legal .wp-block-post-title::after {
  content: "";
  display: block;
  margin-top: 18px;
  width: 88px;
  height: 2px;
  background: linear-gradient(90deg, var(--el-gold) 0%, var(--el-gold-2) 100%);
  border-radius: 2px;
}

body.em-legal h2 {
  font-size: clamp(1.45rem, 1.15rem + 1.2vw, 1.85rem);
  padding-bottom: 0.35em;
  border-bottom: 1px solid var(--el-line-soft);
}

body.em-legal h3 {
  font-size: clamp(1.15rem, 1.02rem + 0.6vw, 1.35rem);
  color: var(--el-gold-2);
}

body.em-legal h4 {
  font-size: 1.05rem;
  color: var(--el-gold-2);
  letter-spacing: 0.02em;
  text-transform: none;
}

/* --- Lauftext (max 720px, ruhige Lesbarkeit) -------------------------------- */
body.em-legal .entry-content,
body.em-legal .wp-block-post-content {
  max-width: var(--em-measure);
  margin-left: auto;
  margin-right: auto;
  padding: clamp(16px, 3vw, 32px);
}

body.em-legal p {
  color: var(--el-text);
  margin: 0 0 1.1em;
  font-size: 1rem;
  line-height: 1.62;
}

body.em-legal p:first-of-type {
  /* dezenter Lead - nicht zu schwer */
  color: var(--el-text);
  font-size: 1.04rem;
}

/* Links: dezenter Gold-Underline statt knalliges Blau */
body.em-legal a {
  color: var(--el-gold-2);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(240,210,146,0.45);
  transition: text-decoration-color .2s ease, color .2s ease;
}
body.em-legal a:hover,
body.em-legal a:focus {
  color: var(--el-gold);
  text-decoration-color: var(--el-gold);
}

/* Strong / em - im Body weich tönen */
body.em-legal strong, body.em-legal b { color: var(--el-text); font-weight: 600; }
body.em-legal em, body.em-legal i { color: var(--el-muted); }

/* --- Listen ---------------------------------------------------------------- */
body.em-legal ul,
body.em-legal ol {
  padding-left: 1.3em;
  margin: 0 0 1.2em;
}
body.em-legal ul li,
body.em-legal ol li {
  margin: 0.35em 0;
  color: var(--el-text);
}
body.em-legal ul li::marker {
  color: var(--el-gold);
}
body.em-legal ol li::marker {
  color: var(--el-gold-2);
  font-weight: 600;
}

/* Verschachtelte Listen etwas heller */
body.em-legal li ul li,
body.em-legal li ol li {
  color: var(--el-muted);
}

/* --- Tables ---------------------------------------------------------------- */
body.em-legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4em 0;
  font-size: 0.95rem;
  background: var(--el-surface);
  border: 1px solid var(--el-line);
  border-radius: var(--em-radius);
  overflow: hidden;
}
body.em-legal th,
body.em-legal td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--el-line-soft);
  vertical-align: top;
}
body.em-legal th {
  background: var(--el-surface-2);
  color: var(--el-gold-2);
  font-weight: 600;
  letter-spacing: 0.01em;
  border-bottom: 1px solid var(--el-line);
}
body.em-legal tr:last-child td {
  border-bottom: none;
}

/* --- Code / pre ------------------------------------------------------------ */
body.em-legal code,
body.em-legal kbd,
body.em-legal samp {
  font-family: var(--em-font-mono);
  font-size: 0.9em;
  background: rgba(201,168,106,0.08);
  border: 1px solid rgba(201,168,106,0.18);
  color: var(--el-gold-2);
  padding: 1px 6px;
  border-radius: 5px;
}
body.em-legal pre {
  background: var(--el-surface);
  border: 1px solid var(--el-line);
  border-radius: var(--em-radius);
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--em-font-mono);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--el-text);
}
body.em-legal pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
}

/* --- Blockquote / Callouts ------------------------------------------------- */
body.em-legal blockquote,
body.em-legal .wp-block-quote {
  margin: 1.4em 0;
  padding: 14px 18px 14px 22px;
  border-left: 3px solid var(--el-gold);
  background: var(--el-surface);
  color: var(--el-muted);
  border-radius: 0 var(--em-radius) var(--em-radius) 0;
  font-family: var(--em-font-serif);
  font-style: normal;
}
body.em-legal blockquote p { color: var(--el-muted); margin: 0; }

/* --- HR -------------------------------------------------------------------- */
body.em-legal hr {
  border: none;
  height: 1px;
  background: var(--el-line);
  margin: 2.2em 0;
}

/* --- Buttons (z.B. Cookie-Consent-Buttons innerhalb Cookie-Page) ----------- */
body.em-legal .wp-block-button__link,
body.em-legal button.wp-block-button__link {
  background: linear-gradient(135deg, var(--el-gold), var(--el-gold-2));
  color: #0a0a0f !important;
  font-weight: 700;
  border-radius: 999px;
  padding: 12px 22px;
  border: none;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(201,168,106,0.20);
  transition: transform .2s ease, box-shadow .2s ease;
}
body.em-legal .wp-block-button__link:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(201,168,106,0.32);
}

/* --- Footer ---------------------------------------------------------------- */
body.em-legal footer,
body.em-legal .wp-block-template-part[data-type="footer"] {
  background: var(--el-bg-2) !important;
  color: var(--el-muted) !important;
  border-top: 1px solid var(--el-line-soft);
  margin-top: 64px;
  padding-top: 32px;
  padding-bottom: 32px;
  font-size: 0.9rem;
}
body.em-legal footer a {
  color: var(--el-muted);
  text-decoration-color: rgba(255,255,255,0.18);
}
body.em-legal footer a:hover {
  color: var(--el-gold-2);
}

/* --- Selection / Focus ----------------------------------------------------- */
body.em-legal ::selection {
  background: rgba(240,210,146,0.28);
  color: var(--el-text);
}
body.em-legal *:focus-visible {
  outline: 2px solid var(--el-gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Images / Figures (selten, aber sauber falls vorhanden) ---------------- */
body.em-legal img,
body.em-legal figure {
  max-width: 100%;
  height: auto;
  border-radius: var(--em-radius);
}
body.em-legal figcaption {
  color: var(--el-muted-2);
  font-size: 0.85rem;
  margin-top: 6px;
  font-style: italic;
}

/* --- Reduced Motion -------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  body.em-legal * {
    transition: none !important;
    animation: none !important;
  }
}

/* --- Small screens --------------------------------------------------------- */
@media (max-width: 640px) {
  body.em-legal { font-size: 16px; }
  body.em-legal h1, body.em-legal .wp-block-post-title { font-size: 1.85rem; }
  body.em-legal h2 { font-size: 1.3rem; }
  body.em-legal .entry-content,
  body.em-legal .wp-block-post-content { padding: 14px 16px; }
}
