/* ==========================================================================
   LEITBERG.DE - ULTIMATIVES DESIGN SYSTEM (leitberg.css)
   ========================================================================== 
   [INFO] Diese Datei enthält das vollständige, bereinigte System:
   - DSGVO konforme lokale Schriftarten
   - Globaler Hintergrund (Grid) & Header UI
   - Sauberes globales Scrolling (keine Blockaden mehr)
   - Alle Landingpage- & Marketing-Komponenten
   - Die Office/Dashboard-App (strikt gekapselt)
   - Die DIN 5008 Print-Engine
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. FONTS (DSGVO KONFORM LOKAL)
   -------------------------------------------------------------------------- */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 600;
    font-display: swap;
    src: url('../fonts/inter-variable.woff2') format('woff2');
}

@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../fonts/outfit-variable.woff2') format('woff2');
}

@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 600 700;
    font-display: swap;
    src: url('../fonts/space-grotesk-variable.woff2') format('woff2');
}

@font-face {
    font-family: 'Material Symbols Outlined';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/material-symbols.woff2') format('woff2');
}

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS (VARIABLEN)
   -------------------------------------------------------------------------- */
:root {
    /* -- GLOBALE FARBEN -- */
    --bg-main: #ffffff;
    --bg-surface: #f8f9fa;
    --bg-surface-hover: #f1f3f5;
    
    --text-main: #1a1a1a;
    --text-muted: #636e72;
    --text-inverse: #ffffff;
    
    --border-subtle: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.15);
    
    --accent-primary: #1a73e8;
    --accent-primary-bg: #e8f0fe;
    --accent-danger: #e74c3c;
    --accent-danger-bg: #fee2e2;
    --accent-success: #27ae60;
    --accent-success-bg: #dcfce7;
    --accent-warning: #f1c40f;

    /* -- OFFICE APP ALIASES -- */
    --bg: #ffffff; 
    --surface: #f8f9fa; 
    --text: #1a1a1a; 
    --border: rgba(0, 0, 0, 0.08); 
    --accent-web: #1a73e8; 
    --editor-bg: #272822; 
    --sidebar-width: 280px;

    /* -- TYPOGRAFIE -- */
    --font-heading: 'Outfit', sans-serif;
    --font-ui: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* -- RADIEN -- */
    --radius-sm: 4px;      
    --radius-md: 8px;      
    --radius-lg: 12px;     
    --radius-xl: 24px;     
    --radius-full: 50%;    

    /* -- ANIMATIONEN & LAYOUT -- */
    --ease-fluid: cubic-bezier(0.2, 0.8, 0.2, 1);
    --container-padding: clamp(20px, 6vw, 80px);
}

/* --------------------------------------------------------------------------
   2. RESET & BASIS (SCROLL-FIX & TRANSPARENTER BODY)
   -------------------------------------------------------------------------- */
* {
    box-sizing: border-box;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100vw;
    max-width: 100vw;
    /* FIX: Body ist transparent, damit das Gitter (#techBg) immer sichtbar ist */
    background-color: transparent;
    color: var(--text-main);
    font-family: var(--font-body);
    /* Normales Scrolling Y erlaubt, nur X wird versteckt */
    overflow-x: hidden; 
    -ms-overflow-style: none;
    scrollbar-width: none;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body::-webkit-scrollbar {
    display: none;
}

a { 
    text-decoration: none; 
    color: inherit; 
}

textarea:focus, input:focus { 
    outline: 2px solid var(--accent-web); 
    outline-offset: -1px; 
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-transform: none;
    white-space: nowrap;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'liga';
}

/* --------------------------------------------------------------------------
   3. GLOBALER HINTERGRUND & HEADER UI
   -------------------------------------------------------------------------- */
.tech-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh; z-index: -1;
    background: #ffffff; /* Das ist die unterste Papierschicht */
    overflow: hidden;
    opacity: 0.6; 
}
.tech-bg svg { width: 100%; height: 100%; display: block; object-fit: cover; }
.bg-grid { stroke: rgba(0,0,0,0.03); stroke-width: 1; }
.bg-grid-hot { stroke: rgba(0,0,0,0.11); stroke-width: 1.35; }

