/* GANZ OBEN: Subtiles Branding beim Textmarkieren */
::selection {
    background-color: #ef4444;
    color: #ffffff;
}

/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* Color Palette - Deep Navy / Slate */
    --bg-body: #090e17;       
    --bg-card: #111827;       
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    /* Branding */
    --primary: #ef4444;       
    --primary-hover: #dc2626;
    --border: #1e293b;
    --border-blueprint: rgba(255, 255, 255, 0.08);
    
    /* Layout */
    --container-width: 1400px;
    --header-height: 80px;
    --radius: 12px;
    
    /* System Fonts */
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-stack);
    line-height: 1.6;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow-x: hidden;
}

/* =========================================
   A11Y (ACCESSIBILITY) & FOCUS STATES
   ========================================= */
*:focus { outline: none; }
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
    border-radius: 2px;
}

.skip-link {
    position: absolute; top: -100px; left: 20px;
    background: var(--primary); color: #fff; padding: 10px 20px;
    font-weight: bold; z-index: 10000; transition: top 0.2s ease;
    border-radius: var(--radius);
}
.skip-link:focus-visible { top: 20px; }

h1, h2, h3, h4 { color: #ffffff; line-height: 1.2; font-weight: 700; margin-bottom: 1rem; }
h1 { font-size: clamp(2.8rem, 5vw, 4.8rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2.2rem, 4vw, 3.5rem); letter-spacing: -0.01em; }
h3 { font-size: 1.5rem; }
p { color: var(--text-muted); margin-bottom: 1.5rem; }
a { text-decoration: none; color: inherit; transition: all 0.2s ease; }
img { max-width: 100%; height: auto; display: block; border-radius: var(--radius); font-style: italic; }
ul { list-style: none; }

.container { width: 92%; max-width: var(--container-width); margin: 0 auto; padding: 0 1rem; }
.icon { width: 18px; height: 18px; display: inline-block; vertical-align: middle; margin-right: 6px; }

/* =========================================
   2. HINTERGRUND SYSTEM (Grid & Canvas)
   ========================================= */
#neural-grid {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -2; pointer-events: none; 
    background: radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.4) 0%, var(--bg-body) 100%);
}

.ambient-grid {
    position: fixed; 
    top: 0; left: 0; 
    width: 100vw; height: 100vh;
    z-index: -3; /* Grid liegt ganz hinten */
    pointer-events: none;
    
    /* Das sichtbare Linien-Raster */
    background-image: 
        linear-gradient(rgba(203, 213, 225, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(203, 213, 225, 0.10) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: 0 0; 
    
    mask-image: radial-gradient(ellipse at 50% 50%, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 40%, transparent 100%);
}

/* Blueprint Accents (Fadenkreuze) */
.blueprint-box { position: relative; }
.blueprint-box::before, .blueprint-box::after {
    content: ''; position: absolute; pointer-events: none;
    width: 15px; height: 15px; z-index: 10;
}
.blueprint-box::before { top: -5px; left: -5px; border-top: 1px solid rgba(255, 255, 255, 0.15); border-left: 1px solid rgba(255, 255, 255, 0.15); }
.blueprint-box::after { bottom: -5px; right: -5px; border-bottom: 1px solid rgba(255, 255, 255, 0.15); border-right: 1px solid rgba(255, 255, 255, 0.15); }

/* =========================================
   3. NEURAL GRID BACKGROUND (Canvas)
   ========================================= */
#neural-grid {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -2; pointer-events: none; 
    background: radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.4) 0%, var(--bg-body) 100%);
}

/* =========================================
   4. BUTTONS (Flat Design, scharf)
   ========================================= */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.9rem 2.2rem; font-weight: 600; border-radius: 6px;
    cursor: pointer; font-size: 1.05rem; border: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.01em;
}

