/* GRUNDLAGEN & RESET */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;700;800&display=swap');

:root {
    --font-main: 'Inter', sans-serif;
    /* Light Mode (Standard) */
    --bg-color: #f8f8f8;
    --text-color: #1a1a1a;
    --accent-color: #ff3e00;
    --line-color: #ccc;
    --table-hover: #1a1a1a;
    --table-text-hover: #f8f8f8;
    --site-padding: clamp(20px, 5vw, 80px);
    /* Light Mode: Hover wird Schwarz, Text wird Weiß */
    --table-hover-bg: #1a1a1a;
    --table-hover-text: #f8f8f8;
    --table-neighbor-bg: rgba(0, 0, 0, 0.05); /* Sehr dezentes Grau */
    --table-neighbor2-bg: rgba(0, 0, 0, 0.02); /* Fast unsichtbar */
    
    transition: background-color 0.5s ease, color 0.5s ease;
}

html, body, a, button, .project-slide, tr {
    cursor: none !important;
}

img {
    /* Verhindert die Textmarkierung um das Bild herum */
    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.draw-hint {
    position: absolute;
    bottom: 50%; 
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    opacity: 0.4;
    transition: opacity 0.5s ease;
}

.scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    opacity: 0.4;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, #000, transparent);
    animation: scroll-anim 2s infinite ease-in-out;
}

section, header, footer {
    padding-left: var(--site-padding);
    padding-right: var(--site-padding);
    width: 100%;
}

.header-home-link, 
.header-compact-nav a,
.nav-line-link {
    text-decoration: none !important; 
    color: white; 
    mix-blend-mode: difference;
    display: inline-block;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    letter-spacing: 0px;
}

.header-home-link:hover,
.header-compact-nav a:hover {
    color: var(--accent-color) !important;
    mix-blend-mode: normal; 
    text-shadow: 0 0 12px var(--accent-color);
}

html, body {
    overflow-x: hidden;
}
body {
    cursor: none;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.5;
    overflow-x: hidden;
    /*textmarkierung ausschalten*/
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE10+/Edge */
    user-select: none;         /* Standard (Chrome, Opera) */
}

* {
    cursor: none !important;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* DARK MODE */
body.dark-mode {
    --bg-color: #1a1a1a;
    --text-color: #f8f8f8;
    --line-color: #444;
    --table-hover: #f8f8f8;
    --table-text-hover: #1a1a1a;
    /* Dark Mode: Hover wird Weiß, Text wird Schwarz */
    --table-hover-bg: #f8f8f8;
    --table-hover-text: #1a1a1a;
    --table-neighbor-bg: rgba(255, 255, 255, 0.1);
    --table-neighbor2-bg: rgba(255, 255, 255, 0.05);
}
.theme-toggle {
    position: fixed;
    top: 30px;
    left: 50%; 
    transform: translateX(-50%);
    z-index: 1000;
}

#dark-mode-toggle { display: none; } 

.lamp-button {
    display: block;
    width: 50px;
    height: 60px;
    transition: transform 0.3s ease;
}

.lamp-button:active { transform: translateY(5px); }

.lamp-svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: var(--text-color);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.4s ease;
}

.light-beam {
    fill: #ffdd00;
    stroke: none;
    opacity: 0.3;
    transition: opacity 0.4s ease;
}

/* ZUSTAND: HELL (Licht an) */
#dark-mode-toggle:not(:checked) + .lamp-button .light-beam {
    opacity: 0.6;
}
#dark-mode-toggle:not(:checked) + .lamp-button .lamp-head {
    fill: var(--text-color);
}

/* ZUSTAND: DUNKEL (Licht aus) */
#dark-mode-toggle:checked + .lamp-button .light-beam {
    opacity: 0;
}
#dark-mode-toggle:checked + .lamp-button .lamp-head {
    fill: var(--text-color);
}


/* CURSOR */
.custom-cursor {
    position: fixed;
    top: 0; 
    left: 0;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    pointer-events: none;
    z-index: 999999;
    mix-blend-mode: difference;
    
    transition: 
        width 0.3s ease, 
        height 0.3s ease, 
        opacity 0.3s ease, 
        border-radius 0.3s ease,
        rotate 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); 
    
    transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);
    rotate: 0deg; 
    will-change: transform, rotate;
}

/* Plus-Zustand */
.custom-cursor.is-plus {
    width: 80px;
    height: 80px;
    background-color: transparent;
    border-radius: 0;
}

