/* =========================================================================
   settings (Inclusief responsieve tekstberekening)
   ========================================================================= */
:root {
    --bg-color: #48cbbd;
    --text-color: #111;   
    --line-color: #fef08a;
    --accent-color: #48cbbd;
    --font-size: 16px;  
    
    /* Dynamische berekening van de tekstgrootte op basis van de browserbreedte */
    --text-container-font-size: clamp(1.8rem, 3.8vw, 3.2rem);
}

@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('fonts/PlusJakartaSans-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Martina Light';
    src: url('fonts/TestMartinaPlantijn-Light.otf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

/* =========================================================================
   header body footer
   ========================================================================= */
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-color);
    color: #fef08a;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2em 3em;
    box-sizing: border-box;
    background: #48CBBD;
    background: linear-gradient(0deg, rgba(72, 203, 189, 0) 0%, rgba(72, 203, 189, 1) 50%);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Brandmark & Beeldmerk: Twee zwarte cirkels van 2em diameter, 2px dik, links van de titel */
.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brandmark {
    display: flex;
    align-items: center;
    gap: 4px;
}

.circle-mark {
    width: 1.2em;
    height: 1.2em;
    border: 2px solid var(--text-color);
    border-radius: 50%;
    box-sizing: border-box;
    display: inline-block;
}

.header h1.logo {
    font-family: 'Martina Light', serif;
    font-size: var(--font-size);
    color: var(--text-color);
    margin: 0;
    user-select: none;

}

/* Minimalistisch ontworpen autoplay knop (fijn zwart omlijnd driehoekje) */
.autoplay-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    /* transition: transform 0.2s ease, opacity 0.2s ease;
    border-radius: 50%; */
}
/* .autoplay-btn:hover {
    transform: scale(1.1);
    background-color: rgba(0, 0, 0, 0.05);
}
.autoplay-btn:active {
    transform: scale(0.95);
} */

.hidden-element {
    display: none !important;
}

/* Custom scrollbar voor het instellingenpaneel */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(15, 76, 71, 0.15);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 76, 71, 0.3);
}

/* =========================================================================
   CANVAS & LAYOUT ELEMENTEN
   ========================================================================= */
/* Canvas Container met hoge z-index (vóór de tekst) */
.canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    z-index: 10;
    user-select: none;
    pointer-events: none;
}

/* Het Canvas element zelf */
.canvas-element {
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
    pointer-events: auto;
}
.canvas-element:active {
    cursor: grabbing;
}

/* Hoofdcontainer voor scrollbare tekst (Lage z-index) */
.scroll-wrapper {
    position: relative;
    z-index: 0;
    width: 100%;
    min-height: 300vh;
    pointer-events: none;
}

/* Eerste schermvullende spacer-container (ingesteld op 2/3 van de schermhoogte) */
.first-screen-container {
    width: 100%;
    height: 66.6vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    box-sizing: border-box;
}

/* =========================================================================
   INTERACTIE INDICATOREN & ANIMATIES
   ========================================================================= */

.minimal-arrow-bounce {
    align-self: center;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    animation: bounce 1.5s infinite;
    opacity: 0.8;
    display: none;
}

/* Bounce animatie */
@keyframes bounce {
    0%, 100% {
        transform: translateY(-8%);
        animation-timing-function: cubic-bezier(0.8,0,1,1);
    }
    50% {
        transform: none;
        animation-timing-function: cubic-bezier(0,0,0.2,1);
    }
}

/* =========================================================================
   TEXT CONTAINER & WRAPPER
   ========================================================================= */
.text-wrapper {
    width: 100%;
    padding: 0 24px 180px; 
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    pointer-events: none;
}

.text-container {
    max-width: 1100px; /* Slankere breedte voor essays */
    margin: 0 auto;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 600;
    font-size: var(--text-container-font-size); /* Responsieve tekstgrootte */
    word-break: break-word;
    line-height: 1.1;
    color: var(--text-color);
}

.text-container p {
    margin-bottom: 2em;
}
.text-container p:last-child {
    margin-bottom: 0;
}

/* Contactlink fix */
.contact-link {
    position: relative;
    /* Zorgt dat dit element bovenop het canvas ligt voor klikbaarheid */
    z-index: 500;
    /* pointer-events: auto; */
    color: inherit;
    /* text-decoration: underline; */
}
/* =========================================================================
   PARTNERS & LOGOS (Nu meescrollend onderaan de pagina)
   ========================================================================= */
.logo-grid {
    width: 100%;
    max-width: 960px;
    margin: 15vh auto 0; /* Royale spacing onder de essay-tekst */
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    /* gap: 2em; */
    pointer-events: auto;

}


/* Volledig sobere logo-containers: geen achtergrond, geen randen, geen afgeronde hoeken */
.logo-container {
    height: 3em;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1em;
}

