/* --- BASIS & RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    font-family: 'DM Sans', sans-serif;
    color: #222;
    background-color: #fff;
    width: 100%;
    height: 100%;
    line-height: 1.3;
    letter-spacing: 0;
    overflow: hidden;
}

/* --- SCROLL SNAPPING LOGIK (Desktop) --- */
.scroll-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

.snap-section {
    min-height: 100vh;
    width: 100vw;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 10%;
}

/* --- NAVIGATION --- */
#main-nav {
    position: fixed;
    top: 40px;
    left: 40px;
    z-index: 1000;
    transition: all 0.3s ease;
}

#main-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

#main-nav a {
    text-decoration: none;
    font-size: 1.05rem;
    letter-spacing: 0;
    font-weight: 400;
    transition: color 0.3s ease;
}

#main-nav.nav-dark a { color: rgba(255, 255, 255, 0.936); }
#main-nav.nav-dark a:hover { color: #c0c0c0; }
#main-nav.nav-dark a.active { color: #ffffff44; }

#main-nav.nav-light a { color: #aaaaaa; }
#main-nav.nav-light a:hover { color: #666666; }
#main-nav.nav-light a.active { color: #000000; }

/* FIX: focus-visible für Tastaturnutzer */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #000;
    outline-offset: 3px;
}

/* --- MOBILE TRIGGER & OVERLAY --- */
/* FIX: Button-Reset, damit <button> wie vorher aussieht */
#mobile-menu-trigger {
    display: none;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
}

#nav-overlay {
    display: none;
}

/* --- 1. HERO SEKTION --- */
#hero { padding: 0; }
.hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; background-color: #111; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.8; }
.hero-logo { position: absolute; bottom: 40px; right: 40px; width: 35vw; max-width: 550px; z-index: 2; }

/* --- 2. TEAM SEKTION --- */
.team-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: 6vh;
    gap: 40px;
}

/* FIX: flex-basis statt gemischte max-width/width */
.team-text {
    flex: 1 1 50%;
    max-width: 55%;
}

.team-text h2 {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(2.5rem, 3.8vw, 4.5rem);
    line-height: 1.05;
    font-weight: 500;
    letter-spacing: 0;
    text-align: left;
    margin-bottom: 20px;
}

/* FIX: flex-basis statt nur width */
.team-images {
    position: relative;
    flex: 0 0 35vw;
    width: 35vw;
    aspect-ratio: 0.9;
    display: flex;
}

/* --- TEAM IMAGE WRAPPER & HOVER --- */
.team-img-wrapper {
    position: absolute;
    width: 65%;
    aspect-ratio: 4 / 5;
    overflow: hidden;

    /* Safari-Fix für saubere Kanten */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    /* Standard-Eigenschaft für alle anderen Browser */
    mask-image: radial-gradient(white, black);

    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.img-left { left: 0; top: 10%; z-index: 1; }
.img-right { right: -15%; bottom: -5%; z-index: 2; }

.team-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s ease;
}

/* Nur auf Geräten mit echter Maus anwenden */
@media (hover: hover) and (pointer: fine) {
    .team-img-wrapper:hover .team-img {
        transform: scale(1.03);
    }
    .team-img-wrapper:hover .info-overlay {
        opacity: 1;
    }
}

/* Auf Handys: nur JS-Klasse */
.team-img-wrapper.active .team-img {
    transform: scale(1.03);
}

/* Abdunkelung Overlay */
.info-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
    padding: 30px;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 3;
}

.team-img-wrapper:hover .info-overlay,
.team-img-wrapper.active .info-overlay {
    opacity: 1;
}

.info-group {
    margin-bottom: 12px;
}

.info-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 2px;
    text-transform: uppercase;
    font-family: 'DM Sans', sans-serif;
}

.info-value {
    display: block;
    font-size: 0.9rem;
    font-weight: 300;
    color: #fff;
    line-height: 1.4;
    max-width: 180px;
    font-family: 'DM Sans', sans-serif;
}

