:root {
    --color-primary: #0a0a0f;
    --color-secondary: #14141e;
    --color-accent-gold: #c6a87c;
    --color-accent-green: #2d5a3d;
    --color-accent-rose: #8b4557;
    --color-text: #ffffff;
    --color-text-muted: rgba(255, 255, 255, 0.7);

    --font-display: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;

    --transition-slow: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    --transition-medium: 0.5s ease;
}

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

html,
body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    /* Prevent default scroll, we control it */
    background-color: var(--color-primary);
    color: var(--color-text);
    font-family: var(--font-body);
}

/* Header Navigation */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: flex-end;
    /* Align to right */
    align-items: center;
    transition: all 0.3s ease;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-accent-gold);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

@media (max-width: 768px) {
    .main-header {
        justify-content: center;
        padding: 1rem;
        background: rgba(10, 10, 15, 0.8);
        /* Darker background for readability on mobile */
        backdrop-filter: blur(10px);
    }

    .nav-menu {
        gap: 0.5rem;
        /* Tighter gap */
        font-size: 0.7rem;
        flex-wrap: wrap;
        /* Allow wrapping */
        justify-content: center;
    }

    .nav-link {
        font-size: 0.65rem;
        /* Smaller font to fit main items */
    }

    /* Force legal items to a new "row" visually */
    .legal-item {
        flex-basis: 45%;
        /* almost half width each */
        text-align: center;
        margin-top: 0.25rem;
        padding-top: 0.25rem;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        /* Subtle separator line */
    }
}

/* Scroll Container */
.scroll-container {
    height: 100vh;
    width: 100vw;
    overflow-y: scroll;
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

/* Section Styling */
.section {
    position: relative;
    height: 100vh;
    width: 100vw;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Backgrounds */
.section-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transform: scale(1.1);
    /* Slight zoom for parallax/movement */
    transition: transform 0.1s linear;
    /* Smooth mouse follow */
}

.section-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: linear-gradient(to bottom, rgba(10, 10, 15, 0.3), rgba(10, 10, 15, 0.8));
}

/* Content */
.content-wrapper {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
    padding: 2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease;
}

.section.active .content-wrapper {
    opacity: 1;
    transform: translateY(0);
}

.brand-badge {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: 0.6rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 400;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 300;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.logo-img {
    height: 90px;
    width: auto;
    object-fit: contain;
    margin: 2rem 0;
    /* Consistent vertical spacing */
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

/* Explicit override for large hero logos if needed, 
   but keeping height consistent is keys */
.logo-img-large {
    height: 100px;
    /* Unified height for all main logos */
    width: auto;
    object-fit: contain;
    margin: 2rem 0;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Glassmorphism container for dark logos on dark backgrounds */
.logo-container-glass {
    display: inline-block;
    background: rgba(255, 255, 255, 0.85);
    /* White with slight transparency */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 15px 30px;
    border-radius: 8px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
    margin: 2rem 0;
    transition: transform 0.3s ease;
}

.logo-container-glass:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.95);
}

/* Adjust logo inside the container to remove default margins since container has them */
.logo-container-glass .logo-img,
.logo-container-glass .logo-img-large {
    margin: 0;
    filter: none;
    /* Remove drop shadow from logo itself as container has it */
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--color-text);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.btn:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
}

/* Navigation Dots */
.nav-dots {
    position: fixed;
    right: 3rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border: 1px solid var(--color-accent-gold);
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0;
}

.dot.active {
    background: var(--color-accent-gold);
}

.dot.active::after {
    width: 24px;
    height: 24px;
    opacity: 1;
}

/* Value Group Connector */
.value-group-connector {
    position: absolute;
    right: 3px;
    /* Center with dots (dots are 6px wide) */
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 90;
    transition: all 0.5s ease;
}

/* Connect dots 3 and 4 (indices 2 and 3) */
/* This requires knowing the height between dots. 
   Assuming standard gap of 1.5rem + 6px dot height */
.nav-dots .value-group-line {
    position: absolute;
    width: 2px;
    background: rgba(255, 255, 255, 0.15);
    left: 2px;
    top: calc(1 * (1.5rem + 6px) + 3px);
    /* Start at 2nd dot center (Index 1) */
    height: calc(1.5rem + 6px);
    /* Distance to 3rd dot (Index 2) */
    z-index: -1;
}

/* Modals */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    /* Black w/ opacity */
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: rgba(20, 20, 25, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: auto;
    padding: 2rem;
    border-radius: 8px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    color: var(--color-text);
    font-family: var(--font-body);
}

.modal-content h2,
.modal-content h3 {
    font-family: var(--font-display);
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.modal-body p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: var(--color-text-muted);
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.close-modal:hover,
.close-modal:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .nav-dots {
        display: none;
    }

    /* Adjust font size for mobile to prevent overflow */
    .section-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
        word-break: break-word;
        /* Ensure long words like 'Unternehmensgruppe' wrap if needed */
        hyphens: auto;
    }

    .section-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
        /* Extra breathing room */
    }

    .content-wrapper {
        padding: 1.5rem;
        /* Ensure branding doesn't touch edges */
        width: 100%;
        overflow: hidden;
        /* Prevent horizontal scroll triggers */
    }

    /* Fix Logo Overflow on Mobile */
    .logo-container-glass {
        padding: 10px 15px;
        /* Reduce padding to save space */
        max-width: 100%;
        /* Ensure container respects parent width */
        width: auto;
        display: inline-block;
    }

    .logo-img-large {
        max-width: 100%;
        /* Allow image to shrink */
        height: auto;
        /* Maintain aspect ratio */
        max-height: 80px;
        /* Slightly smaller max height on mobile */
    }
}