/* ==========================================================================
   1. GLOBAL RESETS & VARIABLES
   ========================================================================== */
:root {
    --bg: #000000;
    --fg: #ffffff;
    --accent: #264374; /* Einheitlicher Haupt-Akzentton */
    --noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: crosshair;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--fg);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden; 
    min-height: 100vh;
    text-transform: uppercase;
}

/* Granular Noise Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: var(--noise);
    opacity: 0.05;
    pointer-events: none;
    z-index: 10;
}

.logo {
    height: 100%; 
    width: auto; 
    display: inline-block; 
    border: 0; 
    vertical-align: middle;
}

canvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
}

/* ==========================================================================
   2. NAVIGATION & SYSTEM STATS
   ========================================================================== */
.nav-link, .nav-back {
    position: fixed;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.3em;
    text-decoration: none;
    color: var(--fg);
    z-index: 100;
    padding: 20px;
    transition: color 0.3s;
}

.nav-back {
    top: 0;
    left: 0;
}

.nav-link:hover, .nav-back:hover { 
    color: var(--accent); 
}

/* Positions-Klassen für Ecken-Navigation */
.top-left     { top: 0; left: 0; }
.top-right    { top: 0; right: 0; }
.bottom-left  { bottom: 0; left: 0; }
.bottom-right { bottom: 0; right: 0; }

.system-status {
    position: fixed;
    top: 0; right: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #444;
    padding: 20px;
    letter-spacing: 0.1em;
    z-index: 100;
}

/* ==========================================================================
   3. TYPOGRAPHY & COMMON ELEMENTS
   ========================================================================== */
.section-header {
    margin-bottom: 40px;
    font-family: 'JetBrains Mono', monospace;
    flex-shrink: 0;
}

.catalog-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 0.4em;
    display: block;
    margin-bottom: 15px;
}

.glitch-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.03em;
    margin-bottom: 5%;
}

/* ==========================================================================
   4. LAYOUTS & PANELS
   ========================================================================== */
main {
    position: relative;
    z-index: 5;
    padding: 10vw;
    padding-top: max(10vw, 80px);
    max-width: 1600px;
    margin: 0 auto;
    min-height: 100vh;
}

/* Hero Grid-Spezifisch */
.hero-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
}

h1 {
    font-size: clamp(2.5rem, 10vw, 12rem); 
    line-height: 0.85;
    font-weight: 900;
    letter-spacing: -0.05em;
    max-width: 500px;
}

.hero-subtext {
    font-family: 'JetBrains Mono', monospace; 
    font-size: 12px; 
    margin-top: 20px; 
    color: #555;
    line-height: 1.5;
}

/* Manifesto Layout-Spezifisch */
.manifesto-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
}

.manifesto-panel {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Contact Layout */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 80px;
    align-items: start;
}

.info-panel {
    position: sticky;
    top: 10vw;
}

.manifesto-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.8;
    color: #888;
    text-transform: none;
    max-width: 600px;
}

.manifesto-text strong {
    color: var(--fg);
    font-weight: 700;
    text-transform: uppercase;
}

/* ==========================================================================
   5. COMPONENTS (TERMINAL, MATRIX, STATS, FORM)
   ========================================================================== */

/* --- Terminal --- */
.terminal {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    height: 300px;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(10px);
    width: 100%;
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
    color: var(--accent);
}

.log-line {
    display: block;
    margin-bottom: 4px;
    opacity: 0.7;
}

.accent-text {
    color: var(--accent);
}

.scanner-line {
    position: absolute;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    top: 50%;
    animation: scan 4s linear infinite;
    opacity: 0.3;
    z-index: 2;
    pointer-events: none;
}

@keyframes scan {
    0% { top: 0%; }
    100% { top: 100%; }
}

/* --- Industrielle Matrix-Tabelle --- */
.services-section {
    min-height: 100vh;
    padding: 8vw 10vw;
    position: relative;
    z-index: 5;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: #000000;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.matrix-container {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.matrix-row {
    display: grid;
    grid-template-columns: 0.6fr 2.5fr 2fr 1fr;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    align-items: center;
    position: relative;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.matrix-cell {
    position: relative;
    z-index: 2;
}

.cell-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #444;
}

.matrix-row:hover .cell-id {
    color: var(--accent);
}

.cell-title h3 {
    font-size: clamp(1.1rem, 1.5vh, 1.6rem);
    font-weight: 900;
    letter-spacing: -0.01em;
}

.cell-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    margin-top: 6px;
    display: block;
}

.cell-specs {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #888;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cell-status {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-self: end;
}

.status-indicator {
    width: 6px;
    height: 6px;
    background-color: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent);
}

.vector-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, rgba(0, 255, 65, 0.02) 0%, transparent 100%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1;
    border-left: 0px solid var(--accent);
}