.custom-cursor.is-plus::before,
.custom-cursor.is-plus::after {
    content: '';
    position: absolute;
    background-color: white;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.custom-cursor.is-plus::before { width: 100%; height: 6px; } 
.custom-cursor.is-plus::after { width: 6px; height: 100%; }

.cursor-rotating {
    rotate: 180deg;
}


/* HERO SECTION */
.landing-page {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 60px;
    background-color: var(--bg-color);
    overflow: hidden;
    z-index: 0;
}
.hero-title, .hero-subtitle{
    position: relative;
    z-index: 10;
}

#permanent-canvas, #transient-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height:fit-content;
    pointer-events: none !important; 
    display: block;
    z-index: 1 !important;
    /* Der Fade-Effekt nach unten */
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
}

#permanent-canvas { z-index: 1; } 
#transient-canvas { z-index: 0; } 

.header-compact, .landing-content, .servus-section, .project, .project-image-container {
    position: relative;
    z-index: 10;
}

.hero {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--spacing);
}

.hero-title {
    color: var(--accent-color); 
    font-size: 6rem;
    font-weight: 800;
    text-transform: lowercase;
    letter-spacing: -2px;
    margin-bottom: 5px;
    line-height: 0.9;
    animation: revealTitle 2s cubic-bezier(0.2, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes revealTitle {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    color: var(--accent-color);
    font-size: 3rem;
    font-weight: 300;
    opacity: 0.8; /* Leicht transparent für Hierarchie */
    text-transform: uppercase;
}


/* COMPACT HEADER (Sticky) */
.header-compact {
    position: fixed;
    top: 0;
    backdrop-filter: blur(20px);
    z-index: 2000;
    padding: 15px ;
    pointer-events: none;
    /* Startzustand: Unsichtbar */
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
/* Wenn diese Klasse am Body ist, erscheint der Header */
body.show-nav .header-compact {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.header-compact-container {
    margin: 0 auto;
    padding: 0 var(--spacing);
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: auto;
}

.header-compact-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: lowercase;
}


/* Nav-Indikator */
.header-compact-nav {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    padding: 10px 0;
    width: fit-content;
}

.nav-line {
    width: 30px;
    height: 8px; 
    background: var(--line-color);
    border-radius: 3px;
    transition: background 0.3s ease;
    position: relative;
}

/* Vergrößert die Klickfläche unsichtbar nach oben und unten */
.nav-line::after {
    content: '';
    position: absolute;
    top: -15px;
    bottom: -15px;
    left: 0;
    right: 0;
}

.nav-line:hover {
    background: var(--text-color);
}

.nav-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 50%;
    top: 50%;
    left: 0;
    /* Zentriert den Punkt vertikal und sorgt für glatte Bewegung */
    transform: translateY(-50);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    pointer-events: none; /* Punkt stört nicht beim Klicken */
}


/* SERVUS SECTION */
.servus-section {
    padding: 100px var(--spacing);
    text-align: center;
    z-index: 10;
}

.servus-text {
    font-size: 10vw;
    font-weight: 800;
    color: var(--accent-color);
    opacity: 0.4;
    text-transform: lowercase;
}

/* Servus Titel Styling */
.servus-title {
    font-size: 10rem;
    cursor: pointer;
    transition: all 0.4s ease;
    mix-blend-mode: difference;
    display: inline-block; /* Wichtig, damit transform funktioniert */
    transform: scaleY(2.5); /*  Streckung */
    transform-origin: top;   /* Optional: Streckt nach unten statt von der Mitte aus */
    line-height: 1;
    margin-bottom: 200px;
}

.servus-title:hover {
    color: var(--accent-color) !important;
    mix-blend-mode: normal;
    text-shadow: 0 0 15px var(--accent-color);
}

.about-drawer {
    max-height: 0; /* Startet geschlossen */
    overflow: hidden;
    transition: max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 0px solid var(--text-color);
    margin-bottom: 40px;
}

.about-drawer.is-open {
    max-height: 700px; 
    border-bottom: 1px solid var(--text-color);
    padding-bottom: 40px;
}

.about-drawer-inner {
    max-width: 1200px; 
    margin: 0 auto;
  
}
.about-content {
    display: flex;
    align-items: center;
    width: 100%;
}

.about-image {
    position: relative;
    z-index: 5;
    display: flex;
    width: 50%;
    height: 200px;
    object-fit: cover;
}

.about-text {
    width: 100%;
    text-align: left;
    padding: 20px;
}

.living-room-controls {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center; 
    align-items: flex-end;   
    gap: 80px;
    margin: 40px auto 60px auto;
    padding: 20px;
    border-bottom: 1px solid var(--text-color);
    max-width: 1200px; 
}

.plattenspieler {
    position: relative;
    width: auto;  
    height: auto;
    background: none; 
    border-radius: 8px;
    padding: 0;
}
.platte {
    position: absolute;
    top: 50%;
    left: 40%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(126, 126, 126,0.5);
    border-radius: 50%;
    z-index: 1;
}
.platte.playing {
    background: #398a20; 
    animation: rotateRecord 3s linear infinite; /* Drehung */
}

@keyframes rotateRecord {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.platte .label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 15px;
    height: 15px;
    background: var(--text-color);
    border-radius: 50%;
}
.turntable-base {
    position: relative;
    width: 100px;
    height: 80px;
    background: var(--text-color); 
    border: 2px solid var(--text-color);
    border-radius: 4px;
    margin-bottom: 0; 
}
.tonarm-pivot {
    position: absolute;
    top: 5px; 
    right: 5px;
    width: 16px;
    height: 16px;
    background: #333;
    border-radius: 50%;
    z-index: 10;
}
.tonarm {
    position: absolute;
    top: 8px; 
    left: 6px;
    width: 4px;
    height: 60px; 
    background: #999;
    border-radius: 2px;
    transform-origin: top center;  
    transition: transform 0.8s cubic-bezier(0.6, 0, 0.2, 1);
}

.tonarm::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -4px;
    width: 12px;
    height: 8px;
    background: #333;
    transform: rotate(10deg); 
}

.tonarm.active {
    transform: rotate(45deg);
}

.gadget-item, .plattenspieler {
    display: flex;
    flex-direction: column;
    align-items: center;    
    width: auto; 
}
.lamp-button {
    display: flex;
    justify-content: center;
    width: 100px;
    height: 80px; 
    margin-bottom: 0;
}
.lamp-svg {
    height: 100%; 
    width: auto;
}
.gadget-label {
    margin-top: 15px; 
}

#water-fill {
    fill: var(--text-color);
    opacity: 0.2;
    transition: fill 0.5s ease, opacity 0.5s ease, transform 0.6s ease;
}
#water-fill.ready-to-clean {
    fill: #0077ff !important;
    opacity: 0.7 !important;
}
.water-svg {
    cursor: pointer;
    transition: transform 0.3s ease;
}
.water-svg:active {
    transform: scale(0.9) rotate(5deg);
}
.glass-body {
    stroke: var(--text-color);
    stroke-width: 3;
    fill: none;
}
.water-line {
    stroke: var(--text-color);
    stroke-width: 2;
    stroke-dasharray: 4 2;
}
@keyframes slosh {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(-100deg); }
    50% { transform: rotate(-150deg); }
    75% { transform: rotate(-150deg); }
    100% { transform: rotate(0deg); }
}
.pouring-action {
    transform: translateY(-150px); 
}
.sloshing {
    animation: slosh 1.6s ease-in-out;
}