.mountain-layer { stroke: none; transform-box: fill-box; transform-origin: center center; }
.layer-3 { fill: url(#grad3); transform: translate3d(0, 0, 0) scale(1.1); }
.layer-2 { fill: url(#grad2); transform: translate3d(20px, -10px, 0) scale(1.1); }
.layer-1 { fill: url(#grad1); transform: translate3d(0, 0, 0) scale(1.1); }

.global-header {
    position: absolute;
    top: 0; left: 0; width: 100%;
    padding: 25px 35px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 1000;
    pointer-events: none; 
}

.header-logo {
    display: block; pointer-events: auto; transition: opacity 0.3s;
}
.header-logo:hover { opacity: 0.7; }
.header-logo img { height: 45px; width: auto; display: block; }

.app-menu-wrap { position: relative; pointer-events: auto; }

.app-launcher-btn {
    background: transparent; border: none; cursor: pointer;
    width: 45px; height: 45px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: background-color 0.2s ease; color: var(--text-main);
}
.app-launcher-btn:hover { background-color: rgba(0,0,0,0.05); }
.app-launcher-btn .material-symbols-outlined { font-size: 26px; color: #5f6368; }

.app-dropdown {
    position: absolute; top: 55px; right: 0; width: 320px;
    background: #fff; border: 1px solid rgba(0,0,0,0.1); border-radius: 24px;
    padding: 24px 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
    opacity: 0; visibility: hidden; transform: translateY(-10px) scale(0.95);
    transform-origin: top right; transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.app-dropdown.active { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.app-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-decoration: none; color: var(--text-main); padding: 12px 4px; border-radius: 12px;
    transition: background-color 0.2s; text-align: center;
}
.app-item:hover { background-color: #f1f3f4; }
.app-item .material-symbols-outlined { font-size: 28px; color: #444746; margin-bottom: 8px; }
.app-item .app-label { font-family: var(--font-body); font-size: 0.85rem; font-weight: 500; color: #1f1f1f; letter-spacing: -0.01em; }

.not-active { display: none !important; }

@media (max-width: 768px) {
    .global-header { padding: 20px; }
    .header-logo img { height: 35px; } 
    .app-launcher-btn { width: 35px; height: 35px; }
    .app-dropdown { position: fixed; top: 75px; right: 20px; width: calc(100vw - 40px); max-width: 320px; padding: 20px 10px; }
}

/* --------------------------------------------------------------------------
   4. TYPOGRAFIE-KLASSEN
   -------------------------------------------------------------------------- */
.h1-marketing {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--text-main);
    margin-top: 0;
    margin-bottom: 25px;
}

.h2-marketing, .start-h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-main);
    margin-top: 0;
    margin-bottom: 25px;
}

.h3-tool, .start-h3 {
    font-family: var(--font-ui);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
    margin-top: 0;
    margin-bottom: 15px;
}

.text-body, .start-p {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.text-muted { color: var(--text-muted); }
.text-white { color: #ffffff !important; }
.text-center { text-align: center; }
.text-lead-border { color: var(--text-main); font-weight: 600; border-left: 2px solid var(--text-main); padding-left: 20px; }
.text-light-muted { color: rgba(255,255,255,0.7); }
.text-light-subtle { color: rgba(255,255,255,0.6); }

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-main);
    text-transform: uppercase;
    margin-bottom: 25px;
    padding: 6px 14px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-main);
    width: fit-content;
    border-radius: var(--radius-sm);
}

.section-tag::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--text-main);
    border-radius: var(--radius-full);
    display: block;
}

.tag-transparent { background: transparent !important; color: #ffffff !important; border-color: rgba(255,255,255,0.2) !important; }
.tag-transparent::before { background: #ffffff !important; }

/* --------------------------------------------------------------------------
   5. GLOBALE KOMPONENTEN (UI-ELEMENTE)
   -------------------------------------------------------------------------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 24px;
    background: var(--text-main);
    color: var(--text-inverse);
    border: none;
    border-radius: var(--radius-lg);
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
    text-decoration: none;
}
.btn-primary:hover:not(:disabled) { background: #333333; transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.15); }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 24px;
    background: var(--bg-main);
    color: var(--text-main);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
}
.btn-secondary:hover:not(:disabled) { background: var(--bg-surface-hover); }

.btn-inverse { background: #ffffff; color: #000000; border: 1px solid #ffffff; }
.btn-inverse:hover { background: #e5e5e5; color: #000000; box-shadow: 0 10px 30px rgba(255,255,255,0.1); transform: translateY(-2px); }
.btn-auto { display: inline-flex; width: auto; }

.btn-start { display: inline-flex; align-items: center; justify-content: center; padding: 22px 45px; background: var(--text-main); color: var(--text-inverse); text-decoration: none; font-family: var(--font-ui); font-weight: 700; font-size: 0.85rem; letter-spacing: 1px; transition: all 0.3s ease-out; cursor: pointer; border: 1px solid var(--text-main); width: fit-content; border-radius: var(--radius-lg); }
.btn-start:hover { background: #333; box-shadow: 0 10px 30px rgba(0,0,0,0.15); transform: translateY(-2px); }

.leitberg-card {
    background: var(--bg-main);
    padding: 40px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 20px 60px rgba(0,0,0,0.05);
}

.leitberg-input {
    width: 100%;
    padding: 15px;
    background: var(--bg-main);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-main);
    transition: border-color 0.2s;
}
.leitberg-input:focus { border-color: var(--text-main); }
.leitberg-input::placeholder { color: var(--text-muted); }

/* --------------------------------------------------------------------------
   6. GLOBALE ANIMATIONEN
   -------------------------------------------------------------------------- */
@keyframes spin { 100% { transform: rotate(360deg); } }
.spinning-icon { animation: spin 1s linear infinite; display: inline-block; }

@keyframes messageSlideIn {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}
.anim-slide-in { animation: messageSlideIn 0.3s var(--ease-fluid) forwards; }

.reveal { opacity: 0; transform: translateY(40px); transition: all 0.9s var(--ease-fluid); }
.reveal.active { opacity: 1; transform: translateY(0); }

.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }

/* --------------------------------------------------------------------------
   7. LAYOUT UTILITIES & MARKETING GRIDS
   -------------------------------------------------------------------------- */
.bg-main { background-color: var(--bg-main); }
.bg-surface { background-color: var(--bg-surface); }
.bg-surface-hover { background-color: var(--bg-surface-hover); }
.bg-black { background-color: #000000; }

.mt-15 { margin-top: 15px; } .mt-40 { margin-top: 40px; } .mt-50 { margin-top: 50px; }
.mb-0 { margin-bottom: 0 !important; } .mb-15 { margin-bottom: 15px; } .mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; } .mb-40 { margin-bottom: 40px; } .mb-50 { margin-bottom: 50px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.ml-5 { margin-left: 5px; }

.flex-center { display: flex; justify-content: center; }
.flex-center-gap-15 { display: flex; align-items: center; gap: 15px; }
.text-center-block { margin: 0 auto 40px auto; max-width: 600px; }
.max-w-600 { max-width: 600px; }
.max-w-800 { max-width: 800px; }

.list-none { list-style: none; padding: 0; margin: 0; }

/* Sections */
.container { max-width: 1300px; margin: 0 auto; padding: 0 5vw; width: 100%; position: relative; }
.container-sm { max-width: 900px; margin: 0 auto; padding: 0 5vw; width: 100%; position: relative; }
.svc-container { max-width: 1250px; margin: 0 auto; padding: 0 5vw; }

.svc-section { padding: 100px 0; border-bottom: 1px solid var(--border-subtle); }
.start-section { padding: 120px 0; position: relative; }
.svc-hero-section { border-bottom: none; padding-bottom: 20px; padding-top: 100px; }
.svc-cta-section { text-align: center; padding: 120px 0; background-color: var(--bg-main); }

/* Grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; margin-top: 60px; align-items: stretch; }
.deep-dive-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }

/* Cards */
.start-card, .card { background: var(--bg-main); padding: 45px; border: 1px solid var(--border-subtle); transition: all 0.4s var(--ease-fluid); height: 100%; display: flex; flex-direction: column; text-align: left; border-radius: var(--radius-xl); }
.start-card:hover, .card:hover { border-color: var(--text-main); transform: translateY(-5px); box-shadow: 0 20px 60px rgba(0,0,0,0.05); }
.start-card .icon, .card .icon { font-size: 2.2rem; margin-bottom: 20px; color: var(--text-main); }

.compare-card { background: var(--bg-main); border: 1px solid var(--border-subtle); padding: 50px; display: flex; flex-direction: column; border-radius: var(--radius-xl); transition: transform 0.2s var(--ease-fluid), border-color 0.2s, box-shadow 0.2s; cursor: default; }
.compare-card:hover { border-color: var(--text-main); transform: translateY(-5px); box-shadow: 0 20px 60px rgba(0,0,0,0.05); }
.compare-card.highlight { background: var(--bg-surface); position: relative; }

.card-badge { background: var(--text-main); color: var(--text-inverse); font-family: var(--font-ui); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; padding: 6px 12px; display: inline-block; margin-bottom: 25px; letter-spacing: 1px; border-radius: var(--radius-sm); }

/* Specs Card */
.specs-card { width: 100%; max-width: 400px; background: var(--bg-main); padding: 40px; border: 1px solid var(--border-subtle); box-shadow: 20px 20px 0 rgba(0,0,0,0.05); border-radius: var(--radius-xl); }
.specs-card.dark { background: var(--text-main); color: var(--text-inverse); box-shadow: 20px 20px 0 rgba(0,0,0,0.1); border: none; }
.specs-header { border-bottom: 1px solid var(--border-subtle); padding-bottom: 20px; margin-bottom: 20px; font-family: var(--font-ui); font-weight: 700; text-transform: uppercase; }
.specs-card.dark .specs-header { border-color: rgba(255,255,255,0.2); }
.specs-list { list-style: none; padding-left: 0; margin: 0; }
.specs-list li { display: flex; justify-content: space-between; margin-bottom: 15px; }
.specs-list li:last-child { margin-bottom: 0; }
.specs-block { margin-bottom: 25px; }
.specs-block:last-child { margin-bottom: 0; }
.specs-label { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 5px; text-transform: uppercase; }
.specs-value { font-size: 1.1rem; font-weight: 600; }

/* Lists & Misc */
.check-list { list-style: none; margin-bottom: 40px; padding-left: 0; }
.check-list li { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 15px; font-size: 1rem; color: var(--text-main); line-height: 1.4; }
.check-list li .material-symbols-outlined { font-size: 20px; color: var(--text-main); margin-top: 2px; font-weight: 600; }

/* Pricing */
.price-wrap { margin: 35px 0; padding: 35px 0; border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.price-wrap-transparent { border-color: transparent; }
.price-main { font-family: var(--font-heading); font-weight: 700; font-size: 2.8rem; color: var(--text-main); line-height: 1; }
.price-main-custom { font-size: 2rem; }
.price-sub { font-size: 0.9rem; color: var(--text-muted); margin-top: 5px; font-family: var(--font-ui); }

/* Features */
.feature-block { margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.feature-item h4 { font-family: var(--font-ui); font-weight: 700; font-size: 0.95rem; margin-bottom: 8px; color: var(--text-main); }
.feature-item p { font-size: 0.9rem; color: var(--text-muted); margin: 0; line-height: 1.6; }

/* Consulting */
.consult-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border-subtle); border: 1px solid var(--border-subtle); margin-top: 50px; border-radius: var(--radius-xl); overflow: hidden; }
.consult-item { padding: 50px 40px; background: var(--bg-main); transition: background 0.3s; }
.consult-item:hover { background: var(--bg-surface-hover); }
.consult-icon { font-size: 32px; margin-bottom: 25px; color: var(--text-main); }

/* FAQ Accordion */
.acc-header { padding: 25px 0; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 30px; border-bottom: 1px solid var(--border-subtle); transition: border-color 0.3s; }
.acc-title { font-family: var(--font-body); font-size: 1.15rem; font-weight: 600; color: var(--text-main); flex: 1; }
.acc-content { max-height: 0; overflow: hidden; transition: max-height 0.5s var(--ease-fluid); color: var(--text-muted); font-size: 1.05rem; line-height: 1.7; font-family: var(--font-body); }
.acc-inner { padding: 20px 0 30px 0; }
.acc-item.active .acc-content { max-height: 1000px; }
.acc-icon { transition: transform 0.4s var(--ease-fluid); }
.acc-item.active .acc-icon { transform: rotate(180deg); color: var(--text-main); }

/* Foundation / Tech Block */
.marketing-foundation { background: #050505; color: var(--text-inverse); padding: 160px 0; overflow: hidden; }
.marketing-foundation .start-h2 { color: #fff; }
.foundation-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 80px; margin-top: 60px; align-items: flex-start; }
.bridge-visual { position: relative; padding: 40px; border-left: 1px solid rgba(255,255,255,0.1); }
.flow-line { height: 2px; width: 0%; background: linear-gradient(90deg, transparent, #ffffff, transparent); position: absolute; top: 0; left: 0; transition: width 2s var(--ease-fluid); }
.reveal.active .flow-line { width: 100%; }
.stat-item { margin-bottom: 40px; }
.stat-label { font-family: var(--font-ui); font-size: 0.8rem; color: rgba(255,255,255,0.5); display: block; margin-bottom: 10px; letter-spacing: 1px; text-transform: uppercase; }
.stat-value { font-size: 1.5rem; font-weight: 600; color: var(--text-inverse); font-family: var(--font-heading); }

@media (max-width: 1024px) {
    .grid-3, .foundation-grid { grid-template-columns: 1fr; }
    .grid-2, .compare-grid, .deep-dive-grid, .feature-block { grid-template-columns: 1fr; gap: 40px; }
    .consult-grid { grid-template-columns: 1fr; }
    .section-padding, .start-section, .svc-section { padding: 80px 0; }
}

/* --------------------------------------------------------------------------
   8. HERO BEREINIGTE EFFEKTE
   -------------------------------------------------------------------------- */
#preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg-main); display: flex; justify-content: center; align-items: center; z-index: 99999; transition: opacity 0.8s var(--ease-fluid), visibility 0.8s; }
#preloader.loaded { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-icon { width: 60px; height: auto; animation: preloaderRotate 1s cubic-bezier(0.7, 0, 0.3, 1) forwards; }
@keyframes preloaderRotate { 0% { transform: rotate(0deg) scale(0.8); opacity: 0; } 50% { opacity: 1; } 100% { transform: rotate(360deg) scale(1); opacity: 1; } }

.hero { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 95vh; text-align: center; padding: 40px 0; overflow: hidden; perspective: 1000px; }
.premium-title-wrapper { position: relative; z-index: 10; margin-bottom: 40px; padding: 0 20px; margin-top: 60px; }
.premium-title { font-family: var(--font-heading); font-weight: 800; font-size: clamp(2.5rem, 7vw, 5.5rem); line-height: 1.1; letter-spacing: -0.04em; color: var(--text-main); opacity: 0; transform: translateY(30px); animation: textRise 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s forwards; }
.premium-lead { font-family: var(--font-body); font-size: clamp(1.1rem, 2vw, 1.25rem); color: var(--text-muted); max-width: 680px; margin: 0 auto 50px auto; line-height: 1.6; position: relative; z-index: 5; opacity: 0; animation: fadeIn 1.5s ease 0.6s forwards; padding: 20px; background: rgba(255,255,255,0.4); backdrop-filter: blur(5px); border-radius: var(--radius-lg); }
.magnetic-wrap { display: inline-block; position: relative; z-index: 10; opacity: 0; animation: fadeIn 1.5s ease 0.8s forwards; }
.scroll-hint { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); color: var(--text-muted); opacity: 0; animation: scrollReveal 1.5s ease 1.5s forwards, scrollPulse 3s infinite 3s; z-index: 10; }

@keyframes scrollReveal { to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes scrollPulse { 0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.4; } 50% { transform: translateX(-50%) translateY(5px); opacity: 0.8; } }
@keyframes textRise { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { to { opacity: 1; } }

/* Sauberes und exklusives Hero-Gitter */
.hero-mountains {
    position: absolute;
    bottom: -2px; left: 0; width: 100%; height: 50vh;
    z-index: 1; pointer-events: none;
}
.hero-mountains svg { width: 100%; height: 100%; display: block; }

.hero-bg-grid {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: 50px 50px;
    background-image: 
        linear-gradient(to right, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    z-index: 1;
    pointer-events: none;
}

.hero-glow {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: 50px 50px;
    background-image: 
        linear-gradient(to right, rgba(0, 0, 0, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 1px, transparent 1px);
    z-index: 2;
    pointer-events: none;
    -webkit-mask-image: radial-gradient(circle 350px at var(--mouse-x, -1000px) var(--mouse-y, -1000px), black 0%, transparent 80%);
    mask-image: radial-gradient(circle 350px at var(--mouse-x, -1000px) var(--mouse-y, -1000px), black 0%, transparent 80%);
    transition: opacity 0.3s ease;
}

/* --------------------------------------------------------------------------
   9. KONTAKT FORMULARE
   -------------------------------------------------------------------------- */
.pt-120 { padding-top: 120px; }
.contact-wrapper { max-width: 1200px; margin: 0 auto; padding: 160px 5vw 100px 5vw; display: block; }
.page-header { margin-bottom: 80px; max-width: 800px; }
.page-headline { font-family: var(--font-heading); font-weight: 800; font-size: clamp(3rem, 5vw, 5rem); line-height: 1.05; color: var(--text-main); margin-bottom: 30px; letter-spacing: -0.02em; }
.page-intro { font-size: 1.25rem; line-height: 1.6; color: var(--text-muted); font-weight: 300; max-width: 650px; }

.split-layout { display: grid; grid-template-columns: 1fr 1.5fr; gap: 80px; border-top: 1px solid var(--border-subtle); padding-top: 60px; }
.details-col { display: flex; flex-direction: column; gap: 50px; }
.detail-group h3 { font-family: var(--font-ui); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; color: var(--text-muted); margin-bottom: 15px; font-weight: 700; }
.detail-link { display: block; font-family: var(--font-heading); font-size: 1.4rem; color: var(--text-main); text-decoration: none; font-weight: 500; margin-bottom: 5px; transition: opacity 0.2s; }
.detail-link:hover { opacity: 0.6; }
.address-block { font-size: 1.1rem; line-height: 1.6; color: var(--text-main); }

.form-col { background: var(--bg-surface); padding: 50px; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); position: relative; min-height: 500px; }
.input-row { margin-bottom: 30px; }
.minimal-label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 10px; color: var(--text-main); }
.minimal-input { width: 100%; background: transparent; border: none; border-bottom: 2px solid var(--border-subtle); padding: 15px 0; font-family: var(--font-body); font-size: 1.1rem; line-height: 1.6; color: var(--text-main); transition: all 0.3s ease; border-radius: 0; outline: none; }
.minimal-input:focus { border-bottom-color: var(--text-main); padding-left: 10px; background: var(--bg-main); }
.minimal-input::placeholder { color: var(--text-muted); font-weight: 300; opacity: 1; }
.textarea-message { min-height: 120px; resize: vertical; }

.check-wrap { display: flex; gap: 15px; margin: 40px 0; align-items: flex-start; }
.check-box { width: 24px; height: 24px; border: 2px solid var(--border-strong); appearance: none; -webkit-appearance: none; cursor: pointer; flex-shrink: 0; transition: all 0.2s; position: relative; background-color: transparent; border-radius: var(--radius-sm); }
.check-box:checked { background-color: var(--text-main); border-color: var(--text-main); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E"); background-size: 16px; background-position: center; background-repeat: no-repeat; }
.check-label { font-size: 0.85rem; line-height: 1.5; color: var(--text-muted); cursor: pointer; padding-top: 2px; }
.check-label a { color: var(--text-main); text-decoration: underline; }

.send-btn { width: 100%; background: var(--text-main); color: var(--text-inverse); border: none; padding: 20px; font-family: var(--font-ui); font-weight: 700; font-size: 1rem; letter-spacing: 1px; cursor: pointer; transition: all 0.2s; text-transform: uppercase; display: flex; justify-content: center; align-items: center; gap: 10px; border-radius: var(--radius-lg); }
.send-btn:hover { background: #333; transform: translateY(-2px); }
.send-btn:disabled { opacity: 0.7; cursor: wait; }

.success-view { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg-surface); z-index: 10; display: none; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 40px; opacity: 0; transition: opacity 0.5s ease; border-radius: var(--radius-lg); }
.success-view.active { display: flex; opacity: 1; }
.success-icon-circle { width: 80px; height: 80px; background: var(--text-main); border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; margin-bottom: 30px; animation: scaleIn 0.5s var(--ease-fluid); }
.success-icon { color: var(--text-inverse); font-size: 40px; }
.success-headline { font-family: var(--font-heading); font-size: 2rem; margin-bottom: 15px; color: var(--text-main); }
.success-text { color: var(--text-muted); font-size: 1.1rem; max-width: 350px; }

@media (max-width: 1000px) { .split-layout { grid-template-columns: 1fr; gap: 60px; } .form-col { padding: 30px 20px; } .page-headline { font-size: 3rem; } }

/* ==========================================================================
   10. OFFICE APP / DASHBOARD STYLES
   ========================================================================== 
   Der FIX: .app-layout verhindert das Scrollen NUR für das Dashboard, 
   aber manipuliert NICHT mehr global den <body> Tag! */

.app-layout { 
    display: flex; 
    height: 100svh; 
    width: 100vw; 
    overflow: hidden; 
}

.sidebar { width: var(--sidebar-width); background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 100; flex-shrink: 0; }
.sidebar-header { padding: 25px 20px 15px; border-bottom: 1px solid var(--border); }
.sidebar-section-title { font-family: var(--font-ui); font-size: 0.8rem; text-transform: uppercase; color: var(--text-muted); padding: 25px 20px 5px; letter-spacing: 0.05em; font-weight: 600; display:flex; justify-content: space-between; align-items:center; }
.file-tree { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.file-item { padding: 10px 15px; border-radius: 8px; cursor: pointer; font-size: 0.95rem; font-weight: 500; color: var(--text-main); display: flex; align-items: center; justify-content: space-between; gap: 10px; transition: background 0.2s; }
.file-item:hover { background: var(--border); }
.file-item.active { background: var(--text-main); color: white; }
.sidebar-footer { padding: 15px 20px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }

.main-content { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.top-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 25px; border-bottom: 1px solid var(--border); background: white; z-index: 10; height: 65px; }
.logo-container { display: flex; align-items: center; gap: 15px; }
.logo-container img { height: 28px; object-fit: contain; }
.project-status { font-size: 0.75rem; background: var(--surface); padding: 4px 8px; border-radius: 4px; color: var(--text-muted); font-family: var(--font-body); margin-left: 10px; border: 1px solid var(--border);}
.token-badge { font-size: 0.75rem; background: rgba(26, 115, 232, 0.1); color: var(--accent-web); padding: 4px 8px; border-radius: 4px; font-family: var(--font-ui); font-weight: 600; display: flex; align-items: center; gap: 4px; }
.top-actions { display: flex; align-items: center; gap: 15px; }
.icon-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 5px; border-radius: 50%; transition: background 0.2s, color 0.2s; display: flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--surface-hover); color: var(--text-main); }

.avatar-box { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--text-main); background: var(--surface); border: 1px solid var(--border); font-size: 14px; font-weight: 600; cursor: pointer;}
.avatar-box.ai { background: rgba(26, 115, 232, 0.1); color: var(--accent-web); border: 1px solid rgba(26, 115, 232, 0.2); font-size: 18px; }
.avatar-box.user { background: var(--text-main); color: white; }

.workspace-split { display: flex; flex: 1; overflow: hidden; position: relative; width: 100%; flex-direction: row; }

.chat-panel { width: 450px; max-width: 50%; min-width: 300px; display: flex; flex-direction: column; background: white; flex-shrink: 0; }
.chat-output { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 15px; scroll-behavior: smooth; }
.msg-wrapper { display: flex; width: 100%; animation: messageSlideIn 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) forwards; }
.msg-row { display: flex; gap: 12px; width: 100%; }
.user-row { flex-direction: row-reverse; }
.msg-col { max-width: 85%; }
.msg-content { padding: 14px 18px; border-radius: 14px; font-size: 0.95rem; line-height: 1.5; word-wrap: break-word; white-space: pre-wrap; }
.user-row .msg-content { background: var(--text-main); color: white; border-top-right-radius: 4px; }
.ai-row .msg-content { background: var(--surface); border: 1px solid var(--border); border-top-left-radius: 4px; color: var(--text-main); }

.chat-input-area { background: white; border: 1px solid var(--border); border-radius: 20px; padding: 8px 12px; display: flex; align-items: flex-end; gap: 10px; margin: 10px 20px 20px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); flex-shrink: 0; }
.chat-input-area textarea { flex: 1; border: none; resize: none; max-height: 120px; padding: 10px 5px; font-family: var(--font-body); font-size: 0.95rem; background: transparent; color: var(--text-main); outline: none; }
.chat-input-area .send-btn { width: 42px; height: 42px; padding: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-bottom: 2px; }

.chat-divider { width: 6px; background: var(--border); cursor: col-resize; z-index: 10; transition: background 0.2s; flex-shrink: 0; }
.chat-divider:hover, .chat-divider.active { background: var(--accent-web); }

.dynamic-container { flex: 1; display: flex; flex-direction: column; min-width: 400px; background: var(--surface); position: relative; overflow-y: auto; padding: 30px; }
.quick-actions { display: flex; gap: 8px; padding: 15px 20px 0; overflow-x: auto; white-space: nowrap; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.quick-actions::-webkit-scrollbar { display: none; }

.chip { background: var(--surface); border: 1px solid var(--border); padding: 8px 16px; border-radius: 20px; font-size: 0.85rem; cursor: pointer; transition: all 0.2s; color: var(--text-main); display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-ui); font-weight: 500; }
.chip:hover { background: var(--surface-hover); border-color: var(--accent-web); color: var(--accent-web); }

.doc-wrapper { width: 100%; display: flex; justify-content: center; padding-bottom: 50px; }
.doc-actions { position: absolute; top: 15px; right: 15px; display: flex; gap: 8px; z-index: 20; }
.doc-btn { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 6px 12px; cursor: pointer; color: var(--text-muted); transition: all 0.2s; display: flex; align-items: center; gap: 5px; font-size: 0.85rem; font-weight: 500;}
.doc-btn:hover { color: var(--text-main); background: var(--surface-hover); border-color: #ccc;}

.folder-sub { padding-left: 35px; display: flex; flex-direction: column; gap: 2px; margin-top: 4px; display: none; }
.folder-sub.open { display: flex; }
.folder-item { padding: 6px 10px; border-radius: 6px; font-size: 0.85rem; color: var(--text-muted); display: flex; align-items: center; justify-content: space-between; cursor: pointer; transition: background 0.2s; }
.folder-item:hover { background: var(--surface-hover); color: var(--text-main); }
.folder-item .material-symbols-outlined { font-size: 16px; }

/* ==========================================================================
   11. INVOICE / A4 PRINT STYLES (DIN 5008)
   ========================================================================== */
.a4-preview {
    background: white;
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    color: #1a1a1a;
    font-family: var(--font-body);
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
}

.page-content {
    flex: 1; 
    padding: 15mm 20mm 0 25mm;
    position: relative;
}

.mark-fold-1 { position: absolute; left: 0; top: 105mm; width: 5mm; border-top: 1px solid #aaa; }
.mark-punch  { position: absolute; left: 0; top: 148.5mm; width: 7mm; border-top: 1px solid #777; }
.mark-fold-2 { position: absolute; left: 0; top: 210mm; width: 5mm; border-top: 1px solid #aaa; }

.header-area { position: relative; height: 85mm; margin-bottom: 10mm; }
.logo-area { text-align: right; margin-bottom: 10mm; }
.logo-img { max-width: 45mm; max-height: 15mm; object-fit: contain; }

.address-box { position: absolute; top: 30mm; left: 0; width: 85mm; font-size: 10.5pt; line-height: 1.2; }
.address-box p { margin: 0 !important; padding-bottom: 2px; }
.sender-line { font-size: 7.5pt; color: #666; text-decoration: underline; margin-bottom: 4mm; }

.info-block { position: absolute; top: 30mm; right: 0; width: 65mm; font-size: 8.5pt; }
.info-table { width: 100%; border-collapse: collapse; }
.info-table td { padding: 3px 0; }
.info-table td:first-child { color: #666; width: 45%; }
.info-table td:last-child { font-weight: 500; text-align: right; }

.document-title { font-family: var(--font-ui); font-size: 18pt; font-weight: 700; margin-bottom: 8mm; color: var(--text-main); }
.a4-preview p { font-size: 9.5pt; line-height: 1.5; margin: 0 0 4mm 0; }

.pos-table { width: 100%; border-collapse: collapse; font-size: 9pt; margin-bottom: 8mm; }
.pos-table th { border-bottom: 2px solid #333; text-align: left; padding: 6px 5px; font-weight: 600; color: #333; }
.pos-table td { border-bottom: 1px solid #eee; padding: 8px 5px; vertical-align: top; }
.pos-table tr { page-break-inside: avoid; }

.summary-box { display: flex; justify-content: flex-end; margin-bottom: 15mm; page-break-inside: avoid; }
.summary-table { width: 75mm; border-collapse: collapse; font-size: 9.5pt; }
.summary-table td { text-align: right; padding: 4px 0; }
.summary-table .label { padding-right: 15px; color: #666; }

.print-footer { padding: 5mm 20mm 20mm 25mm; background: white; box-sizing: border-box; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #ccc; padding-top: 5mm; font-size: 7pt; color: #666; line-height: 1.4; }

@media print {
    @page { size: A4; margin: 0; }
    body, html { margin: 0 !important; padding: 0 !important; background: white !important; }
    .app-layout > aside, .top-bar, .chat-panel, .doc-actions, .quick-actions, .chat-divider { display: none !important; }
    .dynamic-container, .doc-wrapper, #docBody { padding: 0 !important; margin: 0 !important; display: block !important; overflow: visible !important; height: auto !important; min-height: 0 !important; }
    .a4-preview { width: 210mm !important; min-height: 297mm !important; box-shadow: none !important; margin: 0 !important; display: block !important; }
    .page-content { padding-bottom: 45mm !important; }
    .print-footer { position: fixed !important; bottom: 0; left: 0; right: 0; height: 40mm; padding: 5mm 20mm 15mm 25mm !important; z-index: 1000; }
    .header-area { page-break-inside: avoid; }
}

/* ==========================================================================
   X. AUTH PAGES (LOGIN & REGISTER)
   ========================================================================== */

/* Verwandelt die Seite in eine Flexbox, um den Footer immer nach ganz unten zu drücken */
body:has(.auth-wrapper) {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.auth-wrapper {
    flex: 1; /* Nimmt dynamisch den gesamten restlichen Freiraum ein */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px;
    background-color: transparent; 
}

.auth-card {
    width: 100%;
    max-width: 480px;
    padding: 50px;
    position: relative;
    margin: auto 0; /* Zentriert die Karte auch vertikal perfekt im restlichen Raum */
}

/* Etwas breiter für die Registrierung */
.auth-card.register {
    max-width: 500px;
}

.form-hidden {
    display: none !important;
}

/* Blendet NUR noch den Magnetic-Button aus, lässt das Menü aber da! */
body:has(.auth-wrapper) .magnetic-wrap {
    display: none !important;
}

@media (max-width: 600px) {
    .auth-card {
        padding: 40px 25px;
    }
    .auth-wrapper {
        padding: 80px 20px;
    }
}