/* --- 3. PHILOSOPHY SEKTION --- */
.philosophy-container { max-width: 900px; margin: 0 auto; padding-top: 10vh; }
.phil-text { font-size: 1.3rem; line-height: 1.3; margin-bottom: 50px; color: #222; letter-spacing: 0; }
.phil-image-row { display: flex; gap: 30px; margin-bottom: 50px; }
.phil-image-row img { width: calc(50% - 15px); height: auto; object-fit: cover; aspect-ratio: 3 / 2; }

/* --- PROJECTS & PASSWORD GATE --- */

/* --- UPCOMING & PASSWORD GATE --- */
#upcoming {
    position: relative;
    padding-top: 100px; /* Platz für die Navigation */
}

/* Der Container mit den Projekten */
.projects-content {
    width: 100%;
    height: 100%;
    padding: 0 5%;
    /* Weicher Übergang, wenn der Blur entfernt wird */
    transition: filter 1s ease, opacity 1s ease; 
}

/* Der verschwommene Container - BEREINIGT */
.projects-content.locked {
    /* filter und opacity wurden entfernt, der Blur kommt jetzt vom Glas davor */
    user-select: none;
}

/* Das absolute Gate (spannt sich über die gesamte Sektion) */
.password-gate {
    position: absolute;
    inset: 0;
    z-index: 10;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px) grayscale(50%);
    -webkit-backdrop-filter: blur(15px) grayscale(50%);
}

/* NEU: Die magische Milchglasscheibe (Sticky) */
.gate-content {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%; /* Wichtig, damit es über die ganze Breite geht */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.gate-title {
    font-size: 2.5rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: #000;
}

.gate-subtitle {
    font-size: 1.1rem;
    margin-bottom: 40px;
    opacity: 0.7;
    color: #000;
}

/* Das minimalistische Eingabefeld */
.input-group {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #000;
    padding-bottom: 5px;
    pointer-events: auto; /* WICHTIG: Macht das Eingabefeld klickbar! */
}

#project-password {
    background: transparent;
    border: none;
    outline: none;
    color: #000;
    font-size: 1.5rem;
    font-family: 'DM Sans', sans-serif;
    width: 250px;
    text-align: center;
    letter-spacing: 0;
}

#submit-password {
    background: transparent;
    border: none;
    color: #000;
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    padding: 0 10px;
    transition: transform 0.3s ease;
}

#submit-password:hover {
    transform: translateX(5px);
}