.contact-section {
    margin-top: 20px;
}
.contact-button {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid var(--text-color);
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-transform: lowercase;
}
.contact-details {
    display: none; 
    margin-top: 15px;
    padding-top: 15px;
    animation: fadeIn 0.3s ease;
}
.contact-details p {
    font-size: 0.9rem;
    margin: 5px 0;
    opacity: 0.8;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
.contact-button:hover {
    background: var(--accent-color);
    color: var(white);
    border: 1px solid var(--bg-color);
}

/* Canvas Auflösung */
#permanent-canvas {
    transition: filter 3.5s ease, opacity 3.5s ease;
}
.canvas-dissolving {
    filter: blur(10px) brightness(1.2);
    opacity: 0;
    transition: filter 3.5s ease-in, opacity 3.5s ease-in;
}
#permanent-canvas {
    transition: filter 0.3s ease, opacity 0.3s ease;
}

/* --- Tabellen Styling --- */
.nav-table th {
    text-align: left;
    padding: 8px;
    border-bottom: 1px solid #ddd;
    opacity: 0.5;
    font-weight: normal;
}
.nav-table td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.nav-table {
    width: 100%;
    border-collapse: collapse;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing);
    font-size: 0.85rem;
    text-transform: lowercase;
}

.nav-table tr {
    transition: background-color 0.3s ease, color 0.3s ease;
    border-bottom: 1px solid var(--line-color);
}


.nav-table tr.active-hover {
    background-color: var(--table-hover-bg) !important;
    color: var(--table-hover-text) !important;
}
.nav-table tr.neighbor-hover {
    background-color: var(--table-neighbor-bg);
}
.nav-table tr.neighbor2-hover {
    background-color: var(--table-neighbor2-bg);
}


/* PROJECTS SECTION */

.projects, .project-container, .project-media-side {
    position: relative;
    z-index: 100 !important; 
    pointer-events: auto !important;
}

.projects-fullscreen {
    position: relative;
}

