/* BESTAND: styles/04-navigation.css
 * Header, taalkeuze, mobiel menu en overgang/voortgang.
 * Overzicht: HANDLEIDING.md → Vormgeving; laadvolgorde: index.html.
 */
/* ==========================================================================
   03. HEADER, NAVIGATIE EN PAGINAOVERGANG
   ==========================================================================  */

/* 03A. Header en hoofdmenu ------------------------------------------------ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    background: rgba(247, 244, 239, 0.9);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 78px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-raven {
    scale: 79%;
    margin-left: -12px;
    display: block;
    width: 34px;
    height: auto;
    flex: 0 0 auto;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.brand-name {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.brand-tag {
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--faint);
}

/* Taalkeuze in header én geopend menu. De actieve taal heeft een onderstreping. */
.header-controls { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.language-switch { display: flex; align-items: center; gap: 2px; }
.language-button {
    min-width: 32px;
    min-height: 44px;
    padding: 8px 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-underline-offset: 5px;
}
.language-button[aria-pressed="true"] { color: var(--text); text-decoration: underline; }
.language-button:hover { color: var(--text); }
.language-button:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; border-radius: 4px; }
@media (max-width: 380px) {
    .header-inner { gap: 6px; }
    .header-controls { gap: 6px; }
    .language-button { min-width: 30px; }
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    color: var(--faint);
    transition: color 0.2s ease;
}

.nav-link.active,
.nav-link:hover {
    color: var(--text);
}

.header-nav.sb-expanded-nav {
    gap: clamp(8px, 1.2vw, 24px);
}

.header-nav.sb-expanded-nav .nav-link {
    white-space: nowrap;
}

/* Extra ruimte voor de taalkeuze; de projectlayout houdt zijn eigen breakpoint. */
@media (min-width: 1181px) {
    .header-menu-button { display: none; }
}

@media (max-width: 1180px) {
    .header-nav {
        display: none;
    }
}

@media (min-width: 1081px) and (max-height: 980px) {
    .header-inner {
        min-height: 68px;
    }
}

@media (min-width: 1081px) and (max-height: 820px) {
    .header-inner {
        min-height: 62px;
    }

    .brand-tag {
        font-size: 10px;
    }
}

/* 03B. Volledig schermmenu ------------------------------------------------ */

.menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: var(--bg);
    display: flex;
    /* Native dialog: behoud de bestaande schermvullende vormgeving.
       De browser verzorgt focusbegrenzing en maakt de achtergrond inert. */
    width: 100%;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    border: 0;
    padding: 0;
    color: var(--text);
}

.menu-overlay:not([open]) { display: none; }

.menu-inner {
    width: min(1320px, calc(100vw - 32px));
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 24px 0;
}

.menu-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.menu-content {
    display: grid;
    grid-template-columns: 1fr 0.7fr;
    gap: 40px;
    flex: 1;
    align-items: end;
    padding: 44px 0;
}

.menu-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-link {
    font-size: clamp(2rem, 5vw, 3.6rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    color: var(--faint);
}

.menu-link.active,
.menu-link:hover {
    color: var(--text);
}

.menu-meta {
    border-top: 1px solid var(--line);
    padding-top: 20px;
    color: var(--muted);
    line-height: 1.8;
}

.menu-overlay.sb-expanded-menu {
    overflow-y: auto;
    overscroll-behavior: contain;
}

@media (max-width: 1080px) {
    .menu-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .menu-link {
        font-size: 2.2rem;
    }
}

/* 03C. Voortgang en paginaovergang ------------------------------------------------ */

.progress-bar {
    position: fixed;
    inset: 0 0 auto 0;
    height: 3px;
    background: rgba(17, 17, 17, 0.1);
    z-index: 120;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(
        90deg,
        #111111 0%,
        #66ba79 18%,
        #ff5a5f 34%,
        #0081a7 50%,
        #deb047 68%,
        #7b61ff 84%,
        #111111 100%
    );
    background-size: 100vw 100%;
    transition: width 0.12s linear;
}

.page-transition {
    animation: pageFade 0.35s ease both;
}

@keyframes pageFade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
