/* RexCom – Webdesign, Hosting & KI-Automatisierung
   Bewusst ohne externe Schriften oder Frameworks: schnell, sicher, datensparsam. */

:root {
    --ink: #0B1220;
    --text: #1E293B;
    --muted: #5B6B82;
    --line: #E3E8F0;
    --soft: #F5F7FB;
    --white: #FFFFFF;
    --brand: #2563EB;
    --brand-dark: #1D4ED8;
    --violet: #7C3AED;
    --grad: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
    --radius: 14px;
    --shadow: 0 1px 2px rgba(11, 18, 32, 0.04), 0 8px 24px rgba(11, 18, 32, 0.06);
    --shadow-lg: 0 24px 60px rgba(11, 18, 32, 0.14);
    color-scheme: light dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font: 17px/1.65 system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; color: var(--text); background: var(--white); -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; min-height: 100vh; overflow-wrap: break-word; /* klein17: lange Wörter brechen statt die Seite zu verbreitern (WCAG 1.4.10/1.4.12) */ }
img { max-width: 100%; display: block; }
a { color: var(--brand); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; letter-spacing: -0.02em; text-wrap: pretty; }
h1 { font-size: clamp(2.3rem, 5vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { color: var(--muted); }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand); margin-bottom: 14px; }
.eyebrow::before { content: ''; width: 18px; height: 2px; background: var(--grad); border-radius: 2px; }
.lead { font-size: 1.15rem; max-width: 640px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px; border-radius: 10px; font-weight: 700; font-size: 1rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s, background 0.15s; font-family: inherit; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25); }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 12px 28px rgba(37, 99, 235, 0.32); }
.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: #fff; color: #0B1220; }
.btn-light:hover { transform: translateY(-1px); }
.btn-sm { padding: 10px 16px; font-size: 0.92rem; }

/* ---------- Kopfzeile: schwebende Befehlsleiste ----------
   Glas-Pille mittig oben, wird beim Scrollen schmaler; Schnellsuche (Strg/⌘ K) über alle Seiten.
   Handy: Menü als Bottom Sheet. */
.cmd [hidden], .qj [hidden], .cmd-scrim[hidden], .foot [hidden] { display: none !important; }
:root { --cmd-h: 76px; }
html { scroll-padding-top: calc(var(--cmd-h) + 12px); }
/* Die Leiste schwebt über dem ersten Abschnitt – dessen Hintergrund läuft unter dem Glas weiter */
.cmd { position: sticky; top: 0; z-index: 50; height: var(--cmd-h); margin-bottom: calc(-1 * var(--cmd-h)); padding: 12px 16px 0; pointer-events: none; }
.sheet-open .cmd { z-index: 70; }
/* Größere Textabstände (WCAG 1.4.12, klein15): Die Leiste hat nur eine Mindesthöhe. Passt das Menü nicht in eine Zeile,
   rutschen die Links in eine zweite Zeile, statt über den Rand zu ragen. Ohne Textabstände sieht alles aus wie vorher:
   32 px Rundung = halbe Höhe, die 4 px oben/unten liegen innerhalb der 64 px. */
