/*
 * WEBKOO X-CONNECT — Baustellenseite (v1.5.0)
 * Webkoo CI „Charcoal Kontrast“ + Gold, Werte identisch mit der X-Connect-
 * Oberfläche (wp-x-connect/assets/css/admin.css) und der X-Site Engine:
 * Gold ist der einzige Akzent, Radius 2px, Montserrat, alles lokal.
 * Dunkel als Standard; hell, wenn das System hell eingestellt ist.
 */

@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/montserrat-400.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/montserrat-500.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/montserrat-600.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/montserrat-700.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --bg: #111315;
  --card: #1A1D21;
  --card-hover: #1F2329;
  --elevated: #24282C;
  --input: #181B1E;
  --border: rgba(231, 226, 216, 0.10);
  --border-hover: rgba(231, 226, 216, 0.18);
  --text: #D7D3CA;
  --text-2: #A8ADB2;
  --muted: #8A8F94;
  --heading: #E7E2D8;
  --accent: #C59A55;
  --accent-hover: #DBB374;
  --accent-text: #E4C489;
  --accent-soft: rgba(197, 154, 85, 0.12);
  --on-accent: #111315;
  --btn-bg: #2C3135;
  --btn-text: #F1EDE4;
  --btn-icon: #E7C48B;
  --btn-hover: #363C40;
  --success: #3FBE86;
  --success-bg: rgba(63, 190, 134, 0.14);
  --danger: #E1795C;
  --danger-bg: rgba(225, 121, 92, 0.14);
  --radius: 2px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -18px rgba(0, 0, 0, 0.6);
  --focus: 0 0 0 3px rgba(197, 154, 85, 0.3);
  --wrap: 1180px;
  --pad-x: clamp(20px, 4vw, 40px);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #F4F1EB;
    --card: #FFFFFF;
    --card-hover: #FAF8F4;
    --elevated: #F0ECE4;
    --input: #F6F3ED;
    --border: rgba(17, 19, 21, 0.09);
    --border-hover: rgba(17, 19, 21, 0.16);
    --text: #2A2D30;
    --text-2: #6E7379;
    --muted: #767C82;
    --heading: #14161A;
    --accent-hover: #B0853F;
    --accent-text: #8C6A2C;
    --accent-soft: rgba(197, 154, 85, 0.10);
    --btn-bg: #1B1E20;
    --btn-text: #F3EFE7;
    --btn-icon: #DBBE82;
    --btn-hover: #292D30;
    --success: #2E9E6B;
    --success-bg: rgba(46, 158, 107, 0.12);
    --danger: #C0492B;
    --danger-bg: rgba(192, 73, 43, 0.10);
    --shadow: 0 1px 2px rgba(17, 19, 21, 0.05), 0 8px 20px -14px rgba(17, 19, 21, 0.15);
    --focus: 0 0 0 3px rgba(197, 154, 85, 0.25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.65 var(--font); overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; color: var(--heading); font-family: var(--font); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius); }
::selection { background: var(--accent); color: var(--on-accent); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad-x); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 10px 14px; }
.skip:focus { left: 8px; }

.label { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 14px; }
.lead { color: var(--text-2); font-size: 17px; max-width: 560px; }
.h2 { font-size: clamp(26px, 3.2vw, 38px); font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; }
.h3 { font-size: 18px; font-weight: 600; line-height: 1.35; }

/* Buttons — wie in der X-Site-Engine-Oberfläche */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 22px; border: 1px solid transparent; border-radius: var(--radius);
  font: 600 15px/1 var(--font); text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-gold { background: var(--accent); color: var(--on-accent); }
.btn-gold:hover { background: var(--accent-hover); }
.btn-dark { background: var(--btn-bg); color: var(--btn-text); }
.btn-dark svg { color: var(--btn-icon); }
.btn-dark:hover { background: var(--btn-hover); }
.btn-line { background: transparent; color: var(--heading); border-color: var(--border-hover); }
.btn-line:hover { border-color: var(--accent); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Navigation */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; min-height: 44px; }
.logo-name { font-weight: 700; font-size: 17px; color: var(--heading); letter-spacing: -0.01em; }
.logo-by { font-size: 12px; color: var(--muted); font-weight: 500; }