@media (max-width: 768px) {

    .logo-grid {
        flex-wrap: wrap;
    }
        .logo-container {
            flex: 1 1 45%;
        }
}

.logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;

    & img {
        height: 100%;
        width: auto;
        object-fit: contain;
    }


}

.knaw{
        & img{
        height: 4em;
    }
}
.hva{
     max-height: 4em;
        & img{
       height: 4em;
    }
}
.nondescript{
        & img{
        height: 3em;
    }
}
.uva{
    max-height: 2.5em;
        & img{
        height: 2.5em;
    }
}


/* Vaste gradient fade overlay onderaan (houdt de kliks doorlatend) */
.footer-fade {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(180deg, rgba(72, 203, 189, 0) 0%, rgba(72, 203, 189, 1) 100%);
    z-index: 20;
    pointer-events: none;
}

/* =========================================================================
   PREMIUM GLASSMORPHISM SIDEBAR & BARS
   ========================================================================= */
.sidebar {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 25;
    width: 360px;
    max-height: calc(100vh - 32px);
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(15, 76, 71, 0.12);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    pointer-events: auto;
    color: #334155;
    box-sizing: border-box;
}

.sidebar.hidden-state {
    transform: translateX(-390px);
    opacity: 0;
    pointer-events: none;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid rgba(15, 76, 71, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-title-group {
    display: flex;
    flex-direction: column;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #0f4c47;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.sidebar-subtitle {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
    margin-bottom: 0;
}

.sidebar-close-btn {
    padding: 8px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar-close-btn:hover {
    background-color: #f0fdfa;
    color: #0f4c47;
}

.sidebar-content {
    padding: 24px;
    overflow-y: auto;
    flex-grow: 1;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.section-title {
    font-size: 12px;
    font-weight: 600;
    color: #0f4c47;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 12px;
}

.sidebar-divider {
    border: 0;
    border-top: 1px solid rgba(15, 76, 71, 0.08);
    margin: 8px 0;
}

/* =========================================================================
   ROULATIE VOLGORDE LIJST (INTERACTIEF)
   ========================================================================= */
.shape-cycle-list {
    background-color: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-sizing: border-box;
}

.shape-cycle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffff;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    font-size: 12px;
    box-sizing: border-box;
}

.shape-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shape-checkbox {
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #48cbbd;
}

.shape-label {
    font-weight: 500;
    color: #334155;
}

.shape-item-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.order-btn {
    padding: 4px;
    border-radius: 4px;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}
.order-btn:hover {
    background-color: #f1f5f9;
}
.order-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* =========================================================================
   SLIDERS, KOPPELINGEN & INPUT CONTROLS
   ========================================================================= */
.control-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}
.control-group:last-child {
    margin-bottom: 0;
}

.control-label-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.control-label {
    font-size: 12px;
    font-weight: 500;
    color: #475569;
}

.control-value {
    font-size: 12px;
    font-weight: 600;
    color: #0d9488;
}

.range-slider {
    width: 100%;
    height: 6px;
    background-color: #e2e8f0;
    border-radius: 9999px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    accent-color: #48cbbd;
    cursor: pointer;
}

.select-box {
    width: 100%;
    font-size: 12px;
    padding: 10px;
    border-radius: 8px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    outline: none;
    cursor: pointer;
    box-sizing: border-box;
    font-family: inherit;
}
.select-box:focus {
    border-color: #48cbbd;
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(240, 253, 250, 0.4);
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(204, 251, 241, 0.3);
    margin-bottom: 16px;
    box-sizing: border-box;
}

.toggle-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #48cbbd;
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

/* Buttons custom */
.btn-toggle {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    background-color: transparent;
    border: 1px solid #e2e8f0;
    color: #475569;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}
.btn-toggle:hover {
    background-color: #f8fafc;
}
.btn-toggle.active {
    border: 2px solid #48cbbd;
    background-color: rgba(240, 253, 250, 0.5);
    color: #0f4c47;
    font-weight: 600;
}

.btn-theme {
    padding: 8px 4px;
    font-size: 10px;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    color: #334155;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-sizing: border-box;
    font-family: inherit;
}
.btn-theme:hover {
    background-color: #f8fafc;
}
.btn-theme.active {
    border: 2px solid #48cbbd;
    background-color: #f0fdfa;
    color: #0f4c47;
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(15, 76, 71, 0.08);
    background-color: rgba(248, 250, 252, 0.5);
    display: flex;
    gap: 8px;
    box-sizing: border-box;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.btn-export {
    flex-grow: 1;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    background-color: #48cbbd;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
    font-family: inherit;
}
.btn-export:hover {
    background-color: #0d9488;
}

/* Zwevende instellingenknop */
.floating-btn {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 30;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(15, 76, 71, 0.1);
    color: #0f4c47;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}
.floating-btn:hover {
    background-color: #f0fdfa;
}
.floating-btn.scaled-down {
    transform: scale(0);
    pointer-events: none;
    opacity: 0;
}