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

html, body {
    margin: 0;
    padding: 0;
    background-color: #000;
    color: #f5f5f5;
    font-family: 'Montserrat', sans-serif;
    overflow: hidden; /* Disable scrolling since interaction is click-based */
    user-select: none;
    cursor: pointer;
}

#stage {
    position: relative;
    width: 100vw;
    height: 100vh;
    z-index: 2;
}

section {
    height: 100vh;
    width: 100vw;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 60px 20px;
    pointer-events: none; /* Allows click events to pass to body */
}

#navigation-hub {
    justify-content: flex-end;
    pointer-events: auto;
}

/* --- SCRIPT & TYPOGRAPHY --- */
.script-text {
    font-family: 'Felipa', cursive;
    text-align: center;
    color: #fcf8f2;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.7), 0px 0px 25px rgba(0, 0, 0, 0.5);
    font-weight: 400;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

#hero h1 {
    font-size: clamp(2.3rem, 5.5vw, 4.5rem);
    margin-top: 10vh;
}

#hero .quote {
    font-size: clamp(1.4rem, 3.2vw, 2.3rem);
    margin-bottom: 15vh;
    max-width: 850px;
    line-height: 1.4;
}

/* --- IMMERSIVE BACKGROUNDS --- */
.bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

.bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    transition: opacity 1.2s ease-in-out;
}

.bg1 {
    background-image: url('images/image1.JPG');
    z-index: 1;
}

.bg2 {
    background-image: url('images/image2.JPG');
    z-index: 2;
    opacity: 0;
}

/* --- CARDS & REFLECTIONS --- */
.cards-container {
    width: 100%;
    max-width: 1100px;
    display: flex;
    justify-content: center;
    gap: 8%;
    margin-bottom: 10vh;
    padding: 0 20px;
    transition: opacity 1s ease, transform 1s ease;
}

.profile-card {
    width: 28%;
    aspect-ratio: 2 / 3;
    text-decoration: none;
    position: relative;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    margin-bottom: 80px;
    cursor: pointer;
}

.profile-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.profile-card .label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.85) 80%);
    padding: 40px 15px 25px 15px;
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
}

@media (min-width: 769px) {
    .profile-card::after {
        content: "";
        position: absolute;
        top: 101%;
        left: 0;
        width: 100%;
        height: 33%;
        transform: scaleY(-1);
        background-size: cover;
        background-position: bottom;
        opacity: 0.2;
        pointer-events: none;
        filter: blur(2px);
    }

    .profile-card[href="friedrich.html"]::after {
        background-image: linear-gradient(to top, rgba(0,0,0,0.85) 10%, rgba(0,0,0,0) 90%), url('images/image3.jpg');
    }
    .profile-card[href="christine.html"]::after {
        background-image: linear-gradient(to top, rgba(0,0,0,0.85) 10%, rgba(0,0,0,0) 90%), url('images/image4.png');
    }

    .profile-card:hover {
        transform: translateY(-10px) scale(1.02);
        box-shadow: 0 25px 50px rgba(0,0,0,0.8);
    }
}

/* --- ANIMATION HELPERS --- */
.hidden {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(20px);
}

.fade-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.fade-out {
    opacity: 0 !important;
    transform: translateY(-20px) !important;
}

/* --- PULSING ACTION INDICATOR --- */
#click-indicator {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    transition: opacity 0.5s ease;
}

.chevron {
    width: 14px;
    height: 14px;
    border-right: 2px solid rgba(255, 255, 255, 0.85);
    border-bottom: 2px solid rgba(255, 255, 255, 0.85);
    transform: rotate(45deg);
    animation: pulseChevron 2s infinite;
}

@keyframes pulseChevron {
    0% {
        opacity: 0.3;
        transform: rotate(45deg) translate(0, 0);
    }
    50% {
        opacity: 1;
        transform: rotate(45deg) translate(5px, 5px);
    }
    100% {
        opacity: 0.3;
        transform: rotate(45deg) translate(0, 0);
    }
}

/* --- MOBILE LAYOUT --- */
@media (max-width: 768px) {
    .cards-container {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        margin-bottom: 4vh;
    }

    .profile-card {
        width: 55%;
        max-width: 200px;
        margin-bottom: 0;
    }

    .profile-card .label {
        padding: 20px 10px 10px 10px;
    }
}