.fixed-title-container {
    position: fixed;
    top: 50%;
    left: 20%;
    transform: translate(-50%, -50%);
    z-index: 100;
    pointer-events: none; /* Klicks gehen durch den Text auf die Bilder */
    text-align: center;
    width: 100%;
}

#dynamic-project-title {
    font-size: clamp(rem, 12vw, 10rem);
    font-weight: 200;
    text-transform: lowercase;
    color: white;
    margin: 0;
    transition: opacity 0.2s ease-in-out; /* Sanfter Wechsel beim Texttausch */
}

/* Die Bilder-Slides */
.project-slide {
    position: relative;
    height: 100vh;
    width: 100%;
    cursor: pointer;
    overflow: hidden;
}
.slide-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

/*projekte-popups-layout*/
#project-overlay {
    display: none; /* Standardmäßig unsichtbar */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color) !important; 
    color: var(--text-color);
    z-index: 9999; 
    overflow-y: auto; 
}
.modal {
    padding: 0;
}
.modal-content {
    display: flex;
    flex-direction: column; /* Bild oben, Text unten */
    height: 100vh;
    max-width: 1200px; /* Gleiche Breite wie deine Tabelle/About */
    margin: 0 auto;
    padding: 60px 20px;
}

/* Galerie-Container */
.modal-gallery {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 70vh; /* Festgelegte Höhe für das Bild */
    margin: 20px 0;
}
.modal-gallery button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 40px;
    font-weight: 100;
    color: var(--text-color) !important;
    padding: 40px; /* Große Klickfläche */
    opacity: 0.3;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 100;
}
.modal-gallery button:hover {
    opacity: 1;
}
.modal-gallery button:first-of-type {
    left: 0; /* Linker Pfeil am Rand */
}
.modal-gallery button:last-of-type {
    right: 0; /* Rechter Pfeil am Rand */
}

.image-viewport {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
#modal-img {
    max-width: 80%; /* Platz für die Pfeile lassen */
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* Der Schließen-Button (X) oben rechts */
.close-overlay {
    position: fixed;
    top: 30px;
    right: 40px;
    font-size: 100px;
    font-weight: 200;
    line-height: 1;
    color: var(--text-color) !important;
    z-index: 10001;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.5;
}

.close-overlay:hover {
    opacity: 1;
    transform: rotate(90deg);
}


/* Textbereich */
.modal-info {
    padding: 40px 0;
    text-align: left;
    text-transform: lowercase;
}
.info-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    text-transform: lowercase;
}
#image-counter {
    font-size: 0.8rem;
    opacity: 0.4;
}
#modal-description {
    max-width: 600px;
    margin-top: 15px;
    text-transform: lowercase;
}



/* FOOTER */
.footer {
    padding: 60px var(--spacing);
    text-align: center;
    border-top: 1px solid #ddd;
    font-size: 0.9rem;
    opacity: 0.5;
}
.impressum-trigger {
    display: inline-block;
    margin-top: 10px;
    font-size: 20px; 
    text-transform: lowercase;
    letter-spacing: 1px;
    color: var(--text-color);
    text-decoration: none;
    transition: opacity 0.3s;
}


.impressum-box {
    display: none; /* Erstmal versteckt */
    margin-top: 30px;
    font-size: 11px;
    line-height: 1.6;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    padding: 20px;
    border-top: 1px solid var(--line-color);
}

.impressum-box.show {
    display: block;
}

/* RESPONSIVE DESIGN

AB HIER: Nur Anweisungen für Mobile */

@media screen and (max-width: 768px) {
 
    .hero-title {
        font-size: 4rem;
        margin-bottom: 20px; 
    }
    .hero-subtitle {
        font-size: 2rem;
    }

    .draw-hint {
        opacity: 0;
    }

    .header-compact-container {
        flex-direction: row; /* Sicherstellen, dass nichts untereinander rutscht */
        padding: 0 20px;
    }

    .project-layout { grid-template-columns: 1fr; }
    .project-info-side { position: static; }
    .project-media-item { height: 45vh; min-width: 300px; }
 
    .living-room-controls {
        flex-direction: column; 
        align-items: center;
        padding: 40px 20px;
        height: auto; 
        border-bottom: 1px solid var(--text-color);
        max-width: 90%;
    }

    .servus-table-container {
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }

    .servus-title {
        font-size: 5rem;        
        margin-bottom: 60px;
        transform: scaleY(2); 
    }

    .gadget-item, .plattenspieler {
        width: 100%; 
        justify-content: center;
    }
    
    #permanent-canvas {
        height: 100vh; /* Fest auf die Höhe des Bildschirms */
    }
}