/* Hero */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--accent-soft); color: var(--accent-text); border-radius: var(--radius); font-size: 13px; font-weight: 600; margin-bottom: 22px; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hero h1 { font-size: clamp(30px, 4vw, 48px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 22px; }
.hero h1 span { color: var(--accent-text); }
.hero .lead { margin-bottom: 32px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* Vorschau des Wizards (nachgebaut aus der echten Oberfläche) */
.vorschau { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.vs-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.vs-marke { display: flex; align-items: center; gap: 10px; }
.vs-marke strong { display: block; font-size: 14px; color: var(--heading); }
.vs-marke small { display: block; font-size: 11px; color: var(--muted); }
.vs-body { padding: 26px 18px 28px; text-align: center; }

/* Faktenzeile */
.fakten { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.fakten-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.fakt { padding: 26px 20px 26px 0; }
.fakt + .fakt { padding-left: 20px; border-left: 1px solid var(--border); }
.fakt strong { display: block; font-size: 20px; font-weight: 700; color: var(--heading); letter-spacing: -0.01em; margin-bottom: 4px; }
.fakt span { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

/* Abschnitte */
.sec { padding: clamp(64px, 9vw, 104px) 0 0; }
.sec:last-of-type { padding-bottom: clamp(64px, 9vw, 104px); }
.sec-kopf { max-width: 680px; margin-bottom: 40px; }
.sec-kopf .h2 { margin-bottom: 12px; }

.karten { display: grid; gap: 16px; }
.karten-4 { grid-template-columns: repeat(4, 1fr); }
.karten-3 { grid-template-columns: repeat(3, 1fr); }
.karten-2 { grid-template-columns: repeat(2, 1fr); }
.karte { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; transition: border-color .15s ease; }
.karte:hover { border-color: var(--border-hover); }
.karte .h3 { margin-bottom: 8px; }
.karte p { color: var(--text-2); font-size: 15px; }
.karte a { color: var(--accent-text); text-underline-offset: 3px; }
.nummer { display: inline-grid; place-items: center; width: 32px; height: 32px; margin-bottom: 18px; border-radius: var(--radius); background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 15px; }
.symbol { width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: 18px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent-text); }
.symbol svg { width: 20px; height: 20px; }

/* Warteliste */
.warteliste { display: grid; grid-template-columns: 0.9fr 1.1fr; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.wl-info { padding: clamp(26px, 4vw, 44px); border-right: 1px solid var(--border); }
.wl-info .h2 { margin-bottom: 14px; }
.wl-info .lead { font-size: 16px; margin-bottom: 22px; }
.wl-punkte { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; }
.wl-punkte li { position: relative; padding-left: 26px; color: var(--text); font-size: 15px; }
.wl-punkte li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.voraussetzung { font-size: 13px; color: var(--muted); }
.formular { padding: clamp(26px, 4vw, 44px); display: flex; flex-direction: column; gap: 18px; }
.feld { display: flex; flex-direction: column; gap: 7px; }
.feld label { font-size: 14px; font-weight: 600; color: var(--heading); }
.feld label span { color: var(--accent-text); }
.feld input, .feld select {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: var(--radius);
  background: var(--input); color: var(--heading); border: 1px solid var(--border-hover);
  font: 500 15px/1.2 var(--font);
}
.feld select { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
.feld input::placeholder { color: var(--muted); }
.feld input:focus, .feld select:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.feld.hat-fehler input, .feld.hat-fehler select { border-color: var(--danger); }
.fehler { color: var(--danger); font-size: 13px; }
.fehler:empty { display: none; }
.check { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; font-size: 13px; color: var(--text-2); cursor: pointer; line-height: 1.55; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.hinweis { font-size: 12px; color: var(--muted); line-height: 1.6; }
.hinweis a, .rechtstext a { color: var(--accent-text); text-underline-offset: 3px; }
.meldung-box { padding: 14px 16px; border-radius: var(--radius); font-size: 14px; }
.meldung-box.ok { background: var(--success-bg); color: var(--heading); border: 1px solid var(--success); }
.meldung-box.err { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger); }

/* FAQ */
.faq { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.faq-item + .faq-item { border-top: 1px solid var(--border); }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 16px 22px; cursor: pointer; list-style: none; }
.faq-q::-webkit-details-marker { display: none; }
.faq-q h3 { font-size: 16px; font-weight: 600; line-height: 1.4; }
.faq-plus { position: relative; flex: none; width: 22px; height: 22px; color: var(--accent-text); transition: transform .2s ease; }
.faq-plus::before, .faq-plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; background: currentColor; transform: translate(-50%, -50%); }
.faq-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item[open] .faq-plus { transform: rotate(45deg); }
.faq-a { padding: 0 22px 22px; color: var(--text-2); font-size: 15px; max-width: 760px; }

/* Rechtstexte und Meldungen */
.seite { padding: clamp(48px, 7vw, 80px) 0; }
.seite .karte { max-width: 820px; margin: 0 auto; padding: clamp(26px, 5vw, 48px); }
.seite h1 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 700; margin-bottom: 26px; }
.meldung .lead { margin: 0 0 26px; }
.rechtstext { color: var(--text); font-size: 15px; overflow-wrap: anywhere; }
.rechtstext h2 { font-size: 19px; font-weight: 700; margin: 34px 0 10px; }
.rechtstext h3 { font-size: 16px; font-weight: 600; margin: 22px 0 8px; }
.rechtstext p, .rechtstext ul, .rechtstext ol { margin: 0 0 12px; }
.rechtstext ul { padding-left: 20px; }
.link-start { display: inline-flex; align-items: center; min-height: 44px; margin-top: 26px; color: var(--accent-text); font-weight: 600; text-decoration: none; }

/* Footer */
.footer { border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 22px; padding-bottom: 22px; font-size: 13px; color: var(--muted); }
.footer-marke { display: flex; align-items: center; gap: 10px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--text-2); }
.footer-links a:hover { color: var(--accent-text); }


/* ── X-CONNECT-Elemente ─────────────────────────────────────────── */
.logo-box { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid rgba(197, 154, 85, 0.25); color: var(--accent); }
.logo-box svg { width: 20px; height: 20px; }
.logo-box.klein { width: 32px; height: 32px; }
.logo-box.klein svg { width: 17px; height: 17px; }
.logo-box.mini { width: 24px; height: 24px; }
.logo-box.mini svg { width: 13px; height: 13px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.vs-status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--radius); background: var(--success-bg); color: var(--success); font-size: 12px; font-weight: 600; }
.vs-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.vs-body { padding: 20px 18px 22px; }
.vs-titel { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.vs-liste { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); }
.vs-liste li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; font-size: 14px; color: var(--heading); font-weight: 500; }
.vs-liste li + li { border-top: 1px solid var(--border); }
.vs-liste b { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--success); }
.vs-liste b::before { content: ""; width: 10px; height: 6px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg) translateY(-2px); }
.vs-fuss { margin-top: 12px; font-size: 12px; color: var(--muted); }