.btn-primary {
    background-color: #ffffff; color: #090e17; 
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.05); 
}
.btn-primary:hover { 
    transform: translateY(-2px);
    box-shadow: 0 12px 25px -5px rgba(239, 68, 68, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.btn-primary:active { transform: translateY(0); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }

.btn-large { padding: 1.1rem 3rem; font-size: 1.1rem; }

.btn-fernwartung {
    background-color: var(--primary); color: #ffffff; 
    padding: 0.6rem 1.2rem; font-size: 0.9rem; gap: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.btn-fernwartung:hover { 
    background-color: var(--primary-hover); transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(239, 68, 68, 0.4);
}
.btn-fernwartung:active { transform: translateY(0); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); }

/* =========================================
   5. HEADER & LOGO
   ========================================= */
.site-header {
    height: var(--header-height); position: sticky; top: 0; z-index: 1000;
    background: rgba(9, 14, 23, 0.7); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 100%; }

.logo { font-size: 1.8rem; font-weight: 800; color: #ffffff; letter-spacing: -0.5px; font-style: italic; z-index: 1002; }
.logo-be { color: var(--primary); }

.header-right { display: flex; align-items: center; gap: 2.5rem; }
.main-nav ul { display: flex; gap: 2rem; }
.main-nav a { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); }
.main-nav a:hover, .main-nav a:focus-visible { color: #ffffff; outline: none; }

.mobile-toggle { display: none; background: none; border: none; cursor: pointer; z-index: 1002; padding: 5px; }
.mobile-toggle span { display: block; width: 24px; height: 2px; background: #ffffff; margin: 5px 0; transition: transform 0.3s ease, opacity 0.3s ease; }

/* =========================================
   6. HERO SECTION
   ========================================= */
.hero { padding: 6rem 0; min-height: 85vh; display: flex; align-items: center; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 6rem; align-items: center; z-index: 2; }
.hero-content { padding: 2rem 0; } 
.hero-content .lead { font-size: 1.35rem; max-width: 48ch; margin-bottom: 2.5rem; line-height: 1.6; }

.badge-tech {
    display: inline-block; background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1); padding: 4px 12px; border-radius: 20px;
    font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.5rem; letter-spacing: 0.5px;
}

.hero-img { 
    border: 1px solid var(--border); box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.7); 
    object-fit: cover; width: 100%; aspect-ratio: 16/10;
}

/* =========================================
   7. BENTO GRID (Leistungen)
   ========================================= */
.section-bento { padding: 6rem 0; position: relative; z-index: 2; }
.section-header { margin-bottom: 4rem; max-width: 800px; }

.bento-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(320px, auto); gap: 2rem; }

.bento-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 100%);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius); border: none; border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    position: relative; overflow: hidden; display: flex; flex-direction: column;
    transition: transform 0.3s ease, border-top-color 0.3s ease;
}
.bento-card:hover { 
    transform: translateY(-4px); border-top-color: rgba(255,255,255,0.2); 
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
}

.bento-content-inner { padding: 3rem; position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; }

.bento-wide { grid-column: span 2; }
.bento-tall { grid-column: span 1; grid-row: span 2; }

/* Card 2: LWL Switch Hintergrund Fade */
.card-network { background: transparent; }
.card-bg-picture { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; }
.card-bg-img { width: 100%; height: 100%; object-fit: cover; opacity: 0.3; transition: opacity 0.5s ease, transform 0.5s ease; border: none; }
.card-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, rgba(9, 14, 23, 0.1) 0%, var(--bg-body) 100%); z-index: 1; }
.bento-card:hover .card-bg-img { opacity: 0.45; transform: scale(1.05); }