.cmd-pill {
    position: relative; isolation: isolate; pointer-events: auto;
    display: flex; align-items: center; gap: 6px; width: min(1140px, 100%); min-height: 64px; margin: 0 auto; padding: 4px 8px 4px 18px;
    border-radius: 32px; transition: width 0.35s ease, min-height 0.35s ease, padding 0.35s ease;
}
.cmd-pill::before {
    content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
    background: rgba(255, 255, 255, 0.74); -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%);
    border: 1px solid rgba(15, 23, 42, 0.09); box-shadow: 0 12px 32px -14px rgba(11, 18, 32, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transition: background-color 0.3s, box-shadow 0.3s;
}
.cmd.scrolled .cmd-pill { width: min(920px, 100%); min-height: 56px; }
.cmd.scrolled .cmd-pill::before { background: rgba(255, 255, 255, 0.86); box-shadow: 0 16px 40px -16px rgba(11, 18, 32, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.7); }
.cmd :focus-visible, .qj :focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.logo { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; font-weight: 800; color: var(--ink); text-decoration: none; letter-spacing: -0.03em; }
.cmd-logo { min-height: 44px; margin-right: auto; border-radius: 12px; font-size: 1.28rem; flex-shrink: 0; }
.logo-mark { width: 34px; height: 34px; flex-shrink: 0; display: block; filter: drop-shadow(0 4px 10px rgba(59, 130, 246, 0.25)); }
.logo-bg { fill: #0B1220; stroke: transparent; }
.logo-word b { color: var(--brand); font-weight: inherit; }

.cmd-nav { display: flex; align-items: center; gap: 2px; }
.cmd-nav > a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.97rem; white-space: nowrap; transition: background-color 0.15s, color 0.15s; }
.cmd-nav > a:not(.btn):hover { background: rgba(37, 99, 235, 0.08); color: var(--brand); }
.cmd-nav > a.active { background: rgba(37, 99, 235, 0.1); color: var(--brand-dark); }
.cmd-sheet-head, .cmd-sheet-contact { display: none; }
/* Kunden-Login (Kundenportal) – dezent abgesetzt; zwischen 861 und 1024 px nur als Symbol mit unsichtbarer Beschriftung */
.cmd-nav > a.cmd-login { gap: 7px; margin-left: 6px; border: 1px solid var(--line); }
.cmd-login svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.cmd-cta { gap: 0; min-height: 48px; margin-left: 6px; padding: 0 20px; border-radius: 999px; background: var(--grad); color: #fff; white-space: nowrap; box-shadow: 0 8px 20px -6px rgba(79, 70, 229, 0.55); }
.cmd-cta-long { margin-right: 0.28em; }
.cmd .qj-input:focus-visible, .qj .qj-input:focus-visible { outline: none; }
.cmd-cta:hover { background: var(--grad); filter: brightness(0.94); box-shadow: 0 10px 24px -6px rgba(79, 70, 229, 0.6); }
.cmd.scrolled .cmd-cta-long { display: none; }

.cmd-search {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; flex-shrink: 0; margin-left: 6px; padding: 0 7px 0 13px;
    border: 1px solid var(--line); border-radius: 999px; background: rgba(245, 247, 251, 0.9); color: var(--muted);
    font: inherit; font-size: 0.92rem; font-weight: 600; cursor: pointer; transition: border-color 0.15s, color 0.15s;
}
.cmd-search:hover { border-color: #A5B4FC; color: var(--ink); }
.cmd-search svg, .qj-box svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.cmd-kbd, .qj kbd { font: 600 0.74rem/1 ui-monospace, 'Cascadia Mono', Consolas, 'SF Mono', Menlo, monospace; padding: 5px 7px; border-radius: 7px; background: var(--white); border: 1px solid var(--line); border-bottom-width: 2px; color: var(--text); white-space: nowrap; }
.cmd.scrolled .cmd-search-label { display: none; }
/* Schmale Leiste beim Scrollen: Suche nur als runder Lupen-Knopf – „Strg K“ ragte sonst über den Rand */
.cmd.scrolled .cmd-kbd { display: none; }
.cmd.scrolled .cmd-search { width: 44px; padding: 0; justify-content: center; flex-shrink: 0; }

.cmd-menu { display: none; }
.cmd-scrim { position: fixed; inset: 0; z-index: 55; background: rgba(7, 12, 22, 0.42); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }

/* Schnellsuche */
.qj { width: min(640px, calc(100% - 24px)); max-height: min(640px, calc(100% - 24px)); margin: 11vh auto auto; padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--white); color: var(--text); box-shadow: var(--shadow-lg); overflow: hidden; }
.qj[open] { display: flex; flex-direction: column; }
.qj::backdrop { background: rgba(7, 12, 22, 0.45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.qj-box { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.qj-input { flex: 1; min-width: 0; min-height: 48px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1.08rem; outline: none; }
.qj-input::placeholder { color: var(--muted); opacity: 1; }
.qj-box:focus-within { box-shadow: inset 0 -2px 0 var(--brand); }
.qj-esc { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; border: 0; border-radius: 10px; background: none; cursor: pointer; }
.qj-sr, .qj-count { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.qj-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 6px 8px 8px; }
.qj-group::before { content: attr(data-label); display: block; padding: 12px 12px 4px; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.qj-list [role="option"] { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 46px; padding: 8px 12px; border-radius: 11px; color: var(--ink); font-weight: 600; text-decoration: none; }
.qj-list [role="option"] small { flex-shrink: 0; font: 500 0.8rem ui-monospace, 'Cascadia Mono', Consolas, 'SF Mono', Menlo, monospace; color: var(--muted); }
.qj-list [role="option"][aria-selected="true"] { background: #EEF2FF; color: var(--brand-dark); box-shadow: inset 3px 0 0 var(--violet); }
.qj-list [role="option"][aria-selected="true"] small { color: #4338CA; }
.qj-empty { padding: 18px 20px; color: var(--text); }
.qj-hint { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--soft); font-size: 0.82rem; color: var(--muted); }
.qj-hint kbd { margin-left: 6px; }
.qj-hint kbd:first-child, .qj-hint kbd + kbd { margin-left: 0; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 80px 0 96px; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: -30% -10% auto auto; width: 720px; height: 720px; background: radial-gradient(circle, rgba(124, 58, 237, 0.14), transparent 60%); pointer-events: none; }
.hero::after { content: ''; position: absolute; inset: auto auto -40% -15%; width: 640px; height: 640px; background: radial-gradient(circle, rgba(37, 99, 235, 0.12), transparent 60%); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; z-index: 1; }
.hero h1 { margin-bottom: 22px; }
.hero .lead { margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }
.checks { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; font-weight: 600; font-size: 0.95rem; color: var(--text); }
.checks li::before { content: '✓'; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 8px; border-radius: 50%; background: #DCFCE7; color: #15803D; font-size: 0.75rem; font-weight: 800; }

/* Browser-Fenster mit den Demo-Websites */
.showcase { position: relative; height: 470px; }
.browser { position: absolute; background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid var(--line); transition: transform 0.4s; }
.browser-bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: #F1F4F9; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: #CBD3DF; }
.browser-bar i:nth-child(1) { background: #FF6159; } .browser-bar i:nth-child(2) { background: #FFBF2F; } .browser-bar i:nth-child(3) { background: #2ACB42; }
.browser-bar em { margin-left: 10px; font-style: normal; font-size: 0.72rem; color: var(--muted); background: #fff; padding: 2px 10px; border-radius: 6px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser-view { height: calc(100% - 30px); background-size: cover; background-position: center; position: relative; }
.browser-view::after { content: attr(data-title); position: absolute; left: 18px; bottom: 16px; right: 18px; color: #fff; font-weight: 800; font-size: 1.15rem; line-height: 1.2; text-shadow: 0 2px 12px rgba(0,0,0,0.5); }
.browser-view.dark::before { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(0,0,0,0.65)); }
.b1 { width: 76%; height: 300px; top: 0; right: 0; z-index: 1; }
.b2 { width: 62%; height: 250px; top: 150px; left: 0; z-index: 2; }
.b3 { width: 56%; height: 220px; bottom: 0; right: 6%; z-index: 3; }
.showcase:hover .b1 { transform: translate(8px, -8px); }
.showcase:hover .b2 { transform: translate(-8px, 4px); }
.float-badge { position: absolute; z-index: 4; background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); padding: 12px 16px; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 0.9rem; color: var(--ink); }
.float-badge small { display: block; font-weight: 500; color: var(--muted); font-size: 0.78rem; }
.float-badge .dot { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #DCFCE7; font-size: 1.1rem; }
.fb1 { left: -10px; top: 40px; }
.fb2 { right: -6px; bottom: 60px; }

/* ---------- Abschnitte ---------- */
.section { padding: 96px 0; }
.section-soft { background: var(--soft); }
.section-dark { background: var(--ink); color: #CBD5E1; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: #94A3B8; }
.section-head { max-width: 720px; margin-bottom: 52px; }
.section-head.center { margin-left: auto; margin-right: auto; }
.section-head h2 { margin-bottom: 16px; }

.strip { padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.strip-inner { display: flex; justify-content: center; align-items: center; gap: 14px 40px; flex-wrap: wrap; color: var(--muted); font-weight: 700; }
.strip-inner span { display: inline-flex; align-items: center; gap: 8px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #C7D2FE; }
.card h3 { margin: 16px 0 10px; }
.card p { font-size: 0.97rem; }
.icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 1.4rem; background: #EEF2FF; }
.card ul, .feature-list { list-style: none; margin-top: 16px; }
.card li, .feature-list li { position: relative; padding: 5px 0 5px 26px; font-size: 0.95rem; color: var(--text); }
.card li::before, .feature-list li::before { content: ''; position: absolute; left: 2px; top: 13px; width: 12px; height: 7px; border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg); }
.card-link { display: inline-flex; margin-top: 18px; font-weight: 700; text-decoration: none; }
.card-link::after { content: '→'; margin-left: 6px; transition: transform 0.2s; }
.card:hover .card-link::after { transform: translateX(4px); }

/* Vergleich Baukasten vs. RexCom */
.compare { display: grid; grid-template-columns: 1fr 1fr; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.compare > div { padding: 32px; }
.compare .bad { background: #fff; }
.compare .good { background: var(--ink); color: #CBD5E1; }
.compare h3 { margin-bottom: 18px; }
.compare .good h3 { color: #fff; }
.compare ul { list-style: none; }
.compare li { padding: 9px 0 9px 32px; position: relative; border-bottom: 1px solid rgba(148, 163, 184, 0.2); }
.compare li:last-child { border-bottom: 0; }
.compare .bad li::before { content: '✕'; position: absolute; left: 0; color: #DC2626; font-weight: 800; }
.compare .good li::before { content: '✓'; position: absolute; left: 0; color: #4ADE80; font-weight: 800; }

/* Referenzen / Demos */
.demo-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform 0.2s, box-shadow 0.2s; }
.demo-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.demo-card .browser-view { height: 210px; }
.demo-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.demo-body h3 { margin-bottom: 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 18px; }
.tag { font-size: 0.78rem; font-weight: 700; padding: 4px 10px; border-radius: 20px; background: var(--soft); color: var(--text); border: 1px solid var(--line); }
.demo-body .btn { margin-top: auto; align-self: flex-start; }

/* Modelle */
.model { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.model.featured { border: 2px solid var(--brand); box-shadow: 0 20px 50px rgba(37, 99, 235, 0.16); }
.model.featured::before { content: 'Am beliebtesten'; position: absolute; top: -13px; left: 28px; background: var(--grad); color: #fff; font-size: 0.78rem; font-weight: 800; padding: 4px 12px; border-radius: 20px; }
.model h3 { font-size: 1.4rem; margin-bottom: 6px; }
.model .model-sub { font-weight: 700; color: var(--brand); margin-bottom: 14px; }
.price-note { margin-top: 28px; padding: 18px 22px; background: #EEF2FF; border-radius: 12px; color: var(--text); font-weight: 600; display: flex; gap: 12px; align-items: center; }

/* Ablauf */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step { position: relative; padding-top: 64px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: 0; left: 0; width: 46px; height: 46px; border-radius: 12px; background: var(--grad); color: #fff; font-weight: 800; font-size: 1.2rem; display: grid; place-items: center; }
.step::after { content: ''; position: absolute; top: 23px; left: 62px; right: -12px; height: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px); }
.step:last-child::after { display: none; }
.step h3 { margin-bottom: 8px; }

/* KI-Bereich */
.ai-card { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(148, 163, 184, 0.18); border-radius: var(--radius); padding: 26px; }
.ai-card .icon { background: rgba(124, 58, 237, 0.2); }
.ai-card h3 { margin: 14px 0 8px; }
.ai-card p { font-size: 0.95rem; }

/* Bild mit Rahmen */
.photo { border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3; background-size: cover; background-position: center; }

/* Kennzahlen */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
.stat { padding: 22px; border-radius: 12px; background: var(--soft); }
.stat strong { display: block; font-size: 2rem; font-weight: 800; color: var(--ink); line-height: 1.1; }
.stat span { font-size: 0.9rem; color: var(--muted); font-weight: 600; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.08rem; color: var(--ink); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 44px; overflow-wrap: anywhere; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.5rem; line-height: 1; color: var(--brand); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 12px; }

/* CTA */
.cta { position: relative; background: var(--grad); border-radius: 24px; padding: 64px; color: #fff; overflow: hidden; display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; }
.cta::after { content: ''; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); }
.cta h2 { color: #fff; margin-bottom: 12px; }
.cta p { color: rgba(255, 255, 255, 0.85); font-size: 1.1rem; }
.cta-actions { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; position: relative; z-index: 1; }
.cta-actions a:not(.btn) { color: #fff; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }

/* Seitenkopf für Unterseiten */
.page-head { padding: 72px 0 56px; background: linear-gradient(180deg, var(--soft), #fff); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.1rem, 4.4vw, 3.3rem); margin-bottom: 16px; }

/* ---------- Formular ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 36px; box-shadow: var(--shadow-lg); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 700; font-size: 0.9rem; color: var(--ink); margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; padding: 13px 14px; border: 1.5px solid #8190A5; border-radius: 10px; font: inherit; font-size: 1rem; color: var(--ink); background: #fff; transition: border-color 0.15s, box-shadow 0.15s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14); }
.field textarea { resize: vertical; min-height: 130px; }
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; position: relative; }
.chip-group input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.chip-group label { margin: 0; padding: 9px 14px; border: 1.5px solid #D5DCE6; border-radius: 20px; font-weight: 600; font-size: 0.92rem; cursor: pointer; transition: all 0.15s; }
.chip-group input:checked + label { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip-group input:focus-visible + label { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2); }
.form-note { font-size: 0.85rem; margin-top: 14px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.success { display: none; text-align: center; padding: 48px 12px; }
.success .big { font-size: 3rem; margin-bottom: 12px; }
.contact-list { list-style: none; margin-top: 28px; display: grid; gap: 16px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .icon { flex-shrink: 0; width: 44px; height: 44px; }
.contact-list strong { display: block; color: var(--ink); }
.contact-list a { color: var(--text); text-decoration: none; display: inline-block; padding: 12px 0; margin: -12px 0; }
.contact-list a:hover { color: var(--brand); }

/* Rechtstexte */
.legal { max-width: 820px; padding: 64px 24px 96px; }
.legal h1 { font-size: clamp(1.8rem, 7vw, 2.4rem); margin-bottom: 28px; overflow-wrap: break-word; hyphens: auto; }
.legal h2 { font-size: 1.35rem; margin: 36px 0 12px; }
.legal h3 { font-size: 1.05rem; margin: 22px 0 8px; }
.legal p, .legal li { color: var(--text); margin-bottom: 10px; }
.legal ul { padding-left: 22px; }
.legal ul { padding-left: 22px; }
.legal-stand { margin-top: 32px; font-size: 0.9rem; color: var(--muted) !important; }
.todo { background: #FEF3C7; color: #92400E; padding: 1px 6px; border-radius: 4px; font-weight: 700; }

/* ---------- Fußzeile: großes Statement, Status-Zeile, Seitenübersicht in einer Reihe ---------- */
.foot { position: relative; margin-top: auto; padding: 88px 0 28px; overflow: hidden; background: var(--soft); border-top: 1px solid var(--line); font-size: 0.95rem; }
.foot::before { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(37, 99, 235, 0.16) 1px, transparent 1.4px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%); mask-image: linear-gradient(180deg, #000, transparent 70%); }
.foot > .container { position: relative; }
.foot :focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.foot-statement { margin-bottom: 40px; color: var(--ink); font-size: clamp(2.6rem, 8.6vw, 7.4rem); font-weight: 800; line-height: 0.95; letter-spacing: -0.05em; text-wrap: balance; }
.foot-statement span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.06em; }
.foot-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px 40px; padding-bottom: 36px; }
.foot-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.foot-tags a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--text); font-weight: 600; text-decoration: none; transition: border-color 0.15s, color 0.15s; }
.foot-tags a:hover { border-color: #A5B4FC; color: var(--brand); }
.foot-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; }
.foot-btn { min-height: 52px; border-radius: 999px; background: var(--grad); }
.foot-btn:hover { background: var(--grad); filter: brightness(0.94); }
.foot-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; color: var(--muted); }
.foot-contact a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 700; text-decoration: none; }
.foot-contact a:hover { color: var(--brand); text-decoration: underline; }

/* Terminal-Statuszeile */
.foot-status {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 13px 18px; border-radius: 12px;
    background: #0B1220; color: #E2E8F0; font: 500 0.88rem/1.5 ui-monospace, 'Cascadia Mono', Consolas, 'SF Mono', Menlo, monospace;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.16);
}
.foot-prompt { color: #93C5FD; }
.foot-prompt::after { content: ''; display: inline-block; width: 8px; height: 1em; margin-left: 6px; vertical-align: -2px; background: #93C5FD; animation: footBlink 1.1s steps(1) 4; } /* blinkt nur kurz (< 5 s, WCAG 2.2.2), danach ruhig */
@keyframes footBlink { 50% { opacity: 0; } }
.foot-dot { width: 9px; height: 9px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18); }
.foot-load { color: #A5B4FC; }
/* Die ganze Statuszeile ist ein Link auf die Statusseite (status.rex-com.de, läuft getrennt auf dem Wächter-Server) */
a.foot-status { text-decoration: none; transition: background-color 0.2s ease, box-shadow 0.2s ease; }
a.foot-status:hover { background: #111B30; box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.45); }
.foot-status-link { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: #93C5FD; font-weight: 700; white-space: nowrap; }
a.foot-status:hover .foot-status-link, a.foot-status:focus-visible .foot-status-link { color: #BFDBFE; text-decoration: underline; text-underline-offset: 3px; }
.foot-status-pfeil { display: inline-block; transition: transform 0.2s ease; }
a.foot-status:hover .foot-status-pfeil { transform: translateX(3px); }

.foot-map { display: flex; flex-wrap: wrap; align-items: center; margin: 22px -12px 0; }
.foot-map a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: center; padding: 0 12px; color: var(--text); font-weight: 600; text-decoration: none; white-space: nowrap; }
.foot-map a:hover { color: var(--brand); text-decoration: underline; }
.foot-map a.active { color: var(--brand-dark); }
.foot-sep { width: 1px; height: 18px; margin: 0 10px; background: var(--line); }
.foot-copy { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.86rem; color: var(--muted); }

/* ---------- Einblenden beim Scrollen ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .js .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; }
    .cmd-pill, .cmd-pill::before, .cmd-nav, .cmd-menu-icon, .cmd-menu-icon::before, .cmd-menu-icon::after { transition: none !important; }
    .foot-prompt::after { animation: none; }
    a.foot-status, .foot-status-pfeil { transition: none; }
    a.foot-status:hover .foot-status-pfeil { transform: none; }
}

/* ---------- Tablet & Handy ---------- */
/* Pille: Suche nur als Symbol, kurzer Knopftext – bis 1199 px, sonst ragen „Schnellsuche“ und „Strg K“ aus der Pille */
@media (max-width: 1199px) {
    .cmd-search-label, .cmd-cta-long { display: none; }
    .cmd-search { padding-left: 11px; }
    .cmd-nav > a:not(.btn) { padding: 0 11px; }
    .cmd-login-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .cmd-nav > a.cmd-login { width: 44px; padding: 0; justify-content: center; }
}
/* Unter 1340 px kompakte Suche: nur der runde Lupen-Knopf (öffnet das Suchfeld, Escape schließt, Fokus zurück).
   Mit größeren Textabständen (WCAG 1.4.12) passen „Schnellsuche“ und „Strg K“ erst ab dieser Breite in die Leiste. */
@media (min-width: 861px) and (max-width: 1339.98px) {
    .cmd-search-label, .cmd-kbd { display: none; }
    .cmd-search { width: 44px; padding: 0; justify-content: center; flex-shrink: 0; }
}
/* Menü-Links dürfen in eine zweite Zeile der Leiste rutschen (nur, wenn sie nicht in eine passen – z. B. bei größeren Textabständen) */
@media (min-width: 861px) {
    .cmd .cmd-nav { flex-wrap: wrap; justify-content: flex-end; row-gap: 4px; } /* .cmd davor: header-nav.css setzt bei 861–959 px „gap: 0“ */
}
@media (max-width: 1024px) {
    .grid-4, .steps { grid-template-columns: repeat(2, 1fr); }
    .step::after { display: none; }
    .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
    body { font-size: 16px; }
    :root { --cmd-h: 68px; }
    .cmd { padding: 10px 12px 0; }
    .cmd-pill, .cmd.scrolled .cmd-pill { width: 100%; min-height: 58px; padding: 0 7px 0 14px; }
    .cmd-kbd { display: none; }
    .cmd-search { width: 44px; padding: 0; justify-content: center; margin-left: 0; }
    .cmd-menu {
        display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 16px 0 14px; margin-left: 4px;
        border: 0; border-radius: 999px; background: var(--ink); color: #fff; font: inherit; font-weight: 700; font-size: 0.95rem; cursor: pointer;
    }
    .cmd-menu-icon { position: relative; width: 16px; height: 2px; background: currentColor; border-radius: 2px; }
    .cmd-menu-icon::before, .cmd-menu-icon::after { content: ''; position: absolute; left: 0; width: 16px; height: 2px; background: currentColor; border-radius: 2px; transition: transform 0.2s; }
    .cmd-menu-icon::before { top: -5px; }
    .cmd-menu-icon::after { top: 5px; }
    html:not(.js) #navToggle { display: none; }
    .cmd-menu-link { text-decoration: none; }
    .cmd-menu[aria-expanded="true"] .cmd-menu-icon { background: transparent; }
    .cmd-menu[aria-expanded="true"] .cmd-menu-icon::before { transform: translateY(5px) rotate(45deg); }
    .cmd-menu[aria-expanded="true"] .cmd-menu-icon::after { transform: translateY(-5px) rotate(-45deg); }

    /* Bottom Sheet */
    .cmd-nav {
        position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 60;
        flex-direction: column; align-items: stretch; gap: 2px;
        max-height: calc(100vh - 96px); max-height: calc(100dvh - 96px); overflow-y: auto; overscroll-behavior: contain;
        padding: 8px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 26px;
        background: var(--white); border: 1px solid var(--line); box-shadow: 0 -18px 50px -12px rgba(11, 18, 32, 0.4);
        transform: translateY(calc(100% + 24px)); visibility: hidden; transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.32s;
    }
    .cmd-nav.open { transform: translateY(var(--drag, 0px)); visibility: visible; transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1); }
    .cmd-nav.dragging { transition: none; }
    .sheet-open body { overflow: hidden; }
    .cmd-sheet-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 14px 0 10px; touch-action: none; }
    .cmd-grab { grid-column: 1 / -1; justify-self: center; width: 44px; height: 5px; margin-top: -4px; border-radius: 5px; background: var(--line); }
    .cmd-sheet-title { color: var(--ink); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
    .cmd-close { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); color: var(--text); font: inherit; font-weight: 600; font-size: 0.9rem; cursor: pointer; }
    .cmd-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
    .cmd-nav > a:not(.btn) { justify-content: space-between; min-height: 56px; padding: 0 16px; border-radius: 16px; font-size: 1.12rem; font-weight: 700; color: var(--ink); background: var(--soft); margin-top: 6px; }
    .cmd-nav > a:not(.btn)::after { content: '→'; color: var(--brand); font-weight: 700; }
    .cmd-nav > a.active { box-shadow: inset 3px 0 0 var(--violet); }
    .cmd-login-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
    .cmd-nav > a.cmd-login { width: auto; margin-left: 0; padding: 0 16px; border: 0; justify-content: flex-start; gap: 10px; }
    .cmd-nav > a.cmd-login::after { margin-left: auto; }
    .cmd-cta { min-height: 54px; margin: 12px 0 0; justify-content: center; font-size: 1.02rem; }
    .cmd .cmd-nav .cmd-cta-long { display: inline; }
    .cmd-sheet-contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 18px; padding-top: 8px; }
    .cmd-sheet-contact a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); font-weight: 600; text-decoration: none; }
    .qj { margin-top: 12px; max-height: calc(100% - 24px); }
    .qj-hint { display: none; }
    .foot { padding-top: 64px; }
    .foot-row { flex-direction: column; align-items: flex-start; }
    .hero { padding: 48px 0 64px; }
    .hero-grid, .split, .compare, .cta { grid-template-columns: minmax(0, 1fr); }
    .showcase { height: 360px; }
    .b1 { height: 220px; } .b2 { height: 190px; top: 110px; } .b3 { height: 170px; }
    .fb1 { top: auto; bottom: 150px; }
    .grid-2, .grid-3, .form-grid { grid-template-columns: minmax(0, 1fr); }
    .section { padding: 64px 0; }
    .cta { padding: 40px 28px; }
    .form-card { padding: 24px 20px; }
}
@media (max-width: 560px) {
    .container { padding: 0 18px; }
    .grid-4, .steps, .stats { grid-template-columns: minmax(0, 1fr); }
    .hero-actions .btn { width: 100%; }
    .fb2 { display: none; }
    .cmd-logo { font-size: 1.18rem; gap: 8px; }
    .cmd-logo .logo-mark { width: 30px; height: 30px; }
    .foot-btn { width: 100%; }
    .foot-sep { flex-basis: 100%; height: 0; margin: 0; }
}
@media (max-width: 420px) {
    /* Hero: Plakette „Kurze Ladezeiten“ unter die Browser-Fenster statt darauf – sonst verdeckt sie bei 320–420 px Adresszeile/Titel */
    .showcase { margin-bottom: 76px; }
    .fb1 { top: calc(100% + 14px); bottom: auto; left: 0; }
}
@media (max-width: 359px) {
    .cmd-pill, .cmd.scrolled .cmd-pill { padding-left: 10px; }
    .cmd-menu { padding: 0 12px; }
    .cmd-logo .logo-word { font-size: 1.08rem; }
}

/* ---------- Dunkelmodus – folgt der Systemeinstellung ---------- */
@media (prefers-color-scheme: dark) {
    :root { --text: #CBD5E1; --muted: #94A3B8; --line: #243044; --soft: #0F1829; --white: #070C16; --brand: #60A5FA; --brand-dark: #3B82F6; }
    h1, h2, h3, h4, .logo, .faq summary, .field label, .contact-list strong, .stat strong, .float-badge { color: #F1F5F9; }
    .cmd-pill::before { background: rgba(10, 16, 30, 0.7); border-color: rgba(148, 163, 184, 0.2); box-shadow: 0 14px 36px -14px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
    .cmd.scrolled .cmd-pill::before { background: rgba(10, 16, 30, 0.86); }
    .cmd-nav > a:not(.btn):hover { background: rgba(96, 165, 250, 0.12); color: #BFDBFE; }
    .cmd-nav > a.active { background: rgba(96, 165, 250, 0.16); color: #BFDBFE; }
    .cmd-search { background: rgba(15, 24, 41, 0.9); border-color: #334155; color: #CBD5E1; }
    .cmd-search:hover { color: #F1F5F9; border-color: #6366F1; }
    .cmd-kbd, .qj kbd { background: #0F1829; border-color: #334155; color: #E2E8F0; }
    .cmd-menu { background: #F1F5F9; color: #0B1220; }
    .qj { background: #0B1324; border-color: #243044; }
    .qj-list [role="option"][aria-selected="true"] { background: rgba(99, 102, 241, 0.2); color: #E0E7FF; }
    .qj-list [role="option"][aria-selected="true"] small { color: #C7D2FE; }
    .qj-hint { background: #070C16; }
    .foot { background: #0B1324; }
    .foot::before { background-image: radial-gradient(rgba(96, 165, 250, 0.2) 1px, transparent 1.4px); }
    .foot-statement { color: #F1F5F9; }
    .foot-statement span { background-image: linear-gradient(135deg, #60A5FA 0%, #A78BFA 100%); }
    .foot-tags a { background: #0F1829; }
    .foot-tags a:hover { border-color: #6366F1; color: #BFDBFE; }
    .foot-contact a { color: #F1F5F9; }
    .foot-status { background: #050912; }
    a.foot-status:hover { background: #0C1426; }
    .foot-map a.active { color: #BFDBFE; }
    .logo-bg { fill: #131C31; stroke: #2A3754; }
    .btn-primary, .chip-group input:checked + label { background: #2563EB; border-color: #2563EB; }
    .btn-primary:hover { background: #1D4ED8; }
    .cmd-cta, .foot-btn { background: var(--grad); border-color: transparent; }
    .btn-ghost { color: #F1F5F9; border-color: #334155; }
    .btn-ghost:hover { border-color: #F1F5F9; }
    .card, .demo-card, .model, .form-card, .compare .bad, .browser, .float-badge { background: #0F1829; }
    .card:hover { border-color: #3B4B7A; }
    .section-dark, .compare .good { background: #0B1324; }
    .section-dark { border-top: 1px solid var(--line); }
    .browser-bar { background: #16213A; }
    .browser-bar em { background: #070C16; }
    .icon, .price-note { background: rgba(96, 165, 250, 0.12); }
    .page-head { background: linear-gradient(180deg, #0F1829, #070C16); }
    .field input, .field select, .field textarea { background: #070C16; border-color: #5B6B82; color: #F1F5F9; }
    .chip-group label { border-color: #334155; }
}
@media (prefers-color-scheme: dark) and (max-width: 860px) {
    .cmd-nav { background: #0B1324; box-shadow: 0 -18px 50px -12px rgba(0, 0, 0, 0.8); }
    .cmd-nav > a:not(.btn) { background: #0F1829; color: #F1F5F9; }
    .cmd-close { background: #0F1829; color: #E2E8F0; }
    .cmd-sheet-title { color: #F1F5F9; }
}

/* Platz für die schwebende Leiste im jeweils ersten Abschnitt */
.hero { padding-top: calc(80px + var(--cmd-h)); }
.page-head { padding-top: calc(72px + var(--cmd-h)); }
main.legal { padding-top: calc(64px + var(--cmd-h)); }
.cmd ~ main > .section:first-child { padding-top: calc(64px + var(--cmd-h)) !important; }
@media (max-width: 860px) { .hero { padding-top: calc(48px + var(--cmd-h)); } }

/* Lange Wörter in Überschriften auf schmalen Bildschirmen trennen */
h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; }

/* Kundenportal-Kopf auf schmalen Handys: Rufnummer ragte neben Logo + Reiter „Kundenportal“ rechts aus dem Bild (QA 26.09.) */
@media (max-width: 379.98px) {
    .kp-top .kp-top-in { gap: 8px; }
    .kp-top .kp-tag { display: none; }
}