.funktionen { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 28px; }
.funktionen li { position: relative; padding: 14px 0 14px 30px; border-bottom: 1px solid var(--border); color: var(--text-2); font-size: 15px; }
.funktionen li strong { color: var(--heading); font-weight: 600; }
.funktionen li::before { content: ""; position: absolute; left: 4px; top: 21px; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }

.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 16px 22px; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { font-size: 16px; font-weight: 600; line-height: 1.4; }
.faq summary::after { content: "+"; flex: none; width: 22px; text-align: center; font-size: 22px; font-weight: 500; line-height: 1; color: var(--accent-text); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }

.response-msg { display: none; padding: 14px 16px; border-radius: var(--radius); font-size: 14px; }
.response-msg.success { background: var(--success-bg); color: var(--heading); border: 1px solid var(--success); }
.response-msg.error { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger); }
.feld input[type="text"] { margin-top: 8px; }

@media (max-width: 760px) { .funktionen { grid-template-columns: 1fr; } }
.logo-name { white-space: nowrap; }
.nav-kurz { display: none; }


/* Wortumbruch: Nie mitten im Wort zerreißen. Passt ein langes Wort ausnahmsweise
   nicht, trennt der Browser es nach deutschen Regeln mit Trennstrich. */
h1, h2, h3, .fakt strong, .karte p, .faq-a, .vs-liste span, .wl-punkte li, .lead {
  -webkit-hyphens: auto;
  hyphens: auto;
  hyphenate-limit-chars: 10 4 4;
}
.fakt strong { font-size: 18px; overflow-wrap: normal; }

/* Responsive */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .karten-4 { grid-template-columns: repeat(2, 1fr); }
  .karten-3 { grid-template-columns: repeat(2, 1fr); }
  .warteliste { grid-template-columns: 1fr; }
  .wl-info { border-right: 0; border-bottom: 1px solid var(--border); }
}
/* Faktenzeile: vier Spalten erst ab 1100 px — darunter werden lange Wörter
   wie „Datenschutzfreundlich“ zu breit für ihre Spalte. */
@media (max-width: 1100px) {
  .fakten-grid { grid-template-columns: 1fr 1fr; }
  .fakt, .fakt + .fakt { padding: 20px 16px; border-left: 0; }
  .fakt:nth-child(odd) { padding-left: 0; }
  .fakt:nth-child(even) { border-left: 1px solid var(--border); }
  .fakt:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}
@media (max-width: 760px) {
  .logo-by { display: none; }
}
@media (max-width: 600px) {
  .karten-4, .karten-3, .karten-2 { grid-template-columns: 1fr; }
    .hero-ctas .btn { width: 100%; }
  .nav .btn { padding: 0 12px; }
}

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

/* Handy (zuletzt, damit es die Regeln oben übersteuert) */
@media (max-width: 560px) {
  .nav-lang { display: none; }
  .nav-kurz { display: inline; }
  .fakten-grid { grid-template-columns: 1fr; }
  .fakt, .fakt + .fakt, .fakt:nth-child(even) { padding: 16px 0; border-left: 0; border-bottom: 1px solid var(--border); }
  .fakt:last-child { border-bottom: 0; }
  .logo { gap: 10px; }
  .logo-name { font-size: 15px; }
  .logo-box { width: 34px; height: 34px; }
}

/* Sehr schmale Handys: Platz nur für das Logo — der Eintragen-Knopf steht direkt darunter im Hero */
@media (max-width: 400px) {
  .nav .btn { display: none; }
}
