/* ============================================================
   CODEFLUX – Brand & Digital Studio
   Gemeinsames Designsystem (Navy / Gold / Papier)
   Wird von allen Seiten eingebunden: <link rel="stylesheet" href="/assets/codeflux.css">
   ============================================================ */

:root {
  --paper: #FBFAF7;
  --ink: #131C36;          /* Navy als Tinte – der Logo-Bezug */
  --ink-soft: #1C2747;
  --mut: #626879;
  --faint: #9A968C;
  --gold: #C6A15B;
  --gold-2: #D6B472;
  --gold-soft: #F1E4C8;
  --gold-line: #EAD9B4;
  --card: #FFFFFF;
  --line: rgba(19, 28, 54, 0.10);
  --line-soft: rgba(19, 28, 54, 0.06);
  --paper-2: #F0EEE8;
  --shadow: 0 2px 6px rgba(19, 28, 54, 0.06), 0 18px 44px rgba(19, 28, 54, 0.09);
  --shadow-sm: 0 1px 3px rgba(19, 28, 54, 0.06);
  /* Statusfarben (Score/Audit) – auf die Palette abgestimmt */
  --ok: #3E8E5A;
  --ok-soft: #E4F1E9;
  --warn: #C6893B;
  --warn-soft: #F6E9D3;
  --bad: #C0503B;
  --bad-soft: #F5E1DB;
  --radius: 20px;
  --radius-sm: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif;
  font-size: 17.5px; line-height: 1.65; color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s;
}
@media (min-width: 1500px) { body { font-size: 19px; } }
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.wrap { max-width: 1380px; margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 3rem); }
.wrap-wide { max-width: 1680px; margin: 0 auto; padding: 0 clamp(1.2rem, 3vw, 2.5rem); }
.wrap-narrow { max-width: 820px; margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 3rem); }
section { padding: clamp(5rem, 10vw, 8.5rem) 0; }

h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.08; }
h2 { font-size: clamp(2rem, 3.6vw, 3.6rem); margin-bottom: 1.1rem; }

/* Marker-Highlight – der freundliche Gold-Strich */
mark { background: linear-gradient(transparent 58%, var(--gold-soft) 58%); color: inherit; padding: 0 0.1em; }

.sub { color: var(--mut); max-width: 720px; font-size: clamp(1.08rem, 1.3vw, 1.25rem); }
.eyebrow { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.9rem; }

/* Buttons – echte Buttons */
.btn { display: inline-block; text-decoration: none; font-weight: 700; font-size: 1rem;
  padding: 0.95rem 1.8rem; border-radius: 999px; text-align: center; cursor: pointer; border: 0;
  font-family: inherit; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-dark { background: var(--ink); color: #fff; box-shadow: 0 8px 22px rgba(19,28,54,0.22); }
.btn-dark:hover { background: var(--ink-soft); }
.btn-soft { background: var(--gold-soft); color: var(--ink); }
.btn-soft:hover { background: var(--gold-line); }
.btn-gold { background: var(--gold); color: #0E1730; }
.btn-gold:hover { background: var(--gold-2); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--gold); }
.btn small { display: block; font-weight: 500; font-size: 0.74rem; opacity: 0.75; margin-top: 0.1rem; }

/* Foto-Platzhalter & Bilder */
.ph { background: var(--paper-2); border-radius: 18px; display: flex; align-items: center; justify-content: center;
  text-align: center; color: var(--faint); font-size: 0.8rem; line-height: 1.5; padding: 1rem; }
.photo { width: 100%; height: auto; object-fit: cover; border-radius: 18px; }
.ph b { display: block; color: #7E7A70; font-size: 0.72rem; letter-spacing: 0.06em; margin-bottom: 0.25rem; }

/* ── Header ── */
header.site { position: sticky; top: 0; z-index: 50; background: rgba(251, 250, 247, 0.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-soft); }
.site-in { max-width: 1380px; margin: 0 auto; padding: 1rem clamp(1.2rem, 4vw, 3rem); display: flex; align-items: center; gap: 1.6rem; }
.logo { display: inline-flex; flex-direction: column; align-items: flex-start; font-weight: 800; font-size: 1.25rem; letter-spacing: 0.01em; text-decoration: none; color: var(--ink); line-height: 1.1; }
.logo .logo-word { display: block; white-space: nowrap; }
.logo b { color: var(--gold); }
.logo small { display: block; font-size: 0.58rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-top: 0.2rem; white-space: nowrap; }
nav.main { margin-left: auto; display: flex; gap: 1.6rem; align-items: center; }
nav.main a { text-decoration: none; font-size: 0.98rem; font-weight: 600; color: var(--mut); }
nav.main a:hover { color: var(--ink); }
nav.main a.active { color: var(--ink); }
nav.main .btn { padding: 0.6rem 1.3rem; font-size: 0.92rem; }
.burger { display: none; margin-left: auto; border: 0; background: var(--gold-soft); color: var(--ink);
  font: inherit; font-weight: 700; border-radius: 999px; padding: 0.55rem 1.1rem; cursor: pointer; }
.burger:hover { background: var(--gold-line); }
@media (max-width: 860px) {
  nav.main { position: absolute; top: 100%; left: 0; right: 0; background: var(--paper);
    display: none; flex-direction: column; align-items: stretch; gap: 0.2rem;
    padding: 0.8rem 1.2rem 1.2rem; box-shadow: 0 24px 40px rgba(19,28,54,0.12); }
  nav.main.open { display: flex; }
  nav.main a { padding: 0.7rem 0.4rem; font-size: 1.05rem; }
  nav.main .btn { margin-top: 0.6rem; text-align: center; }
  .burger { display: block; }
  .site-in { position: relative; }
}

/* ── Seiten-Hero (Unterseiten) ── */
.page-hero { padding: clamp(3.2rem, 8vw, 6rem) 0 clamp(1.5rem, 4vw, 3rem); }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 4.2rem); max-width: 16ch; }
.page-hero .sub { margin-top: 1.3rem; }

/* ── Prosa / Rechtstexte ── */
.prose h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin: 2.6rem 0 0.8rem; }
.prose h3 { font-size: 1.1rem; font-weight: 700; margin: 1.6rem 0 0.5rem; }
.prose p { margin-bottom: 1rem; color: #2A3046; }
.prose ul, .prose ol { margin: 0 0 1.1rem 1.3rem; }
.prose li { margin-bottom: 0.45rem; color: #2A3046; }
.prose a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.prose a:hover { color: var(--gold); }
.prose .muted { color: var(--mut); }
.prose .lead { font-size: 1.12rem; color: var(--mut); margin-bottom: 2.2rem; }
.updated { font-size: 0.9rem; color: var(--mut); margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }

/* Info-/Kontaktbox */
.contact-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.6rem 1.8rem; margin: 1.2rem 0 2rem; line-height: 1.9; box-shadow: var(--shadow-sm); }
.contact-box strong { font-weight: 700; }
.contact-box a { color: var(--ink); font-weight: 600; }

/* Karten allgemein */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: clamp(1.4rem, 2.5vw, 2.2rem); }