.matrix-row:hover {
    background: rgba(10, 10, 10, 0.8);
    padding-left: 35px;
}

.matrix-row:hover .vector-overlay {
    opacity: 1;
    border-left: 3px solid var(--accent);
}

/* --- Tech Stats Panel --- */
.stats-panel {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tech-spec-box {
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px;
    background: rgba(5, 5, 5, 0.6);
    margin-bottom: 30px;
    position: relative;
}

.tech-spec-box::before {
    content: ''; position: absolute; top: -1px; left: -1px; width: 10px; height: 10px;
    border-top: 1px solid var(--accent); border-left: 1px solid var(--accent);
}

.spec-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    font-family: 'JetBrains Mono', monospace;
    margin-top: 20px;
}

.spec-item {
    display: flex;
    flex-direction: column;
}

.spec-label {
    font-size: 9px;
    color: #444;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.spec-value {
    font-size: 14px;
    color: var(--fg);
}

/* --- Radar Graph --- */
.radar-graph {
    height: 150px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.radar-sweep {
    position: absolute;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, rgba(0, 255, 65, 0.08) 0deg, transparent 90deg);
    animation: sweep 6s linear infinite;
}

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

/* --- Terminal Form --- */
.terminal-form {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    position: relative;
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 30px;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    transition: border-color 0.3s;
}

.form-group:focus-within {
    border-bottom: 1px solid var(--accent);
}

.form-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #555;
    display: block;
    margin-bottom: 5px;
    letter-spacing: 0.1em;
}

.form-group:focus-within .form-label {
    color: var(--accent);
}

.terminal-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--fg);
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    padding: 5px 0;
    text-transform: none;
}

.submit-trigger {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--accent);
    background: transparent;
    border: 1px solid var(--accent);
    padding: 15px 30px;
    letter-spacing: 0.2em;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.submit-trigger:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 15px var(--accent);
}

.console-output {
    display: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--accent);
    line-height: 1.6;
}

.loading-bar {
    width: 0%;
    height: 2px;
    background: var(--accent);
    margin-top: 20px;
    transition: width 2s ease-in-out;
}

/* ==========================================================================
   6. MEDIA QUERIES (RESPONSIVE ENGINE)
   ========================================================================== */

/* Tablets & Medium Screens */
@media (max-width: 1024px) {
    main.hero-layout, main.manifesto-layout, main.contact-layout {
        display: flex;
        flex-direction: column;
        padding: 15vh 8vw 8vw 8vw;
        gap: 50px;
    }

    
    .hero-text {
        width: 100%;
    }

    .terminal {
        width: 100%;
        margin-top: auto;
    }
    
    h1 {
        max-width: 100%;
        font-size: clamp(3.5rem, 12vw, 7rem);
    }

    .stats-panel {
        border-left: none;
        padding-left: 0;
    }

    .info-panel {
        position: static;
    }
}

/* Small Tablets & Large Mobile */
@media (max-width: 900px) {
    body {
        overflow-y: auto;
        height: auto;
    }
    main {
        grid-template-columns: 1fr;
        padding: 80px 20px 40px 20px;
        height: auto;
    }
    .matrix-container {
        display: block;
    }
    .matrix-row {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 30px 10px;
    }
    .cell-status {
        justify-self: start;
    }
    .info-panel {
        display: none; /* Fokus auf das Wesentliche */
    }
}

/* Smartphones */
@media (max-width: 768px) {
    .nav-link {
        position: absolute; 
        font-size: 9px;
        letter-spacing: 0.1em;
        padding: 15px 10px;
        width: 50%;
        text-align: center;
        background: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(5px);
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    .logo {
    height: 80%; 
    width: auto; 
    display: inline-block; 
    border: 0; 
    vertical-align: middle;
    }

    /* 2x2 Grid-Navigations-Leiste oben */
    .top-left { top: 0; left: 0; }
    .top-right { top: 0; right: 0; }
    .bottom-left { top: 45px; left: 0; bottom: auto; }
    .bottom-right { top: 45px; right: 0; bottom: auto; }

    main {
        padding-top: 140px; 
        padding-bottom: 60px;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: space-between; 
        gap: 40px;
    }

    .hero-text {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    h1 {
        font-size: 2.8rem; 
        line-height: 0.9;
        max-width: 100%;
    }

    .hero-subtext {
        font-size: 11px;
        margin-top: 15px;
        max-width: 280px;
    }

    .terminal {
        height: 220px; 
        padding: 15px;
        margin-top: auto; 
    }

    .matrix-row {
        padding: 20px 10px;
    }

    .cell-id {
        font-size: 11px;
        color: var(--accent);
    }

    .cell-title h3 {
        font-size: 1.25rem;
    }

    .matrix-row:hover {
        padding-left: 15px;
    }
}