/* --- CSS Variabelen voor Light/Dark Mode --- */
:root {
    --bg-color: #d8ceb9; 
    --text-main: #1a1a1a;
    --text-sub: #ffffff;
    --bottom-bar-bg: #f4f4f4;
    --particle-color: rgba(0, 0, 0, 0.2);
    --menu-text: #777;
    --ball-glow: rgba(255, 183, 77, 0.4);
    
    /* Variabelen voor de realistische textuur en lichtval */
    --ball-light-diffuse: #ffb74d;
    --ball-light-highlight: rgba(255, 255, 255, 0.8);
    --ball-shadow-base: #b04300;
}

body.dark-mode {
    --bg-color: #121212;
    --text-main: #f4f4f4;
    --text-sub: #bbbbbb;
    --bottom-bar-bg: #1e1e1e;
    --particle-color: rgba(255, 255, 255, 0.3);
    --menu-text: #ccc;
    --ball-glow: rgba(255, 183, 77, 0.6);
    
    /* Pas textuur en lichtval aan voor dark mode */
    --ball-light-diffuse: #e67e22;
    --ball-light-highlight: rgba(255, 255, 255, 0.6);
    --ball-shadow-base: #8e2a00;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.4s ease, color 0.4s ease;
}

body {
    overflow: hidden; 
    background-color: var(--bg-color);
    color: var(--text-main);
    position: relative; 
    
    /* Zorg dat tekst niet geselecteerd kan worden (Beveiliging) */
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
}

/* --- Particle Achtergrond --- */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none; 
}

/* --- Interactieve 3D Getextureerde Bal --- */
#interactive-ball {
    position: fixed;
    /* Grote bal */
    width: 150px;
    height: 150px;
    border-radius: 50%;
    
    /* Complexere gradiënten voor 3D volume en textuur-effect */
    background: 
        /* 1. Specular highlight (lichtvlek) top-left */
        radial-gradient(circle at 35% 35%, var(--ball-light-highlight) 2%, transparent 20%),
        /* 2. Putjes textuur simulatie (dimples) overlappend */
        radial-gradient(circle, rgba(0,0,0,0.08) 1px, transparent 1px) 0 0/15px 15px,
        radial-gradient(circle, rgba(0,0,0,0.08) 1px, transparent 1px) 7px 7px/15px 15px,
        /* 3. Hoofd-diffuse kleur */
        radial-gradient(circle at center, var(--ball-light-diffuse) 0%, var(--ball-shadow-base) 100%);
    
    /* Meng de gradiënten voor het getextureerde effect */
    background-blend-mode: soft-light, overlay, normal;

    /* Realistischere schaduw (volume en glow) */
    box-shadow: 
        inset -10px -10px 20px rgba(0,0,0,0.5), /* Binnenste schaduw voor diepte */
        0 15px 30px rgba(0,0,0,0.3),            /* Externe slagschaduw voor realisme */
        0 20px 40px var(--ball-glow);           /* De oorspronkelijke glow */

    z-index: 5; 
    pointer-events: none; 
    
    /* Transition voor de willekeurige sprong op scroll (zoals in vorige versie) */
    transition: left 0.8s ease-out, top 0.8s ease-out, width 0.3s, height 0.3s; 
    
    /* ONEINDIGE ZWEEF ANIMATIE TOEVOEGEN */
    animation: float 4s ease-in-out infinite;
}

/* --- Zweef Keyframes Animatie --- */
@keyframes float {
    0% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(0, -15px); /* Zweef 15px omhoog */
    }
    100% {
        transform: translate(0, 0);
    }
}

/* --- Dark Mode Toggle --- */
#theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    background: #333;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

body.dark-mode #theme-toggle {
    background: #f4f4f4;
    color: #121212;
}

/* --- Horizontale Scroll Container --- */
.scroll-container {
    position: relative;
    z-index: 10;
    display: flex;
    width: 100vw;
    height: calc(100vh - 80px); 
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory; 
    scroll-behavior: smooth;
    /* Op mobiel swipen mensen horizontaal. Dit verbergt daarvoor de balken */
    -webkit-overflow-scrolling: touch; 
}

.scroll-container::-webkit-scrollbar {
    display: none;
}

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

/* --- Home Pagina Styling --- */
#home {
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.text-content {
    flex: 1;
    z-index: 2;
}

.text-content p {
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-bottom: 10px;
    font-weight: bold;
    color: var(--text-sub);
}

.text-content h1 {
    font-size: 5rem;
    line-height: 0.9;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.text-content h2 {
    font-size: 2.5rem;
    color: var(--text-sub);
}

.visual-content {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    z-index: 2;
}

/* --- Bottom Menu Bar --- */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 80px;
    background-color: var(--bottom-bar-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px; 
    z-index: 50;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.05);
}

.menu-item {
    text-decoration: none;
    color: var(--menu-text);
    font-size: 1rem; 
    font-weight: bold;
    letter-spacing: 1px;
    transition: transform 0.2s, color 0.3s; 
    padding: 10px;
}

.menu-item:hover {
    transform: scale(1.1);
}

#nav-design:hover { color: #00897b; }
#nav-build:hover { color: #f48fb1; }
#nav-market:hover { color: #e53935; }
#nav-measure:hover { color: #8e24aa; }
#nav-search:hover { color: #d81b60; }
#nav-strategy:hover { color: #039be5; }


/* ==================================================== */
/* MOBIELE WEERGAVE                    */
/* ==================================================== */
@media (max-width: 768px) {
    
    /* Maak de enorme letters kleiner op mobiel */
    .text-content h1 {
        font-size: 3rem;
    }
    
    .text-content h2 {
        font-size: 1.5rem;
    }
    
    .text-content p {
        font-size: 0.9rem;
    }

    /* Centreer alles op een klein scherm */
    .page-section {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }

    #home {
        justify-content: center;
    }

    /* Maak de bal kleiner op mobiel */
    #interactive-ball {
        width: 100px;
        height: 100px;
        background-size: initial; /* Textuur her-initialiseren */
    }

    /* Maak de dark-mode knop compacter */
    #theme-toggle {
        font-size: 0.8rem;
        padding: 8px 12px;
        top: 15px;
        right: 15px;
    }

    /* Menu aanpassingen voor mobiel */
    .bottom-bar {
        gap: 15px; /* Minder ruimte tussen de items */
        padding: 0 15px;
        justify-content: flex-start; /* Laat ze links beginnen ipv in het midden */
        overflow-x: auto; /* Voeg swipen toe als het menu breder is dan de telefoon */
        
        /* Verberg scrollbar in het menu zelf */
        -ms-overflow-style: none;  
        scrollbar-width: none;  
    }
    
    .bottom-bar::-webkit-scrollbar {
        display: none;
    }

    .menu-item {
        font-size: 0.85rem;
        white-space: nowrap; /* Zorg dat tekst zoals "STRATEGY" niet op Regels breekt */
    }
}