.error-msg {
    color: #d9534f;
    margin-top: 15px;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.error-msg.show {
    opacity: 1;
}

/* --- PROJECT GRID STYLING (Bild links, Bullets rechts) --- */
.projects-headline {
    font-size: 2rem;
    font-weight: 500;
    letter-spacing: 0;
    margin-bottom: 50px;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 80px; /* Abstand zwischen den Projekten */
    padding-bottom: 100px;
}

.project-card {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 50% Bild, 50% Text auf Desktop */
    gap: 50px;
    align-items: center;
}

.project-image-wrapper img {
    width: 100%;
    aspect-ratio: 16 / 9; /* Breites Kino-Format */
    object-fit: cover;
}

/* Sicherheitshalber auch für die Projekt-Titel, falls die auch zu dick wirken */
.project-info h3 {
    font-size: 1.8rem;
    font-weight: 500;
    letter-spacing: 0;
    margin-bottom: 20px;
}

.project-info ul {
    list-style: none;
    font-size: 1.1rem;
    line-height: 1.6;
}

.project-info ul li {
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* Verhindert künstliches Faux-Bold bei den Projekt-Labels */
.project-info ul li strong {
    font-weight: 500;
}



/* Mobile Anpassung: Bild oben, Text unten */
@media (max-width: 900px) {
    .project-card {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* --- 4. CONTACT SEKTION --- */
.contact-logo { width: 60vw; max-width: 800px; height: auto; margin-bottom: 40px; display: block; margin-left: auto; margin-right: auto; }
.copyright { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); font-size: 0.75rem; color: #888888; font-weight: 300; letter-spacing: 0; text-align: center; width: 100%; }

/* NEU: Die E-Mail mit Hover-Effekt */
.contact-email {
    font-size: 1.5rem;
    color: #222;
    text-decoration: none;
    font-weight: 400;
    transition: opacity 0.3s ease;
}

.contact-email:hover {
    opacity: 0.5;
}

/* --- BACK TO TOP LOGO --- */
#back-to-top-logo { position: fixed; top: 40px; left: 50%; width: 200px; height: auto; z-index: 1001; cursor: pointer; opacity: 0; pointer-events: none; transform: translate(-50%, -15px); transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
#back-to-top-logo.visible { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
#back-to-top-logo:hover { opacity: 0.5; }

/* --- PHILOSOPHY SPEZIAL-STYLING --- */
.phil-divider {
    width: 100%;
    height: 1px;
    background-color: #000;
    margin: 50px 0;
    opacity: 0.8;
}

.phil-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: opacity 0.3s ease;
}

.phil-link:hover {
    opacity: 0.6;
}


/* ========================================== */
/* MOBILE VERSION (max-width: 900px)          */
/* ========================================== */

@media (max-width: 900px) {

    /* --- SAFARI FLOW FIX & SNAPPING OFF --- */
    body, html {
        overflow: visible !important;
        height: auto !important;
    }

    .scroll-container {
        height: auto !important;
        overflow: visible !important;
        scroll-snap-type: none !important;
    }

    .snap-section {
        padding: 100px 20px;
        min-height: 100dvh !important;
        scroll-snap-align: none !important;
    }

    #main-nav { display: none !important; }

    #mobile-menu-trigger {
        display: block;
        position: fixed;
        top: 40px;
        left: 20px;
        z-index: 2000;
        cursor: pointer;
        font-family: 'DM Sans', sans-serif;
        color: #fff;
        font-size: 1.05rem;
        font-weight: 400;
        mix-blend-mode: difference;
    }

    #nav-overlay {
        display: flex;
        position: fixed;
        top: 0; left: 0;
        width: 100%;
        height: 100dvh;
        background: #fff;
        z-index: 3000;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }
    #nav-overlay.open { opacity: 1; pointer-events: auto; }

    /* FIX: Button-Reset für overlay-close */
    .overlay-close {
        position: absolute;
        top: 40px; left: 20px;
        background: none;
        border: none;
        padding: 0;
        font-family: 'DM Sans', sans-serif;
        font-size: 1.05rem;
        font-weight: 400;
        cursor: pointer;
        color: #000;
    }

    .overlay-links { list-style: none; text-align: center; }
    .overlay-link {
        font-family: 'DM Sans', sans-serif;
        font-size: 2.5rem;
        letter-spacing: 0;
        text-decoration: none;
        color: #000;
        font-weight: 300;
        display: block;
        margin: 20px 0;
    }

    .hero-logo {
        right: 50% !important; bottom: 50% !important;
        transform: translate(50%, 50%) !important;
        width: 70vw !important; max-width: 300px;
    }

    .team-container {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding-top: 80px;
    }

    .team-text {
        flex: none;
        max-width: 100%;
    }

    .team-text h2 {
        font-size: clamp(1.5rem, 7.5vw, 2.5rem);
        text-align: left;
        margin-bottom: 40px;
        width: 100%;
    }

    .team-images {
        flex: none;
        width: 80vw;
        aspect-ratio: 1;
        height: auto;
    }

    .team-img-wrapper {
        width: 65%;
    }

    .img-left { left: 0; top: 5%; }
    .img-right { right: -5%; bottom: -2%; }

    .info-overlay { padding: 20px; }
    .info-value { font-size: 0.8rem; }
    .info-label { font-size: 0.6rem; }

    .philosophy-container { padding: 0; }
    .phil-divider { margin: 40px 0; }
    .phil-text { font-size: 1.1rem; line-height: 1.5; }
    .phil-image-row { flex-direction: column; gap: 20px; }
    .phil-image-row img { width: 100% !important; }

    .gate-content {
        height: 100vh;
        height: 100svh;
    }

    #back-to-top-logo { top: 20px; width: 60px; }
}
