/* Grens Corridor Gallery — Frontend Styles */

/* ============================================================
   WRAP & LAYOUT
============================================================ */
.grens-wrap {
    position: relative;
    width: 100%;
    /* Laat de wrap zijn eigen stacking context zijn */
}

/* ============================================================
   INTRO
============================================================ */
.grens-intro {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 40px 40px;
    background: #0a0a0a;
    color: #fff;
}
.grens-intro-label {
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #8DC63F;
    margin-bottom: 20px;
}
.grens-intro-title {
    font-size: clamp(48px, 9vw, 108px);
    font-weight: 500;
    line-height: 1.0;
    letter-spacing: -0.03em;
    margin: 0 0 24px;
    color: #fff;
}
.grens-intro-text {
    font-size: 16px;
    color: rgba(255,255,255,0.45);
    max-width: 420px;
    line-height: 1.8;
    margin: 0 0 48px;
}
.grens-scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.3);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: grens-floatdown 2s ease-in-out infinite;
}
.grens-scroll-line {
    display: block;
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(141,198,63,0.5), transparent);
    margin-top: 4px;
}
@keyframes grens-floatdown {
    0%,100% { transform: translateY(0); opacity: .35; }
    50%      { transform: translateY(8px); opacity: .7; }
}

/* ============================================================
   SCROLL STAGE (reserveert scrollruimte)
============================================================ */
.grens-stage {
    /* Hoogte wordt via JS ingesteld */
    background: #0a0a0a;
}

/* ============================================================
   FIXED OVERLAY (de corridor zelf)
============================================================ */
.grens-fixed {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.5s ease;
    background: #0a0a0a;
}
.grens-fixed.grens-visible {
    opacity: 1;
}

/* Progress bar */
.grens-progress {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: rgba(255,255,255,0.05);
}
.grens-progress-fill {
    height: 100%;
    background: #8DC63F;
    width: 0%;
    transition: width 0.1s linear;
}

/* ============================================================
   GALERIE LAYOUT
============================================================ */
.grens-gallery-outer {
    display: flex;
    align-items: center;
    gap: 48px;
}

/* ============================================================
   3D SCENE & WORLD
   KRITIEKE REGELS — zie claude.md voor uitleg
============================================================ */
.grens-scene {
    width: min(520px, 80vmin);
    height: min(520px, 80vmin);
    flex-shrink: 0;
    position: relative;
    overflow: visible;          /* NIET hidden — zijmuren moeten zichtbaar zijn */
    perspective: 800px;
    perspective-origin: 50% 50%;
}

.grens-world {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    /* GEEN perspective hier — dat breekt de werking */
    /* GEEN overflow:hidden — dat annuleert preserve-3d */
}

.grens-photo-frame {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
}

/*
  pL: linker paneel — scharnier links, rechterkant draait achterwaarts
  pR: rechter paneel — scharnier rechts, linkerkant draait achterwaarts
  img is 200% breed zodat de juiste helft (links/rechts) van de foto zichtbaar is
*/
.grens-pL,
.grens-pR {
    position: absolute;
    top: 0;
    height: 100%;
    width: 50%;
    backface-visibility: hidden;
    will-change: transform;
    overflow: hidden;           /* knipt de foto af op de vouwlijn */
}
.grens-pL {
    left: 0;
    transform-origin: left center;
}
.grens-pR {
    right: 0;
    transform-origin: right center;
}

.grens-pL img {
    position: absolute;
    top: 0; left: 0;
    width: 200%; height: 100%;
    object-fit: cover;
    object-position: left center;
    pointer-events: none;
    display: block;
}
.grens-pR img {
    position: absolute;
    top: 0; right: 0;
    width: 200%; height: 100%;
    object-fit: cover;
    object-position: right center;
    pointer-events: none;
    display: block;
}

/* Slagschaduw bij het openklappen */
.grens-pL .grens-sh {
    position: absolute; inset: 0;
    background: linear-gradient(to right, transparent 30%, rgba(0,0,0,0.88));
    opacity: 0;
    pointer-events: none;
}
.grens-pR .grens-sh {
    position: absolute; inset: 0;
    background: linear-gradient(to left, transparent 30%, rgba(0,0,0,0.88));
    opacity: 0;
    pointer-events: none;
}

/* ============================================================
   COUNTER & SIDEBAR
============================================================ */
.grens-counter {
    position: absolute;
    bottom: -28px; right: 0;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.25);
    font-family: 'DM Sans', system-ui, sans-serif;
}

.grens-sidebar {
    width: 170px;
    flex-shrink: 0;
    color: #fff;
    opacity: 0;
    transform: translateX(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}
.grens-sidebar.grens-show {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}
.grens-sidebar-type {
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8DC63F;
    margin-bottom: 10px;
    font-family: 'DM Sans', system-ui, sans-serif;
}
.grens-sidebar-text {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    line-height: 1.7;
    font-family: 'DM Sans', system-ui, sans-serif;
    margin-bottom: 12px;
}
.grens-sidebar-link {
    display: inline-block;
    font-size: 12px;
    color: #8DC63F;
    text-decoration: none;
    letter-spacing: 0.06em;
    border-bottom: 1px solid rgba(141,198,63,0.3);
    padding-bottom: 2px;
    font-family: 'DM Sans', system-ui, sans-serif;
}
.grens-sidebar-link:hover {
    border-color: #8DC63F;
    color: #a8d95f;
}

/* ============================================================
   OUTRO
============================================================ */
.grens-outro {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 40px;
    gap: 20px;
    background: #0a0a0a;
    color: #fff;
}
.grens-outro p {
    font-size: 14px;
    color: rgba(255,255,255,0.3);
    font-family: 'DM Sans', system-ui, sans-serif;
}
.grens-outro a {
    display: inline-block;
    padding: 13px 32px;
    border: 0.5px solid rgba(141,198,63,0.4);
    color: #8DC63F;
    text-decoration: none;
    font-size: 13px;
    letter-spacing: 0.06em;
    border-radius: 1px;
    font-family: 'DM Sans', system-ui, sans-serif;
    transition: border-color 0.2s, color 0.2s;
}
.grens-outro a:hover {
    border-color: #8DC63F;
    color: #a8d95f;
}

/* ============================================================
   SEO-LIJST (verborgen voor bezoekers, zichtbaar voor crawlers)
============================================================ */
.grens-seo-list {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 800px) {
    .grens-sidebar { display: none; }
    .grens-gallery-outer { gap: 0; }
}
@media (max-width: 480px) {
    .grens-intro-title {
        font-size: clamp(40px, 14vw, 72px);
    }
    .grens-scene {
        width: 92vw;
        height: 92vw;
    }
}