/* Badges / Pills */
.badge { display: inline-block; background: var(--gold-soft); color: #7A5E28; font-size: 0.75rem; font-weight: 700; padding: 0.22rem 0.7rem; border-radius: 999px; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }

/* Tabellen */
table.cfx { width: 100%; border-collapse: collapse; font-size: 0.96rem; }
table.cfx th, table.cfx td { text-align: left; padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); }
table.cfx th { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mut); font-weight: 800; }
.table-scroll { overflow-x: auto; }

/* Formulare */
.field-label { display: block; font-weight: 700; font-size: 0.92rem; margin-bottom: 0.4rem; }
input.cfx, select.cfx, textarea.cfx {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--card);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 0.85rem 1rem; transition: border-color 0.15s, box-shadow 0.15s; }
input.cfx:focus, select.cfx:focus, textarea.cfx:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
input.cfx::placeholder { color: var(--faint); }

/* ── KI-Karte (dunkler Logo-Moment) ── */
.ki-card { background: #0E1730; color: #fff; border-radius: 26px; padding: clamp(2.2rem, 5vw, 3.5rem);
  display: flex; align-items: center; gap: 1.5rem 3rem; flex-wrap: wrap; box-shadow: 0 30px 70px rgba(14, 23, 48, 0.35); }
.ki-card h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.1rem); flex: 1; min-width: 260px; }
.ki-card h2 b { color: var(--gold); }
.ki-card p { color: rgba(255,255,255,0.72); font-size: 0.98rem; margin-top: 0.5rem; }

/* ── Footer ── */
footer.site-footer { padding: 2.2rem 0 3rem; color: var(--mut); font-size: 0.88rem; border-top: 1px solid var(--line-soft); margin-top: 2rem; }
footer.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 0.8rem 2.2rem; justify-content: space-between; align-items: center; }
footer.site-footer a { color: var(--mut); text-decoration: none; }
footer.site-footer a:hover { color: var(--ink); }
footer.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }

/* ── Chaos-Modus (der Gag – überall gleich verfügbar) ── */
body.chaos { background: #FDFD96; color: #00008B;
  font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", cursive; }
body.chaos h1, body.chaos h2, body.chaos h3 { color: #C71585; text-shadow: 2px 2px 0 #00CED1; letter-spacing: 0.02em; }
body.chaos mark { background: #7CFC00; }
body.chaos .btn, body.chaos .funfact button { background: red !important; color: yellow !important; border-radius: 0 !important; box-shadow: 4px 4px 0 #00008B !important; animation: cfx-blink 0.9s steps(1) infinite; }
body.chaos .card, body.chaos .panel, body.chaos .quote, body.chaos .pcard, body.chaos .funfact, body.chaos .contact-box { border-radius: 0; box-shadow: 6px 6px 0 #C71585; background: #fff; }
body.chaos .ph { background: repeating-linear-gradient(45deg, #FF69B4, #FF69B4 14px, #00CED1 14px, #00CED1 28px); color: #00008B; }
body.chaos .photo, body.chaos .avatar { filter: saturate(2.6) hue-rotate(310deg) contrast(1.15); border-radius: 0; }
body.chaos header.site { background: #FF69B4; }
body.chaos .logo { color: #00008B; }
body.chaos .logo small { color: #C71585; }
body.chaos .ki-card { background: #7CFC00; color: #C71585; box-shadow: 8px 8px 0 #00008B; border-radius: 0; }
body.chaos .ki-card p { color: #00008B; }
body.chaos .sub, body.chaos .card p, body.chaos .quote figcaption { color: #006400; }
@keyframes cfx-blink { 50% { opacity: 0.35; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card { transition: none; }
  body.chaos .btn, body.chaos .funfact button { animation: none; }
}

/* Mobile-Feinschliff */
@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .contact-actions, .hero-actions { flex-direction: column; align-items: stretch; }
  .contact-actions .btn, .hero-actions .btn { width: 100%; }
  footer.site-footer .wrap { flex-direction: column; align-items: flex-start; }
}