.bento-icon { width: 44px; height: 44px; color: var(--primary); margin-bottom: 1.5rem; }
.bento-card h3 { font-size: 1.6rem; color: #fff; }
.bento-card p { margin-bottom: 0; font-size: 1.05rem; line-height: 1.7; color: #cbd5e1; }

/* =========================================
   8. LOGBUCH (Architektur & Praxis)
   ========================================= */
.section-logbuch { padding: 8rem 0 4rem; position: relative; z-index: 2; }
.logbuch-header { margin-bottom: 4rem; max-width: 600px; padding: 1rem 0; }
.logbuch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }

.logbuch-card {
    padding: 2.5rem; border-radius: var(--radius);
    background: rgba(255,255,255,0.02); border-left: 2px solid var(--border);
    transition: 0.3s; display: flex; flex-direction: column;
}
.logbuch-card:hover { background: rgba(255,255,255,0.04); border-left-color: var(--primary); }

.logbuch-tag { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 1rem; }
.logbuch-card h3 { font-size: 1.3rem; margin-bottom: 1rem; }
.logbuch-card p { font-size: 0.95rem; margin-bottom: 2rem; flex-grow: 1; }
.logbuch-link { font-weight: 600; color: #fff; font-size: 0.95rem; align-self: flex-start; }
.logbuch-link:hover { color: var(--primary); }

/* =========================================
   9. SPLIT SECTION (Branchen)
   ========================================= */
.section-split { padding: 4rem 0 8rem; position: relative; z-index: 2;}
.split-container { 
    display: grid; grid-template-columns: 1fr; max-width: 900px; margin: 0 auto; padding: 4rem; 
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 100%);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius); border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.clean-list { margin-top: 3rem; }
.clean-list li { margin-bottom: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(255,255,255,0.03); }
.clean-list li:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.clean-list strong { display: block; color: #ffffff; font-size: 1.3rem; margin-bottom: 0.5rem; }
.clean-list span { color: var(--text-muted); font-size: 1.1rem; display: block; line-height: 1.6; }

/* =========================================
   10. CONTACT SECTION
   ========================================= */
.section-contact { padding: 6rem 0; position: relative; z-index: 2;}
.contact-box {
    background: linear-gradient(180deg, rgba(30, 58, 138, 0.08) 0%, rgba(255, 255, 255, 0) 100%);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    padding: 6rem 4rem; border-radius: var(--radius);
    border-top: 1px solid rgba(255, 255, 255, 0.08); text-align: center; position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.status-indicator {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.2);
    color: #10b981; padding: 6px 16px; border-radius: 50px;
    font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 2rem;
}
.status-dot { width: 8px; height: 8px; background-color: #10b981; border-radius: 50%; box-shadow: 0 0 10px #10b981; animation: blink 2s infinite; }

@keyframes blink { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }

.contact-box p { max-width: 700px; margin: 0 auto 4rem auto; font-size: 1.15rem; }
.contact-methods { display: flex; justify-content: center; align-items: center; gap: 5rem; flex-wrap: wrap; }
.contact-item { display: flex; flex-direction: column; align-items: center; }
.contact-label { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 1rem; }

.contact-secondary { border-left: 1px solid var(--border); padding-left: 5rem; }
.contact-link { font-size: 2.2rem; font-weight: 700; color: #ffffff; margin-bottom: 0.5rem; }
.contact-link:hover, .contact-link:focus-visible { color: var(--primary); }
.contact-sub { font-size: 0.9rem; color: var(--text-muted); }

/* =========================================
   11. FOOTER
   ========================================= */
.site-footer { border-top: 1px solid rgba(255,255,255,0.05); padding: 5rem 0 2rem; font-size: 0.95rem; position: relative; z-index: 2; background: rgba(5,8,15,0.8);}
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 3rem; margin-bottom: 4rem; }
.footer-brand .logo { margin-bottom: 1.5rem; display: inline-block; font-size: 1.5rem; }
.footer-brand p { max-width: 450px; line-height: 1.6; }
.footer-links h4 { font-size: 1rem; margin-bottom: 1.2rem; color: #fff; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a:hover, .footer-links a:focus-visible { color: #ffffff; outline: none; text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.05); padding-top: 2rem; color: var(--text-muted); text-align: center; }

/* =========================================
   12. RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 1100px) {
    .hero-grid { grid-template-columns: 1fr; gap: 4rem; text-align: center; }
    .hero-content { padding: 2rem; }
    .hero-content .lead { margin: 0 auto 2.5rem auto; }
    .hero-actions { justify-content: center; }
    .bento-grid { grid-template-columns: 1fr; }
    .bento-wide, .bento-tall { grid-column: span 1; grid-row: auto; }
    .bento-content-inner { padding: 2rem; }
    .split-container { padding: 2rem; }
    .contact-secondary { border-left: none; padding-left: 0; border-top: 1px solid var(--border); padding-top: 3rem; }
}

@media (max-width: 768px) {
    .header-right { gap: 1rem; }
    .mobile-toggle { display: block; }
    
    .main-nav {
        position: fixed; top: 0; right: -100%; width: 100%; height: 100vh;
        background: var(--bg-body); padding: 6rem 2rem;
        transition: right 0.3s ease, visibility 0.3s ease; display: flex; flex-direction: column; visibility: hidden; 
    }
    .main-nav.active { right: 0; visibility: visible; }
    .main-nav ul { flex-direction: column; gap: 2rem; }
    .main-nav a { font-size: 1.2rem; }
    
    .contact-box { padding: 3rem 1.5rem; }
    .contact-methods { flex-direction: column; gap: 3rem; }
    .contact-link { font-size: 1.8rem; }
}

/* =========================================
   13. LEGAL PAGES (Impressum & Datenschutz)
   ========================================= */
.section-legal { padding: 6rem 0; min-height: 80vh; position: relative; z-index: 2; }
.legal-content {
    max-width: 900px; margin: 0 auto; padding: 4rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 100%);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius); border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.legal-content h1 { font-size: 2.5rem; margin-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 1.5rem; }
.legal-content h2 { font-size: 1.5rem; margin-top: 3rem; margin-bottom: 1rem; color: #fff; }
.legal-content h3 { font-size: 1.2rem; margin-top: 2rem; margin-bottom: 0.8rem; color: var(--text-main); }
.legal-content h4 { font-size: 1.05rem; margin-top: 1.5rem; margin-bottom: 0.5rem; }
.legal-content p { font-size: 1rem; line-height: 1.8; margin-bottom: 1.5rem; }
.legal-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 4px; }
.legal-content a:hover, .legal-content a:focus-visible { color: #fff; }
.legal-content ul { list-style: disc; margin-left: 1.5rem; margin-bottom: 1.5rem; color: var(--text-muted); }
.legal-content ul li { margin-bottom: 0.5rem; line-height: 1.7; }

.error-page { display: flex; justify-content: center; align-items: center; min-height: calc(100vh - var(--header-height) - 200px); }
@media (max-width: 768px) { .legal-content { padding: 2rem 1.5rem; } }

/* =========================================
   14. DOWNLOAD MODAL & SPINNER
   ========================================= */
/* (Falls du die .modal Klassen gelöscht hattest, hier sind sie nochmal kompakt) */
.modal {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 9999; display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal-backdrop {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(5, 8, 15, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.modal-content {
    background: linear-gradient(180deg, var(--bg-card) 0%, #090e17 100%);
    border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    border-radius: var(--radius); position: relative; z-index: 10000;
    transform: translateY(20px); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal.is-open .modal-content { transform: translateY(0); }

/* Der technische Lade-Spinner */
.loader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(239, 68, 68, 0.2); /* Transparentes Rot */
    border-top-color: var(--primary); /* Leuchtendes Rot */
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}